summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-12-16 18:35:23 +0000
committerGerald Carter <jerry@samba.org>2003-12-16 18:35:23 +0000
commitc763e9548c94cdb526d8e486d1450b70b9d3969e (patch)
tree6fe2d230bdbdd83df4ab1d7b6db31da554f0ad58 /source3/rpc_server
parent2ff5ed955566e676e9d683c72e315a13a555b4dd (diff)
downloadsamba-c763e9548c94cdb526d8e486d1450b70b9d3969e.tar.gz
samba-c763e9548c94cdb526d8e486d1450b70b9d3969e.tar.bz2
samba-c763e9548c94cdb526d8e486d1450b70b9d3969e.zip
make sure we delete the group mapping before calling the delete group script; patch from Jianliang Lu <j.lu@tiesse.com>
(This used to be commit 19a8dd523a4ee50ba9066efd60a29cf3ba9ae419)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_samr_nt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index c84e288a4b..4d4dfed47c 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -3827,6 +3827,10 @@ NTSTATUS _samr_delete_dom_group(pipes_struct *p, SAMR_Q_DELETE_DOM_GROUP *q_u, S
if ( (grp=getgrgid(gid)) == NULL)
return NT_STATUS_NO_SUCH_GROUP;
+ /* delete mapping first */
+ if(!pdb_delete_group_mapping_entry(group_sid))
+ return NT_STATUS_ACCESS_DENIED;
+
/* we can delete the UNIX group */
smb_delete_group(grp->gr_name);
@@ -3834,8 +3838,6 @@ NTSTATUS _samr_delete_dom_group(pipes_struct *p, SAMR_Q_DELETE_DOM_GROUP *q_u, S
if ( (grp=getgrgid(gid)) != NULL)
return NT_STATUS_ACCESS_DENIED;
- if(!pdb_delete_group_mapping_entry(group_sid))
- return NT_STATUS_ACCESS_DENIED;
if (!close_policy_hnd(p, &q_u->group_pol))
return NT_STATUS_OBJECT_NAME_INVALID;