From b1ad4a27cb7f7a0169c4f6a3756462912a9fa8e6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 21 Sep 2005 14:41:29 +0000 Subject: r10390: Remove fstring, pstring and uint32_t from winbindd_nss.h. Volker (This used to be commit 3dc7e67dc5e5844523e9768081123c622e61c7e9) --- source4/nsswitch/wb_common.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/nsswitch/wb_common.c') 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 */ -- cgit