summaryrefslogtreecommitdiffstats
path: root/source
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
commit19a8dd523a4ee50ba9066efd60a29cf3ba9ae419 (patch)
treed70401a3e94045fe2c2fc511e481dddf5b0cc675 /source
parent6ce7932520c0e5417e3b8a214a97244d10bdf4ad (diff)
downloadsamba-19a8dd523a4ee50ba9066efd60a29cf3ba9ae419.tar.gz
samba-19a8dd523a4ee50ba9066efd60a29cf3ba9ae419.tar.xz
samba-19a8dd523a4ee50ba9066efd60a29cf3ba9ae419.zip
make sure we delete the group mapping before calling the delete group script; patch from Jianliang Lu <j.lu@tiesse.com>
Diffstat (limited to 'source')
-rw-r--r--source/rpc_server/srv_samr_nt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c
index c84e288a4be..4d4dfed47c9 100644
--- a/source/rpc_server/srv_samr_nt.c
+++ b/source/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;