diff options
author | Gerald Carter <jerry@samba.org> | 2003-11-24 17:31:38 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-11-24 17:31:38 +0000 |
commit | c39f5fea4ad7b57ee8ad4d2b115163f76753f853 (patch) | |
tree | e65a6577d044de2fdbfd354bbd1a72c47aec3199 /source3/smbd | |
parent | 62685054962f4be7d8791b87dff85e89347269e8 (diff) | |
download | samba-c39f5fea4ad7b57ee8ad4d2b115163f76753f853.tar.gz samba-c39f5fea4ad7b57ee8ad4d2b115163f76753f853.tar.bz2 samba-c39f5fea4ad7b57ee8ad4d2b115163f76753f853.zip |
more access fixes for group enumeration in LDAP; bug 281
(This used to be commit 68283407e0f366d8315f4be6caed67eb6fe84b85)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/lanman.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 3ea6ab483b..c53889a7a4 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -1635,6 +1635,7 @@ static BOOL api_RNetGroupEnum(connection_struct *conn,uint16 vuid, char *param,c char *str1 = param+2; char *str2 = skip_string(str1,1); char *p = skip_string(str2,1); + BOOL ret; GROUP_MAP *group_list; int num_entries; @@ -1653,8 +1654,12 @@ static BOOL api_RNetGroupEnum(connection_struct *conn,uint16 vuid, char *param,c return False; /* get list of domain groups SID_DOMAIN_GRP=2 */ - if(!pdb_enum_group_mapping(SID_NAME_DOM_GRP , &group_list, &num_entries, False)) { - DEBUG(3,("api_RNetGroupEnum:failed to get group list")); + become_root(); + ret = pdb_enum_group_mapping(SID_NAME_DOM_GRP , &group_list, &num_entries, False); + unbecome_root(); + + if( !ret ) { + DEBUG(3,("api_RNetGroupEnum:failed to get group list")); return False; } |