summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-07-10 07:26:35 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-07-10 07:26:35 +0000
commit78722434a6511f06b8ea7da0b8a4ca08c8980c04 (patch)
tree2ea2e5821691e254dab951430b716169ba8d6814 /source3/passdb
parentfe23e902c643a4f12ac73cfc1e95b32dbac83248 (diff)
downloadsamba-78722434a6511f06b8ea7da0b8a4ca08c8980c04.tar.gz
samba-78722434a6511f06b8ea7da0b8a4ca08c8980c04.tar.bz2
samba-78722434a6511f06b8ea7da0b8a4ca08c8980c04.zip
If we get a SID from group mapping, no need to check it's prefix.
Just set it directly. Andrew Bartlett (This used to be commit 202202bc475f3b8500423b1a9ccf0adc80a4dc49)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_ldap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 643d165e58..fd5ad7ee12 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -589,10 +589,14 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state,
get_single_attribute(ldap_struct, entry, "rid", temp);
user_rid = (uint32)atol(temp);
+
+ pdb_set_user_sid_from_rid(sampass, user_rid);
+
if (!get_single_attribute(ldap_struct, entry, "primaryGroupID", temp)) {
group_rid = 0;
} else {
group_rid = (uint32)atol(temp);
+ pdb_set_group_sid_from_rid(sampass, group_rid);
}
if ((ldap_state->permit_non_unix_accounts)
@@ -624,11 +628,10 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state,
GROUP_MAP map;
/* call the mapping code here */
if(get_group_map_from_gid(gid, &map, MAPPING_WITHOUT_PRIV)) {
- if (!sid_peek_check_rid(get_global_sam_sid(), &map.sid, &group_rid))
- return False;
+ pdb_set_group_sid(sampass, &map.sid);
}
else {
- group_rid=pdb_gid_to_group_rid(gid);
+ pdb_set_group_sid_from_rid(sampass, pdb_gid_to_group_rid(gid));
}
}
}
@@ -781,9 +784,6 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state,
pdb_set_hours_len(sampass, hours_len);
pdb_set_logon_divs(sampass, logon_divs);
- pdb_set_user_sid_from_rid(sampass, user_rid);
- pdb_set_group_sid_from_rid(sampass, group_rid);
-
pdb_set_username(sampass, username);
pdb_set_domain(sampass, domain);