summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-10-31 02:46:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:32 -0500
commitb1d3d75c681d99f84aa2c60863597e32cdd24e66 (patch)
treefb176ac31ea7b8c0e1f4cef073d29c6bd5439000 /source4
parent375fe21ad686e8f8eaec9dd075bc37fef464b13e (diff)
downloadsamba-b1d3d75c681d99f84aa2c60863597e32cdd24e66.tar.gz
samba-b1d3d75c681d99f84aa2c60863597e32cdd24e66.tar.bz2
samba-b1d3d75c681d99f84aa2c60863597e32cdd24e66.zip
r11404: Another torture test and a new WERR.
Andrew Bartlett (This used to be commit de83b8cd187b28ecb30550c44f9f84e373df692e)
Diffstat (limited to 'source4')
-rw-r--r--source4/include/doserr.h1
-rw-r--r--source4/libcli/util/doserr.c1
-rw-r--r--source4/torture/rpc/netlogon.c13
3 files changed, 15 insertions, 0 deletions
diff --git a/source4/include/doserr.h b/source4/include/doserr.h
index 8fe5f2cf6c..5b8ff1dd3d 100644
--- a/source4/include/doserr.h
+++ b/source4/include/doserr.h
@@ -187,6 +187,7 @@
#define WERR_NO_MORE_ITEMS W_ERROR(259)
#define WERR_MORE_DATA W_ERROR(234)
#define WERR_CAN_NOT_COMPLETE W_ERROR(1003)
+#define WERR_INVALID_COMPUTERNAME W_ERROR(1210)
#define WERR_INVALID_DOMAINNAME W_ERROR(1212)
#define WERR_UNKNOWN_REVISION W_ERROR(1305)
#define WERR_REVISION_MISMATCH W_ERROR(1306)
diff --git a/source4/libcli/util/doserr.c b/source4/libcli/util/doserr.c
index a32da5a880..e1ef9d930a 100644
--- a/source4/libcli/util/doserr.c
+++ b/source4/libcli/util/doserr.c
@@ -72,6 +72,7 @@ static const struct werror_code_struct dos_errs[] =
{ "WERR_UNKNOWN_REVISION", WERR_UNKNOWN_REVISION },
{ "WERR_REVISION_MISMATCH", WERR_REVISION_MISMATCH },
{ "WERR_INVALID_OWNER", WERR_INVALID_OWNER },
+ { "WERR_INVALID_COMPUTERNAME", WERR_INVALID_COMPUTERNAME },
{ "WERR_INVALID_DOMAINNAME", WERR_INVALID_DOMAINNAME },
{ "WERR_NO_SUCH_USER", WERR_NO_SUCH_USER },
{ "WERR_NO_SUCH_DOMAIN", WERR_NO_SUCH_DOMAIN },
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 8993969098..a02f670439 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -1136,6 +1136,19 @@ static BOOL test_netr_DsRGetSiteName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ret = False;
}
}
+ r.in.computer_name = talloc_asprintf(mem_ctx, "\\\\%s", computer_name);
+ printf("Testing netr_DsRGetSiteName with broken computer name: %s\n", r.in.computer_name);
+
+ status = dcerpc_netr_DsRGetSiteName(p, mem_ctx, &r);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("netr_DsRGetSiteName - %s\n",
+ nt_errstr(status));
+ ret = False;
+ } else if (!W_ERROR_EQUAL(r.out.result, WERR_INVALID_COMPUTERNAME)) {
+ printf("netr_DsRGetSiteName - incorrect error return %s, expected %s\n",
+ win_errstr(r.out.result), win_errstr(WERR_INVALID_COMPUTERNAME));
+ ret = False;
+ }
return ret;
}