Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 532514 | Differences between
and this patch

Collapse All | Expand All

(-)a/support/export/hostname.c (-7 / +7 lines)
Lines 91-97 host_ntop(const struct sockaddr *sap, char *buf, const size_t buflen) Link Here
91
 * Returns address info structure, or NULL if an error occurs.  Caller
91
 * Returns address info structure, or NULL if an error occurs.  Caller
92
 * must free the returned structure with freeaddrinfo(3).
92
 * must free the returned structure with freeaddrinfo(3).
93
 */
93
 */
94
__attribute_malloc__
94
__attribute__((__malloc__))
95
struct addrinfo *
95
struct addrinfo *
96
host_pton(const char *paddr)
96
host_pton(const char *paddr)
97
{
97
{
Lines 153-159 host_pton(const char *paddr) Link Here
153
 * if no information is available for @hostname.  Caller must free the
153
 * if no information is available for @hostname.  Caller must free the
154
 * returned structure with freeaddrinfo(3).
154
 * returned structure with freeaddrinfo(3).
155
 */
155
 */
156
__attribute_malloc__
156
__attribute__((__malloc__))
157
struct addrinfo *
157
struct addrinfo *
158
host_addrinfo(const char *hostname)
158
host_addrinfo(const char *hostname)
159
{
159
{
Lines 199-205 host_addrinfo(const char *hostname) Link Here
199
 * the string.
199
 * the string.
200
 */
200
 */
201
#ifdef HAVE_GETNAMEINFO
201
#ifdef HAVE_GETNAMEINFO
202
__attribute_malloc__
202
__attribute__((__malloc__))
203
char *
203
char *
204
host_canonname(const struct sockaddr *sap)
204
host_canonname(const struct sockaddr *sap)
205
{
205
{
Lines 234-240 host_canonname(const struct sockaddr *sap) Link Here
234
	return strdup(buf);
234
	return strdup(buf);
235
}
235
}
236
#else	/* !HAVE_GETNAMEINFO */
236
#else	/* !HAVE_GETNAMEINFO */
237
__attribute_malloc__
237
__attribute__((__malloc__))
238
char *
238
char *
239
host_canonname(const struct sockaddr *sap)
239
host_canonname(const struct sockaddr *sap)
240
{
240
{
Lines 266-272 host_canonname(const struct sockaddr *sap) Link Here
266
 *
266
 *
267
 * Caller must free the returned structure with freeaddrinfo(3).
267
 * Caller must free the returned structure with freeaddrinfo(3).
268
 */
268
 */
269
__attribute_malloc__
269
__attribute__((__malloc__))
270
struct addrinfo *
270
struct addrinfo *
271
host_reliable_addrinfo(const struct sockaddr *sap)
271
host_reliable_addrinfo(const struct sockaddr *sap)
272
{
272
{
Lines 313-319 out_free_hostname: Link Here
313
 * Caller must free the returned structure with freeaddrinfo(3).
313
 * Caller must free the returned structure with freeaddrinfo(3).
314
 */
314
 */
315
#ifdef HAVE_GETNAMEINFO
315
#ifdef HAVE_GETNAMEINFO
316
__attribute_malloc__
316
__attribute__((__malloc__))
317
struct addrinfo *
317
struct addrinfo *
318
host_numeric_addrinfo(const struct sockaddr *sap)
318
host_numeric_addrinfo(const struct sockaddr *sap)
319
{
319
{
Lines 361-367 host_numeric_addrinfo(const struct sockaddr *sap) Link Here
361
	return ai;
361
	return ai;
362
}
362
}
363
#else	/* !HAVE_GETNAMEINFO */
363
#else	/* !HAVE_GETNAMEINFO */
364
__attribute_malloc__
364
__attribute__((__malloc__))
365
struct addrinfo *
365
struct addrinfo *
366
host_numeric_addrinfo(const struct sockaddr *sap)
366
host_numeric_addrinfo(const struct sockaddr *sap)
367
{
367
{
(-)a/support/include/exportfs.h (-5 / +5 lines)
Lines 156-170 int secinfo_addflavor(struct flav_info *, struct exportent *); Link Here
156
156
157
char *				host_ntop(const struct sockaddr *sap,
157
char *				host_ntop(const struct sockaddr *sap,
158
						char *buf, const size_t buflen);
158
						char *buf, const size_t buflen);
159
__attribute_malloc__
159
__attribute__((__malloc__))
160
struct addrinfo *		host_pton(const char *paddr);
160
struct addrinfo *		host_pton(const char *paddr);
161
__attribute_malloc__
161
__attribute__((__malloc__))
162
struct addrinfo *		host_addrinfo(const char *hostname);
162
struct addrinfo *		host_addrinfo(const char *hostname);
163
__attribute_malloc__
163
__attribute__((__malloc__))
164
char *				host_canonname(const struct sockaddr *sap);
164
char *				host_canonname(const struct sockaddr *sap);
165
__attribute_malloc__
165
__attribute__((__malloc__))
166
struct addrinfo *		host_reliable_addrinfo(const struct sockaddr *sap);
166
struct addrinfo *		host_reliable_addrinfo(const struct sockaddr *sap);
167
__attribute_malloc__
167
__attribute__((__malloc__))
168
struct addrinfo *		host_numeric_addrinfo(const struct sockaddr *sap);
168
struct addrinfo *		host_numeric_addrinfo(const struct sockaddr *sap);
169
169
170
int				rmtab_read(void);
170
int				rmtab_read(void);
(-)a/support/nfs/svc_create.c (-1 / +1 lines)
Lines 113-119 svc_create_find_xprt(const struct sockaddr *bindaddr, const struct netconfig *nc Link Here
113
 *
113
 *
114
 * Otherwise NULL is returned if an error occurs.
114
 * Otherwise NULL is returned if an error occurs.
115
 */
115
 */
116
__attribute_malloc__
116
__attribute__((__malloc__))
117
static struct addrinfo *
117
static struct addrinfo *
118
svc_create_bindaddr(struct netconfig *nconf, const uint16_t port)
118
svc_create_bindaddr(struct netconfig *nconf, const uint16_t port)
119
{
119
{
(-)a/utils/statd/hostname.c (-3 / +3 lines)
Lines 105-111 statd_present_address(const struct sockaddr *sap, char *buf, const size_t buflen Link Here
105
 * Look up the hostname; report exceptional errors.  Caller must
105
 * Look up the hostname; report exceptional errors.  Caller must
106
 * call freeaddrinfo(3) if a valid addrinfo is returned.
106
 * call freeaddrinfo(3) if a valid addrinfo is returned.
107
 */
107
 */
108
__attribute_malloc__
108
__attribute__((__malloc__))
109
static struct addrinfo *
109
static struct addrinfo *
110
get_addrinfo(const char *hostname, const struct addrinfo *hint)
110
get_addrinfo(const char *hostname, const struct addrinfo *hint)
111
{
111
{
Lines 184-190 get_nameinfo(const struct sockaddr *sap, Link Here
184
 * We won't monitor peers that don't have a reverse map.  The canonical
184
 * We won't monitor peers that don't have a reverse map.  The canonical
185
 * name gives us a key for our monitor list.
185
 * name gives us a key for our monitor list.
186
 */
186
 */
187
__attribute_malloc__
187
__attribute__((__malloc__))
188
char *
188
char *
189
statd_canonical_name(const char *hostname)
189
statd_canonical_name(const char *hostname)
190
{
190
{
Lines 234-240 statd_canonical_name(const char *hostname) Link Here
234
 * NULL if some error occurs.  Caller must free the returned
234
 * NULL if some error occurs.  Caller must free the returned
235
 * list with freeaddrinfo(3).
235
 * list with freeaddrinfo(3).
236
 */
236
 */
237
__attribute_malloc__
237
__attribute__((__malloc__))
238
static struct addrinfo *
238
static struct addrinfo *
239
statd_canonical_list(const char *hostname)
239
statd_canonical_list(const char *hostname)
240
{
240
{
(-)a/utils/statd/sm-notify.c (-4 / +4 lines)
Lines 74-80 static int record_pid(void); Link Here
74
74
75
static struct nsm_host *	hosts = NULL;
75
static struct nsm_host *	hosts = NULL;
76
76
77
__attribute_malloc__
77
__attribute__((__malloc__))
78
static struct addrinfo *
78
static struct addrinfo *
79
smn_lookup(const char *name)
79
smn_lookup(const char *name)
80
{
80
{
Lines 149-155 smn_get_hostname(const struct sockaddr *sap, Link Here
149
 * if the canonical name doesn't exist or cannot be determined.
149
 * if the canonical name doesn't exist or cannot be determined.
150
 * The caller must free the result with free(3).
150
 * The caller must free the result with free(3).
151
 */
151
 */
152
__attribute_malloc__
152
__attribute__((__malloc__))
153
static char *
153
static char *
154
smn_verify_my_name(const char *name)
154
smn_verify_my_name(const char *name)
155
{
155
{
Lines 189-195 smn_verify_my_name(const char *name) Link Here
189
	return retval;
189
	return retval;
190
}
190
}
191
191
192
__attribute_malloc__
192
__attribute__((__malloc__))
193
static struct nsm_host *
193
static struct nsm_host *
194
smn_alloc_host(const char *hostname, const char *mon_name,
194
smn_alloc_host(const char *hostname, const char *mon_name,
195
		const char *my_name, const time_t timestamp)
195
		const char *my_name, const time_t timestamp)
Lines 343-349 static int smn_socket(void) Link Here
343
 * If admin specified a source address or srcport, then convert those
343
 * If admin specified a source address or srcport, then convert those
344
 * to a sockaddr and return it.   Otherwise, return an ANYADDR address.
344
 * to a sockaddr and return it.   Otherwise, return an ANYADDR address.
345
 */
345
 */
346
__attribute_malloc__
346
__attribute__((__malloc__))
347
static struct addrinfo *
347
static struct addrinfo *
348
smn_bind_address(const char *srcaddr, const char *srcport)
348
smn_bind_address(const char *srcaddr, const char *srcport)
349
{
349
{
(-)a/utils/statd/statd.h (-2 / +1 lines)
Lines 25-31 Link Here
25
extern _Bool	statd_matchhostname(const char *hostname1, const char *hostname2);
25
extern _Bool	statd_matchhostname(const char *hostname1, const char *hostname2);
26
extern _Bool	statd_present_address(const struct sockaddr *sap, char *buf,
26
extern _Bool	statd_present_address(const struct sockaddr *sap, char *buf,
27
					const size_t buflen);
27
					const size_t buflen);
28
__attribute_malloc__
28
__attribute__((__malloc__))
29
extern char *	statd_canonical_name(const char *hostname);
29
extern char *	statd_canonical_name(const char *hostname);
30
30
31
extern void	my_svc_run(void);
31
extern void	my_svc_run(void);
32
- 

Return to bug 532514