diff options
author | Gerald Carter <jerry@samba.org> | 2003-11-24 17:33:15 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-11-24 17:33:15 +0000 |
commit | f5ee9c7b02d6acf02d8e516c6e258965a029dd79 (patch) | |
tree | e3f4ada6b37ff42b987e8d41d7ebbafb6cda082d /source3/rpc_server/srv_samr_nt.c | |
parent | 8ade0cf1b6eba966fdb3f2544a83c979195cef75 (diff) | |
download | samba-f5ee9c7b02d6acf02d8e516c6e258965a029dd79.tar.gz samba-f5ee9c7b02d6acf02d8e516c6e258965a029dd79.tar.bz2 samba-f5ee9c7b02d6acf02d8e516c6e258965a029dd79.zip |
more access fixes for group enumeration in LDAP; bug 281
(This used to be commit c4ce92e80688fe7fd4b2fde2c31e94baf3e4dca0)
Diffstat (limited to 'source3/rpc_server/srv_samr_nt.c')
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 6cd5da4892..d3da830991 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -292,6 +292,7 @@ static NTSTATUS load_group_domain_entries(struct samr_info *info, DOM_SID *sid) uint32 group_entries = 0; uint32 i; TALLOC_CTX *mem_ctx = info->mem_ctx; + BOOL ret; DEBUG(10,("load_group_domain_entries\n")); @@ -303,13 +304,14 @@ static NTSTATUS load_group_domain_entries(struct samr_info *info, DOM_SID *sid) become_root(); - - if (!pdb_enum_group_mapping(SID_NAME_DOM_GRP, &map, (int *)&group_entries, ENUM_ONLY_MAPPED)) { + ret = pdb_enum_group_mapping(SID_NAME_DOM_GRP, &map, (int *)&group_entries, ENUM_ONLY_MAPPED); + unbecome_root(); + + if ( !ret ) { 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; |