summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-11-24 15:56:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:29 -0500
commit3ac1f590e966df67d6858a1dd482d80369f9f1a0 (patch)
treef30f5f5a076cc597049a24b8379f41289ea94483
parentb48a01b4a53005e0bae69ec3b8bb434f3a0aa9c7 (diff)
downloadsamba-3ac1f590e966df67d6858a1dd482d80369f9f1a0.tar.gz
samba-3ac1f590e966df67d6858a1dd482d80369f9f1a0.tar.bz2
samba-3ac1f590e966df67d6858a1dd482d80369f9f1a0.zip
r19876: test that we can do a session setup and tree connect using the workstation
and dc credentials I noticed w2k3 has gets NT_STATUS_LOGON_FAILURE after a it has joined a samba4 domain metze (This used to be commit 5da2762b620139f9c332d78abfc084f333538ab8)
-rw-r--r--source4/torture/rpc/join.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/source4/torture/rpc/join.c b/source4/torture/rpc/join.c
index 0cb0f09ad5..a2a30e285a 100644
--- a/source4/torture/rpc/join.c
+++ b/source4/torture/rpc/join.c
@@ -1,5 +1,6 @@
#include "includes.h"
#include "libnet/libnet.h"
+#include "libcli/libcli.h"
#include "auth/credentials/credentials.h"
#include "torture/rpc/rpc.h"
@@ -8,9 +9,12 @@
BOOL torture_rpc_join(struct torture_context *torture)
-{
+{
+ NTSTATUS status;
struct test_join *tj;
struct cli_credentials *machine_account;
+ struct smbcli_state *cli;
+ const char *host = lp_parm_string(-1, "torture", "host");
/* Join domain as a member server. */
tj = torture_join_domain(TORTURE_NETBIOS_NAME,
@@ -18,10 +22,21 @@ BOOL torture_rpc_join(struct torture_context *torture)
&machine_account);
if (!tj) {
- DEBUG(0, ("%s failed to join domain\n",
+ DEBUG(0, ("%s failed to join domain as workstation\n",
TORTURE_NETBIOS_NAME));
return False;
}
+
+ status = smbcli_full_connection(tj, &cli, host,
+ "IPC$", NULL,
+ machine_account,
+ NULL);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
+ TORTURE_NETBIOS_NAME));
+ return False;
+ }
+ smbcli_tdis(cli);
/* Leave domain. */
torture_leave_domain(tj);
@@ -31,11 +46,23 @@ BOOL torture_rpc_join(struct torture_context *torture)
ACB_SVRTRUST,
&machine_account);
if (!tj) {
- DEBUG(0, ("%s failed to join domain\n",
+ DEBUG(0, ("%s failed to join domain as domain controller\n",
TORTURE_NETBIOS_NAME));
return False;
}
+ status = smbcli_full_connection(tj, &cli, host,
+ "IPC$", NULL,
+ machine_account,
+ NULL);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
+ TORTURE_NETBIOS_NAME));
+ return False;
+ }
+
+ smbcli_tdis(cli);
+
/* Leave domain. */
torture_leave_domain(tj);