2 Unix SMB/CIFS implementation.
3 SMB parameters and setup
4 Copyright (C) Andrew Tridgell 1992-1997
5 Copyright (C) Luke Kenneth Casson Leighton 1996-1997
6 Copyright (C) Paul Ashton 1997
7 Copyright (C) Jean François Micouleau 2002
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef _RPC_NETLOGON_H /* _RPC_NETLOGON_H */
24 #define _RPC_NETLOGON_H
28 #define NET_SAMLOGON 0x02
29 #define NET_SAMLOGOFF 0x03
30 #define NET_REQCHAL 0x04
32 #define NET_SRVPWSET 0x06
33 #define NET_SAM_DELTAS 0x07
34 #define NET_GETDCNAME 0x0b
35 #define NET_LOGON_CTRL 0x0c
36 #define NET_GETANYDCNAME 0x0d
37 #define NET_AUTH2 0x0f
38 #define NET_LOGON_CTRL2 0x0e
39 #define NET_SAM_SYNC 0x10
40 #define NET_TRUST_DOM_LIST 0x13
41 #define NET_DSR_GETDCNAME 0x14
42 #define NET_AUTH3 0x1a
43 #define NET_DSR_GETDCNAMEEX 0x1b
44 #define NET_DSR_GETSITENAME 0x1c
45 #define NET_DSR_GETDCNAMEEX2 0x22
46 #define NET_SAMLOGON_EX 0x27
48 /* flags use when sending a NETLOGON_CONTROL request */
50 #define NETLOGON_CONTROL_SYNC 0x2
51 #define NETLOGON_CONTROL_REDISCOVER 0x5
52 #define NETLOGON_CONTROL_TC_QUERY 0x6
53 #define NETLOGON_CONTROL_TRANSPORT_NOTIFY 0x7
54 #define NETLOGON_CONTROL_SET_DBFLAG 0xfffe
56 /* Some flag values reverse engineered from NLTEST.EXE */
57 /* used in the NETLOGON_CONTROL[2] reply */
59 #define NL_CTRL_IN_SYNC 0x0000
60 #define NL_CTRL_REPL_NEEDED 0x0001
61 #define NL_CTRL_REPL_IN_PROGRESS 0x0002
62 #define NL_CTRL_FULL_SYNC 0x0004
64 #define LOGON_KRB5_FAIL_CLOCK_SKEW 0x02000000
66 /* Flags for controlling the behaviour of a particular logon */
68 /* sets NETLOGON_SERVER_TRUST_ACCOUNT user_flag */
70 #define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT 0x00000020
71 #define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT 0x00000800
73 /* updates the "logon time" on network logon */
74 #define MSV1_0_UPDATE_LOGON_STATISTICS 0x00000004
76 /* returns the user parameters in the driveletter */
77 #define MSV1_0_RETURN_USER_PARAMETERS 0x00000008
79 /* returns the profilepath in the driveletter and
80 * sets LOGON_PROFILE_PATH_RETURNED user_flag */
81 #define MSV1_0_RETURN_PROFILE_PATH 0x00000200
84 #define INTERACTIVE_LOGON_TYPE 1
85 #define NET_LOGON_TYPE 2
88 typedef struct account_lockout_string {
92 /* uint16 *bindata; */
93 uint64 lockout_duration;
95 uint32 bad_attempt_lockout;
99 /* HDR_LOCKOUT_STRING */
100 typedef struct hdr_account_lockout_string {
104 } HDR_LOCKOUT_STRING;
106 #define DSGETDC_VALID_FLAGS ( \
107 DS_FORCE_REDISCOVERY | \
108 DS_DIRECTORY_SERVICE_REQUIRED | \
109 DS_DIRECTORY_SERVICE_PREFERRED | \
110 DS_GC_SERVER_REQUIRED | \
112 DS_BACKGROUND_ONLY | \
115 DS_TIMESERV_REQUIRED | \
116 DS_WRITABLE_REQUIRED | \
117 DS_GOOD_TIMESERV_PREFERRED | \
119 DS_ONLY_LDAP_NEEDED | \
122 DS_RETURN_FLAT_NAME | \
125 struct DS_DOMAIN_CONTROLLER_INFO {
126 const char *domain_controller_name;
127 const char *domain_controller_address;
128 int32 domain_controller_address_type;
129 struct GUID *domain_guid;
130 const char *domain_name;
131 const char *dns_forest_name;
133 const char *dc_site_name;
134 const char *client_site_name;
137 #endif /* _RPC_NETLOGON_H */