diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-09-21 14:41:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:38:39 -0500 |
commit | b1ad4a27cb7f7a0169c4f6a3756462912a9fa8e6 (patch) | |
tree | acdf682f7ca428d83f41ae7685abe476fd4b0c6d /source4/nsswitch/wb_common.c | |
parent | 7a545880d796ba76ebfd07472db92ddee93c875a (diff) | |
download | samba-b1ad4a27cb7f7a0169c4f6a3756462912a9fa8e6.tar.gz samba-b1ad4a27cb7f7a0169c4f6a3756462912a9fa8e6.tar.bz2 samba-b1ad4a27cb7f7a0169c4f6a3756462912a9fa8e6.zip |
r10390: Remove fstring, pstring and uint32_t from winbindd_nss.h.
Volker
(This used to be commit 3dc7e67dc5e5844523e9768081123c622e61c7e9)
Diffstat (limited to 'source4/nsswitch/wb_common.c')
-rw-r--r-- | source4/nsswitch/wb_common.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/nsswitch/wb_common.c b/source4/nsswitch/wb_common.c index d7b4614f35..97f8232524 100644 --- a/source4/nsswitch/wb_common.c +++ b/source4/nsswitch/wb_common.c @@ -172,7 +172,7 @@ static int winbind_named_pipe_sock(const char *dir) { struct sockaddr_un sunaddr; struct stat st; - pstring path; + char *path; int fd; int wait_time; int slept; @@ -190,8 +190,7 @@ static int winbind_named_pipe_sock(const char *dir) /* Connect to socket */ - snprintf(path, sizeof(path), "%s%s", dir, "/" WINBINDD_SOCKET_NAME); - + asprintf(&path, "%s%s", dir, "/" WINBINDD_SOCKET_NAME); ZERO_STRUCT(sunaddr); sunaddr.sun_family = AF_UNIX; strncpy(sunaddr.sun_path, path, sizeof(sunaddr.sun_path) - 1); @@ -201,8 +200,11 @@ static int winbind_named_pipe_sock(const char *dir) the winbindd daemon is not running. */ if (lstat(path, &st) == -1) { + SAFE_FREE(path); return -1; } + + SAFE_FREE(path); /* Check permissions on unix socket file */ |