r18625: dfs_GetManagerVersion() returns a version number, not just an exist
authorGünther Deschner <gd@samba.org>
Mon, 18 Sep 2006 20:00:51 +0000 (20:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:57 +0000 (14:18 -0500)
flag.

Guenther
(This used to be commit 3e42ccc6096198458f66841f91234f670ceb59c4)

source4/librpc/idl/dfs.idl
source4/torture/rpc/dfs.c

index 62e0fb900a926eccd8b275e53b6466038b8b167b..9a3d28f1d93e20522f664ac74e73f82576c2e55f 100644 (file)
 {
        /******************/
        /* Function: 0x00 */
+       typedef [v1_enum] enum {
+               DFS_MANAGER_VERSION_NT4         = 0,
+               DFS_MANAGER_VERSION_W2K         = 2,
+               DFS_MANAGER_VERSION_W2K3        = 4
+       } dfs_ManagerVersion;
+
        void dfs_GetManagerVersion(
-               [out] uint32 *exist_flag
+               [out]           dfs_ManagerVersion *version
                );
 
 
index 1813c6434161e3bba19a605b1e01de771cccd69f..b4c95e85c52bb610afa19ff55e45f469e77bc794 100644 (file)
@@ -1,6 +1,6 @@
 /* 
    Unix SMB/CIFS implementation.
-   test suite for lsa dfs operations
+   test suite for rpc dfs operations
 
    Copyright (C) Andrew Tridgell 2003
    
 #include "torture/rpc/rpc.h"
 #include "librpc/gen_ndr/ndr_dfs_c.h"
 
-
-static BOOL test_GetManagerVersion(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
+static BOOL test_GetManagerVersion(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, enum dfs_ManagerVersion *version)
 {
        NTSTATUS status;
        struct dfs_GetManagerVersion r;
-       uint32_t exist = 0;
 
-       r.out.exist_flag = &exist;
+       r.out.version = version;
 
        status = dcerpc_dfs_GetManagerVersion(p, mem_ctx, &r);
        if (!NT_STATUS_IS_OK(status)) {
@@ -172,6 +170,7 @@ BOOL torture_rpc_dfs(struct torture_context *torture)
         struct dcerpc_pipe *p;
        TALLOC_CTX *mem_ctx;
        BOOL ret = True;
+       enum dfs_ManagerVersion version;
 
        mem_ctx = talloc_init("torture_rpc_dfs");
 
@@ -182,7 +181,7 @@ BOOL torture_rpc_dfs(struct torture_context *torture)
                return False;
        }
 
-       if (!test_GetManagerVersion(p, mem_ctx)) {
+       if (!test_GetManagerVersion(p, mem_ctx, &version)) {
                ret = False;
        }