diff options
author | Gerald Carter <jerry@samba.org> | 2006-02-24 21:36:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:23 -0500 |
commit | d95e13e68f3c7ac517a45877b351849ef4a99b93 (patch) | |
tree | 392a8d4445623c60746e444e148b2a4e12ebeaba /source3/rpc_server | |
parent | 2b0277a1d6df176a90f895b9d0582db384fcc6a8 (diff) | |
download | samba-d95e13e68f3c7ac517a45877b351849ef4a99b93.tar.gz samba-d95e13e68f3c7ac517a45877b351849ef4a99b93.tar.bz2 samba-d95e13e68f3c7ac517a45877b351849ef4a99b93.zip |
r13679: Commiting the rm_primary_group.patch posted on samba-technical
* ignore the primary group SID attribute from struct samu*
* generate the primary group SID strictlky from the Unix
primary group when dealing with passdb users
* Fix memory leak in original patch caused by failing to free a
talloc *
* add wrapper around samu_set_unix() to prevent exposing the create
BOOL to callers. Wrappers are samu_set_unix() and samu-allic_rid_unix()
(This used to be commit bcf269e2ec6630b78d909010fabd3b69dd6dda84)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 33de292d22..47e1a31535 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -3121,17 +3121,16 @@ static NTSTATUS set_user_info_21(TALLOC_CTX *mem_ctx, SAM_USER_INFO_21 *id21, * id21. I don't know if they need to be set. --jerry */ - if (IS_SAM_CHANGED(pwd, PDB_GROUPSID) && - !NT_STATUS_IS_OK(status = pdb_set_unix_primary_group(mem_ctx, - pwd))) { - return status; + if ( IS_SAM_CHANGED(pwd, PDB_GROUPSID) ) { + status = pdb_set_unix_primary_group(mem_ctx, pwd); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } } - - /* write the change out */ - if(!NT_STATUS_IS_OK(status = pdb_update_sam_account(pwd))) { - TALLOC_FREE(pwd); - return status; - } + + /* Don't worry about writing out the user account since the + primary group SID is generated solely from the user's Unix + primary group. */ TALLOC_FREE(pwd); |