diff options
author | Jean-François Micouleau <jfm@samba.org> | 2001-07-09 18:17:00 +0000 |
---|---|---|
committer | Jean-François Micouleau <jfm@samba.org> | 2001-07-09 18:17:00 +0000 |
commit | 554a455d4074161bd990722df9bc61756687e2a3 (patch) | |
tree | 73dbd2e00d308a2d185e9c92f32b6490d1c3f57e /source3/groupdb | |
parent | 647a680b00f8fc36a2282d774c4a6104fef8a01b (diff) | |
download | samba-554a455d4074161bd990722df9bc61756687e2a3.tar.gz samba-554a455d4074161bd990722df9bc61756687e2a3.tar.bz2 samba-554a455d4074161bd990722df9bc61756687e2a3.zip |
when retrieving by sid fill also the map.sid field
(This used to be commit f47797fa9595fb19d9e29ef43c5d0135268db455)
Diffstat (limited to 'source3/groupdb')
-rw-r--r-- | source3/groupdb/mapping.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index 8623e0ce3d..a86283b556 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -33,9 +33,9 @@ static TDB_CONTEXT *tdb; /* used for driver files */ PRIVS privs[] = { {SE_PRIV_NONE, "no_privs", "No privilege"}, {SE_PRIV_ADD_USERS, "add_users", "add users"}, - {SE_PRIV_ADD_MACHINES, "add_computers", ""}, - {SE_PRIV_PRINT_OPERATOR, "print_op", ""}, - {SE_PRIV_ALL, "all_privs", ""} + {SE_PRIV_ADD_MACHINES, "add_computers", "add computers to domain"}, + {SE_PRIV_PRINT_OPERATOR, "print_op", "printer operator"}, + {SE_PRIV_ALL, "all_privs", "all privileges"} }; /* PRIVS privs[] = { @@ -156,7 +156,7 @@ BOOL add_mapping_entry(GROUP_MAP *map, int flag) { TDB_DATA kbuf, dbuf; pstring key, buf; - fstring string_sid; + fstring string_sid=""; int len; sid_to_string(string_sid, &map->sid); @@ -570,7 +570,7 @@ BOOL get_local_group_from_sid(DOM_SID sid, GROUP_MAP *map) * make one based on the unix information */ uint32 alias_rid; - sid_split_rid(&sid, &alias_rid); + sid_peek_rid(&sid, &alias_rid); map->gid=pdb_user_rid_to_gid(alias_rid); if ((grp=getgrgid(map->gid)) == NULL) @@ -583,6 +583,7 @@ BOOL get_local_group_from_sid(DOM_SID sid, GROUP_MAP *map) map->privilege=SE_PRIV_NONE; + sid_copy(&map->sid, &sid); } return True; |