summaryrefslogtreecommitdiff
path: root/source4/utils
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-01-12 09:33:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:50:55 -0500
commita5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f (patch)
tree71b27ab4d11e2fc537b0ccf5d4e9c75dcc9757eb /source4/utils
parent4c6b9c79ff5d35e1d03ad5eb543db4b6b906b5ce (diff)
downloadsamba-a5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f.tar.gz
samba-a5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f.tar.bz2
samba-a5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f.zip
r12865: Upgrade the librpc and libnet code.
In librpc, always try SMB level authentication, even if trying schannel, but allow fallback to anonymous. This should better function with servers that set restrict anonymous. There are too many parts of Samba that get, parse and modify the binding parameters. Avoid the extra work, and add a binding element to the struct dcerpc_pipe The libnet vampire code has been refactored, to reduce extra layers and to better conform with the standard argument pattern. Also, take advantage of the new libnet_Lookup code, so we don't require the silly 'password server' smb.conf parameter. To better support forcing traffic to be sealed for the vampire operation, the dcerpc_bind_auth() function now takes an auth level parameter. Andrew Bartlett (This used to be commit d65b354959842326fdd4bd7eb7fbeea0390f4afa)
Diffstat (limited to 'source4/utils')
-rw-r--r--source4/utils/net/net_vampire.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/source4/utils/net/net_vampire.c b/source4/utils/net/net_vampire.c
index 75ad175c66..f89739225d 100644
--- a/source4/utils/net/net_vampire.c
+++ b/source4/utils/net/net_vampire.c
@@ -48,7 +48,7 @@ static int net_samdump_keytab(struct net_context *ctx, int argc, const char **ar
return net_samdump_keytab_usage(ctx, argc, argv);
break;
case 1:
- r.keytab_name = argv[0];
+ r.in.keytab_name = argv[0];
break;
}
@@ -58,14 +58,15 @@ static int net_samdump_keytab(struct net_context *ctx, int argc, const char **ar
}
libnetctx->cred = ctx->credentials;
- r.level = LIBNET_SAMDUMP_GENERIC;
- r.error_string = NULL;
+ r.out.error_string = NULL;
+ r.in.machine_account = NULL;
+ r.in.binding_string = NULL;
status = libnet_SamDump_keytab(libnetctx, ctx->mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("libnet_SamDump returned %s: %s\n",
nt_errstr(status),
- r.error_string));
+ r.out.error_string));
return -1;
}
@@ -103,14 +104,15 @@ int net_samdump(struct net_context *ctx, int argc, const char **argv)
}
libnetctx->cred = ctx->credentials;
- r.level = LIBNET_SAMDUMP_GENERIC;
- r.error_string = NULL;
+ r.out.error_string = NULL;
+ r.in.machine_account = NULL;
+ r.in.binding_string = NULL;
status = libnet_SamDump(libnetctx, ctx->mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("libnet_SamDump returned %s: %s\n",
nt_errstr(status),
- r.error_string));
+ r.out.error_string));
return -1;
}
@@ -144,14 +146,15 @@ int net_samsync_ldb(struct net_context *ctx, int argc, const char **argv)
}
libnetctx->cred = ctx->credentials;
- r.level = LIBNET_SAMSYNC_LDB_GENERIC;
- r.error_string = NULL;
+ r.out.error_string = NULL;
+ r.in.machine_account = NULL;
+ r.in.binding_string = NULL;
status = libnet_samsync_ldb(libnetctx, ctx->mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("libnet_samsync_ldb returned %s: %s\n",
nt_errstr(status),
- r.error_string));
+ r.out.error_string));
return -1;
}