diff options
author | Gerald Carter <jerry@samba.org> | 2003-12-04 04:08:32 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-12-04 04:08:32 +0000 |
commit | 3a1dd0dc773c98c7af40de07cd6e43b5f3170280 (patch) | |
tree | c143f7d3e1abba11ca690a1635074f85e23a9f29 /source3/groupdb | |
parent | f0f1e99fedbca99ede6e95758bc7088ad2106748 (diff) | |
download | samba-3a1dd0dc773c98c7af40de07cd6e43b5f3170280.tar.gz samba-3a1dd0dc773c98c7af40de07cd6e43b5f3170280.tar.bz2 samba-3a1dd0dc773c98c7af40de07cd6e43b5f3170280.zip |
* fix RemoveSidForeignDomain() ; bug 252
* don't fall back to unmapped UNIX group for
get_local_group_from_sid()
* remove an extra become/unbecome_root() pair
from group enumeration
(This used to be commit c0f34b42a6a4af09ae4b76721bc350784d87f686)
Diffstat (limited to 'source3/groupdb')
-rw-r--r-- | source3/groupdb/mapping.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index 8f534d779e..b1c260581e 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -547,27 +547,28 @@ BOOL get_domain_group_from_sid(DOM_SID sid, GROUP_MAP *map) BOOL get_local_group_from_sid(DOM_SID sid, GROUP_MAP *map) { - struct group *grp; - if(!init_group_mapping()) { DEBUG(0,("failed to initialize group mapping")); return(False); } /* The group is in the mapping table */ - if(pdb_getgrsid(map, sid)) { - if (map->sid_name_use!=SID_NAME_ALIAS) { - return False; - } + + if( !pdb_getgrsid(map, sid) ) + return False; - if (map->gid==-1) { - return False; - } - - if ( (grp=getgrgid(map->gid)) == NULL) { - return False; - } - } else { + if ( (map->sid_name_use != SID_NAME_ALIAS) + || (map->gid == -1) + || (getgrgid(map->gid) == NULL) ) + { + return False; + } + +#if 0 /* JERRY */ + /* local groups only exist in the group mapping DB so this + is not necessary */ + + else { /* the group isn't in the mapping table. * make one based on the unix information */ uint32 alias_rid; @@ -588,6 +589,7 @@ BOOL get_local_group_from_sid(DOM_SID sid, GROUP_MAP *map) sid_copy(&map->sid, &sid); } +#endif return True; } |