00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _RPC_MISC_H
00025 #define _RPC_MISC_H
00026
00027 #define SMB_RPC_INTERFACE_VERSION 1
00028 #define PRS_POINTER_CAST BOOL (*)(const char*, prs_struct*, int, void*)
00029
00030 enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_TERMINATE = 2, UNI_BROKEN_NON_NULL = 3, UNI_STR_DBLTERMINATE = 4 };
00031
00032
00033
00034
00035
00036
00037
00038
00039 #define DOMAIN_USER_RID_ADMIN (0x000001F4L)
00040 #define DOMAIN_USER_RID_GUEST (0x000001F5L)
00041 #define DOMAIN_USER_RID_KRBTGT (0x000001F6L)
00042
00043
00044 #define DOMAIN_GROUP_RID_ADMINS (0x00000200L)
00045 #define DOMAIN_GROUP_RID_USERS (0x00000201L)
00046 #define DOMAIN_GROUP_RID_GUESTS (0x00000202L)
00047 #define DOMAIN_GROUP_RID_COMPUTERS (0x00000203L)
00048
00049 #define DOMAIN_GROUP_RID_CONTROLLERS (0x00000204L)
00050 #define DOMAIN_GROUP_RID_CERT_ADMINS (0x00000205L)
00051 #define DOMAIN_GROUP_RID_SCHEMA_ADMINS (0x00000206L)
00052 #define DOMAIN_GROUP_RID_ENTERPRISE_ADMINS (0x00000207L)
00053
00054
00055
00056
00057
00058
00059 #define BUILTIN_ALIAS_RID_ADMINS (0x00000220L)
00060 #define BUILTIN_ALIAS_RID_USERS (0x00000221L)
00061 #define BUILTIN_ALIAS_RID_GUESTS (0x00000222L)
00062 #define BUILTIN_ALIAS_RID_POWER_USERS (0x00000223L)
00063
00064 #define BUILTIN_ALIAS_RID_ACCOUNT_OPS (0x00000224L)
00065 #define BUILTIN_ALIAS_RID_SYSTEM_OPS (0x00000225L)
00066 #define BUILTIN_ALIAS_RID_PRINT_OPS (0x00000226L)
00067 #define BUILTIN_ALIAS_RID_BACKUP_OPS (0x00000227L)
00068
00069 #define BUILTIN_ALIAS_RID_REPLICATOR (0x00000228L)
00070 #define BUILTIN_ALIAS_RID_RAS_SERVERS (0x00000229L)
00071 #define BUILTIN_ALIAS_RID_PRE_2K_ACCESS (0x0000022aL)
00072
00073
00074
00075
00076
00077
00078
00079 #define BASE_RID (0x000003E8L)
00080
00081
00082 #define RID_TYPE_MASK 1
00083 #define RID_MULTIPLIER 2
00084
00085
00086 #define USER_RID_TYPE 0
00087 #define GROUP_RID_TYPE 1
00088
00089
00090
00091
00092
00093
00094
00095 typedef struct policy_handle POLICY_HND;
00096 typedef struct {
00097 uint32 ptr_hnd;
00098 uint32 handle;
00099 } ENUM_HND;
00100
00101 #define OUR_HANDLE(hnd) (((hnd)==NULL) ? "NULL" :\
00102 ( IVAL((hnd)->uuid.node,2) == (uint32)sys_getpid() ? "OURS" : \
00103 "OTHER")), ((unsigned int)IVAL((hnd)->uuid.node,2)),\
00104 ((unsigned int)sys_getpid() )
00105
00106
00107
00108
00109
00110
00111
00112 typedef struct {
00113 uint32 buf_max_len;
00114 uint32 buf_len;
00115 } BUFHDR;
00116
00117
00118 typedef struct {
00119 uint32 info_level;
00120 uint32 length;
00121 uint32 buffer;
00122 } BUFHDR2;
00123
00124
00125 typedef struct {
00126 uint32 size;
00127 uint32 buffer;
00128 } BUFHDR4;
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140 typedef struct {
00141 uint32 buf_max_len;
00142 uint32 offset;
00143 uint32 buf_len;
00144 uint16 *buffer;
00145 } REGVAL_BUFFER;
00146
00147
00148
00149 typedef struct {
00150 uint32 buf_len;
00151 uint8 *buffer;
00152 } RPC_DATA_BLOB;
00153
00154
00155
00156
00157
00158
00159 typedef struct {
00160 uint32 buf_len;
00161 uint16 *buffer;
00162 } BUFFER5;
00163
00164
00165
00166
00167
00168
00169 typedef struct {
00170 uint16 str_str_len;
00171 uint16 str_max_len;
00172 uint32 buffer;
00173 } STRHDR;
00174
00175 typedef struct {
00176 uint16 uni_str_len;
00177 uint16 uni_max_len;
00178 uint32 buffer;
00179 } UNIHDR;
00180
00181
00182
00183
00184
00185
00186 typedef struct {
00187 uint16 *buffer;
00188
00189 } UNISTR;
00190
00191 typedef struct {
00192
00193 uint32 uni_max_len;
00194 uint32 offset;
00195 uint32 uni_str_len;
00196 uint16 *buffer;
00197
00198
00199 } UNISTR2;
00200
00201
00202
00203
00204 typedef struct {
00205 uint32 uni_str_len;
00206 UNISTR str;
00207 } UNISTR3;
00208
00209 typedef struct {
00210 uint16 length;
00211 uint16 size;
00212 UNISTR2 *string;
00213 } UNISTR4;
00214
00215 typedef struct {
00216 uint32 count;
00217 UNISTR4 *strings;
00218 } UNISTR4_ARRAY;
00219
00220
00221
00222
00223
00224
00225 typedef struct {
00226 uint32 str_max_len;
00227 uint32 offset;
00228 uint32 str_str_len;
00229 uint8 *buffer;
00230 } STRING2;
00231
00232
00233
00234
00235
00236
00237
00238
00239 typedef struct {
00240 uint32 num_auths;
00241 DOM_SID sid;
00242 } DOM_SID2;
00243
00244
00245
00246
00247
00248
00249
00250 typedef struct {
00251 uint16 type;
00252 uint32 rid;
00253 uint32 rid_idx;
00254 } DOM_RID;
00255
00256
00257 typedef struct {
00258 uint16 type;
00259 uint32 rid;
00260 uint32 rid_idx;
00261 uint32 unknown;
00262 } DOM_RID2;
00263
00264 typedef struct {
00265 uint32 rid;
00266 uint32 type1;
00267 uint32 ptr_type;
00268 uint32 type2;
00269 uint32 unk;
00270 } DOM_RID3;
00271
00272
00273 typedef struct domrid4_info
00274 {
00275 uint32 unknown;
00276 uint16 attr;
00277 uint32 rid;
00278 } DOM_RID4;
00279
00280
00281 typedef struct {
00282 uint32 g_rid;
00283 uint32 attr;
00284 } DOM_GID;
00285
00286
00287
00288
00289
00290
00291 typedef struct clnt_srv_info {
00292 uint32 undoc_buffer;
00293 UNISTR2 uni_logon_srv;
00294 uint32 undoc_buffer2;
00295 UNISTR2 uni_comp_name;
00296 } DOM_CLNT_SRV;
00297
00298
00299 typedef struct log_info {
00300 uint32 undoc_buffer;
00301 UNISTR2 uni_logon_srv;
00302 UNISTR2 uni_acct_name;
00303 uint16 sec_chan;
00304 UNISTR2 uni_comp_name;
00305 } DOM_LOG_INFO;
00306
00307
00308 typedef struct chal_info {
00309 unsigned char data[8];
00310 } DOM_CHAL;
00311
00312
00313 typedef struct cred_info {
00314 DOM_CHAL challenge;
00315 UTIME timestamp;
00316 } DOM_CRED;
00317
00318
00319 typedef struct clnt_info {
00320 DOM_LOG_INFO login;
00321 DOM_CRED cred;
00322 } DOM_CLNT_INFO;
00323
00324
00325 typedef struct clnt_info2 {
00326 DOM_CLNT_SRV login;
00327 uint32 ptr_cred;
00328 DOM_CRED cred;
00329 } DOM_CLNT_INFO2;
00330
00331
00332 typedef struct logon_info {
00333 uint32 low;
00334 uint32 high;
00335 } DOM_LOGON_ID;
00336
00337
00338 typedef struct owf_info {
00339 uint8 data[16];
00340 } OWF_INFO;
00341
00342
00343 #endif