From 67239541cdd0d1098be05f44d9f7a18e7604cef5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 22 Apr 2000 08:28:49 +0000 Subject: don't copy a null groups list (This used to be commit d0fc1675df35e65488a19d7f5929792fba347b07) --- source3/smbd/service.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/service.c b/source3/smbd/service.c index b7942906df..8d04ce36e1 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -381,8 +381,12 @@ connection_struct *make_connection(char *service,char *user,char *password, int conn->vfs_conn->uid = conn->uid; conn->vfs_conn->gid = conn->gid; conn->vfs_conn->ngroups = conn->ngroups; - conn->vfs_conn->groups = (gid_t *)memdup(conn->groups, - conn->ngroups * sizeof(gid_t)); + if (conn->vfs_conn->ngroups != 0) { + conn->vfs_conn->groups = (gid_t *)memdup(conn->groups, + conn->ngroups * sizeof(gid_t)); + } else { + conn->vfs_conn->groups = NULL; + } /* Initialise VFS function pointers */ -- cgit