summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-09-22 10:37:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:19:14 -0500
commit492b8d38bf0f36cdf1b60eae102c8abee5455271 (patch)
tree394889fb5e1538155c5fffbd3ec9669c1b98514a /source4
parent677b680fcdf1e24bb73c57a42c61dd2300b5d911 (diff)
downloadsamba-492b8d38bf0f36cdf1b60eae102c8abee5455271.tar.gz
samba-492b8d38bf0f36cdf1b60eae102c8abee5455271.tar.bz2
samba-492b8d38bf0f36cdf1b60eae102c8abee5455271.zip
r18822: Automatically remove a forced dfs standard root creation.
Guenther (This used to be commit 5af5c1877465092b0682d4f166f6e33511e4a292)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/dfs.c60
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,