summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-11-24 17:33:15 +0000
committerGerald Carter <jerry@samba.org>2003-11-24 17:33:15 +0000
commitf5ee9c7b02d6acf02d8e516c6e258965a029dd79 (patch)
treee3f4ada6b37ff42b987e8d41d7ebbafb6cda082d /source3/smbd
parent8ade0cf1b6eba966fdb3f2544a83c979195cef75 (diff)
downloadsamba-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/smbd')
-rw-r--r--source3/smbd/lanman.c9
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;
}