2 Unix SMB/Netbios implementation.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-1997
6 Copyright (C) Luke Kenneth Casson Leighton 1996-1997
7 Copyright (C) Paul Ashton 1997
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 2 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, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _RPC_MISC_H /* _RPC_MISC_H */
30 /* well-known RIDs - Relative IDs */
32 /* RIDs - Well-known users ... */
33 #define DOMAIN_USER_RID_ADMIN (0x000001F4L)
34 #define DOMAIN_USER_RID_GUEST (0x000001F5L)
36 /* RIDs - well-known groups ... */
37 #define DOMAIN_GROUP_RID_ADMINS (0x00000200L)
38 #define DOMAIN_GROUP_RID_USERS (0x00000201L)
39 #define DOMAIN_GROUP_RID_GUESTS (0x00000202L)
41 /* RIDs - well-known aliases ... */
42 #define BUILTIN_ALIAS_RID_ADMINS (0x00000220L)
43 #define BUILTIN_ALIAS_RID_USERS (0x00000221L)
44 #define BUILTIN_ALIAS_RID_GUESTS (0x00000222L)
45 #define BUILTIN_ALIAS_RID_POWER_USERS (0x00000223L)
47 #define BUILTIN_ALIAS_RID_ACCOUNT_OPS (0x00000224L)
48 #define BUILTIN_ALIAS_RID_SYSTEM_OPS (0x00000225L)
49 #define BUILTIN_ALIAS_RID_PRINT_OPS (0x00000226L)
50 #define BUILTIN_ALIAS_RID_BACKUP_OPS (0x00000227L)
52 #define BUILTIN_ALIAS_RID_REPLICATOR (0x00000228L)
55 * Masks for mappings between unix uid and gid types and
59 /* Take the bottom bit. */
60 #define RID_TYPE_MASK 1
61 #define RID_MULTIPLIER 2
63 /* The two common types. */
64 #define USER_RID_TYPE 0
65 #define GROUP_RID_TYPE 1
68 typedef struct enum_hnd_info
70 uint32 ptr_hnd; /* pointer to enumeration handle */
71 uint32 handle; /* enumeration handle */
75 /* LOOKUP_LEVEL - switch value */
76 typedef struct lookup_level_info
82 /* DOM_SID2 - security id */
83 typedef struct sid_info_2
85 uint32 num_auths; /* length, bytes, including length of len :-) */
91 /* STRHDR - string header */
92 typedef struct header_info
96 uint32 buffer; /* non-zero */
100 /* UNIHDR - unicode string header */
101 typedef struct unihdr_info
105 uint32 buffer; /* usually has a value of 4 */
109 /* UNIHDR2 - unicode string header and undocumented buffer */
110 typedef struct unihdr2_info
113 uint32 buffer; /* 32 bit buffer pointer */
117 /* clueless as to what maximum length should be */
118 #define MAX_UNISTRLEN 256
119 #define MAX_STRINGLEN 256
120 #define MAX_BUFFERLEN 512
122 /* UNISTR - unicode string size and buffer */
123 typedef struct unistr_info
125 uint16 buffer[MAX_UNISTRLEN]; /* unicode characters. ***MUST*** be null-terminated */
129 /* BUFHDR - buffer header */
130 typedef struct bufhdr_info
137 /* BUFFER2 - unicode string, size (in uint8 ascii chars) and buffer */
138 /* pathetic. some stupid team of \PIPE\winreg writers got the concept */
139 /* of a unicode string different from the other \PIPE\ writers */
140 typedef struct buffer2_info
145 uint16 buffer[MAX_UNISTRLEN]; /* unicode characters. **NOT** necessarily null-terminated */
150 typedef struct buffer3_info
153 uint8 buffer[MAX_BUFFERLEN]; /* data */
158 /* UNISTR2 - unicode string size (in uint16 unicode chars) and buffer */
159 typedef struct unistr2_info
164 uint16 buffer[MAX_UNISTRLEN]; /* unicode characters. **NOT** necessarily null-terminated */
168 /* STRING2 - string size (in uint8 chars) and buffer */
169 typedef struct string2_info
174 uint8 buffer[MAX_STRINGLEN]; /* uint8 characters. **NOT** necessarily null-terminated */
178 /* UNISTR3 - XXXX not sure about this structure */
179 typedef struct unistr3_info
187 /* DOM_RID2 - domain RID structure for ntlsa pipe */
188 typedef struct domrid2_info
190 uint32 type; /* value is 5 */
191 uint32 undoc; /* value is non-zero */
193 uint32 rid_idx; /* don't know what this is */
197 /* DOM_RID3 - domain RID structure for samr pipe */
198 typedef struct domrid3_info
200 uint32 rid; /* domain-relative (to a SID) id */
201 uint32 type1; /* value is 0x1 */
202 uint32 ptr_type; /* undocumented pointer */
203 uint32 type2; /* value is 0x1 */
207 /* DOM_RID4 - rid + user attributes */
208 typedef struct domrid4_info
212 uint32 rid; /* user RID */
216 /* DOM_CLNT_SRV - client / server names */
217 typedef struct clnt_srv_info
219 uint32 undoc_buffer; /* undocumented 32 bit buffer pointer */
220 UNISTR2 uni_logon_srv; /* logon server name */
221 uint32 undoc_buffer2; /* undocumented 32 bit buffer pointer */
222 UNISTR2 uni_comp_name; /* client machine name */
226 /* DOM_LOG_INFO - login info */
227 typedef struct log_info
229 uint32 undoc_buffer; /* undocumented 32 bit buffer pointer */
230 UNISTR2 uni_logon_srv; /* logon server name */
231 UNISTR2 uni_acct_name; /* account name */
232 uint16 sec_chan; /* secure channel type */
233 UNISTR2 uni_comp_name; /* client machine name */
237 /* DOM_CLNT_INFO - client info */
238 typedef struct clnt_info
245 /* DOM_CLNT_INFO2 - client info */
246 typedef struct clnt_info2
254 /* DOM_LOGON_ID - logon id */
255 typedef struct logon_info
263 typedef struct owf_info
270 /* DOM_GID - group id + user attributes */
271 typedef struct gid_info
273 uint32 g_rid; /* a group RID */
278 #define POL_HND_SIZE 20
281 typedef struct lsa_policy_info
283 uint8 data[POL_HND_SIZE]; /* policy handle */
287 #endif /* _RPC_MISC_H */