summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-04-22 03:16:18 +0000
committerGerald Carter <jerry@samba.org>2003-04-22 03:16:18 +0000
commit9d16dac3d14b11f327f2898e3fe45f1b390bead4 (patch)
treed0372fc08e01d06d76db8c6f507fd4f4c8f2ad5e /source3
parent790b852c121e4f167b0f451dd9f34c307f211c0d (diff)
downloadsamba-9d16dac3d14b11f327f2898e3fe45f1b390bead4.tar.gz
samba-9d16dac3d14b11f327f2898e3fe45f1b390bead4.tar.bz2
samba-9d16dac3d14b11f327f2898e3fe45f1b390bead4.zip
wrap pdb_enum_group_mapping() in [un]become_root() so LDAP queries can get the credentials from secrets.tdb
(This used to be commit cf6af44a2464cf1d9bea909dbc0e20829bdc2665)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_samr_nt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 6e1b6f2160..5a8a16b256 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -300,11 +300,16 @@ static NTSTATUS load_group_domain_entries(struct samr_info *info, DOM_SID *sid)
DEBUG(10,("load_group_domain_entries: already in memory\n"));
return NT_STATUS_OK;
}
+
+
+ become_root();
if (!pdb_enum_group_mapping(SID_NAME_DOM_GRP, &map, (int *)&group_entries, ENUM_ONLY_MAPPED, MAPPING_WITHOUT_PRIV)) {
DEBUG(1, ("load_group_domain_entries: pdb_enum_group_mapping() failed!\n"));
return NT_STATUS_NO_MEMORY;
}
+
+ unbecome_root();
info->disp_info.num_group_account=group_entries;