1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

initial netlogon database sync partly works - needs some IDL tweaks

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 983c0e9683
commit 75ea276c14
4 changed files with 8 additions and 76 deletions

View 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 */

View File

@ -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 */

View 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,

View 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");