summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-08-26 16:06:31 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-26 15:34:21 +0200
commite8aed9472a2165306c3b9b3fe92e1581a1b5d460 (patch)
tree9a3babd08df067926643ce1d51c9130ab09259c4
parent9a137311f129c795897c2633aab95c47db7b5903 (diff)
downloadsamba-e8aed9472a2165306c3b9b3fe92e1581a1b5d460.tar.gz
samba-e8aed9472a2165306c3b9b3fe92e1581a1b5d460.tar.bz2
samba-e8aed9472a2165306c3b9b3fe92e1581a1b5d460.zip
s4-drsuapi Allow DsAddEntry of normal objects
We previously only allowed objects of class ntDSDSA Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Aug 26 15:34:21 CEST 2011 on sn-devel-104
-rw-r--r--source4/rpc_server/drsuapi/addentry.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/rpc_server/drsuapi/addentry.c b/source4/rpc_server/drsuapi/addentry.c
index 5f030a0951..fc78b875c7 100644
--- a/source4/rpc_server/drsuapi/addentry.c
+++ b/source4/rpc_server/drsuapi/addentry.c
@@ -61,11 +61,16 @@ static WERROR drsuapi_add_SPNs(struct drsuapi_bind_state *b_state,
ret = ldb_search(b_state->sam_ctx, mem_ctx, &res,
dn, LDB_SCOPE_BASE, attrs,
"(objectClass=ntDSDSA)");
- if (ret != LDB_SUCCESS || res->count < 1) {
+ if (ret != LDB_SUCCESS) {
DEBUG(0,(__location__ ": Failed to find dn '%s'\n", dn_string));
return WERR_DS_DRA_INTERNAL_ERROR;
}
+ if (res->count < 1) {
+ /* we only add SPNs for nTDSDSA objects */
+ continue;
+ }
+
ref_dn = samdb_result_dn(b_state->sam_ctx, mem_ctx, res->msgs[0], "serverReference", NULL);
if (ref_dn == NULL) {
/* we only add SPNs for objects with a