diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-08-08 08:26:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:34 -0500 |
commit | ff7c0a7c357ab8a0ff9de6d18988933e0b398780 (patch) | |
tree | 2382be5d0e35e3ae184413a1668a53e56fb6738d /source3/passdb | |
parent | 175aa92e9e2fa4aa9d0c2fc9d7001ce4fae61a14 (diff) | |
download | samba-ff7c0a7c357ab8a0ff9de6d18988933e0b398780.tar.gz samba-ff7c0a7c357ab8a0ff9de6d18988933e0b398780.tar.bz2 samba-ff7c0a7c357ab8a0ff9de6d18988933e0b398780.zip |
r17451: Change pdb_getgrsid not to take a DOM_SID but a const DOM_SID * as an
argument.
Volker
(This used to be commit 873a5a1211d185fd50e7167d88cbc869f70dfd3f)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/lookup_sid.c | 2 | ||||
-rw-r--r-- | source3/passdb/pdb_interface.c | 12 | ||||
-rw-r--r-- | source3/passdb/pdb_ldap.c | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index f612cff092..f6c15168a9 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/passdb/lookup_sid.c @@ -1352,7 +1352,7 @@ BOOL sid_to_gid(const DOM_SID *psid, gid_t *pgid) if ((sid_check_is_in_builtin(psid) || sid_check_is_in_wellknown_domain(psid))) { - if (pdb_getgrsid(&map, *psid)) { + if (pdb_getgrsid(&map, psid)) { *pgid = map.gid; goto done; } diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 7f2a8f25b3..4e30f92acf 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -561,7 +561,7 @@ NTSTATUS pdb_update_login_attempts(struct samu *sam_acct, BOOL success) return pdb->update_login_attempts(pdb, sam_acct, success); } -BOOL pdb_getgrsid(GROUP_MAP *map, DOM_SID sid) +BOOL pdb_getgrsid(GROUP_MAP *map, const DOM_SID *sid) { struct pdb_methods *pdb = pdb_get_methods(); return NT_STATUS_IS_OK(pdb->getgrsid(pdb, map, sid)); @@ -636,7 +636,7 @@ static NTSTATUS pdb_default_delete_dom_group(struct pdb_methods *methods, sid_compose(&group_sid, get_global_sam_sid(), rid); - if (!get_domain_group_from_sid(group_sid, &map)) { + if (!get_domain_group_from_sid(&group_sid, &map)) { DEBUG(10, ("Could not find group for rid %d\n", rid)); return NT_STATUS_NO_SUCH_GROUP; } @@ -812,7 +812,7 @@ static NTSTATUS pdb_default_add_groupmem(struct pdb_methods *methods, sid_compose(&group_sid, get_global_sam_sid(), group_rid); sid_compose(&member_sid, get_global_sam_sid(), member_rid); - if (!get_domain_group_from_sid(group_sid, &map) || + if (!get_domain_group_from_sid(&group_sid, &map) || (map.gid == (gid_t)-1) || ((grp = getgrgid(map.gid)) == NULL)) { return NT_STATUS_NO_SUCH_GROUP; @@ -874,7 +874,7 @@ static NTSTATUS pdb_default_del_groupmem(struct pdb_methods *methods, sid_compose(&group_sid, get_global_sam_sid(), group_rid); sid_compose(&member_sid, get_global_sam_sid(), member_rid); - if (!get_domain_group_from_sid(group_sid, &map) || + if (!get_domain_group_from_sid(&group_sid, &map) || (map.gid == (gid_t)-1) || ((grp = getgrgid(map.gid)) == NULL)) { return NT_STATUS_NO_SUCH_GROUP; @@ -1276,7 +1276,7 @@ static BOOL pdb_default_sid_to_id(struct pdb_methods *methods, if (sid_peek_check_rid(&global_sid_Builtin, sid, &rid)) { /* Here we only have aliases */ GROUP_MAP map; - if (!NT_STATUS_IS_OK(methods->getgrsid(methods, &map, *sid))) { + if (!NT_STATUS_IS_OK(methods->getgrsid(methods, &map, sid))) { DEBUG(10, ("Could not find map for sid %s\n", sid_string_static(sid))); goto done; @@ -1522,7 +1522,7 @@ static BOOL lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32 rid, } TALLOC_FREE(sam_account); - ret = pdb_getgrsid(&map, sid); + ret = pdb_getgrsid(&map, &sid); unbecome_root(); /* END BECOME_ROOT BLOCK */ diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index afc95fe90f..3e9f321ce2 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -2245,14 +2245,14 @@ static NTSTATUS ldapsam_getgroup(struct pdb_methods *methods, *********************************************************************/ static NTSTATUS ldapsam_getgrsid(struct pdb_methods *methods, GROUP_MAP *map, - DOM_SID sid) + const DOM_SID *sid) { pstring filter; pstr_sprintf(filter, "(&(objectClass=%s)(%s=%s))", LDAP_OBJ_GROUPMAP, get_attr_key2string(groupmap_attr_list, LDAP_ATTR_GROUP_SID), - sid_string_static(&sid)); + sid_string_static(sid)); return ldapsam_getgroup(methods, filter, map); } |