diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-03-23 01:30:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:11:12 -0500 |
commit | 79f6bcd5ae1711075ce0e75392ce83a72766698e (patch) | |
tree | eb7928570c6843880253d0ce053957b1a17d0fcb /source4/libnet | |
parent | 9b48673ad9ed5cf2019df7111fe6ef89ad57573d (diff) | |
download | samba-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/libnet')
-rw-r--r-- | source4/libnet/libnet_join.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c index 1186853520..1f02cc83b6 100644 --- a/source4/libnet/libnet_join.c +++ b/source4/libnet/libnet_join.c @@ -24,6 +24,7 @@ #include "librpc/gen_ndr/ndr_samr.h" #include "lib/crypto/crypto.h" #include "lib/ldb/include/ldb.h" +#include "include/secrets.h" /* * do a domain join using DCERPC/SAMR calls @@ -373,9 +374,9 @@ static NTSTATUS libnet_Join_primary_domain(struct libnet_context *ctx, msg = ldb_msg_new(mem_ctx); /* search for the secret record */ - ret = samdb_search(ldb, + ret = gendb_search(ldb, mem_ctx, base_dn, &msgs, attrs, - "(&(flatname=%s)(objectclass=primaryDomain))", + SECRETS_PRIMARY_DOMAIN_FILTER, r->generic.in.domain_name); if (ret == 0) { msg->dn = talloc_asprintf(mem_ctx, "flatname=%s,%s", |