initial netlogon database sync partly works - needs some IDL tweaks
authorAndrew Tridgell <tridge@samba.org>
Tue, 2 Dec 2003 04:05:05 +0000 (04:05 +0000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 2 Dec 2003 04:05:05 +0000 (04:05 +0000)
source/include/ntdomain.h
source/include/rpc_netlogon.h [deleted file]
source/librpc/idl/netlogon.idl
source/torture/rpc/netlogon.c

index 813c229c6b8b3d5c89e6ca8b8ba08dee2d3e2242..354ac36e49b0eaa05f3bd071bc98cb809e5f414c 100644 (file)
@@ -27,6 +27,5 @@
 #include "rpc_creds.h"
 #include "rpc_secdes.h"
 #include "rpc_lsa.h"
-#include "rpc_netlogon.h"
 
 #endif /* _NT_DOMAIN_H */
diff --git a/source/include/rpc_netlogon.h b/source/include/rpc_netlogon.h
deleted file mode 100644 (file)
index 68a3e42..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   SMB parameters and setup
-   Copyright (C) Andrew Tridgell 1992-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1996-1997
-   Copyright (C) Paul Ashton 1997
-   Copyright (C) Jean François Micouleau 2002
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#ifndef _RPC_NETLOGON_H /* _RPC_NETLOGON_H */
-#define _RPC_NETLOGON_H 
-
-
-/* NETLOGON pipe */
-#define NET_SAMLOGON           0x02
-#define NET_SAMLOGOFF          0x03
-#define NET_REQCHAL            0x04
-#define NET_AUTH               0x05
-#define NET_SRVPWSET           0x06
-#define NET_SAM_DELTAS         0x07
-#define NET_LOGON_CTRL         0x0c
-#define NET_AUTH2              0x0f
-#define NET_LOGON_CTRL2                0x0e
-#define NET_SAM_SYNC           0x10
-#define NET_TRUST_DOM_LIST     0x13
-#define NET_AUTH3              0x1a
-
-/* Secure Channel types.  used in NetrServerAuthenticate negotiation */
-#define SEC_CHAN_WKSTA   2
-#define SEC_CHAN_DOMAIN  4
-#define SEC_CHAN_BDC     6
-
-/* Returned delta types */
-#define SAM_DELTA_DOMAIN_INFO    0x01
-#define SAM_DELTA_GROUP_INFO     0x02
-#define SAM_DELTA_RENAME_GROUP   0x04
-#define SAM_DELTA_ACCOUNT_INFO   0x05
-#define SAM_DELTA_RENAME_USER    0x07
-#define SAM_DELTA_GROUP_MEM      0x08
-#define SAM_DELTA_ALIAS_INFO     0x09
-#define SAM_DELTA_RENAME_ALIAS   0x0b
-#define SAM_DELTA_ALIAS_MEM      0x0c
-#define SAM_DELTA_POLICY_INFO    0x0d
-#define SAM_DELTA_TRUST_DOMS     0x0e
-#define SAM_DELTA_PRIVS_INFO     0x10 /* DT_DELTA_ACCOUNTS */
-#define SAM_DELTA_SECRET_INFO    0x12
-#define SAM_DELTA_DELETE_GROUP   0x14
-#define SAM_DELTA_DELETE_USER    0x15
-#define SAM_DELTA_MODIFIED_COUNT 0x16
-
-/* SAM database types */
-#define SAM_DATABASE_DOMAIN    0x00 /* Domain users and groups */
-#define SAM_DATABASE_BUILTIN   0x01 /* BUILTIN users and groups */
-#define SAM_DATABASE_PRIVS     0x02 /* Privileges */
-
-
-
-#endif /* _RPC_NETLOGON_H */
index c97090dabdb338bb7295bbcef3f366faac97a0bd..a7c61d852a520d7618f68c8473afe322e93672bb 100644 (file)
@@ -258,6 +258,11 @@ interface netlogon
        /*****************/
        /* Function 0x05 */
 
+       /* secure channel types */
+       const int SEC_CHAN_WKSTA   = 2;
+       const int SEC_CHAN_DOMAIN  = 4;
+       const int SEC_CHAN_BDC     = 6;
+
        NTSTATUS netr_ServerAuthenticate(
                [in]        unistr *server_name,
                [in]        unistr username,
index dac9f8c4eada56f5bdb08377e1992bacc5e3b45b..a99ee642f53b6b5f313b79f48ad20b3950b1cdfa 100644 (file)
@@ -99,7 +99,7 @@ static BOOL test_SetupCredentials(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 
        a.in.server_name = NULL;
        a.in.username = talloc_asprintf(mem_ctx, "%s$", lp_netbios_name());
-       a.in.secure_challenge_type = 2;
+       a.in.secure_challenge_type = SEC_CHAN_BDC;
        a.in.computer_name = lp_netbios_name();
 
        printf("Testing ServerAuthenticate\n");
@@ -194,7 +194,7 @@ static BOOL test_SetPassword(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 
        r.in.server_name = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
        r.in.username = talloc_asprintf(mem_ctx, "%s$", lp_netbios_name());
-       r.in.secure_challenge_type = 2;
+       r.in.secure_challenge_type = SEC_CHAN_BDC;
        r.in.computer_name = lp_netbios_name();
 
        password = generate_random_str(8);
@@ -259,7 +259,7 @@ static BOOL test_DatabaseSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
        r.in.logonserver = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
        r.in.computername = lp_netbios_name();
        r.in.database_id = 1;
-       r.in.sync_context = 1;
+       r.in.sync_context = 0;
        r.in.preferredmaximumlength = (uint32)-1;
 
        printf("Testing DatabaseSync\n");