summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_smbpasswd.c
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2001-12-04 21:53:47 +0000
committerJean-François Micouleau <jfm@samba.org>2001-12-04 21:53:47 +0000
commit922eb763d7365716fd3c20aa069746fc9bfb8ab3 (patch)
tree5aa576e627be2c74803509ec298881dbc3c57864 /source3/passdb/pdb_smbpasswd.c
parent4d3ec230b4319510826b2cccc0b957096d8a53fe (diff)
downloadsamba-922eb763d7365716fd3c20aa069746fc9bfb8ab3.tar.gz
samba-922eb763d7365716fd3c20aa069746fc9bfb8ab3.tar.bz2
samba-922eb763d7365716fd3c20aa069746fc9bfb8ab3.zip
added a boolean to the group mapping functions to specify if we need or
not the privileges. Usually we don't need them, so the memory is free early. lib/util_sid.c: added some helper functions to check an SID. passdb/passdb.c: renamed local_lookup_rid() to local_lookup_sid() and pass an RID all the way. If the group doesn't exist on the domain SID, don't return a faked one as it can collide with a builtin one. Some rpc structures have been badly designed, they return only rids and force the client to do subsequent lsa_lookup_sid() on the domain sid and the builtin sid ! rpc_server/srv_util.c: wrote a new version of get_domain_user_groups(). Only the samr code uses it atm. It uses the group mapping code instead of a bloody hard coded crap. The netlogon code will use it too, but I have to do some test first. J.F. (This used to be commit 6c87e96149101995b7d049657d5c26eefef37d8c)
Diffstat (limited to 'source3/passdb/pdb_smbpasswd.c')
-rw-r--r--source3/passdb/pdb_smbpasswd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index c189d9a9b7..e5b1ec97f7 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -1225,8 +1225,7 @@ static BOOL build_sam_account(SAM_ACCOUNT *sam_pass, const struct smb_passwd *pw
uint32 rid;
GROUP_MAP map;
- if (get_group_map_from_gid(pwfile->pw_gid, &map)) {
- free_privilege(&map.priv_set);
+ if (get_group_map_from_gid(pwfile->pw_gid, &map, MAPPING_WITHOUT_PRIV)) {
sid_peek_rid(&map.sid, &rid);
}
else