summaryrefslogtreecommitdiffstats
path: root/source/groupdb
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2001-07-09 18:17:00 +0000
committerJean-François Micouleau <jfm@samba.org>2001-07-09 18:17:00 +0000
commitf47797fa9595fb19d9e29ef43c5d0135268db455 (patch)
tree152f35bfd515e2af93011eff741e44f5f7f429d8 /source/groupdb
parent42fc4f4154ccf2e93322da6b0b234f8f846991dc (diff)
downloadsamba-f47797fa9595fb19d9e29ef43c5d0135268db455.tar.gz
samba-f47797fa9595fb19d9e29ef43c5d0135268db455.tar.xz
samba-f47797fa9595fb19d9e29ef43c5d0135268db455.zip
when retrieving by sid fill also the map.sid field
Diffstat (limited to 'source/groupdb')
-rw-r--r--source/groupdb/mapping.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/groupdb/mapping.c b/source/groupdb/mapping.c
index 8623e0ce3d4..a86283b5567 100644
--- a/source/groupdb/mapping.c
+++ b/source/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;