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/groupdb/mapping.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/groupdb/mapping.c')
-rw-r--r-- | source3/groupdb/mapping.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index 7a07b5c344..8f534d779e 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -629,6 +629,7 @@ Returns a GROUP_MAP struct based on the gid. BOOL get_group_from_gid(gid_t gid, GROUP_MAP *map) { struct group *grp; + BOOL ret; if(!init_group_mapping()) { DEBUG(0,("failed to initialize group mapping")); @@ -641,7 +642,12 @@ BOOL get_group_from_gid(gid_t gid, GROUP_MAP *map) /* * make a group map from scratch if doesn't exist. */ - if (!pdb_getgrgid(map, gid)) { + + become_root(); + ret = pdb_getgrgid(map, gid); + unbecome_root(); + + if ( !ret ) { map->gid=gid; map->sid_name_use=SID_NAME_ALIAS; |