summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_ldap.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-23 13:18:00 +0100
committerVolker Lendecke <vl@samba.org>2010-01-23 14:35:37 +0100
commit9fcbe3a65c6f30754f3f705c3e0b4a4ae150c679 (patch)
tree2c5d01380a271c5b368fa87c21d0c1b7a574fbec /source3/passdb/pdb_ldap.c
parent3e1a1616ec2b51993e988e43ecf0c0f78b1607e5 (diff)
downloadsamba-9fcbe3a65c6f30754f3f705c3e0b4a4ae150c679.tar.gz
samba-9fcbe3a65c6f30754f3f705c3e0b4a4ae150c679.tar.bz2
samba-9fcbe3a65c6f30754f3f705c3e0b4a4ae150c679.zip
s3: Remove some pointless uses of string_sid_talloc
Diffstat (limited to 'source3/passdb/pdb_ldap.c')
-rw-r--r--source3/passdb/pdb_ldap.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 758701bcb8..68e0c22050 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -5012,7 +5012,7 @@ static bool ldapsam_uid_to_sid(struct pdb_methods *methods, uid_t uid,
LDAPMessage *entry = NULL;
bool ret = false;
char *user_sid_string;
- DOM_SID *user_sid;
+ struct dom_sid user_sid;
int rc;
TALLOC_CTX *tmp_ctx = talloc_stackframe();
@@ -5051,14 +5051,13 @@ static bool ldapsam_uid_to_sid(struct pdb_methods *methods, uid_t uid,
goto done;
}
- user_sid = string_sid_talloc(tmp_ctx, user_sid_string);
- if (user_sid == NULL) {
+ if (!string_to_sid(&user_sid, user_sid_string)) {
DEBUG(3, ("Error calling sid_string_talloc for sid '%s'\n",
user_sid_string));
goto done;
}
- sid_copy(sid, user_sid);
+ sid_copy(sid, &user_sid);
store_uid_sid_cache(sid, uid);
idmap_cache_set_sid2uid(sid, uid);
@@ -6048,18 +6047,17 @@ static bool ldapsam_get_trusteddom_pw(struct pdb_methods *methods,
/* domain sid */
if (sid != NULL) {
char *sid_str;
- DOM_SID *dom_sid;
+ struct dom_sid dom_sid;
sid_str = smbldap_talloc_single_attribute(priv2ld(ldap_state),
entry, "sambaSID",
talloc_tos());
if (sid_str == NULL) {
return False;
}
- dom_sid = string_sid_talloc(talloc_tos(), sid_str);
- if (dom_sid == NULL) {
+ if (!string_to_sid(&dom_sid, sid_str)) {
return False;
}
- sid_copy(sid, dom_sid);
+ sid_copy(sid, &dom_sid);
}
return True;