diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-12-16 08:41:22 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-12-17 12:29:26 +1100 |
commit | 1107021f3aa4ad1a3995a018d11aed485aa39c38 (patch) | |
tree | 5118f8508969c68e44f787bc22c999192e70f2ba /source4 | |
parent | b65f1a097754d32dd8b156e719d4a4f328bf4fbc (diff) | |
download | samba-1107021f3aa4ad1a3995a018d11aed485aa39c38.tar.gz samba-1107021f3aa4ad1a3995a018d11aed485aa39c38.tar.bz2 samba-1107021f3aa4ad1a3995a018d11aed485aa39c38.zip |
s4:samldb: make use of dom_sid_split_rid()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samldb.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index 627e15ab93..7ecc41d2c3 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -1120,6 +1120,7 @@ static int samldb_foreign_notice_sid(struct samldb_ctx *ac) { static const char * const attrs[3] = { "nextRid", "name", NULL }; struct ldb_request *req; + NTSTATUS status; char *filter; int ret; @@ -1127,12 +1128,10 @@ static int samldb_foreign_notice_sid(struct samldb_ctx *ac) return LDB_ERR_OPERATIONS_ERROR; } - ac->domain_sid = dom_sid_dup(ac, ac->sid); - if (!ac->domain_sid) { + status = dom_sid_split_rid(ac, ac->sid, &ac->domain_sid, NULL); + if (!NT_STATUS_IS_OK(status)) { return LDB_ERR_OPERATIONS_ERROR; } - /* get the domain component part of the provided SID */ - ac->domain_sid->num_auths--; filter = talloc_asprintf(ac, "(&(objectSid=%s)(objectclass=domain))", ldap_encode_ndr_dom_sid(ac, ac->domain_sid)); |