version 1.112, 2012/07/10 11:53:01 |
version 1.113, 2012/11/26 11:35:28 |
|
|
char * |
char * |
makesocketpath(const char *label) |
makesocketpath(const char *label) |
{ |
{ |
char base[MAXPATHLEN], *path, *s; |
char base[MAXPATHLEN], realbase[MAXPATHLEN], *path, *s; |
struct stat sb; |
struct stat sb; |
u_int uid; |
u_int uid; |
|
|
|
|
return (NULL); |
return (NULL); |
} |
} |
|
|
xasprintf(&path, "%s/%s", base, label); |
if (realpath(base, realbase) == NULL) |
|
strlcpy(realbase, base, sizeof realbase); |
|
|
|
xasprintf(&path, "%s/%s", realbase, label); |
return (path); |
return (path); |
} |
} |
|
|
|
|
} |
} |
} |
} |
free(label); |
free(label); |
if (realpath(path, socket_path) == NULL) |
strlcpy(socket_path, path, sizeof socket_path); |
strlcpy(socket_path, path, sizeof socket_path); |
|
free(path); |
free(path); |
|
|
/* Set process title. */ |
/* Set process title. */ |