diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-05-14 15:24:14 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:03 -0500 |
commit | 75d2304643c6935c0705b1a8ae2ea73a527f2f97 (patch) | |
tree | 4f9abc781daee5a3189fd09db5189d96df44b205 /source3/passdb | |
parent | 990c406a89f9ec52d2570928d07f6913a4c31808 (diff) | |
download | samba-75d2304643c6935c0705b1a8ae2ea73a527f2f97.tar.gz samba-75d2304643c6935c0705b1a8ae2ea73a527f2f97.tar.bz2 samba-75d2304643c6935c0705b1a8ae2ea73a527f2f97.zip |
r15601: Fix segfaults with 'security=share' and 'guest only = yes'
Volker
(This used to be commit ea7cced6bcb3cb7d817e4cb072774692e4afedb0)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/passdb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 876f04bdfe..60f360bde9 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -136,6 +136,7 @@ static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *p { const char *guest_account = lp_guestaccount(); const char *domain = global_myname(); + DOM_SID group_sid; uint32 urid; if ( !pwd ) { @@ -147,6 +148,8 @@ static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *p pdb_set_username(user, pwd->pw_name, PDB_SET); pdb_set_fullname(user, pwd->pw_gecos, PDB_SET); pdb_set_domain (user, get_global_sam_name(), PDB_DEFAULT); + gid_to_sid(&group_sid, pwd->pw_gid); + pdb_set_group_sid(user, &group_sid, PDB_SET); /* save the password structure for later use */ |