summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-04-26 03:52:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:35 -0500
commit2cabf613e36e9d1ca0374d96b9028220b7fe15f5 (patch)
treeb6390224e86eee2a5d40a0e20cffb5a331bb2bb3 /source4
parent3fb30e46beb0227f57c5277206d95f070b8316b8 (diff)
downloadsamba-2cabf613e36e9d1ca0374d96b9028220b7fe15f5.tar.gz
samba-2cabf613e36e9d1ca0374d96b9028220b7fe15f5.tar.bz2
samba-2cabf613e36e9d1ca0374d96b9028220b7fe15f5.zip
r365: improved the IDL for samr_Connect5()
(This used to be commit 4b4f025504cb5b92c8b119259f1df622cd72ec7c)
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/idl/samr.idl27
-rw-r--r--source4/torture/rpc/samr.c20
2 files changed, 26 insertions, 21 deletions
diff --git a/source4/librpc/idl/samr.idl b/source4/librpc/idl/samr.idl
index 92b7a3fa91..0e1bdd3b9f 100644
--- a/source4/librpc/idl/samr.idl
+++ b/source4/librpc/idl/samr.idl
@@ -1077,6 +1077,7 @@
/* Function 0x3d */
NTSTATUS samr_Connect3(
[in] unistr *system_name,
+ /* this unknown value seems to be completely ignored by w2k3 */
[in] uint32 unknown,
[in] uint32 access_mask,
[out,ref] policy_handle *handle
@@ -1108,18 +1109,22 @@
/************************/
/* Function 0x40 */
+
+ typedef struct {
+ uint32 unknown1; /* w2k3 gives 3 */
+ uint32 unknown2; /* w2k3 gives 0 */
+ } samr_ConnectInfo1;
+
+ typedef union {
+ [case(1)] samr_ConnectInfo1 info1;
+ } samr_ConnectInfo;
+
NTSTATUS samr_Connect5(
- [in] unistr *system_name,
- [in] uint32 access_mask,
- [in] uint32 unknown0,
- [in] uint32 unknown1,
- [in] uint32 unknown2,
- [in] uint32 unknown3,
- [out] uint32 unknown4,
- [out] uint32 unknown5,
- [out] uint32 unknown6,
- [out] uint32 unknown7,
- [out,ref] policy_handle *handle
+ [in] unistr *system_name,
+ [in] uint32 access_mask,
+ [in,out] uint32 level,
+ [in,out,switch_is(level),ref] samr_ConnectInfo *info,
+ [out,ref] policy_handle *handle
);
/************************/
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 12639de688..a41ac16a99 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -2594,6 +2594,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct samr_Connect3 r3;
struct samr_Connect4 r4;
struct samr_Connect5 r5;
+ union samr_ConnectInfo info;
BOOL ret = True;
printf("testing samr_Connect\n");
@@ -2610,7 +2611,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("testing samr_Connect2\n");
- r2.in.system_name = "";
+ r2.in.system_name = NULL;
r2.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
r2.out.handle = handle;
@@ -2622,7 +2623,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("testing samr_Connect3\n");
- r3.in.system_name = "";
+ r3.in.system_name = NULL;
r3.in.unknown = 0;
r3.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
r3.out.handle = handle;
@@ -2648,21 +2649,20 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("testing samr_Connect5\n");
+ info.info1.unknown1 = 0;
+ info.info1.unknown2 = 0;
+
r5.in.system_name = "";
r5.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
- r5.in.unknown0 = 1; /*Magic values I took from a WinXP pro workstation */
- r5.in.unknown1 = 1; /*tests failed with NT_STATUS_NET_WRITE_FAULT if */
- r5.in.unknown2 = 3; /*unknown0 and unknown1 where something other than 1 */
- r5.in.unknown3 = 0; /*unkown2 and unknown3 could be varied and had no effect */
+ r5.in.level = 1;
+ r5.in.info = &info;
+ r5.out.info = &info;
r5.out.handle = handle;
status = dcerpc_samr_Connect5(p, mem_ctx, &r5);
if (!NT_STATUS_IS_OK(status)) {
- /*This fails for a Win2000pro machine, but succeeds for
- WinXPpro -- Kai
- */
printf("Connect5 failed - %s\n", nt_errstr(status));
- /*ret = False; Should this test fail? */
+ ret = False;
}
return ret;