summaryrefslogtreecommitdiff
path: root/source4/rpc_server/netlogon
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-03-23 01:30:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:12 -0500
commit79f6bcd5ae1711075ce0e75392ce83a72766698e (patch)
treeeb7928570c6843880253d0ce053957b1a17d0fcb /source4/rpc_server/netlogon
parent9b48673ad9ed5cf2019df7111fe6ef89ad57573d (diff)
downloadsamba-79f6bcd5ae1711075ce0e75392ce83a72766698e.tar.gz
samba-79f6bcd5ae1711075ce0e75392ce83a72766698e.tar.bz2
samba-79f6bcd5ae1711075ce0e75392ce83a72766698e.zip
r5988: Fix the -P option (use machine account credentials) to use the Samba4
secrets system, and not the old system from Samba3. This allowed the code from auth_domain to be shared - we now only lookup the secrets.ldb in lib/credentials.c. In order to link the resultant binary, samdb_search() has been moved from deep inside rpc_server into lib/gendb.c, along with the existing gendb_search_v(). The vast majority of this patch is the simple rename that followed, (Depending on the whole SAMDB for just this function seemed pointless, and brought in futher dependencies, such as smbencrypt.c). Andrew Bartlett (This used to be commit e13c671619bd290a8b3cae8555cb281a9a185ee0)
Diffstat (limited to 'source4/rpc_server/netlogon')
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 6a29bf7db8..0b6106d485 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -152,7 +152,7 @@ static NTSTATUS netr_ServerAuthenticate3(struct dcesrv_call_state *dce_call, TAL
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
/* pull the user attributes */
- num_records = samdb_search(sam_ctx, mem_ctx, NULL, &msgs, attrs,
+ num_records = gendb_search(sam_ctx, mem_ctx, NULL, &msgs, attrs,
"(&(sAMAccountName=%s)(objectclass=user))",
r->in.account_name);
@@ -327,7 +327,7 @@ static NTSTATUS netr_ServerPasswordSet(struct dcesrv_call_state *dce_call, TALLO
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
/* pull the user attributes */
- num_records = samdb_search(sam_ctx, mem_ctx, NULL, &msgs, attrs,
+ num_records = gendb_search(sam_ctx, mem_ctx, NULL, &msgs, attrs,
"(&(sAMAccountName=%s)(objectclass=user))",
pipe_state->creds->account_name);
if (num_records == -1) {
@@ -353,7 +353,7 @@ static NTSTATUS netr_ServerPasswordSet(struct dcesrv_call_state *dce_call, TALLO
}
/* find the domain's DN */
- num_records_domain = samdb_search(sam_ctx, mem_ctx, NULL,
+ num_records_domain = gendb_search(sam_ctx, mem_ctx, NULL,
&msgs_domain, domain_attrs,
"(&(objectSid=%s)(objectclass=domain))",
domain_sid);
@@ -951,12 +951,12 @@ static NTSTATUS netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_call, TALL
primary domain is also a "trusted" domain, so we need to
put the primary domain into the lists of returned trusts as
well */
- ret1 = samdb_search(sam_ctx, mem_ctx, NULL, &res1, attrs, "(objectClass=domainDNS)");
+ ret1 = gendb_search(sam_ctx, mem_ctx, NULL, &res1, attrs, "(objectClass=domainDNS)");
if (ret1 != 1) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- ret2 = samdb_search(sam_ctx, mem_ctx, NULL, &res2, attrs, "(objectClass=trustedDomain)");
+ ret2 = gendb_search(sam_ctx, mem_ctx, NULL, &res2, attrs, "(objectClass=trustedDomain)");
if (ret2 == -1) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
@@ -1030,7 +1030,7 @@ static NTSTATUS netr_ServerPasswordSet2(struct dcesrv_call_state *dce_call, TALL
return NT_STATUS_INVALID_SYSTEM_SERVICE;
}
/* pull the user attributes */
- num_records = samdb_search(sam_ctx, mem_ctx, NULL, &msgs, attrs,
+ num_records = gendb_search(sam_ctx, mem_ctx, NULL, &msgs, attrs,
"(&(sAMAccountName=%s)(objectclass=user))",
pipe_state->creds->account_name);
if (num_records == -1) {
@@ -1056,7 +1056,7 @@ static NTSTATUS netr_ServerPasswordSet2(struct dcesrv_call_state *dce_call, TALL
}
/* find the domain's DN */
- num_records_domain = samdb_search(sam_ctx, mem_ctx, NULL,
+ num_records_domain = gendb_search(sam_ctx, mem_ctx, NULL,
&msgs_domain, domain_attrs,
"(&(objectSid=%s)(objectclass=domain))",
domain_sid);
@@ -1160,7 +1160,7 @@ static WERROR netr_DrsGetDCNameEx2(struct dcesrv_call_state *dce_call, TALLOC_CT
return WERR_DS_SERVICE_UNAVAILABLE;
}
- ret = samdb_search(sam_ctx, mem_ctx, NULL, &res, attrs,
+ ret = gendb_search(sam_ctx, mem_ctx, NULL, &res, attrs,
"(&(objectClass=domainDNS)(dnsDomain=%s))",
r->in.domain_name);
if (ret != 1) {
@@ -1248,7 +1248,7 @@ static WERROR netr_DsrEnumerateDomainTrusts(struct dcesrv_call_state *dce_call,
return WERR_GENERAL_FAILURE;
}
- ret = samdb_search(sam_ctx, mem_ctx, NULL, &res, attrs, "(objectClass=domainDNS)");
+ ret = gendb_search(sam_ctx, mem_ctx, NULL, &res, attrs, "(objectClass=domainDNS)");
if (ret == -1) {
return WERR_GENERAL_FAILURE;
}