diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rpc/dfs.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c index bcd0370216..9815d71ca1 100644 --- a/source4/torture/rpc/dfs.c +++ b/source4/torture/rpc/dfs.c @@ -360,81 +360,81 @@ static BOOL test_EnumEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char * return ret; } - -static BOOL test_AddStdRootForced(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *host, const char *sharename) +static BOOL test_RemoveStdRoot(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *host, const char *sharename) { + struct dfs_RemoveStdRoot r; NTSTATUS status; - struct dfs_AddStdRootForced r; - enum dfs_ManagerVersion version; - - printf("Testing AddStdRootForced\n"); - if (!test_GetManagerVersion(p, mem_ctx, &version)) { - return False; - } + printf("Testing RemoveStdRoot\n"); r.in.servername = host; r.in.rootshare = sharename; - r.in.comment = "standard dfs forced standalone DFS root created by smbtorture (dfs_AddStdRootForced)"; - r.in.store = SMBTORTURE_DFS_PATHNAME; + r.in.flags = 0; - status = dcerpc_dfs_AddStdRootForced(p, mem_ctx, &r); + status = dcerpc_dfs_RemoveStdRoot(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { - printf("AddStdRootForced failed - %s\n", nt_errstr(status)); + printf("RemoveStdRoot failed - %s\n", nt_errstr(status)); return False; } else if (!W_ERROR_IS_OK(r.out.result)) { - printf("dfs_AddStdRootForced failed - %s\n", win_errstr(r.out.result)); - IS_DFS_VERSION_UNSUPPORTED_CALL_W2K3(version, r.out.result); + printf("dfs_RemoveStdRoot failed - %s\n", win_errstr(r.out.result)); return False; } return True; } -static BOOL test_RemoveStdRoot(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *host, const char *sharename) +static BOOL test_AddStdRoot(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *host, const char *sharename) { - struct dfs_RemoveStdRoot r; NTSTATUS status; + struct dfs_AddStdRoot r; - printf("Testing RemoveStdRoot\n"); + printf("Testing AddStdRoot\n"); r.in.servername = host; r.in.rootshare = sharename; + r.in.comment = "standard dfs standalone DFS root created by smbtorture (dfs_AddStdRoot)"; r.in.flags = 0; - status = dcerpc_dfs_RemoveStdRoot(p, mem_ctx, &r); + status = dcerpc_dfs_AddStdRoot(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { - printf("RemoveStdRoot failed - %s\n", nt_errstr(status)); + printf("AddStdRoot failed - %s\n", nt_errstr(status)); return False; } else if (!W_ERROR_IS_OK(r.out.result)) { - printf("dfs_RemoveStdRoot failed - %s\n", win_errstr(r.out.result)); + printf("dfs_AddStdRoot failed - %s\n", win_errstr(r.out.result)); return False; } return True; } -static BOOL test_AddStdRoot(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *host, const char *sharename) + +static BOOL test_AddStdRootForced(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const char *host, const char *sharename) { NTSTATUS status; - struct dfs_AddStdRoot r; + struct dfs_AddStdRootForced r; + enum dfs_ManagerVersion version; - printf("Testing AddStdRoot\n"); + printf("Testing AddStdRootForced\n"); + + if (!test_GetManagerVersion(p, mem_ctx, &version)) { + return False; + } r.in.servername = host; r.in.rootshare = sharename; - r.in.comment = "standard dfs standalone DFS root created by smbtorture (dfs_AddStdRoot)"; - r.in.flags = 0; + r.in.comment = "standard dfs forced standalone DFS root created by smbtorture (dfs_AddStdRootForced)"; + r.in.store = SMBTORTURE_DFS_PATHNAME; - status = dcerpc_dfs_AddStdRoot(p, mem_ctx, &r); + status = dcerpc_dfs_AddStdRootForced(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { - printf("AddStdRoot failed - %s\n", nt_errstr(status)); + printf("AddStdRootForced failed - %s\n", nt_errstr(status)); return False; } else if (!W_ERROR_IS_OK(r.out.result)) { - printf("dfs_AddStdRoot 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; } - return True; + return test_RemoveStdRoot(p, mem_ctx, host, sharename); } static void test_cleanup_stdroot(struct dcerpc_pipe *p, |