diff options
author | Günther Deschner <gd@samba.org> | 2006-09-21 06:06:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:19:10 -0500 |
commit | 3a3da493f0206618d61b02df8f7eb42f6f3c6b4d (patch) | |
tree | dc1484323a676c11c22d9a3da5a6f86be45781d1 /source4/torture/rpc | |
parent | bd0245bbd6d165bbcaa80d2cec5b5c2fe5ab2281 (diff) | |
download | samba-3a3da493f0206618d61b02df8f7eb42f6f3c6b4d.tar.gz samba-3a3da493f0206618d61b02df8f7eb42f6f3c6b4d.tar.bz2 samba-3a3da493f0206618d61b02df8f7eb42f6f3c6b4d.zip |
r18776: Fill in and test dfs_ManagerInitialize().
Guenther
(This used to be commit 3e0e9506b62322cba65d992fc8d783001595e7e7)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/dfs.c | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c index 36d3618f83..91c76724d1 100644 --- a/source4/torture/rpc/dfs.c +++ b/source4/torture/rpc/dfs.c @@ -155,6 +155,34 @@ static BOOL test_GetManagerVersion(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, e return True; } +static BOOL test_ManagerInitialize(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *host) +{ + NTSTATUS status; + enum dfs_ManagerVersion version; + struct dfs_ManagerInitialize r; + + printf("Testing ManagerInitialize\n"); + + if (!test_GetManagerVersion(p, mem_ctx, &version)) { + return False; + } + + r.in.servername = host; + r.in.flags = 0; + + status = dcerpc_dfs_ManagerInitialize(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("ManagerInitialize failed - %s\n", nt_errstr(status)); + return False; + } else if (!W_ERROR_IS_OK(r.out.result)) { + printf("dfs_ManagerInitialize failed - %s\n", win_errstr(r.out.result)); + IS_DFS_VERSION_UNSUPPORTED_CALL_W2K3(version, r.out.result); + return False; + } + + return True; +} + static BOOL test_GetInfoLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16_t level, const char *root) { @@ -170,10 +198,10 @@ static BOOL test_GetInfoLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint16 status = dcerpc_dfs_GetInfo(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { - printf("Info failed - %s\n", nt_errstr(status)); + printf("GetInfo failed - %s\n", nt_errstr(status)); return False; } else if (!W_ERROR_IS_OK(r.out.result)) { - printf("GetInfo failed - %s\n", win_errstr(r.out.result)); + printf("dfs_GetInfo failed - %s\n", win_errstr(r.out.result)); return False; } @@ -355,7 +383,7 @@ static BOOL test_StdRootForced(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const printf("AddStdRootForced failed - %s\n", nt_errstr(status)); return False; } else if (!W_ERROR_IS_OK(r.out.result)) { - printf("AddStdRootForced failed - %s\n", win_errstr(r.out.result)); + printf("dfs_AddStdRootForced failed - %s\n", win_errstr(r.out.result)); IS_DFS_VERSION_UNSUPPORTED_CALL_W2K3(version, r.out.result); return False; } @@ -471,6 +499,7 @@ BOOL torture_rpc_dfs(struct torture_context *torture) } ret &= test_GetManagerVersion(p, mem_ctx, &version); + ret &= test_ManagerInitialize(p, mem_ctx, host); ret &= test_Enum(p, mem_ctx); ret &= test_EnumEx(p, mem_ctx, host); ret &= test_StdRoot(p, mem_ctx, host); |