added netr_AccountSync(), another NT_STATUS_NOT_IMPLEMENTED call
authorAndrew Tridgell <tridge@samba.org>
Tue, 2 Dec 2003 10:04:10 +0000 (10:04 +0000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 2 Dec 2003 10:04:10 +0000 (10:04 +0000)
according to w2k3

source/librpc/idl/netlogon.idl
source/torture/rpc/netlogon.c

index 06a2581fd4ded95b8c8b4ee90c38ec278361787d..16f699129e11eb6949e0490702748ee990902245 100644 (file)
@@ -612,7 +612,7 @@ interface netlogon
                uint8 computer_name[16];
                uint32 timecreated;
                uint32 serial_number;
-       } UAS_INFO_0;
+       } netr_UAS_INFO_0;
 
        typedef struct {
                [flag(NDR_REMAINING)] DATA_BLOB blob;
@@ -623,36 +623,36 @@ interface netlogon
                [in]     unistr computername,
                [in]     netr_Authenticator credential,
                [in,out] netr_Authenticator return_authenticator,
-               [in]     UAS_INFO_0 uas,
+               [in]     netr_UAS_INFO_0 uas,
                [in]     uint32 count,
                [in]     uint32 level,
                [in]     uint32 buffersize,
                [out,subcontext(4)] netr_AccountBuffer buffer,
                [out]    uint32 count_returned,
                [out]    uint32 total_entries,
-               [out]    UAS_INFO_0 recordid
+               [out]    netr_UAS_INFO_0 recordid
                );
 
-#if 0
 
        /*****************/
        /* Function 0x0A */
 
        NTSTATUS netr_AccountSync(
-               [in][string] wchar_t *logonserver,
-               [in][string][ref] wchar_t *computername,
-               [in][ref] AUTHENTICATOR credential,
-               [in][out][ref] AUTHENTICATOR return_authenticator,
-               [out][ref][size_is(count_returned)] uint8 *Buffer,
-               [out][ref] uint32 count_returned,
-               [out][ref] uint32 total_entries,
-               [out][ref] uint32 next_reference,
-               [in][long] reference,
-               [in][long] level,
-               [in][long] buffersize,
-               [in][out][ref] UAS_INFO_0 recordid,
+               [in]      unistr *logonserver,
+               [in]      unistr computername,
+               [in]      netr_Authenticator credential,
+               [in,out]  netr_Authenticator return_authenticator,
+               [in]      uint32 reference,
+               [in]      uint32 level,
+               [in]      uint32 buffersize,
+               [out,subcontext(4)] netr_AccountBuffer buffer,
+               [out]     uint32 count_returned,
+               [out]     uint32 total_entries,
+               [out]     uint32 next_reference,
+               [in,out]  netr_UAS_INFO_0 recordid
                );
 
+#if 0
 
        /*****************/
        /* Function 0x0B */
index 07776026d047c8d6f0b57c2277a815c2c74ad76b..89f1a0132bd0ffd4892fc83aa436fa165fc303c8 100644 (file)
@@ -393,6 +393,41 @@ static BOOL test_AccountDeltas(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
        return ret;
 }
 
+/*
+  try a netlogon AccountSync
+*/
+static BOOL test_AccountSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
+{
+       NTSTATUS status;
+       struct netr_AccountSync r;
+       struct netr_CredentialState creds;
+       BOOL ret = True;
+
+       if (!test_SetupCredentials(p, mem_ctx, &creds)) {
+               return False;
+       }
+
+       r.in.logonserver = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
+       r.in.computername = lp_netbios_name();
+       ZERO_STRUCT(r.in.return_authenticator);
+       creds_client_authenticator(&creds, &r.in.credential);
+       ZERO_STRUCT(r.in.recordid);
+       r.in.reference=0;
+       r.in.level=0;
+       r.in.buffersize=100;
+
+       printf("Testing AccountSync\n");
+
+       /* w2k3 returns "NOT IMPLEMENTED" for this call */
+       status = dcerpc_netr_AccountSync(p, mem_ctx, &r);
+       if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) {
+               printf("AccountSync - %s\n", nt_errstr(status));
+               ret = False;
+       }
+
+       return ret;
+}
+
 
 BOOL torture_rpc_netlogon(int dummy)
 {
@@ -413,7 +448,7 @@ BOOL torture_rpc_netlogon(int dummy)
        
        p->flags |= DCERPC_DEBUG_PRINT_BOTH;
 
-       if (!test_AccountDeltas(p, mem_ctx)) {
+       if (!test_AccountSync(p, mem_ctx)) {
                ret = False;
        }
        return ret;
@@ -442,6 +477,10 @@ BOOL torture_rpc_netlogon(int dummy)
                ret = False;
        }
 
+       if (!test_AccountDeltas(p, mem_ctx)) {
+               ret = False;
+       }
+
         torture_rpc_close(p);
 
        return ret;