diff options
author | Gerald Carter <jerry@samba.org> | 2003-12-04 03:35:46 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-12-04 03:35:46 +0000 |
commit | 3d929b1ce67d945979552fe1ea2c70f6d3925326 (patch) | |
tree | 1f233af6355c59067968c27adf71c0ea48413f39 /source3/groupdb | |
parent | 8a31a346ef1c42f868a4b7a4f667e6eb56c4a7a9 (diff) | |
download | samba-3d929b1ce67d945979552fe1ea2c70f6d3925326.tar.gz samba-3d929b1ce67d945979552fe1ea2c70f6d3925326.tar.bz2 samba-3d929b1ce67d945979552fe1ea2c70f6d3925326.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 da12bbdb0dd9179b1ed457fa009679e2da4a8440)
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; } |