diff options
author | Andrew Bartlett <abartlet@samba.org> | 2001-11-04 04:58:17 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2001-11-04 04:58:17 +0000 |
commit | 1f409a1f3fb0906f1ff985b96bb7a65f56253046 (patch) | |
tree | cb256ce48d9ffa2375ce5988ba8db18b8294258e | |
parent | caae69fcd096f20aa4c6879b95ec2c275afea041 (diff) | |
download | samba-1f409a1f3fb0906f1ff985b96bb7a65f56253046.tar.gz samba-1f409a1f3fb0906f1ff985b96bb7a65f56253046.tar.xz samba-1f409a1f3fb0906f1ff985b96bb7a65f56253046.zip |
Fix segfault. sup_tok might not always be with us.
-rw-r--r-- | source/smbd/password.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/smbd/password.c b/source/smbd/password.c index 429d72b4e51..f0fec9b7960 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -170,9 +170,11 @@ NT_USER_TOKEN *create_nt_token(uid_t uid, gid_t gid, int ngroups, gid_t *groups, } } - /* Now add the additional SIDs from the supplimentary token. */ - for (i = 0; i < sup_tok->num_sids; i++) - sid_copy( &psids[psid_ndx++], &sup_tok->user_sids[i] ); + if (sup_tok) { + /* Now add the additional SIDs from the supplimentary token. */ + for (i = 0; i < sup_tok->num_sids; i++) + sid_copy( &psids[psid_ndx++], &sup_tok->user_sids[i] ); + } /* * Finally add the "standard" SIDs. |