diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-04-22 08:28:49 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-04-22 08:28:49 +0000 |
commit | 67239541cdd0d1098be05f44d9f7a18e7604cef5 (patch) | |
tree | 08c05bc43c2b8b7cbe9d7e173bcebb105177976c /source3 | |
parent | f7608e853596bcb6e8d3d4dd6bb4407fa090fbc1 (diff) | |
download | samba-67239541cdd0d1098be05f44d9f7a18e7604cef5.tar.gz samba-67239541cdd0d1098be05f44d9f7a18e7604cef5.tar.bz2 samba-67239541cdd0d1098be05f44d9f7a18e7604cef5.zip |
don't copy a null groups list
(This used to be commit d0fc1675df35e65488a19d7f5929792fba347b07)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/service.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 */ |