diff options
author | Günther Deschner <gd@samba.org> | 2007-11-06 01:39:47 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:44:26 +0100 |
commit | ef71598952f98edc55b4303ad3b66eec9ec24b9f (patch) | |
tree | 59ef1734ee9612b5c7dcbef6434d4a8ecd577d41 | |
parent | bffef39e71e543cfa7520884e4484680e5e260ce (diff) | |
download | samba-ef71598952f98edc55b4303ad3b66eec9ec24b9f.tar.gz samba-ef71598952f98edc55b4303ad3b66eec9ec24b9f.tar.bz2 samba-ef71598952f98edc55b4303ad3b66eec9ec24b9f.zip |
r25849: Add test for dfs FlushFtTable.
Guenther
(This used to be commit 5a50aae868b4638fb8f76bb6708ebef9808da8e9)
-rw-r--r-- | source4/torture/rpc/dfs.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c index 5596a5cadf..0262aa754f 100644 --- a/source4/torture/rpc/dfs.c +++ b/source4/torture/rpc/dfs.c @@ -596,6 +596,47 @@ static bool test_DcAddress(struct dcerpc_pipe *p, return true; } +static bool test_FlushFtTable(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + const char *host, + const char *sharename) +{ + NTSTATUS status; + struct dfs_FlushFtTable r; + enum dfs_ManagerVersion version; + + printf("Testing FlushFtTable\n"); + + if (!test_GetManagerVersion(p, mem_ctx, &version)) { + return false; + } + + r.in.servername = host; + r.in.rootshare = sharename; + + status = dcerpc_dfs_FlushFtTable(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("FlushFtTable failed - %s\n", nt_errstr(status)); + return false; + } else if (!W_ERROR_IS_OK(r.out.result)) { + printf("dfs_FlushFtTable 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_FtRoot(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + const char *host) +{ + const char *sharename = SMBTORTURE_DFS_SHARENAME; + + return test_FlushFtTable(p, mem_ctx, host, sharename); +} + bool torture_rpc_dfs(struct torture_context *torture) { NTSTATUS status; @@ -612,6 +653,7 @@ bool torture_rpc_dfs(struct torture_context *torture) ret &= test_Enum(p, torture); ret &= test_EnumEx(p, torture, host); ret &= test_StdRoot(p, torture, host); + ret &= test_FtRoot(p, torture, host); ret &= test_DcAddress(p, torture, host); return ret; |