summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-12-16 18:36:05 +0000
committerGerald Carter <jerry@samba.org>2003-12-16 18:36:05 +0000
commit86f53a0da1e0fab1ce8daf6433c803ebd61181d7 (patch)
tree979bbe25d6b962483d7038cd055f1fa9415d76a9 /source3
parent24dff2061e639f08e4f7bba1ebec3bcb41dfcbaa (diff)
downloadsamba-86f53a0da1e0fab1ce8daf6433c803ebd61181d7.tar.gz
samba-86f53a0da1e0fab1ce8daf6433c803ebd61181d7.tar.bz2
samba-86f53a0da1e0fab1ce8daf6433c803ebd61181d7.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 66edeb855e7d7a0bfa20cbe93275c86880bd453d)
Diffstat (limited to 'source3')
-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;