1 #ifndef _WINBINDD_PROTO_H_
2 #define _WINBINDD_PROTO_H_
3 /* This file is automatically generated with "make proto". DO NOT EDIT */
6 /*The following definitions come from lib/access.c */
8 BOOL
allow_access(char *deny_list
,char *allow_list
,
9 char *cname
,char *caddr
);
10 BOOL
check_access(int sock
, char *allow_list
, char *deny_list
);
12 /*The following definitions come from lib/bitmap.c */
14 struct bitmap
*bitmap_allocate(int n
);
15 BOOL
bitmap_set(struct bitmap
*bm
, unsigned i
);
16 BOOL
bitmap_clear(struct bitmap
*bm
, unsigned i
);
17 BOOL
bitmap_query(struct bitmap
*bm
, unsigned i
);
18 int bitmap_find(struct bitmap
*bm
, unsigned ofs
);
20 /*The following definitions come from lib/charcnv.c */
22 char *unix2dos_format(char *str
,BOOL overwrite
);
23 char *dos2unix_format(char *str
, BOOL overwrite
);
24 void interpret_character_set(char *str
);
26 /*The following definitions come from lib/charset.c */
28 void charset_initialise(void);
29 void codepage_initialise(int client_codepage
);
30 void add_char_string(char *s
);
32 /*The following definitions come from lib/crc32.c */
34 uint32
crc32_calc_buffer( uint32 count
, char *buffer
);
36 /*The following definitions come from lib/debug.c */
38 BOOL
dbg_interactive(void);
39 void sig_usr2( int sig
);
40 void sig_usr1( int sig
);
41 void setup_logging( char *pname
, BOOL interactive
);
42 void reopen_logs( void );
43 void force_check_log_size( void );
44 void dbgflush( void );
45 BOOL
dbghdr( int level
, char *file
, char *func
, int line
);
46 dbg_Token
dbg_char2token( dbg_Token
*state
, int c
);
48 /*The following definitions come from lib/doscalls.c */
50 int dos_unlink(char *fname
);
51 int dos_open(char *fname
,int flags
,mode_t mode
);
52 DIR *dos_opendir(char *dname
);
53 char *dos_readdirname(DIR *p
);
54 int dos_stat(char *fname
,SMB_STRUCT_STAT
*sbuf
);
55 int dos_lstat(char *fname
,SMB_STRUCT_STAT
*sbuf
);
56 int dos_mkdir(char *dname
,mode_t mode
);
57 int dos_rmdir(char *dname
);
58 int dos_chdir(char *dname
);
59 int dos_utime(char *fname
,struct utimbuf
*times
);
60 int copy_reg(char *source
, const char *dest
);
61 int dos_rename(char *from
, char *to
);
62 int dos_chmod(char *fname
,mode_t mode
);
63 char *dos_getwd(char *unix_path
);
64 BOOL
dos_file_exist(char *fname
,SMB_STRUCT_STAT
*sbuf
);
65 BOOL
dos_directory_exist(char *dname
,SMB_STRUCT_STAT
*st
);
66 time_t dos_file_modtime(char *fname
);
67 SMB_OFF_T
dos_file_size(char *file_name
);
68 int dos_ChDir(char *path
);
69 char *dos_GetWd(char *path
);
71 /*The following definitions come from lib/fault.c */
73 void fault_setup(void (*fn
)(void *));
75 /*The following definitions come from lib/genrand.c */
77 void generate_random_buffer( unsigned char *out
, int len
, BOOL re_seed
);
79 /*The following definitions come from lib/getsmbpass.c */
81 char *getsmbpass(char *prompt
) ;
83 /*The following definitions come from lib/hmacmd5.c */
85 void hmac_md5_init_rfc2104(uchar
* key
, int key_len
, HMACMD5Context
*ctx
);
86 void hmac_md5_init_limK_to_64(const uchar
* key
, int key_len
,
88 void hmac_md5_update(const uchar
* text
, int text_len
, HMACMD5Context
*ctx
);
89 void hmac_md5_final(uchar
*digest
, HMACMD5Context
*ctx
);
90 void hmac_md5( uchar key
[16], uchar
* data
, int data_len
, uchar
* digest
);
92 /*The following definitions come from lib/interface.c */
94 void load_interfaces(void);
95 void iface_set_default(char *ip
,char *bcast
,char *nmask
);
96 BOOL
ismyip(struct in_addr ip
);
97 BOOL
is_local_net(struct in_addr from
);
98 int iface_count(void);
99 BOOL
we_are_multihomed(void);
100 struct interface
*get_interface(int n
);
101 struct in_addr
*iface_n_ip(int n
);
102 unsigned iface_hash(void);
103 struct in_addr
*iface_bcast(struct in_addr ip
);
104 struct in_addr
*iface_ip(struct in_addr ip
);
106 /*The following definitions come from lib/kanji.c */
108 void interpret_coding_system(char *str
);
109 BOOL
is_multibyte_codepage(void);
110 void initialize_multibyte_vectors( int client_codepage
);
112 /*The following definitions come from lib/md4.c */
114 void mdfour(unsigned char *out
, const unsigned char *in
, int n
);
116 /*The following definitions come from lib/md5.c */
118 void MD5Init(struct MD5Context
*ctx
);
119 void MD5Update(struct MD5Context
*ctx
, uchar
const *buf
, unsigned len
);
120 void MD5Final(uchar digest
[16], struct MD5Context
*ctx
);
121 void MD5Transform(uint32 buf
[4], const uchar inext
[64]);
123 /*The following definitions come from lib/msrpc-client.c */
125 BOOL
receive_msrpc(int fd
, prs_struct
* data
, unsigned int timeout
);
126 BOOL
msrpc_send(int fd
, prs_struct
* ps
);
127 BOOL
msrpc_receive(int fd
, prs_struct
* ps
);
128 BOOL
ncalrpc_l_connect(struct msrpc_local
*msrpc
, const char *pipe_name
);
129 void ncalrpc_l_close_socket(struct msrpc_local
*msrpc
);
130 void ncalrpc_l_sockopt(struct msrpc_local
*msrpc
, char *options
);
131 BOOL
ncalrpc_l_connect_auth(struct msrpc_local
*msrpc
,
132 const vuser_key
* key
, const char *pipename
);
133 struct msrpc_local
*ncalrpc_l_initialise(struct msrpc_local
*msrpc
,
134 const vuser_key
* key
);
135 void ncalrpc_l_shutdown(struct msrpc_local
*msrpc
);
136 BOOL
ncalrpc_l_establish_connection(struct msrpc_local
*msrpc
,
137 const char *pipe_name
);
139 /*The following definitions come from lib/msrpc_use.c */
142 /*The following definitions come from lib/netmask.c */
144 int get_netmask(struct in_addr
*ipaddr
, struct in_addr
*nmask
);
146 /*The following definitions come from lib/pidfile.c */
148 pid_t
pidfile_pid(char *name
);
149 void pidfile_create(char *name
);
151 /*The following definitions come from lib/replace.c */
153 char *rep_inet_ntoa(struct in_addr ip
);
155 /*The following definitions come from lib/set_vuid.c */
157 void init_vuid(void);
158 BOOL
become_vuser(const vuser_key
*k
);
159 BOOL
unbecome_vuser(void);
161 /*The following definitions come from lib/sids.c */
163 struct sid_map
* add_sidmap_to_array(uint32
*len
, struct sid_map
***array
,
164 const struct sid_map
*name
);
165 void get_sam_domain_name(void);
166 BOOL
get_member_domain_sid(void);
167 void generate_wellknown_sids(void);
168 BOOL
create_sidmap_table(void);
169 BOOL
generate_sam_sid(char *domain_name
, DOM_SID
*sid
);
170 BOOL
pwdb_initialise(BOOL is_server
);
171 BOOL
map_domain_name_to_sid(DOM_SID
*sid
, char **nt_domain
);
172 BOOL
map_domain_sid_to_name(DOM_SID
*sid
, char *nt_domain
);
173 BOOL
map_domain_sid_to_any_dc(DOM_SID
*sid
, char *dc_name
);
174 BOOL
split_domain_name(const char *fullname
, char *domain
, char *name
);
175 BOOL
enumtrustdoms(char ***doms
, uint32
*num_entries
);
176 BOOL
enumdomains(char ***doms
, uint32
*num_entries
);
178 /*The following definitions come from lib/signal.c */
180 void BlockSignals(BOOL block
,int signum
);
181 void CatchSignal(int signum
,void (*handler
)(int ));
182 void CatchChild(void);
183 void CatchChildLeaveStatus(void);
185 /*The following definitions come from lib/slprintf.c */
187 int vslprintf(char *str
, int n
, char *format
, va_list ap
);
189 /*The following definitions come from lib/smbrun.c */
191 int smbrun(char *cmd
,char *outfile
,BOOL shared
);
193 /*The following definitions come from lib/snprintf.c */
196 /*The following definitions come from lib/stub_uid.c */
198 void become_root(BOOL save_dir
);
199 void unbecome_root(BOOL restore_dir
);
200 const vuser_key
*get_sec_ctx(void);
202 /*The following definitions come from lib/surs.c */
204 BOOL
surs_sam_sid_to_unixid(DOM_SID
*sid
, uint32 type
, uint32
*id
, BOOL create
);
205 BOOL
surs_unixid_to_sam_sid(uint32 id
, uint32 type
, DOM_SID
*sid
, BOOL create
);
207 /*The following definitions come from lib/sursalgdomonly.c */
209 BOOL
surs_algdomonly_sam_sid_to_unixid(DOM_SID
*sid
, uint32 type
, uint32
*id
,
211 BOOL
surs_algdomonly_unixid_to_sam_sid(uint32 id
, uint32 type
, DOM_SID
*sid
,
214 /*The following definitions come from lib/sursalgnt5ldap.c */
216 BOOL
surs_nt5ldap_sam_sid_to_unixid(LDAPDB
*hds
, DOM_SID
* sid
, uint32 type
,
217 uint32
* id
, BOOL create
);
218 BOOL
surs_nt5ldap_unixid_to_sam_sid(LDAPDB
*hds
, uint32 id
, uint32 type
,
219 DOM_SID
* sid
, BOOL create
);
221 /*The following definitions come from lib/surstdb.c */
223 BOOL
surs_tdb_sam_sid_to_unixid(DOM_SID
* sid
, uint32 type
, uint32
* id
,
225 BOOL
surs_tdb_unixid_to_sam_sid(uint32 id
, uint32 type
, DOM_SID
* sid
,
228 /*The following definitions come from lib/system.c */
230 int sys_select(int maxfd
, fd_set
*fds
, fd_set
*w_fds
, struct timeval
*tval
);
231 int sys_select(int maxfd
, fd_set
*r_fds
, fd_set
*w_fds
, struct timeval
*tval
);
232 int sys_stat(const char *fname
,SMB_STRUCT_STAT
*sbuf
);
233 int sys_fstat(int fd
,SMB_STRUCT_STAT
*sbuf
);
234 int sys_lstat(const char *fname
,SMB_STRUCT_STAT
*sbuf
);
235 int sys_ftruncate(int fd
, SMB_OFF_T offset
);
236 SMB_OFF_T
sys_lseek(int fd
, SMB_OFF_T offset
, int whence
);
237 int sys_fseek(FILE *fp
, SMB_OFF_T offset
, int whence
);
238 SMB_OFF_T
sys_ftell(FILE *fp
);
239 int sys_creat(const char *path
, mode_t mode
);
240 int sys_open(const char *path
, int oflag
, mode_t mode
);
241 FILE *sys_fopen(const char *path
, const char *type
);
242 void *sys_mmap(void *addr
, size_t len
, int prot
, int flags
, int fd
, SMB_OFF_T offset
);
243 int sys_waitpid(pid_t pid
,int *status
,int options
);
244 char *sys_getwd(char *s
);
245 int sys_chown(const char *fname
,uid_t uid
,gid_t gid
);
246 int sys_chroot(const char *dname
);
247 struct hostent
*sys_gethostbyname(const char *name
);
248 BOOL
set_process_capability( uint32 cap_flag
, BOOL enable
);
249 BOOL
set_inherited_process_capability( uint32 cap_flag
, BOOL enable
);
250 long sys_random(void);
251 void sys_srandom(unsigned int seed
);
252 int sys_getgroups(int setlen
, gid_t
*gidset
);
253 struct passwd
*copy_passwd_struct(struct passwd
*pass
);
254 struct passwd
*sys_getpwnam(const char *name
);
255 struct passwd
*sys_getpwuid(uid_t uid
);
257 /*The following definitions come from lib/time.c */
259 void GetTimeOfDay(struct timeval
*tval
);
261 int TimeDiff(time_t t
);
262 struct tm
*LocalTime(time_t *t
);
263 time_t nt_time_to_unix(const NTTIME
*nt
);
264 time_t interpret_long_date(char *p
);
265 void unix_to_nt_time(NTTIME
*nt
, time_t t
);
266 void init_nt_time(NTTIME
*nt
);
267 void put_long_date(char *p
,time_t t
);
268 BOOL
null_mtime(time_t mtime
);
269 void put_dos_date(char *buf
,int offset
,time_t unixdate
);
270 void put_dos_date2(char *buf
,int offset
,time_t unixdate
);
271 void put_dos_date3(char *buf
,int offset
,time_t unixdate
);
272 time_t make_unix_date(void *date_ptr
);
273 time_t make_unix_date2(void *date_ptr
);
274 time_t make_unix_date3(void *date_ptr
);
275 char *http_timestring(time_t t
);
276 char *timestring(void );
277 time_t get_create_time(SMB_STRUCT_STAT
*st
,BOOL fake_dirs
);
279 /*The following definitions come from lib/ufc.c */
281 char *ufc_crypt(char *key
,char *salt
);
283 /*The following definitions come from lib/username.c */
285 struct passwd
*hashed_getpwnam(const char *name
);
286 char *uidtoname(uid_t uid
);
287 char *get_unixhome_dir(char *user
);
288 BOOL
map_username(char *user
);
289 const struct passwd
*Get_Pwnam(char *user
,BOOL allow_change
);
290 BOOL
user_ok(char *user
,int snum
);
291 BOOL
user_in_list(char *user
,char *list
);
293 /*The following definitions come from lib/util.c */
295 BOOL
init_myworkgroup(void);
297 BOOL
in_group(gid_t group
, gid_t current_gid
, int ngroups
, gid_t
* groups
);
298 uint32
get_number(const char *tmp
);
299 char *Atoic(char *p
, int *n
, char *c
);
300 uint32
*add_num_to_list(uint32
** num
, int *count
, int val
);
301 char *get_numlist(char *p
, uint32
** num
, int *count
);
302 void putip(void *dest
, void *src
);
303 BOOL
file_exist(char *fname
, SMB_STRUCT_STAT
* sbuf
);
304 int file_rename(char *from
, char *to
);
305 time_t file_modtime(char *fname
);
306 BOOL
directory_exist(char *dname
, SMB_STRUCT_STAT
* st
);
307 SMB_OFF_T
file_size(char *file_name
);
308 char *attrib_string(uint16 mode
);
309 void unix_format(char *fname
);
310 void dos_format(char *fname
);
311 void show_msg(char *buf
);
312 int smb_len(char *buf
);
313 void _smb_setlen(char *buf
, int len
);
314 void smb_setlen(char *buf
, int len
);
315 int set_message(char *buf
, int num_words
, int num_bytes
, BOOL zero
);
316 int smb_buflen(char *buf
);
317 char *smb_buf(char *buf
);
318 int smb_offset(char *p
, char *buf
);
319 void dos_clean_name(char *s
);
320 void make_dir_struct(char *buf
, char *mask
, char *fname
, SMB_OFF_T size
,
321 int mode
, time_t date
);
322 void close_low_fds(void);
323 int set_blocking(int fd
, BOOL set
);
324 int TvalDiff(struct timeval
*tvalold
, struct timeval
*tvalnew
);
325 SMB_OFF_T
transfer_file(int infd
, int outfd
, SMB_OFF_T n
, char *header
,
326 int headlen
, int align
);
328 BOOL
get_file_match(const char *dirname
, const char *regexp
,
329 uint32
* total
, char ***list
);
330 BOOL
do_match(char *str
, const char *regexp
, int case_sig
);
331 BOOL
mask_match(char *str
, char *regexp
, int case_sig
, BOOL trans2
);
332 void become_daemon(void);
334 int set_filelen(int fd
, SMB_OFF_T len
);
335 void *Realloc(void *p
, size_t size
);
336 void safe_free(void *p
);
337 BOOL
get_myname(char *my_name
, struct in_addr
*ip
);
338 BOOL
ip_equal(struct in_addr ip1
, struct in_addr ip2
);
339 int interpret_protocol(char *str
, int def
);
340 uint32
interpret_addr(char *str
);
341 struct in_addr
*interpret_addr2(char *str
);
342 BOOL
zero_ip(struct in_addr ip
);
343 BOOL
matchname(char *remotehost
, struct in_addr addr
);
344 void standard_sub_basic(char *str
);
345 void standard_sub_vuser(const user_struct
* vuser
, char *str
);
346 void standard_sub(connection_struct
* conn
, user_struct
* vuser
, char *str
);
347 BOOL
same_net(struct in_addr ip1
, struct in_addr ip2
, struct in_addr mask
);
348 struct hostent
*Get_Hostbyname(const char *name
);
349 BOOL
process_exists(int pid
);
350 int get_unixgroups(const char *user
, uid_t uid
, gid_t gid
, int *p_ngroups
,
352 BOOL
get_unix_grps(int *p_ngroups
, struct group
**p_groups
);
353 void free_unix_grps(int ngroups
, struct group
*p_groups
);
354 char *gidtoname(gid_t gid
);
355 BOOL
nametogid(const char *name
, gid_t
* gid
);
356 BOOL
nametouid(const char *name
, uid_t
* uid
);
357 void smb_panic(char *why
);
358 char *readdirname(DIR * p
);
359 BOOL
is_in_path(char *name
, name_compare_entry
* namelist
);
360 void set_namearray(name_compare_entry
** ppname_array
, char *namelist
);
361 void free_namearray(name_compare_entry
* name_array
);
362 BOOL
is_myname(char *s
);
363 void set_remote_arch(enum remote_arch_types type
);
364 enum remote_arch_types
get_remote_arch(void);
365 char *align4(char *q
, char *base
);
366 char *align2(char *q
, char *base
);
367 void out_ascii(FILE * f
, const uchar
* buf
, int len
);
368 void out_struct(FILE * f
, const char *buf1
, int len
, int per_line
);
369 void out_data(FILE * f
, const char *buf1
, int len
, int per_line
);
370 void print_asc(int level
, uchar
const *buf
, int len
);
371 void dump_data(int level
, const char *buf1
, int len
);
372 void dump_data_pw(const char *msg
, const uchar
* data
, size_t len
);
373 char *tab_depth(int depth
);
374 int str_checksum(const char *s
);
375 void zero_free(void *p
, size_t size
);
376 int set_maxfiles(int requested_max
);
377 void reg_get_subkey(char *full_keyname
, char *key_name
, char *subkey_name
);
378 BOOL
reg_split_key(const char *full_keyname
, uint32
* reg_type
,
380 char *get_trusted_serverlist(const char *domain
);
381 uint16
pwdb_acct_ctrl_from_ad(NTDS_USER_FLAG_ENUM adac
);
382 char *pwdb_encode_acct_ctrl(uint16 acct_ctrl
, size_t length
);
383 uint16
pwdb_decode_acct_ctrl(const char *p
);
384 time_t pwdb_get_time_last_changed(const char *p
);
385 time_t pwdb_get_last_set_time(const char *p
);
386 void pwdb_set_logon_time(char *p
, int max_len
, time_t t
);
387 void pwdb_set_logoff_time(char *p
, int max_len
, time_t t
);
388 void pwdb_set_kickoff_time(char *p
, int max_len
, time_t t
);
389 void pwdb_set_can_change_time(char *p
, int max_len
, time_t t
);
390 void pwdb_set_time_last_changed(char *p
, int max_len
, time_t t
);
391 void pwdb_set_must_change_time(char *p
, int max_len
, time_t t
);
392 void pwdb_set_last_set_time(char *p
, int max_len
, time_t t
);
393 void pwdb_sethexpwd(char *p
, const uchar
* pwd
, uint16 acct_ctrl
);
394 BOOL
pwdb_gethexpwd(const char *p
, char *pwd
, uint32
* acct_ctrl
);
395 void *memdup(const void *p
, size_t size
);
396 char *passdb_path(char *name
);
397 char *lock_path(char *name
);
398 const char *get_sid_name_use_str(uint32 sid_name_use
);
400 /*The following definitions come from lib/util_array.c */
402 void free_void_array(uint32 num_entries
, void **entries
,
403 void(free_item
)(void*));
404 void* add_copy_to_array(uint32
*len
, void ***array
, const void *item
,
405 void*(item_dup
)(const void*), BOOL alloc_anyway
);
406 void* add_item_to_array(uint32
*len
, void ***array
, void *item
);
407 void free_use_info_array(uint32 num_entries
, struct use_info
**entries
);
408 struct use_info
* add_use_info_to_array(uint32
*len
, struct use_info
***array
,
409 const struct use_info
*name
);
410 void free_char_array(uint32 num_entries
, char **entries
);
411 char* add_chars_to_array(uint32
*len
, char ***array
, const char *name
);
412 void free_uint32_array(uint32 num_entries
, uint32
**entries
);
413 uint32
* add_uint32s_to_array(uint32
*len
, uint32
***array
, const uint32
*name
);
414 void free_unistr_array(uint32 num_entries
, UNISTR2
**entries
);
415 UNISTR2
* add_unistr_to_array(uint32
*len
, UNISTR2
***array
, UNISTR2
*name
);
416 void free_sid_array(uint32 num_entries
, DOM_SID
**entries
);
417 DOM_SID
* add_sid_to_array(uint32
*len
, DOM_SID
***array
, const DOM_SID
*sid
);
419 /*The following definitions come from lib/util_file.c */
421 BOOL
do_file_lock(int fd
, int waitsecs
, int type
);
422 BOOL
file_lock(int fd
, int type
, int secs
, int *plock_depth
);
423 BOOL
file_unlock(int fd
, int *plock_depth
);
424 BOOL
fcntl_lock(int fd
, int op
, SMB_OFF_T offset
, SMB_OFF_T count
, int type
);
425 void *startfileent(char *pfile
, char *s_readbuf
, int bufsize
,
426 int *file_lock_depth
, BOOL update
);
427 void endfileent(void *vp
, int *file_lock_depth
);
428 SMB_BIG_UINT
getfilepwpos(void *vp
);
429 BOOL
setfilepwpos(void *vp
, SMB_BIG_UINT tok
);
430 int getfileline(void *vp
, char *linebuf
, int linebuf_size
);
431 char *fgets_slash(char *s2
,int maxlen
,FILE *f
);
432 BOOL
file_modified(const char *filename
, time_t *lastmodified
);
433 void *open_file_if_modified(const char *filename
, char *mode
, time_t *lastmodified
);
435 /*The following definitions come from lib/util_hnd.c */
437 struct policy_cache
*get_global_hnd_cache(void);
438 struct policy_cache
*init_policy_cache(int num_pol_hnds
);
439 void free_policy_cache(struct policy_cache
*cache
);
440 BOOL
policy_hnd_set_name(struct policy_cache
*cache
,
441 POLICY_HND
*hnd
, const char *name
);
442 const char *policy_hnd_get_name(struct policy_cache
*cache
,
443 const POLICY_HND
*hnd
);
444 BOOL
dup_policy_hnd(struct policy_cache
*cache
,
446 const POLICY_HND
*from
);
447 BOOL
register_policy_hnd(struct policy_cache
*cache
,
448 const vuser_key
*key
,
451 BOOL
open_policy_hnd(struct policy_cache
*cache
,
452 const vuser_key
*key
,
455 BOOL
open_policy_hnd_link(struct policy_cache
*cache
,
456 const POLICY_HND
*parent_hnd
,
459 int find_policy_by_hnd(struct policy_cache
*cache
, const POLICY_HND
*hnd
);
460 BOOL
set_policy_state(struct policy_cache
*cache
, POLICY_HND
*hnd
,
461 void(*fn
)(void*), void *dev
);
462 void *get_policy_state_info(struct policy_cache
*cache
, const POLICY_HND
*hnd
);
463 BOOL
policy_hnd_set_state_type(struct policy_cache
*cache
,
464 POLICY_HND
*hnd
, int type
);
465 int policy_hnd_get_state_type(struct policy_cache
*cache
,
466 const POLICY_HND
*hnd
);
467 BOOL
policy_hnd_check_state_type(struct policy_cache
*cache
,
468 const POLICY_HND
*hnd
, int type
);
469 BOOL
close_policy_hnd(struct policy_cache
*cache
, POLICY_HND
*hnd
);
470 BOOL
policy_link_key(struct policy_cache
*cache
, const POLICY_HND
*hnd
,
472 const vuser_key
*get_policy_vuser_key(struct policy_cache
*cache
,
473 const POLICY_HND
*hnd
);
474 BOOL
pol_get_usr_sesskey(struct policy_cache
*cache
, const POLICY_HND
*hnd
,
475 uchar usr_sess_key
[16]);
477 /*The following definitions come from lib/util_seaccess.c */
479 BOOL
se_access_check(const SEC_DESC
* sd
, const NET_USER_INFO_3
* user
,
480 uint32 acc_req
, uint32 prev_grant_acc
,
484 /*The following definitions come from lib/util_sec.c */
486 void gain_root_privilege(void);
487 void gain_root_group_privilege(void);
488 void set_effective_uid(uid_t uid
);
489 void set_effective_gid(gid_t gid
);
490 void save_re_uid(void);
491 void restore_re_uid(void);
492 int set_re_uid(void);
493 void become_user_permanently(uid_t uid
, gid_t gid
);
495 /*The following definitions come from lib/util_sid.c */
497 char *sid_to_string(pstring sidstr_out
, const DOM_SID
*sid
);
498 BOOL
string_to_sid(DOM_SID
*sidout
, const char *sidstr
);
499 BOOL
sid_append_rid(DOM_SID
*sid
, uint32 rid
);
500 BOOL
sid_split_rid(DOM_SID
*sid
, uint32
*rid
);
501 void sid_copy(DOM_SID
*sid1
, const DOM_SID
*sid2
);
502 BOOL
sid_front_equal(const DOM_SID
*sid1
, const DOM_SID
*sid2
);
503 BOOL
sid_equal(const DOM_SID
*sid1
, const DOM_SID
*sid2
);
504 int sid_size(const DOM_SID
*sid
);
505 DOM_SID
*sid_dup(const DOM_SID
*src
);
506 BOOL
read_sid(char *domain_name
, DOM_SID
*sid
);
507 BOOL
write_sid(char *domain_name
, DOM_SID
*sid
);
508 BOOL
create_new_sid(DOM_SID
*sid
);
510 /*The following definitions come from lib/util_sock.c */
512 BOOL
is_a_socket(int fd
);
513 void set_socket_options(int fd
, char *options
);
514 void close_sockets(void );
515 ssize_t
write_socket(int fd
,char *buf
,size_t len
);
516 ssize_t
read_udp_socket(int fd
,char *buf
,size_t len
);
517 ssize_t
read_with_timeout(int fd
,char *buf
,size_t mincnt
,size_t maxcnt
,unsigned int time_out
);
518 BOOL
send_keepalive(int client
);
519 ssize_t
read_data(int fd
,char *buffer
,size_t N
);
520 ssize_t
write_data(int fd
,char *buffer
,size_t N
);
521 ssize_t
read_smb_length(int fd
,char *inbuf
,unsigned int timeout
);
522 BOOL
receive_smb(int fd
,char *buffer
, unsigned int timeout
);
523 BOOL
client_receive_smb(int fd
,char *buffer
, unsigned int timeout
);
524 BOOL
send_smb(int fd
,char *buffer
);
525 BOOL
send_one_packet(char *buf
,int len
,struct in_addr ip
,int port
,int type
);
526 int open_socket_in(int type
, int port
, int dlevel
,uint32 socket_addr
,
528 int open_socket_out(int type
, struct in_addr
*addr
, int port
,int timeout
);
529 void set_client_connection_name(const char* name
, int fd
);
530 void set_client_connection_addr(const char* addr
, int fd
);
531 char *client_connection_name(void);
532 char *client_connection_addr(void);
533 void reset_globals_after_fork(void);
534 char *client_name(int fd
);
535 char *client_addr(int fd
);
536 int open_pipe_sock(char *path
);
537 int create_pipe_socket(char *dir
, int dir_perms
,
538 char *path
, int path_perms
);
540 /*The following definitions come from lib/util_str.c */
542 void set_first_token(char *ptr
);
543 BOOL
next_token(char **ptr
,char *buff
,char *sep
, size_t bufsize
);
544 char **toktocliplist(int *ctok
, char *sep
);
545 int StrCaseCmp(const char *s
, const char *t
);
546 int StrnCaseCmp(const char *s
, const char *t
, size_t n
);
547 BOOL
strequal(const char *s1
, const char *s2
);
548 BOOL
strnequal(const char *s1
,const char *s2
,size_t n
);
549 BOOL
strcsequal(const char *s1
,const char *s2
);
550 void strlower(char *s
);
551 void strupper(char *s
);
552 void strnorm(char *s
);
553 BOOL
strisnormal(char *s
);
554 void string_replace(char *s
,char oldc
,char newc
);
555 char *skip_string(char *buf
,size_t n
);
556 size_t str_charnum(const char *s
);
557 BOOL
trim_string(char *s
,const char *front
,const char *back
);
558 BOOL
strhasupper(const char *s
);
559 BOOL
strhaslower(const char *s
);
560 size_t count_chars(const char *s
,char c
);
561 char *safe_strcpy(char *dest
,const char *src
, size_t maxlength
);
562 char *safe_strcat(char *dest
, const char *src
, size_t maxlength
);
563 char *StrCpy(char *dest
,const char *src
);
564 char *StrnCpy(char *dest
,const char *src
,size_t n
);
565 char *strncpyn(char *dest
, char *src
,size_t n
, char c
);
566 size_t strhex_to_str(char *p
, size_t len
, const char *strhex
);
567 BOOL
in_list(char *s
,char *list
,BOOL casesensitive
);
568 BOOL
string_init(char **dest
,const char *src
);
569 void string_free(char **s
);
570 BOOL
string_set(char **dest
,const char *src
);
571 void string_sub(char *s
,const char *pattern
,const char *insert
);
572 void all_string_sub(char *s
,const char *pattern
,const char *insert
, size_t len
);
573 void split_at_first_component(char *path
, char *front
, char sep
, char *back
);
574 void split_at_last_component(char *path
, char *front
, char sep
, char *back
);
575 char *bit_field_to_str(uint32 type
, struct field_info
*bs
);
576 char *enum_field_to_str(uint32 type
, struct field_info
*bs
, BOOL first_default
);
578 /*The following definitions come from lib/util_unistr.c */
580 char *ascii_to_unibuf(char *dest
, const char *src
, int maxlen
);
581 const char* unibuf_to_ascii(char *dest
, const char *src
, int maxlen
);
582 void ascii_to_unistr(uint16
*dest
, const char *src
, int maxlen
);
583 void unistr_to_ascii(char *dest
, const uint16
*src
, int len
);
584 char *unistr2_to_ascii(char *dest
, const UNISTR2
*str
, size_t maxlen
);
585 char *skip_unibuf(char *srcbuf
, int len
);
586 char *uni_strncpy(char *destbuf
, const char *srcbuf
, int len
);
587 uint32
buffer2_to_uint32(const BUFFER2
*str
);
588 void buffer2_to_multistr(char *dest
, const BUFFER2
*str
, size_t maxlen
);
589 void buffer4_to_str(char *dest
, const BUFFER4
*str
, size_t maxlen
);
590 UNISTR2
*unistr2_new(const char *init
);
591 UNISTR2
*unistr2_assign(UNISTR2
*str
, const uint16
*src
, size_t len
);
592 UNISTR2
*unistr2_assign_ascii(UNISTR2
*str
, const char *buf
, int len
);
593 UNISTR2
*unistr2_assign_ascii_str(UNISTR2
*str
, const char *buf
);
594 UNISTR2
*unistr2_grow(UNISTR2
*str
, size_t new_size
);
595 BOOL
unistr2upper(UNISTR2
*str
, const UNISTR2
*from
);
596 BOOL
copy_unistr2(UNISTR2
*str
, const UNISTR2
*from
);
597 UNISTR2
*unistr2_dup(const UNISTR2
*name
);
598 void unistr2_free(UNISTR2
*name
);
599 int StrCaseCmpW(const UNISTR2
*ws
, const UNISTR2
*wt
);
600 BOOL
unistr2equal(const UNISTR2
*s1
, const UNISTR2
*s2
);
602 /*The following definitions come from lib/vagent.c */
604 void init_sock_redir(struct vagent_ops
*va
);
605 void free_sock_redir(struct vagent_ops
*va
);
606 void start_agent(struct vagent_ops
*va
);
608 /*The following definitions come from lib/vuser.c */
610 BOOL
is_valid_user_struct(const vuser_key
* key
);
611 user_struct
*get_valid_user_struct(const vuser_key
* key
);
612 void invalidate_vuid(vuser_key
* key
);
613 BOOL
validated_username(vuser_key
* key
, char *name
, size_t len
);
614 uint16
create_vuid(pid_t pid
,
615 uid_t uid
, gid_t gid
,
616 int n_groups
, gid_t
* groups
,
617 const char *unix_name
,
618 const char *requested_name
,
619 const char *real_name
,
620 BOOL guest
, const NET_USER_INFO_3
* info3
);
621 uint16
register_vuid(pid_t pid
, uid_t uid
, gid_t gid
,
622 const char *unix_name
,
623 const char *requested_name
,
624 BOOL guest
, const NET_USER_INFO_3
* info3
);
625 BOOL
check_vuser_ok(struct uid_cache
*cache
, user_struct
* vuser
, int snum
);
627 /*The following definitions come from lib/vuser_db.c */
629 BOOL
tdb_delete_vuid( const vuser_key
*uk
);
630 BOOL
tdb_lookup_vuid( const vuser_key
*uk
, user_struct
**usr
);
631 BOOL
tdb_store_vuid( const vuser_key
*uk
, user_struct
*usr
);
632 BOOL
vuid_init_db(void);
634 /*The following definitions come from libsmb/clientgen.c */
636 int cli_set_port(struct cli_state
*cli
, int port
);
637 char *cli_errstr(struct cli_state
*cli
);
638 void cli_safe_smb_errstr(struct cli_state
*cli
, char *msg
, size_t len
);
639 BOOL
get_safe_rap_errstr(int rap_error
, char *err_msg
, size_t msglen
);
640 void cli_safe_errstr(struct cli_state
*cli
, char *err_msg
, size_t msglen
);
641 BOOL
cli_send_trans(struct cli_state
*cli
, int trans
,
642 char *name
, int pipe_name_len
,
644 uint16
*setup
, int lsetup
, int msetup
,
645 char *param
, int lparam
, int mparam
,
646 char *data
, int ldata
, int mdata
);
647 BOOL
cli_api_pipe(struct cli_state
*cli
, char *pipe_name
, int pipe_name_len
,
648 uint16
*setup
, uint32 setup_count
, uint32 max_setup_count
,
649 char *params
, uint32 param_count
, uint32 max_param_count
,
650 char *data
, uint32 data_count
, uint32 max_data_count
,
651 char **rparam
, uint32
*rparam_count
,
652 char **rdata
, uint32
*rdata_count
);
653 BOOL
cli_api(struct cli_state
*cli
,
654 char *param
, int prcnt
, int mprcnt
,
655 char *data
, int drcnt
, int mdrcnt
,
656 char **rparam
, int *rprcnt
,
657 char **rdata
, int *rdrcnt
);
658 BOOL
cli_NetWkstaUserLogon(struct cli_state
*cli
,char *user
, char *workstation
);
659 BOOL
cli_RNetShareEnum(struct cli_state
*cli
, void (*fn
)(const char *, uint32
, const char *));
660 BOOL
cli_NetServerEnum(struct cli_state
*cli
, char *workgroup
, uint32 stype
,
661 void (*fn
)(const char *, uint32
, const char *));
662 BOOL
cli_session_setup_x(struct cli_state
*cli
,
664 char *pass
, int passlen
,
665 char *ntpass
, int ntpasslen
,
667 BOOL
cli_session_setup(struct cli_state
*cli
,
668 char *myhostname
, char *user
,
669 char *pass
, int passlen
,
670 char *ntpass
, int ntpasslen
,
672 BOOL
cli_ulogoff(struct cli_state
*cli
);
673 BOOL
cli_send_tconX(struct cli_state
*cli
,
674 char *share
, char *dev
, char *pass
, int passlen
);
675 BOOL
cli_tdis(struct cli_state
*cli
);
676 BOOL
cli_rename(struct cli_state
*cli
, char *fname_src
, char *fname_dst
);
677 BOOL
cli_unlink(struct cli_state
*cli
, char *fname
);
678 BOOL
cli_mkdir(struct cli_state
*cli
, char *dname
);
679 BOOL
cli_rmdir(struct cli_state
*cli
, char *dname
);
680 int cli_nt_create(struct cli_state
*cli
, const char *fname
);
681 int cli_open(struct cli_state
*cli
, const char *fname
,
682 int flags
, int share_mode
);
683 BOOL
cli_close(struct cli_state
*cli
, int fnum
);
684 BOOL
cli_lock(struct cli_state
*cli
, int fnum
, uint32 offset
, uint32 len
, int timeout
);
685 BOOL
cli_unlock(struct cli_state
*cli
, int fnum
, uint32 offset
, uint32 len
, int timeout
);
686 size_t cli_read_one(struct cli_state
*cli
, int fnum
, char *buf
, off_t offset
, size_t size
);
687 size_t cli_read(struct cli_state
*cli
, int fnum
, char *buf
, off_t offset
, size_t size
, BOOL overlap
);
688 ssize_t
cli_write(struct cli_state
*cli
,
689 int fnum
, uint16 write_mode
,
690 char *buf
, off_t offset
, size_t size
, size_t bytes_left
);
691 BOOL
cli_getattrE(struct cli_state
*cli
, int fd
,
692 uint16
*attr
, size_t *size
,
693 time_t *c_time
, time_t *a_time
, time_t *m_time
);
694 BOOL
cli_getatr(struct cli_state
*cli
, char *fname
,
695 uint16
*attr
, size_t *size
, time_t *t
);
696 BOOL
cli_setatr(struct cli_state
*cli
, char *fname
, uint16 attr
, time_t t
);
697 BOOL
cli_qpathinfo(struct cli_state
*cli
, const char *fname
,
698 time_t *c_time
, time_t *a_time
, time_t *m_time
,
699 size_t *size
, uint16
*mode
);
700 BOOL
cli_qpathinfo2(struct cli_state
*cli
, const char *fname
,
701 time_t *c_time
, time_t *a_time
, time_t *m_time
,
702 time_t *w_time
, size_t *size
, uint16
*mode
,
704 BOOL
cli_qfileinfo(struct cli_state
*cli
, int fnum
,
705 uint16
*mode
, size_t *size
,
706 time_t *c_time
, time_t *a_time
, time_t *m_time
,
707 time_t *w_time
, SMB_INO_T
*ino
);
708 int cli_list(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
709 void (*fn
)(file_info
*, const char *));
710 BOOL
cli_oem_change_password(struct cli_state
*cli
, const char *user
, const char *new_password
,
711 const char *old_password
);
712 BOOL
cli_negprot(struct cli_state
*cli
);
713 BOOL
cli_session_request(struct cli_state
*cli
,
714 struct nmb_name
*calling
, struct nmb_name
*called
);
715 BOOL
cli_connect(struct cli_state
*cli
, const char *host
, struct in_addr
*ip
);
716 void cli_init_creds(struct cli_state
*cli
, const struct ntuser_creds
*usr
);
717 struct cli_state
*cli_initialise(struct cli_state
*cli
);
718 void cli_close_socket(struct cli_state
*cli
);
719 void cli_shutdown(struct cli_state
*cli
);
720 int cli_error(struct cli_state
*cli
, uint8
*eclass
, uint32
*num
);
721 void cli_sockopt(struct cli_state
*cli
, char *options
);
722 uint16
cli_setpid(struct cli_state
*cli
, uint16 pid
);
723 BOOL
cli_reestablish_connection(struct cli_state
*cli
);
724 BOOL
cli_establish_connection(struct cli_state
*cli
,
725 const char *dest_host
, struct in_addr
*dest_ip
,
726 struct nmb_name
*calling
, struct nmb_name
*called
,
727 char *service
, char *service_type
,
728 BOOL do_shutdown
, BOOL do_tcon
);
729 BOOL
cli_connect_auth(struct cli_state
*cli
,
730 const char* desthost
,
731 struct in_addr
*dest_ip
,
732 const struct ntuser_creds
*usr
);
733 BOOL
cli_connect_servers_auth(struct cli_state
*cli
,
735 const struct ntuser_creds
*usr
);
736 BOOL
cli_connect_serverlist(struct cli_state
*cli
, char *p
);
737 int cli_printjob_del(struct cli_state
*cli
, int job
);
738 int cli_print_queue(struct cli_state
*cli
,
739 void (*fn
)(struct print_job_info
*));
740 BOOL
cli_chkpath(struct cli_state
*cli
, char *path
);
741 BOOL
cli_message_start(struct cli_state
*cli
, char *host
, char *username
,
743 BOOL
cli_message_text(struct cli_state
*cli
, char *msg
, int len
, int grp
);
744 BOOL
cli_message_end(struct cli_state
*cli
, int grp
);
745 BOOL
cli_dskattr(struct cli_state
*cli
, int *bsize
, int *total
, int *avail
);
746 BOOL
get_any_dc_name(const char *domain
, char *srv_name
);
748 /*The following definitions come from libsmb/credentials.c */
750 char *credstr(const uchar
*cred
);
751 void cred_session_key(DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
, const char *pass
,
752 uchar session_key
[8]);
753 void cred_create(uchar session_key
[8], DOM_CHAL
*stor_cred
, UTIME timestamp
,
755 int cred_assert(const DOM_CHAL
*cred
, uchar session_key
[8],
756 DOM_CHAL
*stored_cred
, UTIME timestamp
);
757 BOOL
clnt_deal_with_creds(uchar sess_key
[8],
758 DOM_CRED
*sto_clnt_cred
, DOM_CRED
*rcv_srv_cred
);
759 BOOL
deal_with_creds(uchar sess_key
[8],
760 DOM_CRED
*sto_clnt_cred
,
761 const DOM_CRED
*rcv_clnt_cred
, DOM_CRED
*rtn_srv_cred
);
763 /*The following definitions come from libsmb/namequery.c */
765 BOOL
name_status(int fd
,char *name
,int name_type
,BOOL recurse
,
766 struct in_addr to_ip
,char *master
,char *rname
,
767 void (*fn
)(struct packet_struct
*));
768 struct in_addr
*name_query(int fd
,const char *name
,int name_type
, BOOL bcast
,BOOL recurse
,
769 struct in_addr to_ip
, int *count
, void (*fn
)(struct packet_struct
*));
770 FILE *startlmhosts(char *fname
);
771 BOOL
getlmhostsent( FILE *fp
, pstring name
, int *name_type
, struct in_addr
*ipaddr
);
772 void endlmhosts(FILE *fp
);
773 BOOL
is_ip_address(const char *name
);
774 BOOL
resolve_name(const char *name
, struct in_addr
*return_ip
, int name_type
);
775 BOOL
resolve_srv_name(const char* srv_name
, fstring dest_host
,
777 BOOL
find_master_ip(char *group
, struct in_addr
*master_ip
);
779 /*The following definitions come from libsmb/nmblib.c */
781 void debug_nmb_packet(struct packet_struct
*p
);
782 char *nmb_namestr(struct nmb_name
*n
);
783 void nmb_safe_namestr(struct nmb_name
*n
, char *str
, size_t len
);
784 struct packet_struct
*copy_packet(struct packet_struct
*packet
);
785 void free_packet(struct packet_struct
*packet
);
786 struct packet_struct
*read_packet(int fd
,enum packet_type packet_type
);
787 void make_nmb_name( struct nmb_name
*n
, const char *name
, int type
, const char *this_scope
);
788 BOOL
nmb_name_equal(struct nmb_name
*n1
, struct nmb_name
*n2
);
789 BOOL
send_packet(struct packet_struct
*p
);
790 struct packet_struct
*receive_packet(int fd
,enum packet_type type
,int t
);
791 void sort_query_replies(char *data
, int n
, struct in_addr ip
);
792 BOOL
read_nmb_sock(int c
, struct nmb_state
*con
);
793 int get_nmb_sock(void);
794 char *dns_to_netbios_name(char *dns_name
);
795 int name_mangle( char *In
, char *Out
, char name_type
);
796 int name_extract(char *buf
,int ofs
,char *name
);
797 int name_len(char *s1
);
799 /*The following definitions come from libsmb/nterr.c */
801 BOOL
get_safe_nt_error_msg(uint32 nt_code
, char *msg
, size_t len
);
802 const char *get_nt_error_msg(uint32 nt_code
);
804 /*The following definitions come from libsmb/pwd_cache.c */
806 void pwd_init(struct pwd_info
*pwd
);
807 BOOL
pwd_is_nullpwd(const struct pwd_info
*pwd
);
808 void pwd_obfuscate_key(struct pwd_info
*pwd
, uint32 int_key
, char *str_key
);
809 BOOL
pwd_compare(const struct pwd_info
*_pwd1
, const struct pwd_info
*_pwd2
);
810 void pwd_read(struct pwd_info
*pwd
, char *passwd_report
, BOOL do_encrypt
);
811 void pwd_set_nullpwd(struct pwd_info
*pwd
);
812 void pwd_set_cleartext(struct pwd_info
*pwd
, char *clr
);
813 void pwd_get_cleartext(struct pwd_info
*pwd
, char *clr
);
814 void pwd_set_lm_nt_16(struct pwd_info
*pwd
,
815 const uchar lm_pwd
[16],
816 const uchar nt_pwd
[16]);
817 void pwd_get_lm_nt_16(const struct pwd_info
*pwd
, uchar lm_pwd
[16], uchar nt_pwd
[16]);
818 void pwd_make_lm_nt_16(struct pwd_info
*pwd
, char *clr
);
819 void pwd_make_lm_nt_owf2(struct pwd_info
*pwd
, const uchar srv_key
[8],
820 const char *user
, const char *server
, const char *domain
,
822 void pwd_make_lm_nt_owf(struct pwd_info
*pwd
, uchar cryptkey
[8],
824 void pwd_get_lm_nt_owf(struct pwd_info
*pwd
, uchar lm_owf
[24],
825 uchar
*nt_owf
, size_t *nt_owf_len
);
827 /*The following definitions come from libsmb/smbdes.c */
829 void smbhash(uchar
*out
, const uchar
*in
, const uchar
*key
, int forw
);
830 void E_P16(uchar
*p14
,uchar
*p16
);
831 void E_P24(const uchar
*p21
, const uchar
*c8
, uchar
*p24
);
832 void D_P16(const uchar
*p14
, const uchar
*in
, uchar
*out
);
833 void E_old_pw_hash( const uchar
*p14
, const uchar
*in
, uchar
*out
);
834 void cred_hash1(uchar
*out
, const uchar
*in
, const uchar
*key
);
835 void cred_hash2(uchar
*out
,uchar
*in
,uchar
*key
);
836 void cred_hash3(uchar
*out
, const uchar
*in
,uchar
*key
, int forw
);
837 void SamOEMhash( uchar
*data
, const uchar
*key
, int val
);
838 void sam_pwd_hash(uint32 rid
, const uchar
*in
, uchar
*out
, int forw
);
840 /*The following definitions come from libsmb/smbencrypt.c */
842 void SMBencrypt(uchar
* pwrd
, uchar
* c8
, uchar
* p24
);
843 void SMBNTencrypt(uchar
* pwrd
, uchar
* c8
, uchar
* p24
);
844 void E_md4hash(uchar
* pwrd
, uchar
* p16
);
845 void lm_owf_genW(const UNISTR2
* pwd
, uchar p16
[16]);
846 void lm_owf_gen(const char *pwd
, uchar p16
[16]);
847 void nt_owf_genW(const UNISTR2
* pwd
, uchar nt_p16
[16]);
848 void nt_owf_gen(const char *pwd
, uchar nt_p16
[16]);
849 void nt_lm_owf_genW(const UNISTR2
* pwd
, uchar nt_p16
[16], uchar lm_p16
[16]);
850 void nt_lm_owf_gen(const char *pwd
, uchar nt_p16
[16], uchar lm_p16
[16]);
851 void SMBOWFencrypt(const uchar pwrd
[16], const uchar
* c8
, uchar p24
[24]);
852 void SMBOWFencrypt_ntv2(const uchar kr
[16],
853 const uchar
* srv_chal
, int srv_chal_len
,
854 const uchar
* cli_chal
, int cli_chal_len
,
856 void SMBsesskeygen_ntv2(const uchar kr
[16],
857 const uchar
* nt_resp
, char sess_key
[16]);
858 void SMBsesskeygen_ntv1(const uchar kr
[16],
859 const uchar
* nt_resp
, char sess_key
[16]);
860 void SMBgenclientchals(char *lm_cli_chal
,
861 char *nt_cli_chal
, int *nt_cli_chal_len
,
862 const char *srv
, const char *dom
);
863 void ntv2_owf_gen(const uchar owf
[16],
864 const char *user_n
, const char *domain_n
, uchar kr_buf
[16]);
865 void NTLMSSPOWFencrypt(const uchar pwrd
[8], const uchar
* ntlmchalresp
,
867 BOOL
make_oem_passwd_hash(uchar data
[516],
868 const char *pwrd
, int new_pw_len
,
869 const uchar old_pw_hash
[16], BOOL unicode
);
870 BOOL
nt_encrypt_string2(STRING2
* out
, const STRING2
* in
, const uchar
* key
);
871 BOOL
nt_decrypt_string2(STRING2
* out
, const STRING2
* in
, const uchar
* key
);
872 void create_ntlmssp_resp(struct pwd_info
*pwd
,
873 char *domain
, char *user_name
, char *my_name
,
874 uint32 ntlmssp_cli_flgs
, prs_struct
* auth_resp
);
875 BOOL
decode_pw_buffer(const char buffer
[516], char *new_pwrd
,
876 int new_pwrd_size
, uint32
* new_pw_len
);
877 BOOL
encode_pw_buffer(char buffer
[516], const char *new_pass
,
878 int new_pw_len
, BOOL nt_pass_set
);
880 /*The following definitions come from libsmb/smberr.c */
882 char *smb_err_msg(uint8
class, uint32 num
);
883 BOOL
smb_safe_err_msg(uint8
class, uint32 num
, char *ret
, size_t len
);
884 BOOL
smb_safe_errstr(char *inbuf
, char *msg
, size_t len
);
885 char *smb_errstr(char *inbuf
);
887 /*The following definitions come from nsswitch/winbindd.c */
889 void exit_server(char *reason
);
890 int winbind_get_domain_sid(char *system_name
, fstring domain_name
,
891 DOM_SID
*domain_sid
);
892 int winbind_lookup_by_name(char *system_name
, DOM_SID
*level5_sid
,
893 fstring name
, DOM_SID
*sid
,
894 enum SID_NAME_USE
*type
);
895 int winbind_lookup_by_sid(char *system_name
, DOM_SID
*level5_sid
,
896 DOM_SID
*sid
, char *name
,
897 enum SID_NAME_USE
*type
);
898 int winbind_lookup_userinfo(char *system_name
, DOM_SID
*level5_sid
,
899 uint32 user_rid
, SAM_USERINFO_CTR
*info
);
900 int winbind_lookup_groupinfo(char *system_name
, DOM_SID
*level5_sid
,
901 uint32 group_rid
, GROUP_INFO_CTR
*info
);
902 int create_winbind_socket(void);
903 int main(int argc
, char **argv
);
905 /*The following definitions come from nsswitch/winbindd_group.c */
907 void winbindd_getgrnam_from_group(DOM_SID
*domain_sid
,
908 struct winbindd_request
*request
,
909 struct winbindd_response
*response
);
910 void winbindd_getgrnam_from_gid(DOM_SID
*domain_sid
,
911 struct winbindd_request
*request
,
912 struct winbindd_response
*response
);
914 /*The following definitions come from nsswitch/winbindd_surs.c */
916 BOOL
winbindd_surs_sam_sid_to_unixid(DOM_SID
*sid
, uint32 type
, uint32
*id
);
917 BOOL
winbindd_surs_unixid_to_sam_sid(uint32 id
, uint32 type
, DOM_SID
*sid
,
920 /*The following definitions come from nsswitch/winbindd_user.c */
922 void winbindd_getpwnam_from_user(DOM_SID
*domain_sid
,
923 struct winbindd_request
*request
,
924 struct winbindd_response
*response
);
925 void winbindd_getpwnam_from_uid(DOM_SID
*domain_sid
,
926 struct winbindd_request
*request
,
927 struct winbindd_response
*response
);
929 /*The following definitions come from param/loadparm.c */
931 struct vfs_options
*lp_vfsoptions(int i
) ;
932 char *lp_logfile(void);
933 char *lp_smbrun(void);
934 char *lp_configfile(void);
935 char *lp_smb_passwd_file(void);
936 char *lp_sam_directory(void);
937 char *lp_smb_passgrp_file(void);
938 char *lp_smb_group_file(void);
939 char *lp_smb_alias_file(void);
940 char *lp_serverstring(void);
941 char *lp_printcapname(void);
942 char *lp_lockdir(void);
943 char *lp_rootdir(void);
944 char *lp_defaultservice(void);
945 char *lp_msg_command(void);
946 char *lp_hosts_equiv(void);
947 char *lp_auto_services(void);
948 char *lp_passwd_program(void);
949 char *lp_passwd_chat(void);
950 char *lp_passwordserver(void);
951 char *lp_name_resolve_order(void);
952 char *lp_workgroup(void);
953 char *lp_trusted_domains(void);
954 char *lp_trusting_domains(void);
955 char *lp_username_map(void);
956 char *lp_aliasname_map(void);
957 char *lp_groupname_map(void);
958 char *lp_builtinname_map(void);
959 char *lp_builtinrid_file(void);
960 char *lp_ntusrname_map(void);
961 char *lp_remote_announce(void);
962 char *lp_remote_browse_sync(void);
963 char *lp_wins_server(void);
964 char *lp_interfaces(void);
965 char *lp_socket_address(void);
966 char *lp_nis_home_map_name(void);
967 char *lp_netbios_aliases(void);
968 char *lp_driverfile(void);
969 char *lp_panic_action(void);
970 char *lp_nt_forms(void);
971 char *lp_nt_drivers_file(void);
972 char *lp_dfs_map(void);
973 char *lp_ldap_server(void);
974 char *lp_ldap_suffix(void);
975 char *lp_ldap_bind_as(void);
976 char *lp_ldap_passwd_file(void);
977 char *lp_ldap_url(void);
978 char *lp_ldap_realm(void);
979 char *lp_ldap_computers_subcontext(void);
980 char *lp_ldap_users_subcontext(void);
981 char *lp_ldap_builtin_subcontext(void);
982 int lp_ssl_version(void);
983 char *lp_ssl_hosts(void);
984 char *lp_ssl_hosts_resign(void);
985 char *lp_ssl_cacertdir(void);
986 char *lp_ssl_cacertfile(void);
987 char *lp_ssl_cert(void);
988 char *lp_ssl_privkey(void);
989 char *lp_ssl_client_cert(void);
990 char *lp_ssl_client_privkey(void);
991 char *lp_ssl_ciphers(void);
992 BOOL
lp_ssl_enabled(void);
993 BOOL
lp_ssl_reqClientCert(void);
994 BOOL
lp_ssl_reqServerCert(void);
995 BOOL
lp_ssl_compatibility(void);
996 BOOL
lp_dns_proxy(void);
997 BOOL
lp_wins_support(void);
998 BOOL
lp_we_are_a_wins_server(void);
999 BOOL
lp_wins_proxy(void);
1000 BOOL
lp_local_master(void);
1001 BOOL
lp_domain_logons(void);
1002 BOOL
lp_load_printers(void);
1003 BOOL
lp_use_rhosts(void);
1004 BOOL
lp_readprediction(void);
1005 BOOL
lp_readbmpx(void);
1006 BOOL
lp_readraw(void);
1007 BOOL
lp_writeraw(void);
1008 BOOL
lp_null_passwords(void);
1009 BOOL
lp_strip_dot(void);
1010 BOOL
lp_encrypted_passwords(void);
1011 BOOL
lp_update_encrypted(void);
1012 BOOL
lp_client_ntlmv2(void);
1013 BOOL
lp_server_ntlmv2(void);
1014 BOOL
lp_client_schannel(void);
1015 BOOL
lp_server_schannel(void);
1016 BOOL
lp_syslog_only(void);
1017 BOOL
lp_timestamp_logs(void);
1018 BOOL
lp_browse_list(void);
1019 BOOL
lp_unix_realname(void);
1020 BOOL
lp_nis_home_map(void);
1021 BOOL
lp_bind_interfaces_only(void);
1022 BOOL
lp_unix_password_sync(void);
1023 BOOL
lp_passwd_chat_debug(void);
1024 BOOL
lp_ole_locking_compat(void);
1025 BOOL
lp_nt_smb_support(void);
1026 BOOL
lp_nt_pipe_support(void);
1027 BOOL
lp_stat_cache(void);
1028 int lp_os_level(void);
1029 int lp_max_ttl(void);
1030 int lp_max_wins_ttl(void);
1031 int lp_min_wins_ttl(void);
1032 int lp_max_log_size(void);
1033 int lp_max_open_files(void);
1034 int lp_maxxmit(void);
1035 int lp_maxmux(void);
1036 int lp_passwordlevel(void);
1037 int lp_usernamelevel(void);
1038 int lp_readsize(void);
1039 int lp_shmem_size(void);
1040 int lp_deadtime(void);
1041 int lp_maxprotocol(void);
1042 int lp_security(void);
1043 int lp_maxdisksize(void);
1044 int lp_lpqcachetime(void);
1045 int lp_syslog(void);
1046 int lp_client_code_page(void);
1047 int lp_lm_announce(void);
1048 int lp_lm_interval(void);
1049 int lp_machine_password_timeout(void);
1050 int lp_change_notify_timeout(void);
1051 int lp_stat_cache_size(void);
1052 int lp_map_to_guest(void);
1053 int lp_ldap_port(void);
1054 int lp_ldap_protocol_version(void);
1055 char *lp_logon_script(const user_struct
* );
1056 char *lp_logon_path(const user_struct
* );
1057 char *lp_logon_drive(const user_struct
* );
1058 char *lp_logon_home(const user_struct
* );
1059 char *lp_preexec(int );
1060 char *lp_postexec(int );
1061 char *lp_rootpreexec(int );
1062 char *lp_rootpostexec(int );
1063 char *lp_servicename(int );
1064 char *lp_pathname(int );
1065 char *lp_dontdescend(int );
1066 char *lp_username(int );
1067 char *lp_guestaccount(int );
1068 char *lp_invalid_users(int );
1069 char *lp_valid_users(int );
1070 char *lp_admin_users(int );
1071 char *lp_printcommand(int );
1072 char *lp_lpqcommand(int );
1073 char *lp_lprmcommand(int );
1074 char *lp_lppausecommand(int );
1075 char *lp_lpresumecommand(int );
1076 char *lp_queuepausecommand(int );
1077 char *lp_queueresumecommand(int );
1078 char *lp_printername(int );
1079 char *lp_printerdriver(int );
1080 char *lp_hostsallow(int );
1081 char *lp_hostsdeny(int );
1082 char *lp_magicscript(int );
1083 char *lp_magicoutput(int );
1084 char *lp_comment(int );
1085 char *lp_force_user(int );
1086 char *lp_force_group(int );
1087 char *lp_readlist(int );
1088 char *lp_writelist(int );
1089 char *lp_fstype(int );
1090 char *lp_vfsobj(int );
1091 char *lp_mangled_map(int );
1092 char *lp_veto_files(int );
1093 char *lp_hide_files(int );
1094 char *lp_veto_oplocks(int );
1095 char *lp_driverlocation(int );
1096 BOOL
lp_revalidate(int );
1097 BOOL
lp_casesensitive(int );
1098 BOOL
lp_preservecase(int );
1099 BOOL
lp_shortpreservecase(int );
1100 BOOL
lp_casemangle(int );
1101 BOOL
lp_status(int );
1102 BOOL
lp_hide_dot_files(int );
1103 BOOL
lp_browseable(int );
1104 BOOL
lp_readonly(int );
1105 BOOL
lp_no_set_dir(int );
1106 BOOL
lp_guest_ok(int );
1107 BOOL
lp_guest_only(int );
1108 BOOL
lp_print_ok(int );
1109 BOOL
lp_postscript(int );
1110 BOOL
lp_map_hidden(int );
1111 BOOL
lp_map_archive(int );
1112 BOOL
lp_locking(int );
1113 BOOL
lp_strict_locking(int );
1114 BOOL
lp_share_modes(int );
1115 BOOL
lp_oplocks(int );
1116 BOOL
lp_onlyuser(int );
1117 BOOL
lp_manglednames(int );
1118 BOOL
lp_widelinks(int );
1119 BOOL
lp_symlinks(int );
1120 BOOL
lp_syncalways(int );
1121 BOOL
lp_strict_sync(int );
1122 BOOL
lp_map_system(int );
1123 BOOL
lp_delete_readonly(int );
1124 BOOL
lp_fake_oplocks(int );
1125 BOOL
lp_recursive_veto_delete(int );
1126 BOOL
lp_dos_filetimes(int );
1127 BOOL
lp_dos_filetime_resolution(int );
1128 BOOL
lp_fake_dir_create_times(int );
1129 BOOL
lp_blocking_locks(int );
1130 int lp_create_mode(int );
1131 int lp_force_create_mode(int );
1132 int lp_dir_mode(int );
1133 int lp_force_dir_mode(int );
1134 int lp_max_connections(int );
1135 int lp_defaultcase(int );
1136 int lp_minprintspace(int );
1137 int lp_printing(int );
1138 char lp_magicchar(int );
1139 char *lp_mysql_host(void);
1140 char *lp_mysql_user(void);
1141 char *lp_mysql_passfile(void);
1142 char *lp_mysql_db(void);
1143 char *lp_mysql_table(void);
1144 BOOL
lp_add_home(char *pszHomename
, int iDefaultService
, char *pszHomedir
);
1145 int lp_add_service(char *pszService
, int iDefaultService
);
1146 BOOL
lp_add_printer(char *pszPrintername
, int iDefaultService
);
1147 BOOL
lp_file_list_changed(void);
1148 void *lp_local_ptr(int snum
, void *ptr
);
1149 BOOL
lp_do_parameter(int snum
, char *pszParmName
, char *pszParmValue
);
1150 BOOL
lp_is_default(int snum
, struct parm_struct
*parm
);
1151 struct parm_struct
*lp_next_parameter(int snum
, int *i
, int allparameters
);
1152 BOOL
lp_snum_ok(int iService
);
1153 void lp_add_one_printer(char *name
,char *comment
);
1154 BOOL
lp_loaded(void);
1155 void lp_killunused(BOOL (*snumused
)(int ));
1156 BOOL
lp_load(char *pszFname
,BOOL global_only
, BOOL save_defaults
, BOOL add_ipc
);
1157 int lp_numservices(void);
1158 void lp_dump(FILE *f
, BOOL show_defaults
);
1159 int lp_servicenumber(char *pszServiceName
);
1160 char *volume_label(int snum
);
1161 void lp_remove_service(int snum
);
1162 void lp_copy_service(int snum
, char *new_name
);
1163 int lp_default_server_announce(void);
1164 int lp_major_announce_version(void);
1165 int lp_minor_announce_version(void);
1166 void lp_set_name_resolve_order(char *new_order
);
1167 void lp_set_kernel_oplocks(BOOL val
);
1168 BOOL
lp_kernel_oplocks(void);
1169 int lp_server_role(void);
1170 BOOL
lp_domain_master(void);
1171 BOOL
lp_preferred_master(void);
1173 /*The following definitions come from param/params.c */
1175 BOOL
pm_process( char *FileName
,
1176 BOOL (*sfunc
)(char *),
1177 BOOL (*pfunc
)(char *, char *) );
1179 /*The following definitions come from rpc_client/cli_connect.c */
1181 void init_connections(void);
1182 void free_connections(void);
1183 void cli_connection_free(struct cli_connection
*con
);
1184 void cli_connection_unlink(struct cli_connection
*con
);
1185 BOOL
cli_connection_init(const char *srv_name
, const char *pipe_name
,
1186 struct cli_connection
**con
);
1187 BOOL
cli_connection_init_auth(const char *srv_name
, const char *pipe_name
,
1188 struct cli_connection
**con
,
1189 cli_auth_fns
* auth
, void *auth_creds
);
1190 BOOL
cli_connection_getsrv(const char *srv_name
, const char *pipe_name
,
1191 struct cli_connection
**con
);
1192 BOOL
cli_connection_get(const POLICY_HND
* pol
, struct cli_connection
**con
);
1193 BOOL
cli_pol_link(POLICY_HND
* to
, const POLICY_HND
* from
);
1194 BOOL
cli_get_usr_sesskey(const POLICY_HND
* pol
, uchar usr_sess_key
[16]);
1195 BOOL
cli_set_con_usr_sesskey(struct cli_connection
*con
,
1196 const uchar usr_sess_key
[16]);
1197 const vuser_key
*cli_con_sec_ctx(struct cli_connection
*con
);
1198 struct cli_auth_fns
*cli_conn_get_authfns(struct cli_connection
*con
);
1199 void *cli_conn_get_auth_creds(struct cli_connection
*con
);
1200 void *cli_conn_get_auth_info(struct cli_connection
*con
);
1201 BOOL
cli_conn_set_auth_info(struct cli_connection
*con
, void *auth_info
);
1202 struct ntdom_info
*cli_conn_get_ntinfo(struct cli_connection
*con
);
1203 BOOL
cli_get_con_sesskey(struct cli_connection
*con
, uchar sess_key
[16]);
1204 BOOL
cli_con_get_srvname(struct cli_connection
*con
, char *srv_name
);
1205 BOOL
cli_get_sesskey(const POLICY_HND
* pol
, uchar sess_key
[16]);
1206 BOOL
cli_get_sesskey_srv(const char *srv_name
, uchar sess_key
[16]);
1207 void cli_con_gen_next_creds(struct cli_connection
*con
,
1208 DOM_CRED
* new_clnt_cred
);
1209 void cli_con_get_cli_cred(struct cli_connection
*con
, DOM_CRED
* clnt_cred
);
1210 BOOL
cli_con_deal_with_creds(struct cli_connection
*con
,
1211 DOM_CRED
* rcv_srv_cred
);
1212 BOOL
cli_con_set_creds(const char *srv_name
, const uchar sess_key
[16],
1214 BOOL
rpc_hnd_pipe_req(const POLICY_HND
* hnd
, uint8 op_num
,
1215 prs_struct
* data
, prs_struct
* rdata
);
1216 BOOL
rpc_con_pipe_req(struct cli_connection
*con
, uint8 op_num
,
1217 prs_struct
* data
, prs_struct
* rdata
);
1218 BOOL
rpc_api_write(struct cli_connection
*con
, prs_struct
* data
);
1219 BOOL
rpc_api_rcv_pdu(struct cli_connection
*con
, prs_struct
* rdata
);
1220 BOOL
rpc_api_send_rcv_pdu(struct cli_connection
*con
, prs_struct
* data
,
1221 prs_struct
* rdata
);
1222 BOOL
set_policy_con(struct policy_cache
*cache
, POLICY_HND
* hnd
,
1223 struct cli_connection
*con
,
1224 void (*free_fn
) (struct cli_connection
*));
1225 BOOL
get_policy_con(struct policy_cache
*cache
, const POLICY_HND
* hnd
,
1226 struct cli_connection
**con
);
1228 /*The following definitions come from rpc_client/cli_lsarpc.c */
1230 BOOL
get_domain_sids(const char *domain
, DOM_SID
* sid3
, DOM_SID
* sid5
);
1231 BOOL
get_trust_sid_and_domain(const char *myname
, char *server
,
1232 DOM_SID
* sid
, char *domain
, size_t len
);
1233 BOOL
lsa_open_policy(const char *system_name
, POLICY_HND
*hnd
,
1234 BOOL sec_qos
, uint32 des_access
);
1235 BOOL
lsa_open_policy2(const char *system_name
, POLICY_HND
*hnd
,
1236 BOOL sec_qos
, uint32 des_access
);
1237 BOOL
lsa_create_secret(const POLICY_HND
*hnd
,
1238 const char *secret_name
,
1239 uint32 des_access
, POLICY_HND
*hnd_secret
);
1240 BOOL
lsa_open_secret(const POLICY_HND
*hnd
,
1241 const char *secret_name
,
1242 uint32 des_access
, POLICY_HND
*hnd_secret
);
1243 uint32
lsa_set_secret(POLICY_HND
*hnd
, const STRING2
* secret
);
1244 BOOL
lsa_query_secret(POLICY_HND
*hnd
, STRING2
* secret
, NTTIME
* last_update
);
1245 BOOL
lsa_lookup_names(POLICY_HND
*hnd
,
1248 DOM_SID
** sids
, uint32
** types
, int *num_sids
);
1249 BOOL
lsa_lookup_sids(POLICY_HND
*hnd
,
1252 char ***names
, uint32
** types
, int *num_names
);
1253 BOOL
lsa_query_sec_obj(const POLICY_HND
*hnd
, uint32 sec_info
,
1254 SEC_DESC_BUF
*sec_buf
);
1255 BOOL
lsa_query_info_pol(POLICY_HND
*hnd
, uint16 info_class
,
1256 fstring domain_name
, DOM_SID
* domain_sid
);
1257 BOOL
lsa_enum_trust_dom(POLICY_HND
*hnd
, uint32
* enum_ctx
,
1258 uint32
* num_doms
, char ***names
, DOM_SID
*** sids
);
1259 BOOL
lsa_close(POLICY_HND
*hnd
);
1261 /*The following definitions come from rpc_client/cli_netlogon.c */
1263 void gen_next_creds( struct ntdom_info
*nt
, DOM_CRED
*new_clnt_cred
);
1264 BOOL
cli_net_logon_ctrl2(const char* srv_name
, uint32 status_level
);
1265 uint32
cli_net_auth2(const char *srv_name
,
1266 const char *trust_acct
,
1267 const char *acct_name
,
1269 uint32
*neg_flags
, DOM_CHAL
*srv_chal
);
1270 uint32
cli_net_req_chal( const char *srv_name
, const char* myhostname
,
1271 DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
);
1272 BOOL
cli_net_srv_pwset(const char* srv_name
,
1273 const char* myhostname
,
1274 const char* trust_acct
,
1275 const uint8 hashed_trust_pwd
[16],
1276 uint16 sec_chan_type
);
1277 uint32
cli_net_sam_logon(const char* srv_name
, const char* myhostname
,
1278 NET_ID_INFO_CTR
*ctr
,
1279 NET_USER_INFO_3
*user_info3
);
1280 BOOL
cli_net_sam_logoff(const char* srv_name
, const char* myhostname
,
1281 NET_ID_INFO_CTR
*ctr
);
1282 BOOL
cli_net_sam_sync( const char* srv_name
, const char* myhostname
,
1285 SAM_DELTA_HDR
*hdr_deltas
,
1286 SAM_DELTA_CTR
*deltas
);
1288 /*The following definitions come from rpc_client/cli_pipe.c */
1290 BOOL
create_rpc_request(prs_struct
* rhdr
, uint16 vuid
,
1291 uint8 op_num
, uint8 flags
, int data_len
, int auth_len
);
1292 BOOL
rpc_api_pipe_req(struct cli_connection
*con
, uint8 opnum
,
1293 prs_struct
* data
, prs_struct
* rdata
);
1294 BOOL
cli_send_and_rcv_pdu_trans(struct cli_connection
*con
,
1295 struct cli_state
*cli
, uint16 fnum
,
1296 prs_struct
* data
, prs_struct
* rdata
,
1298 BOOL
cli_send_and_rcv_pdu_rw(struct cli_connection
*con
,
1299 struct cli_state
*cli
, uint16 fnum
,
1300 prs_struct
* data
, prs_struct
* rdata
,
1302 BOOL
cli_send_and_rcv_pdu(struct cli_connection
*con
,
1303 struct cli_state
*cli
, uint16 fnum
,
1304 prs_struct
* data
, prs_struct
* rdata
,
1306 BOOL
cli_rcv_pdu(struct cli_connection
*con
,
1307 struct cli_state
*cli
, uint16 fnum
, prs_struct
*rdata
);
1308 BOOL
rpc_pipe_bind(struct cli_connection
*con
,
1309 const char *pipe_name
,
1310 RPC_IFACE
* abstract
, RPC_IFACE
* transfer
);
1311 void cli_nt_set_ntlmssp_flgs(struct cli_state
*cli
, uint32 ntlmssp_flgs
);
1312 BOOL
cli_nt_session_open(struct cli_state
*cli
, const char *pipe_name
,
1314 void cli_nt_session_close(struct cli_state
*cli
, uint16 fnum
);
1316 /*The following definitions come from rpc_client/cli_pipe_noauth.c */
1319 /*The following definitions come from rpc_client/cli_pipe_ntlmssp.c */
1322 /*The following definitions come from rpc_client/cli_samr.c */
1324 BOOL
samr_chgpasswd_user( struct cli_connection
*con
,
1325 const char *srv_name
, const char *user_name
,
1326 const char nt_newpass
[516], const uchar nt_oldhash
[16],
1327 const char lm_newpass
[516], const uchar lm_oldhash
[16]);
1328 BOOL
samr_get_dom_pwinfo(struct cli_connection
*con
, const char *srv_name
);
1329 BOOL
samr_query_dom_info( POLICY_HND
*domain_pol
, uint16 switch_value
,
1331 uint32
samr_enum_domains( POLICY_HND
*pol
,
1332 uint32
*start_idx
, uint32 size
,
1333 struct acct_info
**sam
,
1334 uint32
*num_sam_domains
);
1335 uint32
samr_enum_dom_groups( POLICY_HND
*pol
,
1336 uint32
*start_idx
, uint32 size
,
1337 struct acct_info
**sam
,
1338 uint32
*num_sam_groups
);
1339 uint32
samr_enum_dom_aliases( POLICY_HND
*pol
,
1340 uint32
*start_idx
, uint32 size
,
1341 struct acct_info
**sam
,
1342 uint32
*num_sam_aliases
);
1343 uint32
samr_enum_dom_users( POLICY_HND
*pol
, uint32
*start_idx
,
1344 uint16 acb_mask
, uint16 unk_1
, uint32 size
,
1345 struct acct_info
**sam
,
1346 uint32
*num_sam_users
);
1347 BOOL
samr_connect( const char *srv_name
, uint32 access_mask
,
1348 POLICY_HND
*connect_pol
);
1349 BOOL
samr_query_sec_obj( const POLICY_HND
*pol
,
1352 BOOL
samr_open_user( const POLICY_HND
*pol
,
1353 uint32 unk_0
, uint32 rid
,
1354 POLICY_HND
*user_pol
);
1355 BOOL
samr_open_alias( const POLICY_HND
*domain_pol
,
1356 uint32 flags
, uint32 rid
,
1357 POLICY_HND
*alias_pol
);
1358 BOOL
samr_del_aliasmem( POLICY_HND
*alias_pol
, DOM_SID
*sid
);
1359 BOOL
samr_add_aliasmem( POLICY_HND
*alias_pol
, DOM_SID
*sid
);
1360 BOOL
samr_delete_dom_alias( POLICY_HND
*alias_pol
);
1361 uint32
samr_create_dom_user( POLICY_HND
*domain_pol
, const char *acct_name
,
1362 uint32 unk_0
, uint32 unk_1
,
1363 POLICY_HND
*user_pol
, uint32
*rid
);
1364 BOOL
samr_create_dom_alias( POLICY_HND
*domain_pol
, const char *acct_name
,
1365 POLICY_HND
*alias_pol
, uint32
*rid
);
1366 BOOL
samr_query_aliasinfo( POLICY_HND
*alias_pol
, uint16 switch_value
,
1367 ALIAS_INFO_CTR
*ctr
);
1368 BOOL
samr_set_aliasinfo( POLICY_HND
*alias_pol
, ALIAS_INFO_CTR
*ctr
);
1369 BOOL
samr_open_group( const POLICY_HND
*domain_pol
,
1370 uint32 flags
, uint32 rid
,
1371 POLICY_HND
*group_pol
);
1372 BOOL
samr_del_groupmem( POLICY_HND
*group_pol
, uint32 rid
);
1373 BOOL
samr_add_groupmem( POLICY_HND
*group_pol
, uint32 rid
);
1374 BOOL
samr_delete_dom_user( POLICY_HND
*user_pol
);
1375 BOOL
samr_delete_dom_group( POLICY_HND
*group_pol
);
1376 BOOL
samr_create_dom_group( POLICY_HND
*domain_pol
, const char *acct_name
,
1377 POLICY_HND
*group_pol
, uint32
*rid
);
1378 BOOL
samr_set_groupinfo( POLICY_HND
*group_pol
, GROUP_INFO_CTR
*ctr
);
1379 BOOL
samr_unknown_2d( const POLICY_HND
*domain_pol
,
1380 const DOM_SID
*sid
);
1381 BOOL
samr_open_domain( const POLICY_HND
*connect_pol
,
1384 POLICY_HND
*domain_pol
);
1385 BOOL
samr_query_lookup_domain( POLICY_HND
*pol
, const char *dom_name
,
1387 BOOL
samr_query_lookup_names(const POLICY_HND
*pol
, uint32 flags
,
1388 uint32 num_names
, char **names
,
1389 uint32
*num_rids
, uint32
**rids
, uint32
**types
);
1390 BOOL
samr_query_lookup_rids( const POLICY_HND
*pol
, uint32 flags
,
1391 uint32 num_rids
, const uint32
*rids
,
1395 BOOL
samr_query_aliasmem( const POLICY_HND
*alias_pol
,
1396 uint32
*num_mem
, DOM_SID2
*sid
);
1397 BOOL
samr_query_useraliases( const POLICY_HND
*pol
,
1398 uint32
*ptr_sid
, DOM_SID2
*sid
,
1399 uint32
*num_aliases
, uint32
**rid
);
1400 BOOL
samr_query_groupmem( POLICY_HND
*group_pol
,
1401 uint32
*num_mem
, uint32
**rid
, uint32
**attr
);
1402 BOOL
samr_query_usergroups( POLICY_HND
*pol
, uint32
*num_groups
,
1404 BOOL
samr_query_groupinfo( POLICY_HND
*pol
,
1405 uint16 switch_value
, GROUP_INFO_CTR
* ctr
);
1406 BOOL
samr_set_userinfo2( POLICY_HND
*pol
, uint16 switch_value
,
1408 BOOL
samr_set_userinfo( POLICY_HND
*pol
, uint16 switch_value
, void* usr
);
1409 BOOL
samr_query_userinfo( POLICY_HND
*pol
, uint16 switch_value
,
1410 SAM_USERINFO_CTR
*ctr
);
1411 BOOL
samr_close( POLICY_HND
*hnd
);
1412 BOOL
samr_query_dispinfo( POLICY_HND
*pol_domain
, uint16 level
,
1413 uint32
*num_entries
,
1414 SAM_DISPINFO_CTR
*ctr
);
1416 /*The following definitions come from rpc_client/cli_use.c */
1418 void init_cli_use(void);
1419 void free_cli_use(void);
1420 struct cli_state
*cli_net_use_add(const char *srv_name
,
1421 const struct ntuser_creds
*usr_creds
,
1422 BOOL redir
, BOOL reuse
, BOOL
*is_new
);
1423 BOOL
cli_net_use_del(const char *srv_name
,
1424 const struct ntuser_creds
*usr_creds
,
1425 BOOL force_close
, BOOL
*connection_closed
);
1426 void cli_net_use_enum(uint32
* num_cons
, struct use_info
***use
);
1427 void cli_use_wait_keyboard(void);
1429 /*The following definitions come from rpc_client/msrpc_samr.c */
1431 uint32
lookup_sam_domainname(const char *srv_name
,
1432 const char *domain
, DOM_SID
*sid
);
1433 uint32
lookup_sam_names(const char *domain
, const DOM_SID
*sid
,
1434 uint32 num_names
, char **names
,
1435 uint32
*num_rids
, uint32
**rids
, uint32
**types
);
1436 uint32
lookup_sam_name(const char *domain
, DOM_SID
*sid
,
1437 char *name
, uint32
*rid
, uint32
*type
);
1438 uint32
lookup_sam_rid(const char *domain
, DOM_SID
*sid
,
1439 uint32 rid
, char *name
, uint32
*type
);
1440 BOOL
req_user_info( const POLICY_HND
*pol_dom
,
1443 uint32 user_rid
, uint16 info_level
,
1444 USER_INFO_FN(usr_inf
));
1445 uint32
sam_query_usergroups( const POLICY_HND
*pol_dom
,
1449 const char *user_name
,
1454 USER_MEM_FN(usr_mem
));
1455 void msrpc_sam_user( const POLICY_HND
*pol_dom
, const POLICY_HND
*pol_blt
,
1457 const DOM_SID
*sid1
,
1458 const DOM_SID
*blt_sid1
,
1459 uint32 user_rid
, uint16 info_level
,
1462 USER_INFO_FN(usr_inf_fn
),
1463 USER_MEM_FN(usr_grp_fn
),
1464 USER_MEM_FN(usr_als_fn
));
1465 BOOL
msrpc_sam_query_user( const char* srv_name
,
1470 USER_INFO_FN(usr_inf_fn
),
1471 USER_MEM_FN(usr_grp_fn
),
1472 USER_MEM_FN(usr_als_fn
));
1473 int msrpc_sam_enum_users( const char* srv_name
,
1475 const DOM_SID
*sid1
,
1476 struct acct_info
**sam
,
1477 uint32
*num_sam_entries
,
1479 USER_INFO_FN(usr_inf_fn
),
1480 USER_MEM_FN(usr_grp_fn
),
1481 USER_MEM_FN(usr_als_fn
));
1482 BOOL
sam_query_dominfo(const char* srv_name
,
1483 const DOM_SID
*sid1
,
1484 uint32 switch_value
, SAM_UNK_CTR
*ctr
);
1485 BOOL
query_aliasinfo( const POLICY_HND
*pol_dom
,
1489 ALIAS_INFO_FN(grp_inf
));
1490 BOOL
sam_query_aliasmem(const char *srv_name
,
1491 const POLICY_HND
*pol_dom
,
1497 BOOL
req_aliasmem_info(const char* srv_name
,
1498 const POLICY_HND
*pol_dom
,
1502 const char *alias_name
,
1503 ALIAS_MEM_FN(als_mem
));
1504 BOOL
sam_query_groupmem( const POLICY_HND
*pol_dom
,
1510 BOOL
query_groupinfo( const POLICY_HND
*pol_dom
,
1514 GROUP_INFO_FN(grp_inf
));
1515 BOOL
req_groupmem_info( const POLICY_HND
*pol_dom
,
1519 const char *group_name
,
1520 GROUP_MEM_FN(grp_mem
));
1521 uint32
msrpc_sam_get_first_domain( const char* srv_name
,
1524 uint32
msrpc_sam_enum_domains( const char* srv_name
,
1525 struct acct_info
**sam
,
1526 uint32
*num_sam_entries
,
1528 DOMAIN_INFO_FN(dom_inf_fn
));
1529 uint32
msrpc_sam_enum_groups( const char* srv_name
,
1531 const DOM_SID
*sid1
,
1532 struct acct_info
**sam
,
1533 uint32
*num_sam_entries
,
1535 GROUP_INFO_FN(grp_inf_fn
),
1536 GROUP_MEM_FN(grp_mem_fn
));
1537 uint32
msrpc_sam_enum_aliases( const char* srv_name
,
1539 const DOM_SID
*sid1
,
1540 struct acct_info
**sam
,
1541 uint32
*num_sam_entries
,
1543 ALIAS_INFO_FN(als_inf_fn
),
1544 ALIAS_MEM_FN(als_mem_fn
));
1545 BOOL
create_samr_domain_user( POLICY_HND
*pol_dom
,
1546 char *acct_name
, uint16 acb_info
,
1547 const char* password
, int plen
,
1549 BOOL
create_samr_domain_alias( POLICY_HND
*pol_open_domain
,
1550 const char *acct_name
, const char *acct_desc
,
1552 BOOL
create_samr_domain_group( POLICY_HND
*pol_open_domain
,
1553 const char *acct_name
, const char *acct_desc
,
1555 BOOL
get_samr_query_usergroups( const POLICY_HND
*pol_open_domain
,
1557 uint32
*num_groups
, DOM_GID
**gid
);
1558 BOOL
delete_samr_dom_group( POLICY_HND
*pol_open_domain
,
1560 BOOL
get_samr_query_groupmem(
1561 const POLICY_HND
*pol_open_domain
,
1562 uint32 group_rid
, uint32
*num_mem
,
1563 uint32
**rid
, uint32
**attr
);
1564 BOOL
delete_samr_dom_alias(
1565 POLICY_HND
*pol_open_domain
,
1567 BOOL
get_samr_query_aliasmem(
1568 const POLICY_HND
*pol_open_domain
,
1569 uint32 alias_rid
, uint32
*num_mem
, DOM_SID2
*sid
);
1570 BOOL
set_samr_set_userinfo2(
1571 POLICY_HND
*pol_open_domain
,
1573 uint32 user_rid
, void *usr
);
1574 BOOL
set_samr_set_userinfo( const POLICY_HND
*pol_open_domain
,
1576 uint32 user_rid
, void *usr
);
1577 BOOL
get_samr_query_userinfo( const POLICY_HND
*pol_open_domain
,
1579 uint32 user_rid
, SAM_USERINFO_CTR
*ctr
);
1580 BOOL
get_samr_query_groupinfo(
1581 const POLICY_HND
*pol_open_domain
,
1583 uint32 group_rid
, GROUP_INFO_CTR
*ctr
);
1584 BOOL
get_samr_query_aliasinfo(
1585 const POLICY_HND
*pol_open_domain
,
1587 uint32 alias_rid
, ALIAS_INFO_CTR
*ctr
);
1588 BOOL
msrpc_sam_create_dom_user(const char* srv_name
, DOM_SID
*sid1
,
1589 char *acct_name
, uint16 acb_info
,
1590 const char *password
, int plen
,
1592 BOOL
msrpc_sam_query_dispinfo(const char* srv_name
, const char* domain
,
1594 uint16 switch_value
,
1595 uint32
*num_entries
, SAM_DISPINFO_CTR
*ctr
,
1597 BOOL
msrpc_sam_ntchange_pwd(const char* srv_name
,
1600 const uchar lm_oldhash
[16],
1601 const uchar nt_oldhash
[16],
1602 const char* new_passwd
);
1603 BOOL
msrpc_sam_ntpasswd_set(const char* srv_name
, const char *user
,
1604 struct ntuser_creds
*samr_creds
,
1605 const uchar lm_newpass
[516],
1606 const uchar lm_hshhash
[16],
1607 const uchar nt_newpass
[516],
1608 const uchar nt_hshhash
[16]);
1609 BOOL
msrpc_sam_query_userinfo(const char* srv_name
, const DOM_SID
*sid
,
1610 const char *user_name
, uint16 info_level
,
1611 SAM_USERINFO_CTR
*ctr
);
1613 /*The following definitions come from rpc_client/ncacn_np_use.c */
1615 BOOL
ncacn_np_establish_connection(struct ncacn_np
*cli
,
1616 const char *srv_name
,
1617 const struct ntuser_creds
*ntc
,
1618 const char *pipe_name
, BOOL redir
,
1620 void init_ncacn_np_use(void);
1621 void free_ncacn_np_use(void);
1622 struct ncacn_np
*ncacn_np_initialise(struct ncacn_np
*msrpc
,
1623 const vuser_key
* key
);
1624 struct ncacn_np
*ncacn_np_use_add(const char *pipe_name
,
1625 const vuser_key
* key
,
1626 const char *srv_name
,
1627 const struct ntuser_creds
*ntc
,
1629 BOOL reuse
, BOOL
*is_new_connection
);
1630 BOOL
ncacn_np_use_del(const char *pipe_name
,
1631 const vuser_key
* key
,
1632 BOOL force_close
, BOOL
*connection_closed
);
1633 void ncacn_np_use_enum(uint32
* num_cons
, struct use_info
***use
);
1635 /*The following definitions come from rpc_client/ncalrpc_l_use.c */
1637 void init_ncalrpc_use(void);
1638 void free_ncalrpc_use(void);
1639 struct msrpc_local
*ncalrpc_l_use_add(const char *pipe_name
,
1640 const vuser_key
* key
,
1641 BOOL redir
, BOOL reuse
, BOOL
*is_new
);
1642 BOOL
ncalrpc_l_use_del(const char *pipe_name
,
1643 const vuser_key
* key
,
1644 BOOL force_close
, BOOL
*connection_closed
);
1645 void ncalrpc_l_use_enum(uint32
* num_cons
, struct use_info
***use
);
1646 void ncalrpc_use_wait_keyboard(void);
1648 /*The following definitions come from rpc_parse/parse_creds.c */
1650 BOOL
make_creds_unix(CREDS_UNIX
*r_u
, const char* user_name
,
1651 const char* requested_name
,
1652 const char* real_name
,
1654 BOOL
creds_io_unix(char *desc
, CREDS_UNIX
*r_u
, prs_struct
*ps
, int depth
);
1655 void creds_free_unix(CREDS_UNIX
*r_u
);
1656 BOOL
make_creds_unix_sec(CREDS_UNIX_SEC
*r_u
,
1657 uint32 uid
, uint32 gid
, uint32 num_grps
, gid_t
*grps
);
1658 BOOL
creds_io_unix_sec(char *desc
, CREDS_UNIX_SEC
*r_u
, prs_struct
*ps
, int depth
);
1659 void creds_free_unix_sec(CREDS_UNIX_SEC
*r_u
);
1660 BOOL
creds_io_pwd_info(char *desc
, struct pwd_info
*pwd
, prs_struct
*ps
, int depth
);
1661 BOOL
creds_io_nt(char *desc
, CREDS_NT
*r_u
, prs_struct
*ps
, int depth
);
1662 void creds_free_nt(CREDS_NT
*r_u
);
1663 BOOL
creds_io_hybrid(char *desc
, CREDS_HYBRID
*r_u
, prs_struct
*ps
, int depth
);
1664 void copy_unix_creds(CREDS_UNIX
*to
, const CREDS_UNIX
*from
);
1665 void copy_unix_sec_creds(CREDS_UNIX_SEC
*to
, const CREDS_UNIX_SEC
*from
);
1666 void copy_nt_creds(struct ntuser_creds
*to
,
1667 const struct ntuser_creds
*from
);
1668 void copy_user_creds(struct user_creds
*to
,
1669 const struct user_creds
*from
);
1670 void free_user_creds(struct user_creds
*creds
);
1671 BOOL
creds_io_cmd(char *desc
, CREDS_CMD
*r_u
, prs_struct
*ps
, int depth
);
1672 BOOL
create_ntuser_creds( prs_struct
*ps
,
1674 uint16 version
, uint16 command
,
1675 const vuser_key
*key
,
1676 const struct ntuser_creds
*ntu
,
1678 BOOL
create_user_creds( prs_struct
*ps
,
1680 uint16 version
, uint16 command
,
1681 const vuser_key
*key
,
1682 const struct user_creds
*usr
);
1684 /*The following definitions come from rpc_parse/parse_lsa.c */
1686 BOOL
make_lsa_trans_name(LSA_TRANS_NAME
* trn
, UNISTR2
* uni_name
,
1687 uint32 sid_name_use
, char *name
, uint32 idx
);
1688 int make_dom_ref_uni(DOM_R_REF
* ref
, const UNISTR2
* uni_domname
,
1689 const DOM_SID
* dom_sid
);
1690 int make_dom_ref(DOM_R_REF
* ref
, const char *domname
,
1691 const DOM_SID
* dom_sid
);
1692 BOOL
make_lsa_sec_qos(LSA_SEC_QOS
* qos
, uint16 imp_lev
, uint8 ctxt
,
1693 uint8 eff
, uint32 unknown
);
1694 BOOL
make_lsa_obj_attr(LSA_OBJ_ATTR
* attr
, uint32 attributes
,
1696 BOOL
make_q_open_pol(LSA_Q_OPEN_POL
* r_q
, uint16 system_name
,
1698 uint32 desired_access
, LSA_SEC_QOS
* qos
);
1699 BOOL
lsa_io_q_open_pol(char *desc
, LSA_Q_OPEN_POL
* r_q
, prs_struct
* ps
,
1701 BOOL
lsa_io_r_open_pol(char *desc
, LSA_R_OPEN_POL
* r_p
, prs_struct
* ps
,
1703 BOOL
make_q_open_pol2(LSA_Q_OPEN_POL2
* r_q
, const char *server_name
,
1705 uint32 desired_access
, LSA_SEC_QOS
* qos
);
1706 BOOL
lsa_io_q_open_pol2(char *desc
, LSA_Q_OPEN_POL2
* r_q
, prs_struct
* ps
,
1708 BOOL
lsa_io_r_open_pol2(char *desc
, LSA_R_OPEN_POL2
* r_p
, prs_struct
* ps
,
1710 BOOL
make_q_query_sec_obj(LSA_Q_QUERY_SEC_OBJ
* q_q
, const POLICY_HND
*hnd
,
1712 BOOL
lsa_io_q_query_sec_obj(char *desc
, LSA_Q_QUERY_SEC_OBJ
* q_q
, prs_struct
* ps
,
1714 BOOL
lsa_io_r_query_sec_obj(char *desc
, LSA_R_QUERY_SEC_OBJ
*r_u
, prs_struct
*ps
, int depth
);
1715 BOOL
make_q_query(LSA_Q_QUERY_INFO
* q_q
, POLICY_HND
*hnd
, uint16 info_class
);
1716 BOOL
lsa_io_q_query(char *desc
, LSA_Q_QUERY_INFO
* q_q
, prs_struct
* ps
,
1718 BOOL
make_q_create_secret(LSA_Q_CREATE_SECRET
* q_o
,
1719 const POLICY_HND
*pol_hnd
, const char *secret_name
,
1720 uint32 desired_access
);
1721 BOOL
lsa_io_q_create_secret(char *desc
, LSA_Q_CREATE_SECRET
* q_o
,
1722 prs_struct
* ps
, int depth
);
1723 BOOL
lsa_io_r_create_secret(char *desc
, LSA_R_CREATE_SECRET
* r_o
,
1724 prs_struct
* ps
, int depth
);
1725 BOOL
make_q_open_secret(LSA_Q_OPEN_SECRET
* q_o
, const POLICY_HND
*pol_hnd
,
1726 const char *secret_name
, uint32 desired_access
);
1727 BOOL
lsa_io_q_open_secret(char *desc
, LSA_Q_OPEN_SECRET
* q_o
,
1728 prs_struct
* ps
, int depth
);
1729 BOOL
lsa_io_r_open_secret(char *desc
, LSA_R_OPEN_SECRET
* r_o
,
1730 prs_struct
* ps
, int depth
);
1731 BOOL
lsa_io_secret_value(char *desc
, LSA_SECRET_VALUE
* value
,
1732 prs_struct
* ps
, int depth
);
1733 BOOL
lsa_io_secret_info(char *desc
, LSA_SECRET_INFO
* info
, prs_struct
* ps
,
1735 BOOL
lsa_io_secret(char *desc
, LSA_SECRET
* q_q
, prs_struct
* ps
, int depth
);
1736 BOOL
make_q_query_secret(LSA_Q_QUERY_SECRET
* q_q
, POLICY_HND
*pol
,
1737 const STRING2
*secret
, const NTTIME
* update
);
1738 BOOL
lsa_io_q_query_secret(char *desc
, LSA_Q_QUERY_SECRET
* q_q
,
1739 prs_struct
* ps
, int depth
);
1740 BOOL
lsa_io_r_query_secret(char *desc
, LSA_R_QUERY_SECRET
* r_q
,
1741 prs_struct
* ps
, int depth
);
1742 BOOL
lsa_io_q_set_secret(char *desc
, LSA_Q_SET_SECRET
* q_q
, prs_struct
* ps
,
1744 BOOL
lsa_io_r_set_secret(char *desc
, LSA_R_SET_SECRET
* r_q
, prs_struct
* ps
,
1746 BOOL
make_q_enum_trust_dom(LSA_Q_ENUM_TRUST_DOM
* q_e
,
1748 uint32 enum_context
, uint32 preferred_len
);
1749 BOOL
lsa_io_q_enum_trust_dom(char *desc
, LSA_Q_ENUM_TRUST_DOM
* q_e
,
1750 prs_struct
* ps
, int depth
);
1751 BOOL
make_r_enum_trust_dom(LSA_R_ENUM_TRUST_DOM
* r_e
, int32 enum_context
,
1753 UNISTR2
* domain_names
, DOM_SID
** domain_sids
,
1755 BOOL
lsa_io_r_enum_trust_dom(char *desc
, LSA_R_ENUM_TRUST_DOM
* r_e
,
1756 prs_struct
* ps
, int depth
);
1757 void lsa_free_r_enum_trust_dom(LSA_R_ENUM_TRUST_DOM
* r_e
);
1758 BOOL
lsa_io_r_query(char *desc
, LSA_R_QUERY_INFO
* r_q
, prs_struct
* ps
,
1760 BOOL
make_lsa_sid_enum(LSA_SID_ENUM
* sen
, uint32 num_entries
,
1762 BOOL
make_q_lookup_sids(LSA_Q_LOOKUP_SIDS
* q_l
, POLICY_HND
*hnd
,
1763 int num_sids
, DOM_SID
** sids
, uint16 level
);
1764 BOOL
lsa_io_q_lookup_sids(char *desc
, LSA_Q_LOOKUP_SIDS
* q_s
,
1765 prs_struct
* ps
, int depth
);
1766 BOOL
lsa_io_r_lookup_sids(char *desc
, LSA_R_LOOKUP_SIDS
* r_s
,
1767 prs_struct
* ps
, int depth
);
1768 BOOL
make_q_lookup_names(LSA_Q_LOOKUP_NAMES
* q_l
, POLICY_HND
*hnd
,
1769 uint32 num_names
, char **names
);
1770 BOOL
lsa_io_q_lookup_names(char *desc
, LSA_Q_LOOKUP_NAMES
* q_r
,
1771 prs_struct
* ps
, int depth
);
1772 BOOL
lsa_io_r_lookup_names(char *desc
, LSA_R_LOOKUP_NAMES
* r_r
,
1773 prs_struct
* ps
, int depth
);
1774 BOOL
make_lsa_q_close(LSA_Q_CLOSE
* q_c
, POLICY_HND
*hnd
);
1775 BOOL
lsa_io_q_close(char *desc
, LSA_Q_CLOSE
* q_c
, prs_struct
* ps
, int depth
);
1776 BOOL
lsa_io_r_close(char *desc
, LSA_R_CLOSE
* r_c
, prs_struct
* ps
, int depth
);
1778 /*The following definitions come from rpc_parse/parse_misc.c */
1780 BOOL
smb_io_bigint(char *desc
, BIGINT
*bigint
, prs_struct
*ps
, int depth
);
1781 BOOL
smb_io_time(char *desc
, NTTIME
*nttime
, prs_struct
*ps
, int depth
);
1782 BOOL
smb_io_lookup_level(char *desc
, LOOKUP_LEVEL
*level
, prs_struct
*ps
, int depth
);
1783 uint32
get_enum_hnd(ENUM_HND
*enh
);
1784 BOOL
make_enum_hnd(ENUM_HND
*enh
, uint32 hnd
);
1785 BOOL
smb_io_enum_hnd(char *desc
, ENUM_HND
*hnd
, prs_struct
*ps
, int depth
);
1786 BOOL
smb_io_dom_sid(char *desc
, DOM_SID
*sid
, prs_struct
*ps
, int depth
);
1787 BOOL
make_dom_sid2(DOM_SID2
*sid2
, const DOM_SID
*sid
);
1788 BOOL
smb_io_dom_sid2(char *desc
, DOM_SID2
*sid
, prs_struct
*ps
, int depth
);
1789 BOOL
make_str_hdr(STRHDR
*hdr
, int max_len
, int len
, uint32 buffer
);
1790 BOOL
smb_io_strhdr(char *desc
, STRHDR
*hdr
, prs_struct
*ps
, int depth
);
1791 BOOL
make_strhdr2(STRHDR2
*hdr
, uint32 max_len
, uint32 len
, uint32 buffer
);
1792 BOOL
smb_io_strhdr2(char *desc
, STRHDR2
*hdr
, prs_struct
*ps
, int depth
);
1793 BOOL
make_uni_hdr(UNIHDR
*hdr
, int len
);
1794 BOOL
make_unihdr_from_unistr2(UNIHDR
*hdr
, const UNISTR2
*str
);
1795 BOOL
smb_io_unihdr(char *desc
, UNIHDR
*hdr
, prs_struct
*ps
, int depth
);
1796 BOOL
make_buf_hdr(BUFHDR
*hdr
, int max_len
, int len
);
1797 BOOL
smb_io_hdrbuf_pre(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
, uint32
*offset
);
1798 BOOL
smb_io_hdrbuf_post(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
,
1799 uint32 ptr_hdrbuf
, uint32 max_len
, uint32 len
);
1800 BOOL
smb_io_hdrbuf(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
);
1801 BOOL
make_bufhdr2(BUFHDR2
*hdr
, uint32 info_level
, uint32 length
, uint32 buffer
);
1802 BOOL
smb_io_bufhdr2(char *desc
, BUFHDR2
*hdr
, prs_struct
*ps
, int depth
);
1803 BOOL
make_uni_hdr2(UNIHDR2
*hdr
, int len
);
1804 BOOL
make_unihdr2_from_unistr2(UNIHDR2
*hdr
, const UNISTR2
*str
);
1805 BOOL
smb_io_unihdr2(char *desc
, UNIHDR2
*hdr2
, prs_struct
*ps
, int depth
);
1806 BOOL
make_unistr(UNISTR
*str
, char *buf
);
1807 BOOL
smb_io_unistr(char *desc
, UNISTR
*uni
, prs_struct
*ps
, int depth
);
1808 BOOL
make_buffer3_uint32(BUFFER3
*str
, uint32 val
);
1809 BOOL
make_buffer3_str(BUFFER3
*str
, const char *buf
, int len
);
1810 BOOL
make_buffer3_hex(BUFFER3
*str
, char *buf
);
1811 BOOL
make_buffer3_bytes(BUFFER3
*str
, uint8
*buf
, int len
);
1812 BOOL
smb_io_buffer3(char *desc
, BUFFER3
*buf3
, prs_struct
*ps
, int depth
);
1813 BOOL
make_buffer4_str(BUFFER4
*str
, const char *buf
, int len
);
1814 BOOL
smb_io_buffer4(char *desc
, BUFFER4
*buf4
, uint32 buffer
, prs_struct
*ps
, int depth
);
1815 BOOL
init_buffer5(BUFFER5
**str
);
1816 BOOL
clear_buffer5(BUFFER5
**str
);
1817 BOOL
make_buffer5(BUFFER5
*str
, char *buf
, int len
);
1818 BOOL
smb_io_buffer5(char *desc
, BUFFER5
*buf5
, prs_struct
*ps
, int depth
);
1819 BOOL
make_buffer2_multi(BUFFER2
*str
, char *const* const buf
, uint32 num
);
1820 BOOL
make_buffer2(BUFFER2
*str
, const char *buf
, int len
);
1821 BOOL
smb_io_buffer2(char *desc
, BUFFER2
*buf2
, uint32 buffer
, prs_struct
*ps
, int depth
);
1822 BOOL
make_buf_unistr2(UNISTR2
*str
, uint32
*ptr
, const char *buf
);
1823 BOOL
make_string2(STRING2
*str
, const char *buf
, int len
);
1824 BOOL
make_buf_string2(STRING2
*str
, uint32
*ptr
, const char *buf
);
1825 BOOL
smb_io_string2(char *desc
, STRING2
*str2
, uint32 buffer
, prs_struct
*ps
, int depth
);
1826 BOOL
make_unistr2(UNISTR2
*str
, const char *buf
, int len
);
1827 BOOL
smb_io_unistr2(char *desc
, UNISTR2
*uni2
, uint32 buffer
, prs_struct
*ps
, int depth
);
1828 BOOL
make_dom_rid2(DOM_RID2
*rid2
, uint32 rid
, uint8 type
, uint32 idx
);
1829 BOOL
smb_io_dom_rid2(char *desc
, DOM_RID2
*rid2
, prs_struct
*ps
, int depth
);
1830 BOOL
make_dom_rid3(DOM_RID3
*rid3
, uint32 rid
, uint8 type
);
1831 BOOL
smb_io_dom_rid3(char *desc
, DOM_RID3
*rid3
, prs_struct
*ps
, int depth
);
1832 BOOL
make_log_info(DOM_LOG_INFO
*log
,
1833 const char *logon_srv
, const char *acct_name
,
1834 uint16 sec_chan
, const char *comp_name
);
1835 BOOL
smb_io_log_info(char *desc
, DOM_LOG_INFO
*log
, prs_struct
*ps
, int depth
);
1836 BOOL
smb_io_chal(char *desc
, DOM_CHAL
*chal
, prs_struct
*ps
, int depth
);
1837 BOOL
smb_io_cred(char *desc
, DOM_CRED
*cred
, prs_struct
*ps
, int depth
);
1838 BOOL
make_clnt_info2(DOM_CLNT_INFO2
*clnt
,
1839 const char *logon_srv
, const char *comp_name
,
1840 DOM_CRED
*clnt_cred
);
1841 BOOL
smb_io_clnt_info2(char *desc
, DOM_CLNT_INFO2
*clnt
, prs_struct
*ps
, int depth
);
1842 BOOL
make_clnt_info(DOM_CLNT_INFO
*clnt
,
1843 const char *logon_srv
, const char *acct_name
,
1844 uint16 sec_chan
, const char *comp_name
,
1846 BOOL
smb_io_clnt_info(char *desc
, DOM_CLNT_INFO
*clnt
, prs_struct
*ps
, int depth
);
1847 BOOL
make_owf_info(OWF_INFO
*hash
, const uint8 data
[16]);
1848 BOOL
smb_io_owf_info(char *desc
, OWF_INFO
*hash
, prs_struct
*ps
, int depth
);
1849 BOOL
smb_io_gid(char *desc
, DOM_GID
*gid
, prs_struct
*ps
, int depth
);
1850 BOOL
smb_io_pol_hnd(char *desc
, POLICY_HND
*pol
, prs_struct
*ps
, int depth
);
1851 BOOL
smb_io_dom_query_3(char *desc
, DOM_QUERY_3
*d_q
, prs_struct
*ps
, int depth
);
1852 BOOL
smb_io_dom_query_5(char *desc
, DOM_QUERY_3
*d_q
, prs_struct
*ps
, int depth
);
1853 BOOL
smb_io_unistr3(char *desc
, UNISTR3
*name
, prs_struct
*ps
, int depth
);
1855 /*The following definitions come from rpc_parse/parse_net.c */
1857 BOOL
make_q_logon_ctrl2(NET_Q_LOGON_CTRL2
*q_l
,
1858 const char* srv_name
,
1859 uint32 function_code
,
1861 uint32 switch_value
);
1862 BOOL
net_io_q_logon_ctrl2(char *desc
, NET_Q_LOGON_CTRL2
*q_l
, prs_struct
*ps
, int depth
);
1863 BOOL
make_r_logon_ctrl2(NET_R_LOGON_CTRL2
*r_l
,
1864 uint32 switch_value
,
1865 NETLOGON_INFO
*logon_info
,
1867 BOOL
net_io_r_logon_ctrl2(char *desc
, NET_R_LOGON_CTRL2
*r_l
, prs_struct
*ps
, int depth
);
1868 BOOL
net_io_r_trust_dom(char *desc
, NET_R_TRUST_DOM_LIST
*r_t
, prs_struct
*ps
, int depth
);
1869 BOOL
net_io_q_trust_dom(char *desc
, NET_Q_TRUST_DOM_LIST
*q_l
, prs_struct
*ps
, int depth
);
1870 BOOL
make_q_req_chal(NET_Q_REQ_CHAL
*q_c
,
1871 const char *logon_srv
, const char *logon_clnt
,
1872 DOM_CHAL
*clnt_chal
);
1873 BOOL
net_io_q_req_chal(char *desc
, NET_Q_REQ_CHAL
*q_c
, prs_struct
*ps
, int depth
);
1874 BOOL
net_io_r_req_chal(char *desc
, NET_R_REQ_CHAL
*r_c
, prs_struct
*ps
, int depth
);
1875 BOOL
make_q_auth(NET_Q_AUTH
*q_a
,
1876 const char *logon_srv
, const char *acct_name
,
1877 uint16 sec_chan
, const char *comp_name
,
1878 DOM_CHAL
*clnt_chal
);
1879 BOOL
net_io_q_auth(char *desc
, NET_Q_AUTH
*q_a
, prs_struct
*ps
, int depth
);
1880 BOOL
net_io_r_auth(char *desc
, NET_R_AUTH
*r_a
, prs_struct
*ps
, int depth
);
1881 BOOL
make_q_auth_2(NET_Q_AUTH_2
*q_a
,
1882 const char *logon_srv
, const char *acct_name
,
1883 uint16 sec_chan
, const char *comp_name
,
1884 DOM_CHAL
*clnt_chal
, uint32 clnt_flgs
);
1885 BOOL
net_io_q_auth_2(char *desc
, NET_Q_AUTH_2
*q_a
, prs_struct
*ps
, int depth
);
1886 BOOL
net_io_r_auth_2(char *desc
, NET_R_AUTH_2
*r_a
, prs_struct
*ps
, int depth
);
1887 BOOL
make_q_srv_pwset(NET_Q_SRV_PWSET
*q_s
,
1888 const char *logon_srv
, const char *acct_name
,
1889 uint16 sec_chan
, const char *comp_name
,
1890 DOM_CRED
*cred
, char nt_cypher
[16]);
1891 BOOL
net_io_q_srv_pwset(char *desc
, NET_Q_SRV_PWSET
*q_s
, prs_struct
*ps
, int depth
);
1892 BOOL
net_io_r_srv_pwset(char *desc
, NET_R_SRV_PWSET
*r_s
, prs_struct
*ps
, int depth
);
1893 BOOL
make_id_info1(NET_ID_INFO_1
*id
, const char *domain_name
,
1897 const char *user_name
,
1898 const char *wksta_name
,
1899 const char sess_key
[16],
1900 const uchar lm_cypher
[16],
1901 const uchar nt_cypher
[16]);
1902 BOOL
make_id_info4(NET_ID_INFO_4
*id
, const char *domain_name
,
1904 uint32 log_id_low
, uint32 log_id_high
,
1905 const char *user_name
, const char *wksta_name
,
1906 const char *general
);
1907 BOOL
make_id_info2(NET_ID_INFO_2
*id
, const char *domain_name
,
1909 uint32 log_id_low
, uint32 log_id_high
,
1910 const char *user_name
, const char *wksta_name
,
1911 const uchar lm_challenge
[8],
1912 const uchar
*lm_chal_resp
,
1914 const uchar
*nt_chal_resp
,
1916 BOOL
make_sam_info(DOM_SAM_INFO
*sam
,
1917 const char *logon_srv
, const char *comp_name
,
1918 DOM_CRED
*clnt_cred
,
1919 DOM_CRED
*rtn_cred
, uint16 logon_level
,
1920 NET_ID_INFO_CTR
*ctr
);
1921 BOOL
make_net_user_info3W(NET_USER_INFO_3
*usr
,
1923 const NTTIME
*logon_time
,
1924 const NTTIME
*logoff_time
,
1925 const NTTIME
*kickoff_time
,
1926 const NTTIME
*pass_last_set_time
,
1927 const NTTIME
*pass_can_change_time
,
1928 const NTTIME
*pass_must_change_time
,
1930 const UNISTR2
*user_name
,
1931 const UNISTR2
*full_name
,
1932 const UNISTR2
*log_scr
,
1933 const UNISTR2
*prof_path
,
1934 const UNISTR2
*home_dir
,
1935 const UNISTR2
*dir_drive
,
1938 uint16 bad_pw_count
,
1943 const DOM_GID
*gids
,
1946 const char sess_key
[16],
1948 const UNISTR2
*logon_srv
,
1949 const UNISTR2
*logon_dom
,
1951 const char *padding
,
1953 const DOM_SID
*dom_sid
,
1954 const char *other_sids
);
1955 BOOL
make_net_user_info3(NET_USER_INFO_3
*usr
,
1958 NTTIME
*logoff_time
,
1959 NTTIME
*kickoff_time
,
1960 NTTIME
*pass_last_set_time
,
1961 NTTIME
*pass_can_change_time
,
1962 NTTIME
*pass_must_change_time
,
1972 uint16 bad_pw_count
,
1989 BOOL
net_io_user_info3(char *desc
, NET_USER_INFO_3
*usr
, prs_struct
*ps
, int depth
);
1990 BOOL
net_io_q_sam_logon(char *desc
, NET_Q_SAM_LOGON
*q_l
, prs_struct
*ps
, int depth
);
1991 BOOL
make_r_sam_logon(NET_R_SAM_LOGON
*r_s
,
1992 const DOM_CRED
*srv_creds
,
1993 uint16 switch_value
,
1994 NET_USER_INFO_3
*user_info
,
1996 BOOL
net_io_r_sam_logon(char *desc
, NET_R_SAM_LOGON
*r_l
, prs_struct
*ps
, int depth
);
1997 BOOL
net_io_q_sam_logoff(char *desc
, NET_Q_SAM_LOGOFF
*q_l
, prs_struct
*ps
, int depth
);
1998 BOOL
make_r_sam_logoff(NET_R_SAM_LOGOFF
*r_s
,
1999 const DOM_CRED
*srv_cred
,
2001 BOOL
net_io_r_sam_logoff(char *desc
, NET_R_SAM_LOGOFF
*r_l
, prs_struct
*ps
, int depth
);
2002 BOOL
make_q_sam_sync(NET_Q_SAM_SYNC
*q_s
,
2003 const char *srv_name
,
2004 const char *cli_name
,
2005 DOM_CRED
*cli_creds
, uint32 database_id
);
2006 BOOL
net_io_q_sam_sync(char *desc
, NET_Q_SAM_SYNC
*q_s
, prs_struct
*ps
, int depth
);
2007 BOOL
make_sam_delta_hdr(SAM_DELTA_HDR
*delta
, uint16 type
, uint32 rid
);
2008 BOOL
make_sam_account_info(SAM_ACCOUNT_INFO
*info
,
2009 const UNISTR2
*user_name
,
2010 const UNISTR2
*full_name
,
2011 uint32 user_rid
, uint32 group_rid
,
2012 const UNISTR2
*home_dir
,
2013 const UNISTR2
*dir_drive
,
2014 const UNISTR2
*log_scr
,
2015 const UNISTR2
*desc
,
2017 const UNISTR2
*prof_path
,
2018 const UNISTR2
*wkstas
,
2019 const UNISTR2
*unk_str
,
2020 const UNISTR2
*mung_dial
);
2021 BOOL
make_r_sam_sync(NET_R_SAM_SYNC
*r_s
,
2022 const DOM_CRED
*srv_cred
,
2023 uint32 sync_context
,
2026 SAM_DELTA_HDR
*hdr_deltas
,
2027 SAM_DELTA_CTR
*deltas
,
2029 BOOL
net_io_r_sam_sync(char *desc
, uint8 sess_key
[16],
2030 NET_R_SAM_SYNC
*r_s
, prs_struct
*ps
, int depth
);
2032 /*The following definitions come from rpc_parse/parse_ntlmssp.c */
2034 BOOL
rpc_hdr_ntlmssp_auth_chk(RPC_HDR_AUTH
*rai
);
2035 BOOL
make_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG
*neg
,
2037 fstring myname
, fstring domain
);
2038 BOOL
smb_io_rpc_auth_ntlmssp_neg(char *desc
, RPC_AUTH_NTLMSSP_NEG
*neg
, prs_struct
*ps
, int depth
);
2039 BOOL
make_rpc_auth_ntlmssp_chal(RPC_AUTH_NTLMSSP_CHAL
*chl
,
2041 uint8 challenge
[8]);
2042 BOOL
smb_io_rpc_auth_ntlmssp_chal(char *desc
, RPC_AUTH_NTLMSSP_CHAL
*chl
, prs_struct
*ps
, int depth
);
2043 BOOL
make_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP
*rsp
,
2045 uchar
*nt_resp
, size_t nt_len
,
2046 char *domain
, char *user
, char *wks
,
2048 BOOL
smb_io_rpc_auth_ntlmssp_resp(char *desc
, RPC_AUTH_NTLMSSP_RESP
*rsp
, prs_struct
*ps
, int depth
);
2049 BOOL
rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
, uint32 crc32
, uint32 seq_num
);
2050 BOOL
make_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
,
2051 uint32 ver
, uint32 crc32
, uint32 seq_num
);
2052 BOOL
smb_io_rpc_auth_ntlmssp_chk(char *desc
, RPC_AUTH_NTLMSSP_CHK
*chk
, prs_struct
*ps
, int depth
);
2054 /*The following definitions come from rpc_parse/parse_prs.c */
2056 void prs_debug(prs_struct
* ps
, int depth
, const char *desc
,
2057 const char *fn_name
);
2058 void prs_debug_out(const prs_struct
* ps
, char *msg
, int level
);
2059 void prs_init(prs_struct
* ps
, uint32 size
, uint8 align
, BOOL io
);
2060 void prs_set_packtype(prs_struct
* ps
, const uint8
* pack_type
);
2061 void prs_create(prs_struct
* ps
, char *data
, uint32 size
, uint8 align
,
2063 BOOL
prs_copy(prs_struct
* ps
, const prs_struct
* from
);
2064 BOOL
prs_alloc_data(prs_struct
* buf
, int size
);
2065 BOOL
prs_buf_copy(char *copy_into
, const prs_struct
* buf
,
2066 uint32 offset
, uint32 len
);
2067 void prs_struct_free(prs_struct
** buf
);
2068 void prs_free_data(prs_struct
* buf
);
2069 BOOL
prs_realloc_data(prs_struct
* buf
, size_t new_size
);
2070 BOOL
prs_grow_data(prs_struct
* buf
, BOOL io
, int new_size
, BOOL force_grow
);
2071 uint32
prs_buf_len(const prs_struct
* buf
);
2072 char *prs_data(const prs_struct
* buf
, uint32 offset
);
2073 void prs_link(prs_struct
* prev
, prs_struct
* ps
, prs_struct
* next
);
2074 void prs_align(prs_struct
* ps
);
2075 BOOL
prs_grow(prs_struct
* ps
, uint32 new_size
);
2076 BOOL
prs_append_data(prs_struct
* ps
, const char *data
, int len
);
2077 BOOL
prs_add_data(prs_struct
* ps
, const char *data
, int len
);
2078 BOOL
_prs_uint8(char *name
, prs_struct
* ps
, int depth
, uint8
* data8
);
2079 BOOL
_prs_uint16(char *name
, prs_struct
* ps
, int depth
, uint16
* data16
);
2080 BOOL
_prs_hash1(prs_struct
* ps
, uint32 offset
, uint8 sess_key
[16]);
2081 BOOL
_prs_uint32(char *name
, prs_struct
* ps
, int depth
, uint32
* data32
);
2082 BOOL
_prs_uint8s(BOOL charmode
, char *name
, prs_struct
* ps
, int depth
,
2083 uint8
* data8s
, int len
);
2084 BOOL
_prs_uint16s(BOOL charmode
, char *name
, prs_struct
* ps
, int depth
,
2085 uint16
* data16s
, int len
);
2086 BOOL
_prs_uint32s(BOOL charmode
, char *name
, prs_struct
* ps
, int depth
,
2087 uint32
* data32s
, int len
);
2088 BOOL
_prs_buffer2(BOOL charmode
, char *name
, prs_struct
* ps
, int depth
,
2090 BOOL
_prs_string2(BOOL charmode
, char *name
, prs_struct
* ps
, int depth
,
2092 BOOL
_prs_unistr2(BOOL charmode
, char *name
, prs_struct
* ps
, int depth
,
2094 BOOL
_prs_unistr3(BOOL charmode
, char *name
, UNISTR3
* str
, prs_struct
* ps
,
2096 BOOL
_prs_unistr(char *name
, prs_struct
* ps
, int depth
, UNISTR
* str
);
2097 BOOL
_prs_string(char *name
, prs_struct
* ps
, int depth
, char *str
,
2098 uint16 len
, uint16 max_buf_size
);
2099 BOOL
_prs_uint16_pre(char *name
, prs_struct
* ps
, int depth
, uint16
* data16
,
2101 BOOL
_prs_uint16_post(char *name
, prs_struct
* ps
, int depth
, uint16
* data16
,
2102 uint32 ptr_uint16
, uint32 start_offset
);
2103 BOOL
_prs_uint32_pre(char *name
, prs_struct
* ps
, int depth
, uint32
* data32
,
2105 BOOL
_prs_uint32_post(char *name
, prs_struct
* ps
, int depth
, uint32
* data32
,
2106 uint32 ptr_uint32
, uint32 data_size
);
2107 int prs_tdb_delete(TDB_CONTEXT
* tdb
, prs_struct
* pk
);
2108 int prs_tdb_store(TDB_CONTEXT
* tdb
, int flgs
, prs_struct
* pk
,
2110 void prs_tdb_fetch(TDB_CONTEXT
* tdb
, prs_struct
* pk
, prs_struct
* pd
);
2112 /*The following definitions come from rpc_parse/parse_rpc.c */
2114 BOOL
make_rpc_hdr(RPC_HDR
* hdr
, enum RPC_PKT_TYPE pkt_type
, uint8 flags
,
2115 uint32 call_id
, int frag_len
, int auth_len
);
2116 BOOL
smb_io_rpc_hdr(char *desc
, RPC_HDR
* rpc
, prs_struct
* ps
, int depth
);
2117 BOOL
is_complete_pdu(prs_struct
* ps
);
2118 BOOL
smb_io_rpc_hdr_nack(char *desc
, RPC_HDR_NACK
* rpc
, prs_struct
* ps
,
2120 BOOL
smb_io_rpc_hdr_fault(char *desc
, RPC_HDR_FAULT
* rpc
, prs_struct
* ps
,
2122 BOOL
make_rpc_hdr_rb(RPC_HDR_RB
* rpc
,
2123 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
2124 uint32 num_elements
, uint16 context_id
,
2125 uint8 num_syntaxes
, RPC_IFACE
* abstract
,
2126 RPC_IFACE
* transfer
);
2127 BOOL
smb_io_rpc_hdr_rb(char *desc
, RPC_HDR_RB
* rpc
, prs_struct
* ps
,
2129 BOOL
make_rpc_hdr_ba(RPC_HDR_BA
* rpc
,
2130 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
2131 const char *pipe_addr
,
2132 uint8 num_results
, uint16 result
, uint16 reason
,
2133 RPC_IFACE
* transfer
);
2134 BOOL
smb_io_rpc_hdr_ba(char *desc
, RPC_HDR_BA
* rpc
, prs_struct
* ps
,
2136 BOOL
make_rpc_hdr_req(RPC_HDR_REQ
* hdr
, uint32 alloc_hint
, uint16 vuid
,
2138 BOOL
smb_io_rpc_hdr_req(char *desc
, RPC_HDR_REQ
* rpc
, prs_struct
* ps
,
2140 BOOL
smb_io_rpc_hdr_resp(char *desc
, RPC_HDR_RESP
* rpc
, prs_struct
* ps
,
2142 BOOL
make_rpc_hdr_autha(RPC_HDR_AUTHA
* rai
,
2143 uint16 max_tsize
, uint16 max_rsize
,
2144 uint8 auth_type
, uint8 auth_level
,
2145 uint8 stub_type_len
);
2146 BOOL
smb_io_rpc_hdr_autha(char *desc
, RPC_HDR_AUTHA
* rai
, prs_struct
* ps
,
2148 BOOL
make_rpc_hdr_auth(RPC_HDR_AUTH
* rai
,
2149 uint8 auth_type
, uint8 auth_level
,
2150 uint8 stub_type_len
, uint32 ptr
);
2151 BOOL
smb_io_rpc_hdr_auth(char *desc
, RPC_HDR_AUTH
* rai
, prs_struct
* ps
,
2153 BOOL
make_rpc_auth_verifier(RPC_AUTH_VERIFIER
* rav
,
2154 char *signature
, uint32 msg_type
);
2155 BOOL
smb_io_rpc_auth_verifier(char *desc
, RPC_AUTH_VERIFIER
* rav
,
2156 prs_struct
* ps
, int depth
);
2157 BOOL
rpc_auth_verifier_chk(RPC_AUTH_VERIFIER
* rav
,
2158 char *signature
, uint32 msg_type
);
2160 /*The following definitions come from rpc_parse/parse_samr.c */
2162 BOOL
make_samr_q_close_hnd(SAMR_Q_CLOSE_HND
*q_c
, POLICY_HND
*hnd
);
2163 BOOL
samr_io_q_close_hnd(char *desc
, SAMR_Q_CLOSE_HND
*q_u
, prs_struct
*ps
, int depth
);
2164 BOOL
samr_io_r_close_hnd(char *desc
, SAMR_R_CLOSE_HND
*r_u
, prs_struct
*ps
, int depth
);
2165 BOOL
make_samr_q_lookup_domain(SAMR_Q_LOOKUP_DOMAIN
*q_u
,
2166 POLICY_HND
*pol
, const char *dom_name
);
2167 BOOL
samr_io_q_lookup_domain(char *desc
, SAMR_Q_LOOKUP_DOMAIN
*q_u
, prs_struct
*ps
, int depth
);
2168 BOOL
make_samr_r_lookup_domain(SAMR_R_LOOKUP_DOMAIN
*r_u
,
2169 DOM_SID
*dom_sid
, uint32 status
);
2170 BOOL
samr_io_r_lookup_domain(char *desc
, SAMR_R_LOOKUP_DOMAIN
*r_u
, prs_struct
*ps
, int depth
);
2171 BOOL
make_samr_q_unknown_2d(SAMR_Q_UNKNOWN_2D
*q_u
,
2172 const POLICY_HND
*dom_pol
,
2173 const DOM_SID
*sid
);
2174 BOOL
samr_io_q_unknown_2d(char *desc
, SAMR_Q_UNKNOWN_2D
*q_u
, prs_struct
*ps
, int depth
);
2175 BOOL
samr_io_r_unknown_2d(char *desc
, SAMR_R_UNKNOWN_2D
*r_u
, prs_struct
*ps
, int depth
);
2176 BOOL
make_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN
*q_u
,
2177 const POLICY_HND
*connect_pol
, uint32 flags
,
2178 const DOM_SID
*sid
);
2179 BOOL
samr_io_q_open_domain(char *desc
, SAMR_Q_OPEN_DOMAIN
*q_u
, prs_struct
*ps
, int depth
);
2180 BOOL
samr_io_r_open_domain(char *desc
, SAMR_R_OPEN_DOMAIN
*r_u
, prs_struct
*ps
, int depth
);
2181 BOOL
make_samr_q_get_usrdom_pwinfo(SAMR_Q_GET_USRDOM_PWINFO
*q_u
, POLICY_HND
*user_pol
);
2182 BOOL
samr_io_q_get_usrdom_pwinfo(char *desc
, SAMR_Q_GET_USRDOM_PWINFO
*q_u
, prs_struct
*ps
, int depth
);
2183 BOOL
make_samr_r_get_usrdom_pwinfo(SAMR_R_GET_USRDOM_PWINFO
*q_u
, uint32 status
);
2184 BOOL
samr_io_r_get_usrdom_pwinfo(char *desc
, SAMR_R_GET_USRDOM_PWINFO
*r_u
, prs_struct
*ps
, int depth
);
2185 BOOL
make_samr_q_query_sec_obj(SAMR_Q_QUERY_SEC_OBJ
*q_u
,
2186 const POLICY_HND
*user_pol
, uint32 sec_info
);
2187 BOOL
samr_io_q_query_sec_obj(char *desc
, SAMR_Q_QUERY_SEC_OBJ
*q_u
, prs_struct
*ps
, int depth
);
2188 BOOL
make_samr_q_query_dom_info(SAMR_Q_QUERY_DOMAIN_INFO
*q_u
,
2189 POLICY_HND
*domain_pol
, uint16 switch_value
);
2190 BOOL
samr_io_q_query_dom_info(char *desc
, SAMR_Q_QUERY_DOMAIN_INFO
*q_u
, prs_struct
*ps
, int depth
);
2191 BOOL
make_unk_info3(SAM_UNK_INFO_3
*u_3
);
2192 BOOL
make_unk_info6(SAM_UNK_INFO_6
*u_6
);
2193 BOOL
make_unk_info7(SAM_UNK_INFO_7
*u_7
);
2194 BOOL
make_unk_info2(SAM_UNK_INFO_2
*u_2
, char *domain
, char *server
);
2195 BOOL
make_unk_info1(SAM_UNK_INFO_1
*u_1
);
2196 BOOL
make_samr_r_query_dom_info(SAMR_R_QUERY_DOMAIN_INFO
*r_u
,
2197 uint16 switch_value
, SAM_UNK_CTR
*ctr
,
2199 BOOL
samr_io_r_query_dom_info(char *desc
, SAMR_R_QUERY_DOMAIN_INFO
*r_u
, prs_struct
*ps
, int depth
);
2200 BOOL
samr_io_r_query_sec_obj(char *desc
, SAMR_R_QUERY_SEC_OBJ
*r_u
, prs_struct
*ps
, int depth
);
2201 BOOL
make_sam_entry(SAM_ENTRY
*sam
, uint32 len_sam_name
, uint32 rid
);
2202 BOOL
make_samr_q_enum_dom_users(SAMR_Q_ENUM_DOM_USERS
*q_e
, POLICY_HND
*pol
,
2204 uint16 acb_mask
, uint16 unk_1
, uint32 size
);
2205 BOOL
samr_io_q_enum_dom_users(char *desc
, SAMR_Q_ENUM_DOM_USERS
*q_e
, prs_struct
*ps
, int depth
);
2206 BOOL
make_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS
*r_u
,
2208 uint32 num_sam_entries
);
2209 BOOL
samr_io_r_enum_dom_users(char *desc
, SAMR_R_ENUM_DOM_USERS
*r_u
, prs_struct
*ps
, int depth
);
2210 BOOL
make_samr_q_query_dispinfo(SAMR_Q_QUERY_DISPINFO
*q_e
, POLICY_HND
*pol
,
2211 uint16 switch_level
, uint32 start_idx
,
2212 uint32 max_entries
);
2213 BOOL
samr_io_q_query_dispinfo(char *desc
, SAMR_Q_QUERY_DISPINFO
*q_e
, prs_struct
*ps
, int depth
);
2214 BOOL
make_sam_dispinfo_1(SAM_DISPINFO_1
*sam
, uint32
*num_entries
,
2215 uint32
*data_size
, uint32 start_idx
,
2216 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
2217 BOOL
make_sam_dispinfo_2(SAM_DISPINFO_2
*sam
, uint32
*num_entries
,
2218 uint32
*data_size
, uint32 start_idx
,
2219 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
2220 BOOL
make_sam_dispinfo_3(SAM_DISPINFO_3
*sam
, uint32
*num_entries
,
2221 uint32
*data_size
, uint32 start_idx
,
2223 BOOL
make_sam_dispinfo_4(SAM_DISPINFO_4
*sam
, uint32
*num_entries
,
2224 uint32
*data_size
, uint32 start_idx
,
2225 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
2226 BOOL
make_sam_dispinfo_5(SAM_DISPINFO_5
*sam
, uint32
*num_entries
,
2227 uint32
*data_size
, uint32 start_idx
,
2229 BOOL
make_samr_r_query_dispinfo(SAMR_R_QUERY_DISPINFO
*r_u
,
2230 uint32 num_entries
, uint32 data_size
,
2231 uint16 switch_level
, SAM_DISPINFO_CTR
*ctr
,
2233 BOOL
samr_io_r_query_dispinfo(char *desc
, SAMR_R_QUERY_DISPINFO
*r_u
, prs_struct
*ps
, int depth
);
2234 BOOL
make_samr_q_open_group(SAMR_Q_OPEN_GROUP
*q_c
,
2235 const POLICY_HND
*hnd
,
2236 uint32 access_mask
, uint32 rid
);
2237 BOOL
samr_io_q_open_group(char *desc
, SAMR_Q_OPEN_GROUP
*q_u
, prs_struct
*ps
, int depth
);
2238 BOOL
samr_io_r_open_group(char *desc
, SAMR_R_OPEN_GROUP
*r_u
, prs_struct
*ps
, int depth
);
2239 BOOL
make_samr_group_info1(GROUP_INFO1
*gr1
,
2240 char *acct_name
, char *acct_desc
,
2241 uint32 num_members
);
2242 BOOL
samr_io_group_info1(char *desc
, GROUP_INFO1
*gr1
, prs_struct
*ps
, int depth
);
2243 BOOL
make_samr_group_info4(GROUP_INFO4
*gr4
, const char *acct_desc
);
2244 BOOL
samr_io_group_info4(char *desc
, GROUP_INFO4
*gr4
, prs_struct
*ps
, int depth
);
2245 BOOL
samr_group_info_ctr(char *desc
, GROUP_INFO_CTR
*ctr
, prs_struct
*ps
, int depth
);
2246 BOOL
make_samr_q_create_dom_group(SAMR_Q_CREATE_DOM_GROUP
*q_e
,
2248 const char *acct_desc
);
2249 BOOL
samr_io_q_create_dom_group(char *desc
, SAMR_Q_CREATE_DOM_GROUP
*q_e
, prs_struct
*ps
, int depth
);
2250 BOOL
samr_io_r_create_dom_group(char *desc
, SAMR_R_CREATE_DOM_GROUP
*r_u
, prs_struct
*ps
, int depth
);
2251 BOOL
make_samr_q_delete_dom_group(SAMR_Q_DELETE_DOM_GROUP
*q_c
, POLICY_HND
*hnd
);
2252 BOOL
samr_io_q_delete_dom_group(char *desc
, SAMR_Q_DELETE_DOM_GROUP
*q_u
, prs_struct
*ps
, int depth
);
2253 BOOL
samr_io_r_delete_dom_group(char *desc
, SAMR_R_DELETE_DOM_GROUP
*r_u
, prs_struct
*ps
, int depth
);
2254 BOOL
make_samr_q_del_groupmem(SAMR_Q_DEL_GROUPMEM
*q_e
,
2257 BOOL
samr_io_q_del_groupmem(char *desc
, SAMR_Q_DEL_GROUPMEM
*q_e
, prs_struct
*ps
, int depth
);
2258 BOOL
make_samr_r_del_groupmem(SAMR_R_DEL_GROUPMEM
*r_u
, POLICY_HND
*pol
,
2260 BOOL
samr_io_r_del_groupmem(char *desc
, SAMR_R_DEL_GROUPMEM
*r_u
, prs_struct
*ps
, int depth
);
2261 BOOL
make_samr_q_add_groupmem(SAMR_Q_ADD_GROUPMEM
*q_e
,
2264 BOOL
samr_io_q_add_groupmem(char *desc
, SAMR_Q_ADD_GROUPMEM
*q_e
, prs_struct
*ps
, int depth
);
2265 BOOL
make_samr_r_add_groupmem(SAMR_R_ADD_GROUPMEM
*r_u
, POLICY_HND
*pol
,
2267 BOOL
samr_io_r_add_groupmem(char *desc
, SAMR_R_ADD_GROUPMEM
*r_u
, prs_struct
*ps
, int depth
);
2268 BOOL
make_samr_q_set_groupinfo(SAMR_Q_SET_GROUPINFO
*q_e
,
2269 POLICY_HND
*pol
, GROUP_INFO_CTR
*ctr
);
2270 BOOL
samr_io_q_set_groupinfo(char *desc
, SAMR_Q_SET_GROUPINFO
*q_e
, prs_struct
*ps
, int depth
);
2271 BOOL
make_samr_r_set_groupinfo(SAMR_R_SET_GROUPINFO
*r_u
,
2273 BOOL
samr_io_r_set_groupinfo(char *desc
, SAMR_R_SET_GROUPINFO
*r_u
, prs_struct
*ps
, int depth
);
2274 BOOL
make_samr_q_query_groupinfo(SAMR_Q_QUERY_GROUPINFO
*q_e
,
2276 uint16 switch_level
);
2277 BOOL
samr_io_q_query_groupinfo(char *desc
, SAMR_Q_QUERY_GROUPINFO
*q_e
, prs_struct
*ps
, int depth
);
2278 BOOL
make_samr_r_query_groupinfo(SAMR_R_QUERY_GROUPINFO
*r_u
, GROUP_INFO_CTR
*ctr
,
2280 BOOL
samr_io_r_query_groupinfo(char *desc
, SAMR_R_QUERY_GROUPINFO
*r_u
, prs_struct
*ps
, int depth
);
2281 BOOL
make_samr_q_query_groupmem(SAMR_Q_QUERY_GROUPMEM
*q_c
, POLICY_HND
*hnd
);
2282 BOOL
samr_io_q_query_groupmem(char *desc
, SAMR_Q_QUERY_GROUPMEM
*q_u
, prs_struct
*ps
, int depth
);
2283 BOOL
make_samr_r_query_groupmem(SAMR_R_QUERY_GROUPMEM
*r_u
,
2284 uint32 num_entries
, uint32
*rid
, uint32
*attr
, uint32 status
);
2285 BOOL
samr_io_r_query_groupmem(char *desc
, SAMR_R_QUERY_GROUPMEM
*r_u
, prs_struct
*ps
, int depth
);
2286 void samr_free_r_query_groupmem(SAMR_R_QUERY_GROUPMEM
*r_u
);
2287 BOOL
make_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS
*q_u
,
2289 BOOL
samr_io_q_query_usergroups(char *desc
, SAMR_Q_QUERY_USERGROUPS
*q_u
, prs_struct
*ps
, int depth
);
2290 BOOL
make_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS
*r_u
,
2291 uint32 num_gids
, DOM_GID
*gid
, uint32 status
);
2292 BOOL
samr_io_gids(char *desc
, uint32
*num_gids
, DOM_GID
**gid
, prs_struct
*ps
, int depth
);
2293 BOOL
samr_io_r_query_usergroups(char *desc
, SAMR_R_QUERY_USERGROUPS
*r_u
, prs_struct
*ps
, int depth
);
2294 BOOL
make_samr_q_enum_domains(SAMR_Q_ENUM_DOMAINS
*q_e
,
2295 const POLICY_HND
*pol
,
2296 uint32 start_idx
, uint32 size
);
2297 BOOL
samr_io_q_enum_domains(char *desc
, SAMR_Q_ENUM_DOMAINS
*q_e
, prs_struct
*ps
, int depth
);
2298 BOOL
make_samr_r_enum_domains(SAMR_R_ENUM_DOMAINS
*r_u
,
2299 uint32 next_idx
, uint32 num_sam_entries
);
2300 BOOL
samr_io_r_enum_domains(char *desc
, SAMR_R_ENUM_DOMAINS
*r_u
, prs_struct
*ps
, int depth
);
2301 BOOL
make_samr_q_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS
*q_e
,
2302 const POLICY_HND
*pol
,
2303 uint32 start_idx
, uint32 size
);
2304 BOOL
samr_io_q_enum_dom_groups(char *desc
, SAMR_Q_ENUM_DOM_GROUPS
*q_e
, prs_struct
*ps
, int depth
);
2305 BOOL
make_samr_r_enum_dom_groups(SAMR_R_ENUM_DOM_GROUPS
*r_u
,
2306 uint32 next_idx
, uint32 num_sam_entries
);
2307 BOOL
samr_io_r_enum_dom_groups(char *desc
, SAMR_R_ENUM_DOM_GROUPS
*r_u
, prs_struct
*ps
, int depth
);
2308 BOOL
make_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES
*q_e
, POLICY_HND
*pol
,
2309 uint32 start_idx
, uint32 size
);
2310 BOOL
samr_io_q_enum_dom_aliases(char *desc
, SAMR_Q_ENUM_DOM_ALIASES
*q_e
, prs_struct
*ps
, int depth
);
2311 BOOL
make_samr_r_enum_dom_aliases(SAMR_R_ENUM_DOM_ALIASES
*r_u
,
2313 uint32 num_sam_entries
);
2314 BOOL
samr_io_r_enum_dom_aliases(char *desc
, SAMR_R_ENUM_DOM_ALIASES
*r_u
, prs_struct
*ps
, int depth
);
2315 BOOL
make_samr_alias_info3(ALIAS_INFO3
*al3
, const char *acct_desc
);
2316 BOOL
samr_io_alias_info3(char *desc
, ALIAS_INFO3
*al3
, prs_struct
*ps
, int depth
);
2317 BOOL
samr_alias_info_ctr(char *desc
, ALIAS_INFO_CTR
*ctr
, prs_struct
*ps
, int depth
);
2318 BOOL
make_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO
*q_e
,
2319 const POLICY_HND
*pol
, uint16 switch_level
);
2320 BOOL
samr_io_q_query_aliasinfo(char *desc
, SAMR_Q_QUERY_ALIASINFO
*q_e
, prs_struct
*ps
, int depth
);
2321 BOOL
make_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO
*r_u
,
2322 ALIAS_INFO_CTR
*ctr
, uint32 status
);
2323 BOOL
samr_io_r_query_aliasinfo(char *desc
, SAMR_R_QUERY_ALIASINFO
*r_u
, prs_struct
*ps
, int depth
);
2324 BOOL
make_samr_q_set_aliasinfo(SAMR_Q_SET_ALIASINFO
*q_u
,
2325 const POLICY_HND
*hnd
,
2326 ALIAS_INFO_CTR
*ctr
);
2327 BOOL
samr_io_q_set_aliasinfo(char *desc
, SAMR_Q_SET_ALIASINFO
*q_u
, prs_struct
*ps
, int depth
);
2328 BOOL
samr_io_r_set_aliasinfo(char *desc
, SAMR_R_SET_ALIASINFO
*r_u
, prs_struct
*ps
, int depth
);
2329 BOOL
make_samr_q_query_useraliases(SAMR_Q_QUERY_USERALIASES
*q_u
,
2330 const POLICY_HND
*hnd
,
2332 uint32
*ptr_sid
, DOM_SID2
*sid
);
2333 BOOL
samr_io_q_query_useraliases(char *desc
, SAMR_Q_QUERY_USERALIASES
*q_u
, prs_struct
*ps
, int depth
);
2334 void samr_free_q_query_useraliases(SAMR_Q_QUERY_USERALIASES
*q_u
);
2335 BOOL
make_samr_r_query_useraliases(SAMR_R_QUERY_USERALIASES
*r_u
,
2336 uint32 num_rids
, uint32
*rid
, uint32 status
);
2337 BOOL
samr_io_rids(char *desc
, uint32
*num_rids
, uint32
**rid
, prs_struct
*ps
, int depth
);
2338 BOOL
samr_io_r_query_useraliases(char *desc
, SAMR_R_QUERY_USERALIASES
*r_u
, prs_struct
*ps
, int depth
);
2339 BOOL
make_samr_q_open_alias(SAMR_Q_OPEN_ALIAS
*q_u
, const POLICY_HND
*pol
,
2340 uint32 unknown_0
, uint32 rid
);
2341 BOOL
samr_io_q_open_alias(char *desc
, SAMR_Q_OPEN_ALIAS
*q_u
, prs_struct
*ps
, int depth
);
2342 BOOL
samr_io_r_open_alias(char *desc
, SAMR_R_OPEN_ALIAS
*r_u
, prs_struct
*ps
, int depth
);
2343 BOOL
make_samr_q_lookup_rids(SAMR_Q_LOOKUP_RIDS
*q_u
,
2344 const POLICY_HND
*pol
, uint32 flags
,
2345 uint32 num_rids
, const uint32
*rid
);
2346 BOOL
samr_io_q_lookup_rids(char *desc
, SAMR_Q_LOOKUP_RIDS
*q_u
, prs_struct
*ps
, int depth
);
2347 void samr_free_q_lookup_rids(SAMR_Q_LOOKUP_RIDS
*q_u
);
2348 BOOL
make_samr_r_lookup_rids(SAMR_R_LOOKUP_RIDS
*r_u
,
2349 uint32 num_names
, UNIHDR
*hdr_name
, UNISTR2
*uni_name
,
2351 BOOL
samr_io_r_lookup_rids(char *desc
, SAMR_R_LOOKUP_RIDS
*r_u
, prs_struct
*ps
, int depth
);
2352 void samr_free_r_lookup_rids(SAMR_R_LOOKUP_RIDS
*r_u
);
2353 BOOL
make_samr_q_delete_alias(SAMR_Q_DELETE_DOM_ALIAS
*q_u
, POLICY_HND
*hnd
);
2354 BOOL
samr_io_q_delete_alias(char *desc
, SAMR_Q_DELETE_DOM_ALIAS
*q_u
, prs_struct
*ps
, int depth
);
2355 BOOL
samr_io_r_delete_alias(char *desc
, SAMR_R_DELETE_DOM_ALIAS
*r_u
, prs_struct
*ps
, int depth
);
2356 BOOL
make_samr_q_create_dom_alias(SAMR_Q_CREATE_DOM_ALIAS
*q_u
, POLICY_HND
*hnd
,
2357 const char *acct_desc
);
2358 BOOL
samr_io_q_create_dom_alias(char *desc
, SAMR_Q_CREATE_DOM_ALIAS
*q_u
, prs_struct
*ps
, int depth
);
2359 BOOL
samr_io_r_create_dom_alias(char *desc
, SAMR_R_CREATE_DOM_ALIAS
*r_u
, prs_struct
*ps
, int depth
);
2360 BOOL
make_samr_q_add_aliasmem(SAMR_Q_ADD_ALIASMEM
*q_u
, POLICY_HND
*hnd
,
2362 BOOL
samr_io_q_add_aliasmem(char *desc
, SAMR_Q_ADD_ALIASMEM
*q_u
, prs_struct
*ps
, int depth
);
2363 BOOL
samr_io_r_add_aliasmem(char *desc
, SAMR_R_ADD_ALIASMEM
*r_u
, prs_struct
*ps
, int depth
);
2364 BOOL
make_samr_q_del_aliasmem(SAMR_Q_DEL_ALIASMEM
*q_u
, POLICY_HND
*hnd
,
2366 BOOL
samr_io_q_del_aliasmem(char *desc
, SAMR_Q_DEL_ALIASMEM
*q_u
, prs_struct
*ps
, int depth
);
2367 BOOL
samr_io_r_del_aliasmem(char *desc
, SAMR_R_DEL_ALIASMEM
*r_u
, prs_struct
*ps
, int depth
);
2368 BOOL
make_samr_q_delete_dom_alias(SAMR_Q_DELETE_DOM_ALIAS
*q_c
, POLICY_HND
*hnd
);
2369 BOOL
samr_io_q_delete_dom_alias(char *desc
, SAMR_Q_DELETE_DOM_ALIAS
*q_u
, prs_struct
*ps
, int depth
);
2370 BOOL
make_samr_r_delete_dom_alias(SAMR_R_DELETE_DOM_ALIAS
*r_u
,
2372 BOOL
samr_io_r_delete_dom_alias(char *desc
, SAMR_R_DELETE_DOM_ALIAS
*r_u
, prs_struct
*ps
, int depth
);
2373 BOOL
make_samr_q_query_aliasmem(SAMR_Q_QUERY_ALIASMEM
*q_c
,
2374 const POLICY_HND
*hnd
);
2375 BOOL
samr_io_q_query_aliasmem(char *desc
, SAMR_Q_QUERY_ALIASMEM
*q_u
, prs_struct
*ps
, int depth
);
2376 BOOL
make_samr_r_query_aliasmem(SAMR_R_QUERY_ALIASMEM
*r_u
,
2377 uint32 num_sids
, DOM_SID2
*sid
, uint32 status
);
2378 BOOL
samr_io_r_query_aliasmem(char *desc
, SAMR_R_QUERY_ALIASMEM
*r_u
, prs_struct
*ps
, int depth
);
2379 BOOL
make_samr_q_lookup_names(SAMR_Q_LOOKUP_NAMES
*q_u
,
2380 const POLICY_HND
*pol
, uint32 flags
,
2381 uint32 num_names
, char **name
);
2382 BOOL
samr_io_q_lookup_names(char *desc
, SAMR_Q_LOOKUP_NAMES
*q_u
, prs_struct
*ps
, int depth
);
2383 void samr_free_q_lookup_names(SAMR_Q_LOOKUP_NAMES
*q_l
);
2384 BOOL
make_samr_r_lookup_names(SAMR_R_LOOKUP_NAMES
*r_u
,
2386 const uint32
*rid
, const uint32
*type
,
2388 BOOL
samr_io_r_lookup_names(char *desc
, SAMR_R_LOOKUP_NAMES
*r_u
, prs_struct
*ps
, int depth
);
2389 void samr_free_r_lookup_names(SAMR_R_LOOKUP_NAMES
*r_l
);
2390 BOOL
make_samr_q_delete_dom_user(SAMR_Q_DELETE_DOM_USER
*q_c
, POLICY_HND
*hnd
);
2391 BOOL
samr_io_q_delete_dom_user(char *desc
, SAMR_Q_DELETE_DOM_USER
*q_u
, prs_struct
*ps
, int depth
);
2392 BOOL
samr_io_r_delete_dom_user(char *desc
, SAMR_R_DELETE_DOM_USER
*r_u
, prs_struct
*ps
, int depth
);
2393 BOOL
make_samr_q_open_user(SAMR_Q_OPEN_USER
*q_u
,
2394 const POLICY_HND
*pol
,
2395 uint32 access_mask
, uint32 rid
);
2396 BOOL
samr_io_q_open_user(char *desc
, SAMR_Q_OPEN_USER
*q_u
, prs_struct
*ps
, int depth
);
2397 BOOL
samr_io_r_open_user(char *desc
, SAMR_R_OPEN_USER
*r_u
, prs_struct
*ps
, int depth
);
2398 BOOL
make_samr_q_create_user(SAMR_Q_CREATE_USER
*q_u
,
2401 uint16 acb_info
, uint32 access_mask
);
2402 BOOL
samr_io_q_create_user(char *desc
, SAMR_Q_CREATE_USER
*q_u
, prs_struct
*ps
, int depth
);
2403 BOOL
samr_io_r_create_user(char *desc
, SAMR_R_CREATE_USER
*r_u
, prs_struct
*ps
, int depth
);
2404 BOOL
make_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO
*q_u
,
2405 POLICY_HND
*hnd
, uint16 switch_value
);
2406 BOOL
samr_io_q_query_userinfo(char *desc
, SAMR_Q_QUERY_USERINFO
*q_u
, prs_struct
*ps
, int depth
);
2407 BOOL
make_sam_user_info12(SAM_USER_INFO_12
*usr
,
2409 const uint8 lm_pwd
[16],
2410 const uint8 nt_pwd
[16]);
2411 BOOL
sam_io_user_info12(char *desc
, SAM_USER_INFO_12
*u
, prs_struct
*ps
, int depth
);
2412 BOOL
make_sam_user_info10(SAM_USER_INFO_10
*usr
,
2414 BOOL
sam_io_user_info10(char *desc
, SAM_USER_INFO_10
*usr
, prs_struct
*ps
, int depth
);
2415 BOOL
make_sam_user_info11(SAM_USER_INFO_11
*usr
,
2421 BOOL
sam_io_user_info11(char *desc
, SAM_USER_INFO_11
*usr
, prs_struct
*ps
, int depth
);
2422 BOOL
make_sam_user_info24(SAM_USER_INFO_24
*usr
,
2423 const char newpass
[516], uint16 passlen
);
2424 BOOL
make_sam_user_info23W(SAM_USER_INFO_23
*usr
,
2426 const NTTIME
*logon_time
, /* all zeros */
2427 const NTTIME
*logoff_time
, /* all zeros */
2428 const NTTIME
*kickoff_time
, /* all zeros */
2429 const NTTIME
*pass_last_set_time
, /* all zeros */
2430 const NTTIME
*pass_can_change_time
, /* all zeros */
2431 const NTTIME
*pass_must_change_time
, /* all zeros */
2433 const UNISTR2
*user_name
,
2434 const UNISTR2
*full_name
,
2435 const UNISTR2
*home_dir
,
2436 const UNISTR2
*dir_drive
,
2437 const UNISTR2
*log_scr
,
2438 const UNISTR2
*prof_path
,
2439 const UNISTR2
*desc
,
2440 const UNISTR2
*wkstas
,
2441 const UNISTR2
*unk_str
,
2442 const UNISTR2
*mung_dial
,
2444 uint32 user_rid
, /* 0x0000 0000 */
2457 BOOL
make_sam_user_info23A(SAM_USER_INFO_23
*usr
,
2459 NTTIME
*logon_time
, /* all zeros */
2460 NTTIME
*logoff_time
, /* all zeros */
2461 NTTIME
*kickoff_time
, /* all zeros */
2462 NTTIME
*pass_last_set_time
, /* all zeros */
2463 NTTIME
*pass_can_change_time
, /* all zeros */
2464 NTTIME
*pass_must_change_time
, /* all zeros */
2466 char *user_name
, /* NULL */
2477 uint32 user_rid
, /* 0x0000 0000 */
2490 BOOL
make_sam_user_info21W(SAM_USER_INFO_21
*usr
,
2492 const NTTIME
*logon_time
,
2493 const NTTIME
*logoff_time
,
2494 const NTTIME
*kickoff_time
,
2495 const NTTIME
*pass_last_set_time
,
2496 const NTTIME
*pass_can_change_time
,
2497 const NTTIME
*pass_must_change_time
,
2499 const UNISTR2
*user_name
,
2500 const UNISTR2
*full_name
,
2501 const UNISTR2
*home_dir
,
2502 const UNISTR2
*dir_drive
,
2503 const UNISTR2
*log_scr
,
2504 const UNISTR2
*prof_path
,
2505 const UNISTR2
*desc
,
2506 const UNISTR2
*wkstas
,
2507 const UNISTR2
*unk_str
,
2508 const UNISTR2
*mung_dial
,
2510 const uchar lm_pwd
[16],
2511 const uchar nt_pwd
[16],
2519 const LOGON_HRS
*hrs
,
2522 BOOL
make_sam_user_info21A(SAM_USER_INFO_21
*usr
,
2525 NTTIME
*logoff_time
,
2526 NTTIME
*kickoff_time
,
2527 NTTIME
*pass_last_set_time
,
2528 NTTIME
*pass_can_change_time
,
2529 NTTIME
*pass_must_change_time
,
2551 BOOL
sam_io_user_info21(char *desc
, SAM_USER_INFO_21
*usr
, prs_struct
*ps
, int depth
);
2552 uint32
make_samr_userinfo_ctr_usr21(SAM_USERINFO_CTR
*ctr
,
2553 uint16 switch_value
,
2554 const SAM_USER_INFO_21
*usr
);
2555 BOOL
make_samr_userinfo_ctr(SAM_USERINFO_CTR
*ctr
, const uchar
*sess_key
,
2556 uint16 switch_value
, void *info
);
2557 BOOL
samr_io_userinfo_ctr(char *desc
, SAM_USERINFO_CTR
*ctr
, prs_struct
*ps
, int depth
);
2558 void free_samr_userinfo_ctr(SAM_USERINFO_CTR
*ctr
);
2559 BOOL
make_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO
*r_u
,
2560 SAM_USERINFO_CTR
*ctr
, uint32 status
);
2561 BOOL
samr_io_r_query_userinfo(char *desc
, SAMR_R_QUERY_USERINFO
*r_u
, prs_struct
*ps
, int depth
);
2562 BOOL
make_samr_q_set_userinfo(SAMR_Q_SET_USERINFO
*q_u
,
2564 uint16 switch_value
, void *info
);
2565 BOOL
samr_io_q_set_userinfo(char *desc
, SAMR_Q_SET_USERINFO
*q_u
, prs_struct
*ps
, int depth
);
2566 void free_samr_q_set_userinfo(SAMR_Q_SET_USERINFO
*q_u
);
2567 BOOL
make_samr_r_set_userinfo(SAMR_R_SET_USERINFO
*r_u
, uint32 status
);
2568 BOOL
samr_io_r_set_userinfo(char *desc
, SAMR_R_SET_USERINFO
*r_u
, prs_struct
*ps
, int depth
);
2569 BOOL
make_samr_q_set_userinfo2(SAMR_Q_SET_USERINFO2
*q_u
,
2571 uint16 switch_value
,
2572 SAM_USERINFO_CTR
*ctr
);
2573 BOOL
samr_io_q_set_userinfo2(char *desc
, SAMR_Q_SET_USERINFO2
*q_u
, prs_struct
*ps
, int depth
);
2574 void free_samr_q_set_userinfo2(SAMR_Q_SET_USERINFO2
*q_u
);
2575 BOOL
make_samr_r_set_userinfo2(SAMR_R_SET_USERINFO2
*r_u
,
2577 BOOL
samr_io_r_set_userinfo2(char *desc
, SAMR_R_SET_USERINFO2
*r_u
, prs_struct
*ps
, int depth
);
2578 BOOL
make_samr_q_connect(SAMR_Q_CONNECT
*q_u
,
2579 const char *srv_name
, uint32 access_mask
);
2580 BOOL
samr_io_q_connect(char *desc
, SAMR_Q_CONNECT
*q_u
, prs_struct
*ps
, int depth
);
2581 BOOL
samr_io_r_connect(char *desc
, SAMR_R_CONNECT
*r_u
, prs_struct
*ps
, int depth
);
2582 BOOL
make_samr_q_connect_anon(SAMR_Q_CONNECT_ANON
*q_u
);
2583 BOOL
samr_io_q_connect_anon(char *desc
, SAMR_Q_CONNECT_ANON
*q_u
, prs_struct
*ps
, int depth
);
2584 BOOL
samr_io_r_connect_anon(char *desc
, SAMR_R_CONNECT_ANON
*r_u
, prs_struct
*ps
, int depth
);
2585 BOOL
make_samr_q_get_dom_pwinfo(SAMR_Q_GET_DOM_PWINFO
*q_u
, const char *srv_name
);
2586 BOOL
samr_io_q_get_dom_pwinfo(char *desc
, SAMR_Q_GET_DOM_PWINFO
*q_u
, prs_struct
*ps
, int depth
);
2587 BOOL
samr_io_r_get_dom_pwinfo(char *desc
, SAMR_R_GET_DOM_PWINFO
*r_u
, prs_struct
*ps
, int depth
);
2588 BOOL
make_enc_passwd(SAMR_ENC_PASSWD
*pwd
, const char pass
[512]);
2589 BOOL
samr_io_enc_passwd(char *desc
, SAMR_ENC_PASSWD
*pwd
, prs_struct
*ps
, int depth
);
2590 BOOL
make_enc_hash(SAMR_ENC_HASH
*hsh
, const uchar hash
[16]);
2591 BOOL
samr_io_enc_hash(char *desc
, SAMR_ENC_HASH
*hsh
, prs_struct
*ps
, int depth
);
2592 BOOL
make_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER
*q_u
,
2593 const char *dest_host
, const char *user_name
,
2594 const char nt_newpass
[516],
2595 const uchar nt_oldhash
[16],
2596 const char lm_newpass
[516],
2597 const uchar lm_oldhash
[16]);
2598 BOOL
samr_io_q_chgpasswd_user(char *desc
, SAMR_Q_CHGPASSWD_USER
*q_u
, prs_struct
*ps
, int depth
);
2599 BOOL
make_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER
*r_u
, uint32 status
);
2600 BOOL
samr_io_r_chgpasswd_user(char *desc
, SAMR_R_CHGPASSWD_USER
*r_u
, prs_struct
*ps
, int depth
);
2602 /*The following definitions come from rpc_parse/parse_sec.c */
2604 BOOL
make_sec_access(SEC_ACCESS
*t
, uint32 mask
);
2605 BOOL
sec_io_access(char *desc
, SEC_ACCESS
*t
, prs_struct
*ps
, int depth
);
2606 BOOL
make_sec_ace(SEC_ACE
*t
, DOM_SID
*sid
, uint8 type
, SEC_ACCESS mask
, uint8 flag
);
2607 BOOL
sec_io_ace(char *desc
, SEC_ACE
*t
, prs_struct
*ps
, int depth
);
2608 BOOL
make_sec_acl(SEC_ACL
*t
, uint16 revision
, int num_aces
, SEC_ACE
*ace
);
2609 void free_sec_acl(SEC_ACL
*t
);
2610 BOOL
sec_io_acl(char *desc
, SEC_ACL
*t
, prs_struct
*ps
, int depth
);
2611 int make_sec_desc(SEC_DESC
*t
, uint16 revision
, uint16 type
,
2612 DOM_SID
*owner_sid
, DOM_SID
*grp_sid
,
2613 SEC_ACL
*sacl
, SEC_ACL
*dacl
);
2614 void free_sec_desc(SEC_DESC
*t
);
2615 BOOL
sec_io_desc(char *desc
, SEC_DESC
*t
, prs_struct
*ps
, int depth
);
2616 BOOL
make_sec_desc_buf(SEC_DESC_BUF
*buf
, int len
, SEC_DESC
*data
);
2617 void free_sec_desc_buf(SEC_DESC_BUF
*buf
);
2618 BOOL
sec_io_desc_buf(char *desc
, SEC_DESC_BUF
*sec
, prs_struct
*ps
, int depth
);
2620 /*The following definitions come from rpc_parse/parse_vuid.c */
2622 BOOL
vuid_io_key(char *desc
, vuser_key
* r_u
, prs_struct
* ps
, int depth
);
2623 BOOL
make_vuid_user_struct(user_struct
* r_u
,
2624 uid_t uid
, gid_t gid
,
2626 const char *requested_name
,
2627 const char *real_name
,
2629 uint32 n_groups
, const gid_t
* groups
,
2630 const NET_USER_INFO_3
* usr
);
2631 BOOL
vuid_io_user_struct(char *desc
, user_struct
* r_u
, prs_struct
* ps
,
2633 void vuid_free_user_struct(user_struct
* r_u
);
2635 /*The following definitions come from tdb/tdb.c */
2637 char *tdb_error(TDB_CONTEXT
*tdb
);
2638 int tdb_update(TDB_CONTEXT
*tdb
, TDB_DATA key
, TDB_DATA dbuf
);
2639 TDB_DATA
tdb_fetch(TDB_CONTEXT
*tdb
, TDB_DATA key
);
2640 int tdb_exists(TDB_CONTEXT
*tdb
, TDB_DATA key
);
2641 int tdb_traverse(TDB_CONTEXT
*tdb
, int (*fn
)(TDB_CONTEXT
*tdb
, TDB_DATA key
, TDB_DATA dbuf
, void* state
), void* state
);
2642 TDB_DATA
tdb_firstkey(TDB_CONTEXT
*tdb
);
2643 TDB_DATA
tdb_nextkey(TDB_CONTEXT
*tdb
, TDB_DATA key
);
2644 int tdb_delete(TDB_CONTEXT
*tdb
, TDB_DATA key
);
2645 int tdb_store(TDB_CONTEXT
*tdb
, TDB_DATA key
, TDB_DATA dbuf
, int flag
);
2646 TDB_CONTEXT
*tdb_open(char *name
, int hash_size
, int tdb_flags
,
2647 int open_flags
, mode_t mode
);
2648 int tdb_close(TDB_CONTEXT
*tdb
);
2649 int tdb_writelock(TDB_CONTEXT
*tdb
);
2650 int tdb_writeunlock(TDB_CONTEXT
*tdb
);
2651 int tdb_lockchain(TDB_CONTEXT
*tdb
, TDB_DATA key
);
2652 int tdb_unlockchain(TDB_CONTEXT
*tdb
, TDB_DATA key
);
2653 #endif /* _WINBINDD_PROTO_H_ */