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 /* pipe string names */
31 #define PIPE_SRVSVC "\\PIPE\\srvsvc"
32 #define PIPE_SAMR "\\PIPE\\samr"
33 #define PIPE_WINREG "\\PIPE\\winreg"
34 #define PIPE_WKSSVC "\\PIPE\\wkssvc"
35 #define PIPE_NETLOGON "\\PIPE\\NETLOGON"
36 #define PIPE_NTLSA "\\PIPE\\ntlsa"
37 #define PIPE_NTSVCS "\\PIPE\\ntsvcs"
38 #define PIPE_LSASS "\\PIPE\\lsass"
39 #define PIPE_LSARPC "\\PIPE\\lsarpc"
41 /* well-known RIDs - Relative IDs */
43 /* RIDs - Well-known users ... */
44 #define DOMAIN_USER_RID_ADMIN (0x000001F4L)
45 #define DOMAIN_USER_RID_GUEST (0x000001F5L)
47 /* RIDs - well-known groups ... */
48 #define DOMAIN_GROUP_RID_ADMINS (0x00000200L)
49 #define DOMAIN_GROUP_RID_USERS (0x00000201L)
50 #define DOMAIN_GROUP_RID_GUESTS (0x00000202L)
52 /* RIDs - well-known aliases ... */
53 #define DOMAIN_ALIAS_RID_ADMINS (0x00000220L)
54 #define DOMAIN_ALIAS_RID_USERS (0x00000221L)
55 #define DOMAIN_ALIAS_RID_GUESTS (0x00000222L)
56 #define DOMAIN_ALIAS_RID_POWER_USERS (0x00000223L)
58 #define DOMAIN_ALIAS_RID_ACCOUNT_OPS (0x00000224L)
59 #define DOMAIN_ALIAS_RID_SYSTEM_OPS (0x00000225L)
60 #define DOMAIN_ALIAS_RID_PRINT_OPS (0x00000226L)
61 #define DOMAIN_ALIAS_RID_BACKUP_OPS (0x00000227L)
63 #define DOMAIN_ALIAS_RID_REPLICATOR (0x00000228L)
66 typedef struct enum_hnd_info
68 uint32 ptr_hnd; /* pointer to enumeration handle */
69 uint32 handle; /* enumeration handle */
73 /* LOOKUP_LEVEL - switch value */
74 typedef struct lookup_level_info
80 #define MAXSUBAUTHS 15 /* max sub authorities in a SID */
82 /* DOM_SID - security id */
83 typedef struct sid_info
85 uint8 sid_rev_num; /* SID revision number */
86 uint8 num_auths; /* number of sub-authorities */
87 uint8 id_auth[6]; /* Identifier Authority */
89 * Note that the values in these uint32's are in *native* byteorder,
90 * not neccessarily little-endian...... JRA.
92 uint32 sub_auths[MAXSUBAUTHS]; /* pointer to sub-authorities. */
96 /* DOM_SID2 - security id */
97 typedef struct sid_info_2
99 uint32 num_auths; /* length, bytes, including length of len :-) */
105 /* STRHDR - string header */
106 typedef struct header_info
110 uint32 buffer; /* non-zero */
114 /* UNIHDR - unicode string header */
115 typedef struct unihdr_info
119 uint32 buffer; /* usually has a value of 4 */
123 /* UNIHDR2 - unicode string header and undocumented buffer */
124 typedef struct unihdr2_info
127 uint32 buffer; /* 32 bit buffer pointer */
131 /* clueless as to what maximum length should be */
132 #define MAX_UNISTRLEN 256
133 #define MAX_STRINGLEN 256
135 /* UNISTR - unicode string size and buffer */
136 typedef struct unistr_info
138 uint16 buffer[MAX_UNISTRLEN]; /* unicode characters. ***MUST*** be null-terminated */
142 /* UNINOTSTR2 - unicode string, size (in uint8 ascii chars) and buffer */
143 /* pathetic. some stupid team of \PIPE\winreg writers got the concept */
144 /* of a unicode string different from the other \PIPE\ writers */
145 typedef struct uninotstr2_info
150 uint16 buffer[MAX_UNISTRLEN]; /* unicode characters. **NOT** necessarily null-terminated */
154 /* UNISTR2 - unicode string size (in uint16 unicode chars) and buffer */
155 typedef struct unistr2_info
160 uint16 buffer[MAX_UNISTRLEN]; /* unicode characters. **NOT** necessarily null-terminated */
164 /* STRING2 - string size (in uint8 chars) and buffer */
165 typedef struct string2_info
170 uint8 buffer[MAX_STRINGLEN]; /* uint8 characters. **NOT** necessarily null-terminated */
175 /* DOM_RID2 - domain RID structure for ntlsa pipe */
176 typedef struct domrid2_info
178 uint32 type; /* value is 5 */
179 uint32 undoc; /* value is non-zero */
181 uint32 rid_idx; /* don't know what this is */
185 /* DOM_RID3 - domain RID structure for samr pipe */
186 typedef struct domrid3_info
188 uint32 rid; /* domain-relative (to a SID) id */
189 uint32 type1; /* value is 0x1 */
190 uint32 ptr_type; /* undocumented pointer */
191 uint32 type2; /* value is 0x1 */
195 /* DOM_RID4 - rid + user attributes */
196 typedef struct domrid4_info
200 uint32 rid; /* user RID */
204 /* DOM_CLNT_SRV - client / server names */
205 typedef struct clnt_srv_info
207 uint32 undoc_buffer; /* undocumented 32 bit buffer pointer */
208 UNISTR2 uni_logon_srv; /* logon server name */
209 uint32 undoc_buffer2; /* undocumented 32 bit buffer pointer */
210 UNISTR2 uni_comp_name; /* client machine name */
214 /* DOM_LOG_INFO - login info */
215 typedef struct log_info
217 uint32 undoc_buffer; /* undocumented 32 bit buffer pointer */
218 UNISTR2 uni_logon_srv; /* logon server name */
219 UNISTR2 uni_acct_name; /* account name */
220 uint16 sec_chan; /* secure channel type */
221 UNISTR2 uni_comp_name; /* client machine name */
225 /* DOM_CLNT_INFO - client info */
226 typedef struct clnt_info
233 /* DOM_CLNT_INFO2 - client info */
234 typedef struct clnt_info2
242 /* DOM_LOGON_ID - logon id */
243 typedef struct logon_info
251 typedef struct owf_info
258 /* DOM_GID - group id + user attributes */
259 typedef struct gid_info
261 uint32 g_rid; /* a group RID */
266 #define POL_HND_SIZE 20
269 typedef struct lsa_policy_info
271 uint8 data[POL_HND_SIZE]; /* policy handle */
275 #endif /* _RPC_MISC_H */