summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-08-02 10:08:54 +0200
committerStefan Metzmacher <metze@samba.org>2013-08-10 09:18:59 +0200
commitc0144273af8f0956a05d102113c40cec77069f7a (patch)
tree77b41661f14b276379d7f0093987c08a7b0cb1fb /source4
parenta36ccdc83edb7437dd00601c459421286fd79db4 (diff)
downloadsamba-c0144273af8f0956a05d102113c40cec77069f7a.tar.gz
samba-c0144273af8f0956a05d102113c40cec77069f7a.tar.bz2
samba-c0144273af8f0956a05d102113c40cec77069f7a.zip
s4:libnet: avoid usage of dcerpc_schannel_creds()
We use cli_credentials_get_netlogon_creds() which returns the same value. dcerpc_schannel_creds() is a layer violation. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/libnet/libnet_samsync.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/libnet/libnet_samsync.c b/source4/libnet/libnet_samsync.c
index 9629b9f085..206d81ee36 100644
--- a/source4/libnet/libnet_samsync.c
+++ b/source4/libnet/libnet_samsync.c
@@ -25,7 +25,6 @@
#include "libcli/auth/libcli_auth.h"
#include "../libcli/samsync/samsync.h"
#include "auth/gensec/gensec.h"
-#include "auth/gensec/schannel.h"
#include "auth/credentials/credentials.h"
#include "libcli/auth/schannel.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
@@ -183,9 +182,9 @@ NTSTATUS libnet_SamSync_netlogon(struct libnet_context *ctx, TALLOC_CTX *mem_ctx
/* get NETLOGON credentials */
- nt_status = dcerpc_schannel_creds(p->conn->security_state.generic_state, samsync_ctx, &creds);
- if (!NT_STATUS_IS_OK(nt_status)) {
- r->out.error_string = talloc_strdup(mem_ctx, "Could not obtain NETLOGON credentials from DCERPC/GENSEC layer");
+ creds = cli_credentials_get_netlogon_creds(machine_account);
+ if (creds == NULL) {
+ r->out.error_string = talloc_strdup(mem_ctx, "Could not obtain NETLOGON credentials from credentials");
talloc_free(samsync_ctx);
return nt_status;
}