3 /* This file is automatically generated with "make proto". DO NOT EDIT */
6 /*The following definitions come from client/client.c */
8 void do_list(const char *mask
,uint16 attribute
,void (*fn
)(file_info
*),BOOL rec
, BOOL dirs
);
9 struct cli_state
*do_connect(char *server
, char *share
);
11 /*The following definitions come from client/clitar.c */
14 void cmd_tarmode(void);
15 void cmd_setmode(void);
17 int process_tar(void);
18 int tar_parseargs(int argc
, char *argv
[], char *Optarg
, int Optind
);
20 /*The following definitions come from lib/access.c */
22 BOOL
allow_access(char *deny_list
,char *allow_list
,
23 char *cname
,char *caddr
);
24 BOOL
check_access(int sock
, char *allow_list
, char *deny_list
);
26 /*The following definitions come from lib/bitmap.c */
28 struct bitmap
*bitmap_allocate(int n
);
29 BOOL
bitmap_set(struct bitmap
*bm
, unsigned i
);
30 BOOL
bitmap_clear(struct bitmap
*bm
, unsigned i
);
31 BOOL
bitmap_query(struct bitmap
*bm
, unsigned i
);
32 int bitmap_find(struct bitmap
*bm
, unsigned ofs
);
34 /*The following definitions come from lib/charcnv.c */
36 char *unix2dos_format(char *str
,BOOL overwrite
);
37 char *dos2unix_format(char *str
, BOOL overwrite
);
38 void interpret_character_set(char *str
, int codepage
);
40 /*The following definitions come from lib/charset.c */
42 void charset_initialise(void);
43 void codepage_initialise(int client_codepage
);
44 void add_char_string(char *s
);
46 /*The following definitions come from lib/cmd_interp.c */
48 void free_cmd_set_array(uint32 num_entries
, struct command_set
**entries
);
49 struct command_set
*add_cmd_set_to_array(uint32
*len
,
50 struct command_set
***array
,
51 const struct command_set
*cmd
);
52 void add_command_set(const struct command_set
*cmds
);
53 void cmd_set_no_autoconnect(void);
54 int command_main(int argc
, char *argv
[]);
56 /*The following definitions come from lib/crc32.c */
58 uint32
crc32_calc_buffer( char *buffer
, uint32 count
);
60 /*The following definitions come from lib/debug.c */
62 void sig_usr2( int sig
);
63 void sig_usr1( int sig
);
64 void setup_logging( char *pname
, BOOL interactive
);
65 void reopen_logs( void );
66 void force_check_log_size( void );
67 BOOL
need_to_check_log_size( void );
68 void check_log_size( void );
69 void dbgflush( void );
70 BOOL
dbghdr( int level
, char *file
, char *func
, int line
);
72 /*The following definitions come from lib/doscalls.c */
74 int dos_unlink(char *fname
);
75 int dos_open(char *fname
,int flags
,mode_t mode
);
76 DIR *dos_opendir(char *dname
);
77 char *dos_readdirname(DIR *p
);
78 int dos_chown(char *fname
, uid_t uid
, gid_t gid
);
79 int dos_stat(char *fname
,SMB_STRUCT_STAT
*sbuf
);
80 int dos_lstat(char *fname
,SMB_STRUCT_STAT
*sbuf
);
81 int dos_mkdir(char *dname
,mode_t mode
);
82 int dos_rmdir(char *dname
);
83 int dos_chdir(char *dname
);
84 int dos_utime(char *fname
,struct utimbuf
*times
);
85 int copy_reg(char *source
, const char *dest
);
86 int dos_rename(char *from
, char *to
);
87 int dos_chmod(char *fname
,mode_t mode
);
88 char *dos_getwd(char *unix_path
);
89 BOOL
dos_file_exist(char *fname
,SMB_STRUCT_STAT
*sbuf
);
90 BOOL
dos_directory_exist(char *dname
,SMB_STRUCT_STAT
*st
);
91 time_t dos_file_modtime(char *fname
);
92 SMB_OFF_T
dos_file_size(char *file_name
);
93 int dos_ChDir(char *path
);
94 char *dos_GetWd(char *path
);
96 /*The following definitions come from lib/fault.c */
98 void fault_setup(void (*fn
)(void *));
100 /*The following definitions come from lib/fsusage.c */
102 int sys_fsusage(const char *path
, SMB_BIG_UINT
*dfree
, SMB_BIG_UINT
*dsize
);
104 /*The following definitions come from lib/genrand.c */
106 void generate_random_buffer( unsigned char *out
, int len
, BOOL re_seed
);
108 /*The following definitions come from lib/getsmbpass.c */
110 char *getsmbpass(char *prompt
) ;
112 /*The following definitions come from lib/hash.c */
114 BOOL
hash_table_init(hash_table
*table
, int num_buckets
, compare_function compare_func
);
115 int string_hash(int hash_size
, const char *key
);
116 hash_element
*hash_lookup(hash_table
*table
, char *key
);
117 hash_element
*hash_insert(hash_table
*table
, char *value
, char *key
);
118 void hash_remove(hash_table
*table
, hash_element
*hash_elem
);
119 BOOL
hash_clear(hash_table
*table
);
121 /*The following definitions come from lib/interface.c */
123 void load_interfaces(void);
124 BOOL
interfaces_changed(void);
125 BOOL
ismyip(struct in_addr ip
);
126 BOOL
is_local_net(struct in_addr from
);
127 int iface_count(void);
128 BOOL
we_are_multihomed(void);
129 struct interface
*get_interface(int n
);
130 struct in_addr
*iface_n_ip(int n
);
131 struct in_addr
*iface_n_bcast(int n
);
132 unsigned iface_hash(void);
133 struct in_addr
*iface_bcast(struct in_addr ip
);
134 struct in_addr
*iface_ip(struct in_addr ip
);
136 /*The following definitions come from lib/interfaces.c */
138 int get_interfaces(struct iface_struct
*ifaces
, int max_interfaces
);
140 /*The following definitions come from lib/kanji.c */
142 void interpret_coding_system(char *str
);
143 void initialize_multibyte_vectors( int client_codepage
);
145 /*The following definitions come from lib/md4.c */
147 void mdfour(unsigned char *out
, unsigned char *in
, int n
);
149 /*The following definitions come from lib/ms_fnmatch.c */
151 int ms_fnmatch(char *pattern
, char *string
);
153 /*The following definitions come from lib/msrpc-client.c */
155 BOOL
receive_msrpc(int fd
, prs_struct
*data
, unsigned int timeout
);
156 BOOL
msrpc_send(int fd
, prs_struct
*ps
);
157 BOOL
msrpc_receive(int fd
, prs_struct
*ps
);
158 BOOL
msrpc_connect(struct msrpc_state
*msrpc
, const char *pipe_name
);
159 void msrpc_init_creds(struct msrpc_state
*msrpc
, const struct user_creds
*usr
);
160 void msrpc_close_socket(struct msrpc_state
*msrpc
);
161 void msrpc_sockopt(struct msrpc_state
*msrpc
, char *options
);
162 BOOL
msrpc_connect_auth(struct msrpc_state
*msrpc
,
164 const char* pipename
,
165 const struct user_creds
*usr
);
166 struct msrpc_state
*msrpc_initialise(struct msrpc_state
*msrpc
, uint32 pid
);
167 void msrpc_shutdown(struct msrpc_state
*msrpc
);
168 BOOL
msrpc_establish_connection(struct msrpc_state
*msrpc
,
169 const char *pipe_name
);
171 /*The following definitions come from lib/msrpc_use.c */
174 void init_msrpc_use(void);
175 void free_msrpc_use(void);
176 struct msrpc_state
*msrpc_use_add(const char* pipe_name
,
178 const struct user_creds
*usr_creds
,
180 BOOL
msrpc_use_del(const char* pipe_name
,
181 const struct user_creds
*usr_creds
,
183 BOOL
*connection_closed
);
184 void msrpc_net_use_enum(uint32
*num_cons
, struct use_info
***use
);
187 /*The following definitions come from lib/pidfile.c */
189 pid_t
pidfile_pid(char *name
);
190 void pidfile_create(char *name
);
192 /*The following definitions come from lib/replace.c */
194 char *rep_inet_ntoa(struct in_addr ip
);
196 /*The following definitions come from lib/select.c */
198 void sys_select_signal(void);
199 int sys_select(int maxfd
, fd_set
*fds
,struct timeval
*tval
);
200 int sys_select_intr(int maxfd
, fd_set
*fds
,struct timeval
*tval
);
202 /*The following definitions come from lib/signal.c */
204 void BlockSignals(BOOL block
,int signum
);
205 void CatchSignal(int signum
,void (*handler
)(int ));
206 void CatchChild(void);
207 void CatchChildLeaveStatus(void);
209 /*The following definitions come from lib/slprintf.c */
211 int vslprintf(char *str
, int n
, char *format
, va_list ap
);
213 /*The following definitions come from lib/smbrun.c */
215 int smbrun(char *cmd
,char *outfile
,BOOL shared
);
217 /*The following definitions come from lib/snprintf.c */
220 /*The following definitions come from lib/substitute.c */
222 void standard_sub_basic(char *str
);
223 void standard_sub_advanced(int snum
, char *user
, char *connectpath
, gid_t gid
, char *str
);
224 void standard_sub_conn(connection_struct
*conn
, char *str
);
225 void standard_sub_snum(int snum
, char *str
);
226 void standard_sub_vuser(char *str
, user_struct
*vuser
);
227 void standard_sub_vsnum(char *str
, user_struct
*vuser
, int snum
);
229 /*The following definitions come from lib/system.c */
231 int sys_usleep(long usecs
);
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 SMB_STRUCT_DIRENT
*sys_readdir(DIR *dirp
);
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 void oplock_set_capability(BOOL this_process
, BOOL inherit
);
249 long sys_random(void);
250 void sys_srandom(unsigned int seed
);
251 int groups_max(void);
252 int sys_getgroups(int setlen
, gid_t
*gidset
);
253 int sys_setgroups(int setlen
, gid_t
*gidset
);
254 struct passwd
*sys_getpwnam(const char *name
);
255 struct passwd
*sys_getpwuid(uid_t uid
);
256 int wsys_stat(const smb_ucs2_t
*wfname
,SMB_STRUCT_STAT
*sbuf
);
257 int wsys_lstat(const smb_ucs2_t
*wfname
,SMB_STRUCT_STAT
*sbuf
);
258 int wsys_creat(const smb_ucs2_t
*wfname
, mode_t mode
);
259 int wsys_open(const smb_ucs2_t
*wfname
, int oflag
, mode_t mode
);
260 FILE *wsys_fopen(const smb_ucs2_t
*wfname
, const char *type
);
261 DIR *wsys_opendir(const smb_ucs2_t
*wfname
);
262 smb_ucs2_t
*wsys_getwd(smb_ucs2_t
*s
);
263 int wsys_chown(const smb_ucs2_t
*wfname
, uid_t uid
, gid_t gid
);
264 int wsys_chroot(const smb_ucs2_t
*wfname
);
265 pid_t
sys_fork(void);
266 pid_t
sys_getpid(void);
267 int sys_popen(const char *command
);
268 int sys_pclose(int fd
);
270 /*The following definitions come from lib/talloc.c */
272 TALLOC_CTX
*talloc_init(void);
273 void *talloc(TALLOC_CTX
*t
, size_t size
);
274 void talloc_destroy(TALLOC_CTX
*t
);
276 /*The following definitions come from lib/time.c */
278 void GetTimeOfDay(struct timeval
*tval
);
280 int TimeDiff(time_t t
);
281 struct tm
*LocalTime(time_t *t
);
282 time_t nt_time_to_unix(NTTIME
*nt
);
283 time_t interpret_long_date(char *p
);
284 void unix_to_nt_time(NTTIME
*nt
, time_t t
);
285 void put_long_date(char *p
,time_t t
);
286 BOOL
null_mtime(time_t mtime
);
287 void put_dos_date(char *buf
,int offset
,time_t unixdate
);
288 void put_dos_date2(char *buf
,int offset
,time_t unixdate
);
289 void put_dos_date3(char *buf
,int offset
,time_t unixdate
);
290 time_t make_unix_date(void *date_ptr
);
291 time_t make_unix_date2(void *date_ptr
);
292 time_t make_unix_date3(void *date_ptr
);
293 char *http_timestring(time_t t
);
294 char *timestring(BOOL hires
);
295 time_t get_create_time(SMB_STRUCT_STAT
*st
,BOOL fake_dirs
);
297 /*The following definitions come from lib/ufc.c */
299 char *ufc_crypt(char *key
,char *salt
);
301 /*The following definitions come from lib/username.c */
303 char *get_user_home_dir(char *user
);
304 BOOL
map_username(char *user
);
305 struct passwd
*Get_Pwnam(char *user
,BOOL allow_change
);
306 BOOL
user_in_list(char *user
,char *list
);
307 struct passwd
*smb_getpwnam(char *user
, BOOL allow_change
);
309 /*The following definitions come from lib/util.c */
312 BOOL
in_group(gid_t group
, gid_t current_gid
, int ngroups
, gid_t
*groups
);
313 char *Atoic(char *p
, int *n
, char *c
);
314 char *get_numlist(char *p
, uint32
**num
, int *count
);
315 BOOL
file_exist(char *fname
,SMB_STRUCT_STAT
*sbuf
);
316 int file_rename(char *from
, char *to
);
317 time_t file_modtime(char *fname
);
318 BOOL
directory_exist(char *dname
,SMB_STRUCT_STAT
*st
);
319 SMB_OFF_T
get_file_size(char *file_name
);
320 char *attrib_string(uint16 mode
);
321 void show_msg(char *buf
);
322 void smb_setlen(char *buf
,int len
);
323 int set_message(char *buf
,int num_words
,int num_bytes
,BOOL zero
);
324 void dos_clean_name(char *s
);
325 void unix_clean_name(char *s
);
326 BOOL
reduce_name(char *s
,char *dir
,BOOL widelinks
);
327 void make_dir_struct(char *buf
,char *mask
,char *fname
,SMB_OFF_T size
,int mode
,time_t date
);
328 void close_low_fds(void);
329 int set_blocking(int fd
, BOOL set
);
330 SMB_OFF_T
transfer_file(int infd
,int outfd
,SMB_OFF_T n
,char *header
,int headlen
,int align
);
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
);
338 int interpret_protocol(char *str
,int def
);
339 BOOL
is_ipaddress(const char *str
);
340 uint32
interpret_addr(char *str
);
341 struct in_addr
*interpret_addr2(char *str
);
342 BOOL
zero_ip(struct in_addr ip
);
343 BOOL
same_net(struct in_addr ip1
,struct in_addr ip2
,struct in_addr mask
);
344 struct hostent
*Get_Hostbyname(const char *name
);
345 BOOL
process_exists(pid_t pid
);
346 char *uidtoname(uid_t uid
);
347 char *gidtoname(gid_t gid
);
348 uid_t
nametouid(const char *name
);
349 gid_t
nametogid(const char *name
);
350 void smb_panic(char *why
);
351 char *readdirname(DIR *p
);
352 BOOL
is_in_path(char *name
, name_compare_entry
*namelist
);
353 void set_namearray(name_compare_entry
**ppname_array
, char *namelist
);
354 void free_namearray(name_compare_entry
*name_array
);
355 BOOL
fcntl_lock(int fd
, int op
, SMB_OFF_T offset
, SMB_OFF_T count
, int type
);
356 BOOL
is_myname(char *s
);
357 void set_remote_arch(enum remote_arch_types type
);
358 enum remote_arch_types
get_remote_arch(void);
359 void out_ascii(FILE *f
, unsigned char *buf
,int len
);
360 void out_data(FILE *f
,char *buf1
,int len
, int per_line
);
361 void print_asc(int level
, unsigned char *buf
,int len
);
362 void dump_data(int level
,char *buf1
,int len
);
363 char *tab_depth(int depth
);
364 int str_checksum(const char *s
);
365 void zero_free(void *p
, size_t size
);
366 int set_maxfiles(int requested_max
);
367 BOOL
reg_split_key(char *full_keyname
, uint32
*reg_type
, char *key_name
);
368 char *smbd_mktemp(char *template);
369 void *memdup(void *p
, size_t size
);
370 char *myhostname(void);
371 char *lock_path(char *name
);
372 char *parent_dirname(const char *path
);
373 BOOL
ms_has_wild(char *s
);
374 BOOL
mask_match(char *string
, char *pattern
, BOOL is_case_sensitive
);
375 int _Insure_trap_error(int a1
, int a2
, int a3
, int a4
, int a5
, int a6
);
377 /*The following definitions come from lib/util_array.c */
379 void free_void_array(uint32 num_entries
, void **entries
,
380 void(free_item
)(void*));
381 void* add_copy_to_array(uint32
*len
, void ***array
, const void *item
,
382 void*(item_dup
)(const void*), BOOL alloc_anyway
);
383 void* add_item_to_array(uint32
*len
, void ***array
, void *item
);
384 void free_use_info_array(uint32 num_entries
, struct use_info
**entries
);
385 struct use_info
* add_use_info_to_array(uint32
*len
, struct use_info
***array
,
386 const struct use_info
*name
);
387 void free_char_array(uint32 num_entries
, char **entries
);
388 char* add_chars_to_array(uint32
*len
, char ***array
, const char *name
);
389 void free_uint32_array(uint32 num_entries
, uint32
**entries
);
390 uint32
* add_uint32s_to_array(uint32
*len
, uint32
***array
, const uint32
*name
);
391 void free_sid_array(uint32 num_entries
, DOM_SID
**entries
);
392 DOM_SID
* add_sid_to_array(uint32
*len
, DOM_SID
***array
, const DOM_SID
*sid
);
394 /*The following definitions come from lib/util_file.c */
396 BOOL
do_file_lock(int fd
, int waitsecs
, int type
);
397 BOOL
file_lock(int fd
, int type
, int secs
, int *plock_depth
);
398 BOOL
file_unlock(int fd
, int *plock_depth
);
399 void *startfilepwent(char *pfile
, char *s_readbuf
, int bufsize
,
400 int *file_lock_depth
, BOOL update
);
401 void endfilepwent(void *vp
, int *file_lock_depth
);
402 SMB_BIG_UINT
getfilepwpos(void *vp
);
403 BOOL
setfilepwpos(void *vp
, SMB_BIG_UINT tok
);
404 int getfileline(void *vp
, char *linebuf
, int linebuf_size
);
405 char *fgets_slash(char *s2
,int maxlen
,FILE *f
);
406 char *file_pload(char *syscmd
, size_t *size
);
407 char *file_load(char *fname
, size_t *size
);
408 char **file_lines_load(char *fname
, int *numlines
);
409 char **file_lines_pload(char *syscmd
, int *numlines
);
410 void file_lines_free(char **lines
);
411 void file_lines_slashcont(char **lines
);
413 /*The following definitions come from lib/util_list.c */
415 BOOL
copy_policy_hnd (POLICY_HND
*dest
, const POLICY_HND
*src
);
416 BOOL
compare_rpc_hnd_node(const RPC_HND_NODE
*x
,
417 const RPC_HND_NODE
*y
);
418 BOOL
RpcHndList_set_connection(const POLICY_HND
*hnd
,
419 struct cli_connection
*con
);
420 BOOL
RpcHndList_del_connection(const POLICY_HND
*hnd
);
421 struct cli_connection
* RpcHndList_get_connection(const POLICY_HND
*hnd
);
423 /*The following definitions come from lib/util_seaccess.c */
425 BOOL
se_access_check(SEC_DESC
*sd
, struct current_user
*user
,
426 uint32 acc_desired
, uint32
*acc_granted
, uint32
*status
);
428 /*The following definitions come from lib/util_sec.c */
430 void gain_root_privilege(void);
431 void gain_root_group_privilege(void);
432 void set_effective_uid(uid_t uid
);
433 void set_effective_gid(gid_t gid
);
434 void save_re_uid(void);
435 void restore_re_uid(void);
436 int set_re_uid(void);
437 void become_user_permanently(uid_t uid
, gid_t gid
);
439 /*The following definitions come from lib/util_sid.c */
441 void generate_wellknown_sids(void);
442 BOOL
map_domain_sid_to_name(DOM_SID
*sid
, char *nt_domain
);
443 BOOL
lookup_known_rid(DOM_SID
*sid
, uint32 rid
, char *name
, uint8
*psid_name_use
);
444 BOOL
map_domain_name_to_sid(DOM_SID
*sid
, char *nt_domain
);
445 void split_domain_name(const char *fullname
, char *domain
, char *name
);
446 char *sid_to_string(fstring sidstr_out
, DOM_SID
*sid
);
447 BOOL
string_to_sid(DOM_SID
*sidout
, char *sidstr
);
448 BOOL
sid_append_rid(DOM_SID
*sid
, uint32 rid
);
449 BOOL
sid_split_rid(DOM_SID
*sid
, uint32
*rid
);
450 void sid_copy(DOM_SID
*dst
, const DOM_SID
*src
);
451 DOM_SID
*sid_dup(DOM_SID
*src
);
452 BOOL
sid_linearize(char *outbuf
, size_t len
, DOM_SID
*sid
);
453 BOOL
sid_equal(const DOM_SID
*sid1
, const DOM_SID
*sid2
);
454 size_t sid_size(DOM_SID
*sid
);
456 /*The following definitions come from lib/util_sock.c */
458 BOOL
is_a_socket(int fd
);
459 void set_socket_options(int fd
, char *options
);
460 ssize_t
read_udp_socket(int fd
,char *buf
,size_t len
);
461 ssize_t
read_with_timeout(int fd
,char *buf
,size_t mincnt
,size_t maxcnt
,unsigned int time_out
);
462 BOOL
send_keepalive(int client
);
463 ssize_t
read_data(int fd
,char *buffer
,size_t N
);
464 ssize_t
write_data(int fd
,char *buffer
,size_t N
);
465 ssize_t
write_socket_data(int fd
,char *buffer
,size_t N
);
466 ssize_t
write_socket(int fd
,char *buf
,size_t len
);
467 ssize_t
read_smb_length(int fd
,char *inbuf
,unsigned int timeout
);
468 BOOL
receive_smb(int fd
,char *buffer
, unsigned int timeout
);
469 BOOL
client_receive_smb(int fd
,char *buffer
, unsigned int timeout
);
470 BOOL
send_null_session_msg(int fd
);
471 BOOL
send_smb(int fd
,char *buffer
);
472 BOOL
send_one_packet(char *buf
,int len
,struct in_addr ip
,int port
,int type
);
473 int open_socket_in(int type
, int port
, int dlevel
,uint32 socket_addr
, BOOL rebind
);
474 int open_socket_out(int type
, struct in_addr
*addr
, int port
,int timeout
);
475 void reset_globals_after_fork(void);
476 void client_setfd(int fd
);
477 char *client_name(void);
478 char *client_addr(void);
479 char *get_socket_name(int fd
);
480 char *get_socket_addr(int fd
);
481 int open_pipe_sock(char *path
);
482 int create_pipe_socket(char *dir
, int dir_perms
,
483 char *path
, int path_perms
);
485 /*The following definitions come from lib/util_str.c */
487 void set_first_token(char *ptr
);
488 BOOL
next_token(char **ptr
,char *buff
,char *sep
, size_t bufsize
);
489 char **toktocliplist(int *ctok
, char *sep
);
490 int StrCaseCmp(const char *s
, const char *t
);
491 int StrnCaseCmp(const char *s
, const char *t
, size_t n
);
492 BOOL
strequal(const char *s1
, const char *s2
);
493 BOOL
strnequal(const char *s1
,const char *s2
,size_t n
);
494 BOOL
strcsequal(const char *s1
,const char *s2
);
495 void strlower(char *s
);
496 void strupper(char *s
);
497 void strnorm(char *s
);
498 BOOL
strisnormal(char *s
);
499 void string_replace(char *s
,char oldc
,char newc
);
500 char *skip_string(char *buf
,size_t n
);
501 size_t str_charnum(const char *s
);
502 BOOL
trim_string(char *s
,const char *front
,const char *back
);
503 BOOL
strhasupper(const char *s
);
504 BOOL
strhaslower(const char *s
);
505 size_t count_chars(const char *s
,char c
);
506 BOOL
str_is_all(const char *s
,char c
);
507 char *safe_strcpy(char *dest
,const char *src
, size_t maxlength
);
508 char *safe_strcat(char *dest
, const char *src
, size_t maxlength
);
509 char *alpha_strcpy(char *dest
, const char *src
, size_t maxlength
);
510 char *StrnCpy(char *dest
,const char *src
,size_t n
);
511 char *strncpyn(char *dest
, const char *src
,size_t n
, char c
);
512 size_t strhex_to_str(char *p
, size_t len
, const char *strhex
);
513 BOOL
in_list(char *s
,char *list
,BOOL casesensitive
);
514 void string_free(char **s
);
515 BOOL
string_set(char **dest
,const char *src
);
516 void string_sub(char *s
,const char *pattern
,const char *insert
, size_t len
);
517 void fstring_sub(char *s
,const char *pattern
,const char *insert
);
518 void pstring_sub(char *s
,const char *pattern
,const char *insert
);
519 void all_string_sub(char *s
,const char *pattern
,const char *insert
, size_t len
);
520 void split_at_last_component(char *path
, char *front
, char sep
, char *back
);
521 char *octal_string(int i
);
522 char *string_truncate(char *s
, int length
);
523 void parse_domain_user(char *domuser
, fstring domain
, fstring user
);
525 /*The following definitions come from lib/util_unistr.c */
527 size_t dos_PutUniCode(char *dst
,const char *src
, ssize_t len
, BOOL null_terminate
);
528 void unistr_to_dos(char *dest
, const char *src
, size_t len
);
529 char *skip_unibuf(char *src
, size_t len
);
530 char *dos_unistrn2(uint16
*src
, int len
);
531 char *dos_unistr2(uint16
*src
);
532 char *dos_unistr2_to_str(UNISTR2
*str
);
533 void ascii_to_unistr(uint16
*dest
, const char *src
, int maxlen
);
534 void unistr_to_ascii(char *dest
, const uint16
*src
, int len
);
535 void unistr2_to_ascii(char *dest
, const UNISTR2
*str
, size_t maxlen
);
536 uint32
buffer2_to_uint32(BUFFER2
*str
);
537 char *dos_buffer2_to_str(BUFFER2
*str
);
538 char *dos_buffer2_to_multistr(BUFFER2
*str
);
539 size_t dos_struni2(char *dst
, const char *src
, size_t max_len
);
540 char *dos_unistr(char *buf
);
541 int unistrcpy(char *dst
, char *src
);
542 void default_unicode_map(smb_ucs2_t
**pp_cp_to_ucs2
, uint16
**pp_ucs2_to_cp
);
543 BOOL
load_unicode_map(const char *codepage
, smb_ucs2_t
**pp_cp_to_ucs2
, uint16
**pp_ucs2_to_cp
);
544 BOOL
load_dos_unicode_map(int codepage
);
545 BOOL
load_unix_unicode_map(const char *unix_char_set
);
546 smb_ucs2_t
*multibyte_to_unicode(smb_ucs2_t
*dst
, const char *src
,
547 size_t dst_len
, smb_ucs2_t
*cp_to_ucs2
);
548 char *unicode_to_unix(char *dst
, const smb_ucs2_t
*src
, size_t dst_len
);
549 smb_ucs2_t
*unix_to_unicode(smb_ucs2_t
*dst
, const char *src
, size_t dst_len
);
550 char *unicode_to_dos(char *dst
, const smb_ucs2_t
*src
, size_t dst_len
);
551 size_t unicode_to_dos_char(char *dst
, const smb_ucs2_t src
);
552 smb_ucs2_t
*dos_to_unicode(smb_ucs2_t
*dst
, const char *src
, size_t dst_len
);
553 size_t strlen_w(const smb_ucs2_t
*src
);
554 smb_ucs2_t
*safe_strcpy_w(smb_ucs2_t
*dest
,const smb_ucs2_t
*src
, size_t maxlength
);
555 smb_ucs2_t
*safe_strcat_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
, size_t maxlength
);
556 int strcmp_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
557 int strncmp_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
, size_t len
);
558 smb_ucs2_t
*strstr_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
559 smb_ucs2_t
*strchr_w(const smb_ucs2_t
*s
, smb_ucs2_t c
);
560 smb_ucs2_t
*strrchr_w(const smb_ucs2_t
*s
, smb_ucs2_t c
);
561 smb_ucs2_t
*strtok_w(smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
562 smb_ucs2_t
*strdup_w(const smb_ucs2_t
*s
);
563 int isupper_w( smb_ucs2_t val
);
564 int islower_w( smb_ucs2_t val
);
565 int isdigit_w( smb_ucs2_t val
);
566 int isxdigit_w( smb_ucs2_t val
);
567 int isspace_w( smb_ucs2_t val
);
568 smb_ucs2_t
toupper_w( smb_ucs2_t val
);
569 smb_ucs2_t
tolower_w( smb_ucs2_t val
);
570 void set_first_token_w(smb_ucs2_t
*ptr
);
571 BOOL
next_token_w(smb_ucs2_t
**ptr
, smb_ucs2_t
*buff
, smb_ucs2_t
*sep
, size_t bufsize
);
572 smb_ucs2_t
**toktocliplist_w(int *ctok
, smb_ucs2_t
*sep
);
573 int StrCaseCmp_w(const smb_ucs2_t
*s
, const smb_ucs2_t
*t
);
574 int StrnCaseCmp_w(const smb_ucs2_t
*s
, const smb_ucs2_t
*t
, size_t n
);
575 BOOL
strequal_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
576 BOOL
strnequal_w(const smb_ucs2_t
*s1
,const smb_ucs2_t
*s2
,size_t n
);
577 BOOL
strcsequal_w(const smb_ucs2_t
*s1
,const smb_ucs2_t
*s2
);
578 void strlower_w(smb_ucs2_t
*s
);
579 void strupper_w(smb_ucs2_t
*s
);
580 void strnorm_w(smb_ucs2_t
*s
);
581 BOOL
strisnormal_w(smb_ucs2_t
*s
);
582 void string_replace_w(smb_ucs2_t
*s
, smb_ucs2_t oldc
, smb_ucs2_t newc
);
583 smb_ucs2_t
*skip_string_w(smb_ucs2_t
*buf
,size_t n
);
584 size_t str_charnum_w(const smb_ucs2_t
*s
);
585 BOOL
trim_string_w(smb_ucs2_t
*s
,const smb_ucs2_t
*front
,const smb_ucs2_t
*back
);
586 BOOL
strhasupper_w(const smb_ucs2_t
*s
);
587 BOOL
strhaslower_w(const smb_ucs2_t
*s
);
588 size_t count_chars_w(const smb_ucs2_t
*s
,smb_ucs2_t c
);
589 BOOL
str_is_all_w(const smb_ucs2_t
*s
,smb_ucs2_t c
);
590 smb_ucs2_t
*alpha_strcpy_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
, size_t maxlength
);
591 smb_ucs2_t
*StrnCpy_w(smb_ucs2_t
*dest
,const smb_ucs2_t
*src
,size_t n
);
592 smb_ucs2_t
*strncpyn_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
,size_t n
, smb_ucs2_t c
);
593 size_t strhex_to_str_w(char *p
, size_t len
, const smb_ucs2_t
*strhex
);
594 BOOL
in_list_w(smb_ucs2_t
*s
,smb_ucs2_t
*list
,BOOL casesensitive
);
595 BOOL
string_init_w(smb_ucs2_t
**dest
,const smb_ucs2_t
*src
);
596 void string_free_w(smb_ucs2_t
**s
);
597 BOOL
string_set_w(smb_ucs2_t
**dest
,const smb_ucs2_t
*src
);
598 void string_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
, size_t len
);
599 void fstring_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
);
600 void pstring_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,smb_ucs2_t
*insert
);
601 void all_string_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
, size_t len
);
602 void split_at_last_component_w(smb_ucs2_t
*path
, smb_ucs2_t
*front
, smb_ucs2_t sep
, smb_ucs2_t
*back
);
603 smb_ucs2_t
*octal_string_w(int i
);
604 smb_ucs2_t
*string_truncate_w(smb_ucs2_t
*s
, size_t length
);
606 /*The following definitions come from libsmb/cliconnect.c */
608 BOOL
cli_session_setup(struct cli_state
*cli
,
610 char *pass
, int passlen
,
611 char *ntpass
, int ntpasslen
,
613 BOOL
cli_ulogoff(struct cli_state
*cli
);
614 BOOL
cli_send_tconX(struct cli_state
*cli
,
615 char *share
, char *dev
, char *pass
, int passlen
);
616 BOOL
cli_tdis(struct cli_state
*cli
);
617 BOOL
cli_negprot(struct cli_state
*cli
);
618 BOOL
cli_session_request(struct cli_state
*cli
,
619 struct nmb_name
*calling
, struct nmb_name
*called
);
620 BOOL
cli_connect(struct cli_state
*cli
, const char *host
, struct in_addr
*ip
);
621 BOOL
cli_reestablish_connection(struct cli_state
*cli
);
622 BOOL
cli_establish_connection(struct cli_state
*cli
,
623 char *dest_host
, struct in_addr
*dest_ip
,
624 struct nmb_name
*calling
, struct nmb_name
*called
,
625 char *service
, char *service_type
,
626 BOOL do_shutdown
, BOOL do_tcon
);
627 BOOL
attempt_netbios_session_request(struct cli_state
*cli
, char *srchost
, char *desthost
,
628 struct in_addr
*pdest_ip
);
630 /*The following definitions come from libsmb/clientgen.c */
632 int cli_set_port(struct cli_state
*cli
, int port
);
633 BOOL
cli_receive_smb(struct cli_state
*cli
);
634 BOOL
cli_send_smb(struct cli_state
*cli
);
635 void cli_setup_packet(struct cli_state
*cli
);
636 void cli_init_creds(struct cli_state
*cli
, const struct ntuser_creds
*usr
);
637 struct cli_state
*cli_initialise(struct cli_state
*cli
);
638 void cli_shutdown(struct cli_state
*cli
);
639 void cli_sockopt(struct cli_state
*cli
, char *options
);
640 uint16
cli_setpid(struct cli_state
*cli
, uint16 pid
);
642 /*The following definitions come from libsmb/clierror.c */
644 char *cli_errstr(struct cli_state
*cli
);
645 int cli_error(struct cli_state
*cli
, uint8
*eclass
, uint32
*num
, uint32
*nt_rpc_error
);
647 /*The following definitions come from libsmb/clifile.c */
649 BOOL
cli_rename(struct cli_state
*cli
, char *fname_src
, char *fname_dst
);
650 BOOL
cli_unlink(struct cli_state
*cli
, char *fname
);
651 BOOL
cli_mkdir(struct cli_state
*cli
, char *dname
);
652 BOOL
cli_rmdir(struct cli_state
*cli
, char *dname
);
653 int cli_nt_create(struct cli_state
*cli
, char *fname
);
654 int cli_open(struct cli_state
*cli
, char *fname
, int flags
, int share_mode
);
655 BOOL
cli_close(struct cli_state
*cli
, int fnum
);
656 BOOL
cli_lock(struct cli_state
*cli
, int fnum
,
657 uint32 offset
, uint32 len
, int timeout
, enum brl_type lock_type
);
658 BOOL
cli_unlock(struct cli_state
*cli
, int fnum
, uint32 offset
, uint32 len
);
659 BOOL
cli_getattrE(struct cli_state
*cli
, int fd
,
660 uint16
*attr
, size_t *size
,
661 time_t *c_time
, time_t *a_time
, time_t *m_time
);
662 BOOL
cli_getatr(struct cli_state
*cli
, char *fname
,
663 uint16
*attr
, size_t *size
, time_t *t
);
664 BOOL
cli_setatr(struct cli_state
*cli
, char *fname
, uint16 attr
, time_t t
);
665 BOOL
cli_chkpath(struct cli_state
*cli
, char *path
);
666 BOOL
cli_dskattr(struct cli_state
*cli
, int *bsize
, int *total
, int *avail
);
668 /*The following definitions come from libsmb/clilist.c */
670 int cli_list(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
671 void (*fn
)(file_info
*, const char *));
672 int cli_list_old(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
673 void (*fn
)(file_info
*, const char *));
675 /*The following definitions come from libsmb/climessage.c */
677 BOOL
cli_message_start(struct cli_state
*cli
, char *host
, char *username
,
679 BOOL
cli_message_text(struct cli_state
*cli
, char *msg
, int len
, int grp
);
680 BOOL
cli_message_end(struct cli_state
*cli
, int grp
);
682 /*The following definitions come from libsmb/cliprint.c */
684 int cli_print_queue(struct cli_state
*cli
,
685 void (*fn
)(struct print_job_info
*));
686 int cli_printjob_del(struct cli_state
*cli
, int job
);
688 /*The following definitions come from libsmb/clirap.c */
690 BOOL
cli_api_pipe(struct cli_state
*cli
, char *pipe_name
, int pipe_name_len
,
691 uint16
*setup
, uint32 setup_count
, uint32 max_setup_count
,
692 char *params
, uint32 param_count
, uint32 max_param_count
,
693 char *data
, uint32 data_count
, uint32 max_data_count
,
694 char **rparam
, uint32
*rparam_count
,
695 char **rdata
, uint32
*rdata_count
);
696 BOOL
cli_api(struct cli_state
*cli
,
697 char *param
, int prcnt
, int mprcnt
,
698 char *data
, int drcnt
, int mdrcnt
,
699 char **rparam
, int *rprcnt
,
700 char **rdata
, int *rdrcnt
);
701 BOOL
cli_NetWkstaUserLogon(struct cli_state
*cli
,char *user
, char *workstation
);
702 int cli_RNetShareEnum(struct cli_state
*cli
, void (*fn
)(const char *, uint32
, const char *));
703 BOOL
cli_NetServerEnum(struct cli_state
*cli
, char *workgroup
, uint32 stype
,
704 void (*fn
)(const char *, uint32
, const char *));
705 BOOL
cli_oem_change_password(struct cli_state
*cli
, const char *user
, const char *new_password
,
706 const char *old_password
);
707 BOOL
cli_qpathinfo(struct cli_state
*cli
, const char *fname
,
708 time_t *c_time
, time_t *a_time
, time_t *m_time
,
709 size_t *size
, uint16
*mode
);
710 BOOL
cli_qpathinfo2(struct cli_state
*cli
, const char *fname
,
711 time_t *c_time
, time_t *a_time
, time_t *m_time
,
712 time_t *w_time
, size_t *size
, uint16
*mode
,
714 BOOL
cli_qfileinfo(struct cli_state
*cli
, int fnum
,
715 uint16
*mode
, size_t *size
,
716 time_t *c_time
, time_t *a_time
, time_t *m_time
,
717 time_t *w_time
, SMB_INO_T
*ino
);
719 /*The following definitions come from libsmb/clireadwrite.c */
721 size_t cli_read(struct cli_state
*cli
, int fnum
, char *buf
, off_t offset
, size_t size
);
722 ssize_t
cli_write(struct cli_state
*cli
,
723 int fnum
, uint16 write_mode
,
724 char *buf
, off_t offset
, size_t size
);
725 ssize_t
cli_smbwrite(struct cli_state
*cli
,
726 int fnum
, char *buf
, off_t offset
, size_t size1
);
728 /*The following definitions come from libsmb/clitrans.c */
730 BOOL
cli_send_trans(struct cli_state
*cli
, int trans
,
731 char *name
, int pipe_name_len
,
733 uint16
*setup
, int lsetup
, int msetup
,
734 char *param
, int lparam
, int mparam
,
735 char *data
, int ldata
, int mdata
);
736 BOOL
cli_receive_trans(struct cli_state
*cli
,int trans
,
737 char **param
, int *param_len
,
738 char **data
, int *data_len
);
740 /*The following definitions come from libsmb/credentials.c */
742 char *credstr(uchar
*cred
);
743 void cred_session_key(DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
, char *pass
,
744 uchar session_key
[8]);
745 void cred_create(uchar session_key
[8], DOM_CHAL
*stor_cred
, UTIME timestamp
,
747 int cred_assert(DOM_CHAL
*cred
, uchar session_key
[8], DOM_CHAL
*stored_cred
,
749 BOOL
clnt_deal_with_creds(uchar sess_key
[8],
750 DOM_CRED
*sto_clnt_cred
, DOM_CRED
*rcv_srv_cred
);
751 BOOL
deal_with_creds(uchar sess_key
[8],
752 DOM_CRED
*sto_clnt_cred
,
753 DOM_CRED
*rcv_clnt_cred
, DOM_CRED
*rtn_srv_cred
);
755 /*The following definitions come from libsmb/namequery.c */
757 BOOL
name_status(int fd
,char *name
,int name_type
,BOOL recurse
,
758 struct in_addr to_ip
,char *master
,char *rname
);
759 struct in_addr
*name_query(int fd
,const char *name
,int name_type
,
760 BOOL bcast
,BOOL recurse
,
761 struct in_addr to_ip
, int *count
);
762 FILE *startlmhosts(char *fname
);
763 BOOL
getlmhostsent( FILE *fp
, pstring name
, int *name_type
, struct in_addr
*ipaddr
);
764 void endlmhosts(FILE *fp
);
765 BOOL
is_ip_address(const char *name
);
766 BOOL
resolve_name(const char *name
, struct in_addr
*return_ip
, int name_type
);
767 BOOL
resolve_srv_name(const char* srv_name
, fstring dest_host
,
769 BOOL
find_master_ip(char *group
, struct in_addr
*master_ip
);
770 BOOL
lookup_pdc_name(const char *srcname
, const char *domain
, struct in_addr
*pdc_ip
, char *ret_name
);
771 BOOL
get_dc_list(char *group
, struct in_addr
**ip_list
, int *count
);
773 /*The following definitions come from libsmb/nmblib.c */
775 void debug_nmb_packet(struct packet_struct
*p
);
776 char *nmb_namestr(struct nmb_name
*n
);
777 struct packet_struct
*copy_packet(struct packet_struct
*packet
);
778 void free_packet(struct packet_struct
*packet
);
779 struct packet_struct
*parse_packet(char *buf
,int length
,
780 enum packet_type packet_type
);
781 struct packet_struct
*read_packet(int fd
,enum packet_type packet_type
);
782 void make_nmb_name( struct nmb_name
*n
, const char *name
, int type
);
783 BOOL
nmb_name_equal(struct nmb_name
*n1
, struct nmb_name
*n2
);
784 int build_packet(char *buf
, struct packet_struct
*p
);
785 BOOL
send_packet(struct packet_struct
*p
);
786 struct packet_struct
*receive_packet(int fd
,enum packet_type type
,int t
);
787 struct packet_struct
*receive_nmb_packet(int fd
, int t
, int trn_id
);
788 struct packet_struct
*receive_dgram_packet(int fd
, int t
, char *mailslot_name
);
789 BOOL
match_mailslot_name(struct packet_struct
*p
, char *mailslot_name
);
790 void sort_query_replies(char *data
, int n
, struct in_addr ip
);
791 char *dns_to_netbios_name(char *dns_name
);
792 int name_mangle( char *In
, char *Out
, char name_type
);
793 int name_extract(char *buf
,int ofs
,char *name
);
794 int name_len(char *s1
);
796 /*The following definitions come from libsmb/nterr.c */
798 BOOL
get_safe_nt_error_msg(uint32 nt_code
,char *msg
, size_t len
);
799 const char *get_nt_error_msg(uint32 nt_code
);
801 /*The following definitions come from libsmb/passchange.c */
803 BOOL
remote_password_change(const char *remote_machine
, const char *user_name
,
804 const char *old_passwd
, const char *new_passwd
,
805 char *err_str
, size_t err_str_len
);
807 /*The following definitions come from libsmb/pwd_cache.c */
809 void pwd_init(struct pwd_info
*pwd
);
810 BOOL
pwd_is_nullpwd(const struct pwd_info
*pwd
);
811 BOOL
pwd_compare(struct pwd_info
*pwd1
, struct pwd_info
*pwd2
);
812 void pwd_read(struct pwd_info
*pwd
, char *passwd_report
, BOOL do_encrypt
);
813 void pwd_set_nullpwd(struct pwd_info
*pwd
);
814 void pwd_set_cleartext(struct pwd_info
*pwd
, char *clr
);
815 void pwd_get_cleartext(struct pwd_info
*pwd
, char *clr
);
816 void pwd_set_lm_nt_16(struct pwd_info
*pwd
, uchar lm_pwd
[16], uchar nt_pwd
[16]);
817 void pwd_get_lm_nt_16(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_owf(struct pwd_info
*pwd
, uchar cryptkey
[8]);
820 void pwd_get_lm_nt_owf(struct pwd_info
*pwd
, uchar lm_owf
[24], uchar nt_owf
[24]);
822 /*The following definitions come from libsmb/smbdes.c */
824 void E_P16(unsigned char *p14
,unsigned char *p16
);
825 void E_P24(unsigned char *p21
, unsigned char *c8
, unsigned char *p24
);
826 void D_P16(unsigned char *p14
, unsigned char *in
, unsigned char *out
);
827 void E_old_pw_hash( unsigned char *p14
, unsigned char *in
, unsigned char *out
);
828 void cred_hash1(unsigned char *out
,unsigned char *in
,unsigned char *key
);
829 void cred_hash2(unsigned char *out
,unsigned char *in
,unsigned char *key
);
830 void cred_hash3(unsigned char *out
,unsigned char *in
,unsigned char *key
, int forw
);
831 void SamOEMhash( unsigned char *data
, unsigned char *key
, int val
);
833 /*The following definitions come from libsmb/smbencrypt.c */
835 void SMBencrypt(uchar
*passwd
, uchar
*c8
, uchar
*p24
);
836 void E_md4hash(uchar
*passwd
, uchar
*p16
);
837 void nt_lm_owf_gen(char *pwd
, uchar nt_p16
[16], uchar p16
[16]);
838 void SMBOWFencrypt(uchar passwd
[16], uchar
*c8
, uchar p24
[24]);
839 void NTLMSSPOWFencrypt(uchar passwd
[8], uchar
*ntlmchalresp
, uchar p24
[24]);
840 void SMBNTencrypt(uchar
*passwd
, uchar
*c8
, uchar
*p24
);
841 BOOL
make_oem_passwd_hash(char data
[516], const char *passwd
, uchar old_pw_hash
[16], BOOL unicode
);
843 /*The following definitions come from libsmb/smberr.c */
845 char *smb_errstr(char *inbuf
);
847 /*The following definitions come from libsmb/unexpected.c */
849 void unexpected_packet(struct packet_struct
*p
);
850 void clear_unexpected(time_t t
);
851 struct packet_struct
*receive_unexpected(enum packet_type packet_type
, int id
,
852 char *mailslot_name
);
854 /*The following definitions come from locking/brlock.c */
856 void brl_init(int read_only
);
857 BOOL
brl_lock(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
858 uint16 smbpid
, pid_t pid
, uint16 tid
,
859 br_off start
, br_off size
,
860 enum brl_type lock_type
);
861 BOOL
brl_unlock(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
862 uint16 smbpid
, pid_t pid
, uint16 tid
,
863 br_off start
, br_off size
);
864 BOOL
brl_locktest(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
865 uint16 smbpid
, pid_t pid
, uint16 tid
,
866 br_off start
, br_off size
,
867 enum brl_type lock_type
);
868 void brl_close(SMB_DEV_T dev
, SMB_INO_T ino
, pid_t pid
, int tid
, int fnum
);
869 int brl_forall(BRLOCK_FN(fn
));
871 /*The following definitions come from locking/locking.c */
873 BOOL
is_locked(files_struct
*fsp
,connection_struct
*conn
,
874 SMB_BIG_UINT count
,SMB_BIG_UINT offset
,
875 enum brl_type lock_type
);
876 BOOL
do_lock(files_struct
*fsp
,connection_struct
*conn
,
877 SMB_BIG_UINT count
,SMB_BIG_UINT offset
,enum brl_type lock_type
,
878 int *eclass
,uint32
*ecode
);
879 BOOL
do_unlock(files_struct
*fsp
,connection_struct
*conn
,
880 SMB_BIG_UINT count
,SMB_BIG_UINT offset
,
881 int *eclass
,uint32
*ecode
);
882 void locking_close_file(files_struct
*fsp
);
883 BOOL
locking_init(int read_only
);
884 BOOL
locking_end(void);
885 BOOL
lock_share_entry(connection_struct
*conn
,
886 SMB_DEV_T dev
, SMB_INO_T inode
);
887 BOOL
unlock_share_entry(connection_struct
*conn
,
888 SMB_DEV_T dev
, SMB_INO_T inode
);
889 BOOL
lock_share_entry_fsp(files_struct
*fsp
);
890 BOOL
unlock_share_entry_fsp(files_struct
*fsp
);
891 int get_share_modes(connection_struct
*conn
,
892 SMB_DEV_T dev
, SMB_INO_T inode
,
893 share_mode_entry
**shares
);
894 void del_share_mode(files_struct
*fsp
);
895 BOOL
set_share_mode(files_struct
*fsp
, uint16 port
, uint16 op_type
);
896 BOOL
remove_share_oplock(files_struct
*fsp
);
897 BOOL
downgrade_share_oplock(files_struct
*fsp
);
898 BOOL
modify_share_mode(files_struct
*fsp
, int new_mode
, uint16 new_oplock
);
899 int share_mode_forall(SHAREMODE_FN(fn
));
901 /*The following definitions come from locking/posix.c */
903 int fd_close_posix(struct connection_struct
*conn
, files_struct
*fsp
);
904 BOOL
is_posix_locked(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
, enum brl_type lock_type
);
905 BOOL
set_posix_lock(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
, enum brl_type lock_type
);
906 BOOL
release_posix_lock(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
);
907 void posix_locking_close_file(files_struct
*fsp
);
908 BOOL
posix_locking_init(int read_only
);
909 BOOL
posix_locking_end(void);
911 /*The following definitions come from msdfs/msdfs.c */
913 BOOL
create_junction(char* pathname
, struct junction_map
* jn
);
914 BOOL
is_msdfs_link(connection_struct
* conn
, char* path
);
915 BOOL
get_referred_path(struct junction_map
* junction
);
916 BOOL
dfs_redirect(char* pathname
, connection_struct
* conn
);
917 BOOL
dfs_findfirst_redirect(char* pathname
, connection_struct
* conn
);
918 int setup_dfs_referral(char* pathname
, int max_referral_level
,
920 int dfs_path_error(char* inbuf
, char* outbuf
);
921 BOOL
create_msdfs_link(struct junction_map
* jn
, BOOL exists
);
922 BOOL
remove_msdfs_link(struct junction_map
* jn
);
923 int enum_msdfs_links(struct junction_map
* jn
);
924 int setup_dfs_referral(char* pathname
, int max_referral_level
,
926 BOOL
is_msdfs_link(connection_struct
* conn
, char* path
);
928 /*The following definitions come from nmbd/asyncdns.c */
930 int asyncdns_fd(void);
931 void kill_async_dns_child(void);
932 void start_async_dns(void);
933 void run_dns_queue(void);
934 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
935 struct name_record
**n
);
936 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
937 struct name_record
**n
);
938 void kill_async_dns_child(void);
940 /*The following definitions come from nmbd/nmbd.c */
943 /*The following definitions come from nmbd/nmbd_become_dmb.c */
945 void add_domain_names(time_t t
);
947 /*The following definitions come from nmbd/nmbd_become_lmb.c */
949 void insert_permanent_name_into_unicast( struct subnet_record
*subrec
,
950 struct nmb_name
*nmbname
, uint16 nb_type
);
951 void unbecome_local_master_browser(struct subnet_record
*subrec
, struct work_record
*work
,
952 BOOL force_new_election
);
953 void become_local_master_browser(struct subnet_record
*subrec
, struct work_record
*work
);
954 void set_workgroup_local_master_browser_name( struct work_record
*work
, char *newname
);
956 /*The following definitions come from nmbd/nmbd_browserdb.c */
958 void update_browser_death_time( struct browse_cache_record
*browc
);
959 struct browse_cache_record
*create_browser_in_lmb_cache( char *work_name
,
962 struct browse_cache_record
*find_browser_in_lmb_cache( char *browser_name
);
963 void expire_lmb_browsers( time_t t
);
965 /*The following definitions come from nmbd/nmbd_browsesync.c */
967 void dmb_expire_and_sync_browser_lists(time_t t
);
968 void announce_and_sync_with_domain_master_browser( struct subnet_record
*subrec
,
969 struct work_record
*work
);
970 void collect_all_workgroup_names_from_wins_server(time_t t
);
971 void sync_all_dmbs(time_t t
);
973 /*The following definitions come from nmbd/nmbd_elections.c */
975 void check_master_browser_exists(time_t t
);
976 void run_elections(time_t t
);
977 void process_election(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
978 BOOL
check_elections(void);
980 /*The following definitions come from nmbd/nmbd_incomingdgrams.c */
982 void tell_become_backup(void);
983 void process_host_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
984 void process_workgroup_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
985 void process_local_master_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
986 void process_master_browser_announce(struct subnet_record
*subrec
,
987 struct packet_struct
*p
,char *buf
);
988 void process_lm_host_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
989 void process_get_backup_list_request(struct subnet_record
*subrec
,
990 struct packet_struct
*p
,char *buf
);
991 void process_reset_browser(struct subnet_record
*subrec
,
992 struct packet_struct
*p
,char *buf
);
993 void process_announce_request(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
994 void process_lm_announce_request(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
996 /*The following definitions come from nmbd/nmbd_incomingrequests.c */
998 void process_name_release_request(struct subnet_record
*subrec
,
999 struct packet_struct
*p
);
1000 void process_name_refresh_request(struct subnet_record
*subrec
,
1001 struct packet_struct
*p
);
1002 void process_name_registration_request(struct subnet_record
*subrec
,
1003 struct packet_struct
*p
);
1004 void process_node_status_request(struct subnet_record
*subrec
, struct packet_struct
*p
);
1005 void process_name_query_request(struct subnet_record
*subrec
, struct packet_struct
*p
);
1007 /*The following definitions come from nmbd/nmbd_lmhosts.c */
1009 void load_lmhosts_file(char *fname
);
1010 BOOL
find_name_in_lmhosts(struct nmb_name
*nmbname
, struct name_record
**namerecp
);
1012 /*The following definitions come from nmbd/nmbd_logonnames.c */
1014 void add_logon_names(void);
1016 /*The following definitions come from nmbd/nmbd_mynames.c */
1018 void register_my_workgroup_one_subnet(struct subnet_record
*subrec
);
1019 BOOL
register_my_workgroup_and_names(void);
1020 void release_my_names(void);
1021 void refresh_my_names(time_t t
);
1023 /*The following definitions come from nmbd/nmbd_namelistdb.c */
1025 void set_samba_nb_type(void);
1026 void remove_name_from_namelist( struct subnet_record
*subrec
,
1027 struct name_record
*namerec
);
1028 struct name_record
*find_name_on_subnet( struct subnet_record
*subrec
,
1029 struct nmb_name
*nmbname
,
1031 struct name_record
*find_name_for_remote_broadcast_subnet(
1032 struct nmb_name
*nmbname
,
1034 void update_name_ttl( struct name_record
*namerec
, int ttl
);
1035 struct name_record
*add_name_to_subnet( struct subnet_record
*subrec
,
1040 enum name_source source
,
1042 struct in_addr
*iplist
);
1043 void standard_success_register(struct subnet_record
*subrec
,
1044 struct userdata_struct
*userdata
,
1045 struct nmb_name
*nmbname
, uint16 nb_flags
, int ttl
,
1046 struct in_addr registered_ip
);
1047 void standard_fail_register( struct subnet_record
*subrec
,
1048 struct response_record
*rrec
,
1049 struct nmb_name
*nmbname
);
1050 BOOL
find_ip_in_name_record( struct name_record
*namerec
, struct in_addr ip
);
1051 void add_ip_to_name_record( struct name_record
*namerec
, struct in_addr new_ip
);
1052 void remove_ip_from_name_record( struct name_record
*namerec
,
1053 struct in_addr remove_ip
);
1054 void standard_success_release( struct subnet_record
*subrec
,
1055 struct userdata_struct
*userdata
,
1056 struct nmb_name
*nmbname
,
1057 struct in_addr released_ip
);
1058 void expire_names_on_subnet(struct subnet_record
*subrec
, time_t t
);
1059 void expire_names(time_t t
);
1060 void add_samba_names_to_subnet( struct subnet_record
*subrec
);
1061 void dump_all_namelists(void);
1063 /*The following definitions come from nmbd/nmbd_namequery.c */
1065 BOOL
query_name(struct subnet_record
*subrec
, char *name
, int type
,
1066 query_name_success_function success_fn
,
1067 query_name_fail_function fail_fn
,
1068 struct userdata_struct
*userdata
);
1069 BOOL
query_name_from_wins_server(struct in_addr ip_to
,
1070 char *name
, int type
,
1071 query_name_success_function success_fn
,
1072 query_name_fail_function fail_fn
,
1073 struct userdata_struct
*userdata
);
1075 /*The following definitions come from nmbd/nmbd_nameregister.c */
1077 BOOL
register_name(struct subnet_record
*subrec
,
1078 char *name
, int type
, uint16 nb_flags
,
1079 register_name_success_function success_fn
,
1080 register_name_fail_function fail_fn
,
1081 struct userdata_struct
*userdata
);
1082 BOOL
refresh_name(struct subnet_record
*subrec
, struct name_record
*namerec
,
1083 refresh_name_success_function success_fn
,
1084 refresh_name_fail_function fail_fn
,
1085 struct userdata_struct
*userdata
);
1087 /*The following definitions come from nmbd/nmbd_namerelease.c */
1089 BOOL
release_name(struct subnet_record
*subrec
, struct name_record
*namerec
,
1090 release_name_success_function success_fn
,
1091 release_name_fail_function fail_fn
,
1092 struct userdata_struct
*userdata
);
1094 /*The following definitions come from nmbd/nmbd_nodestatus.c */
1096 BOOL
node_status(struct subnet_record
*subrec
, struct nmb_name
*nmbname
,
1097 struct in_addr send_ip
, node_status_success_function success_fn
,
1098 node_status_fail_function fail_fn
, struct userdata_struct
*userdata
);
1100 /*The following definitions come from nmbd/nmbd_packets.c */
1102 uint16
get_nb_flags(char *buf
);
1103 void set_nb_flags(char *buf
, uint16 nb_flags
);
1104 struct response_record
*queue_register_name( struct subnet_record
*subrec
,
1105 response_function resp_fn
,
1106 timeout_response_function timeout_fn
,
1107 register_name_success_function success_fn
,
1108 register_name_fail_function fail_fn
,
1109 struct userdata_struct
*userdata
,
1110 struct nmb_name
*nmbname
,
1112 struct response_record
*queue_register_multihomed_name( struct subnet_record
*subrec
,
1113 response_function resp_fn
,
1114 timeout_response_function timeout_fn
,
1115 register_name_success_function success_fn
,
1116 register_name_fail_function fail_fn
,
1117 struct userdata_struct
*userdata
,
1118 struct nmb_name
*nmbname
,
1120 struct in_addr register_ip
);
1121 struct response_record
*queue_release_name( struct subnet_record
*subrec
,
1122 response_function resp_fn
,
1123 timeout_response_function timeout_fn
,
1124 release_name_success_function success_fn
,
1125 release_name_fail_function fail_fn
,
1126 struct userdata_struct
*userdata
,
1127 struct nmb_name
*nmbname
,
1129 struct in_addr release_ip
);
1130 struct response_record
*queue_refresh_name( struct subnet_record
*subrec
,
1131 response_function resp_fn
,
1132 timeout_response_function timeout_fn
,
1133 refresh_name_success_function success_fn
,
1134 refresh_name_fail_function fail_fn
,
1135 struct userdata_struct
*userdata
,
1136 struct name_record
*namerec
,
1137 struct in_addr refresh_ip
);
1138 struct response_record
*queue_query_name( struct subnet_record
*subrec
,
1139 response_function resp_fn
,
1140 timeout_response_function timeout_fn
,
1141 query_name_success_function success_fn
,
1142 query_name_fail_function fail_fn
,
1143 struct userdata_struct
*userdata
,
1144 struct nmb_name
*nmbname
);
1145 struct response_record
*queue_query_name_from_wins_server( struct in_addr to_ip
,
1146 response_function resp_fn
,
1147 timeout_response_function timeout_fn
,
1148 query_name_success_function success_fn
,
1149 query_name_fail_function fail_fn
,
1150 struct userdata_struct
*userdata
,
1151 struct nmb_name
*nmbname
);
1152 struct response_record
*queue_node_status( struct subnet_record
*subrec
,
1153 response_function resp_fn
,
1154 timeout_response_function timeout_fn
,
1155 node_status_success_function success_fn
,
1156 node_status_fail_function fail_fn
,
1157 struct userdata_struct
*userdata
,
1158 struct nmb_name
*nmbname
,
1159 struct in_addr send_ip
);
1160 void reply_netbios_packet(struct packet_struct
*orig_packet
,
1161 int rcode
, enum netbios_reply_type_code rcv_code
, int opcode
,
1162 int ttl
, char *data
,int len
);
1163 void run_packet_queue(void);
1164 void retransmit_or_expire_response_records(time_t t
);
1165 BOOL
listen_for_packets(BOOL run_election
);
1166 BOOL
send_mailslot(BOOL unique
, char *mailslot
,char *buf
,int len
,
1167 char *srcname
, int src_type
,
1168 char *dstname
, int dest_type
,
1169 struct in_addr dest_ip
,struct in_addr src_ip
,
1172 /*The following definitions come from nmbd/nmbd_processlogon.c */
1174 void process_logon_packet(struct packet_struct
*p
,char *buf
,int len
,
1177 /*The following definitions come from nmbd/nmbd_responserecordsdb.c */
1179 void remove_response_record(struct subnet_record
*subrec
,
1180 struct response_record
*rrec
);
1181 struct response_record
*make_response_record( struct subnet_record
*subrec
,
1182 struct packet_struct
*p
,
1183 response_function resp_fn
,
1184 timeout_response_function timeout_fn
,
1185 success_function success_fn
,
1186 fail_function fail_fn
,
1187 struct userdata_struct
*userdata
);
1188 struct response_record
*find_response_record(struct subnet_record
**ppsubrec
,
1190 BOOL
is_refresh_already_queued(struct subnet_record
*subrec
, struct name_record
*namerec
);
1192 /*The following definitions come from nmbd/nmbd_sendannounce.c */
1194 void send_browser_reset(int reset_type
, char *to_name
, int to_type
, struct in_addr to_ip
);
1195 void broadcast_announce_request(struct subnet_record
*subrec
, struct work_record
*work
);
1196 void announce_my_server_names(time_t t
);
1197 void announce_my_lm_server_names(time_t t
);
1198 void reset_announce_timer(void);
1199 void announce_myself_to_domain_master_browser(time_t t
);
1200 void announce_my_servers_removed(void);
1201 void announce_remote(time_t t
);
1202 void browse_sync_remote(time_t t
);
1204 /*The following definitions come from nmbd/nmbd_serverlistdb.c */
1206 void remove_all_servers(struct work_record
*work
);
1207 struct server_record
*find_server_in_workgroup(struct work_record
*work
, char *name
);
1208 void remove_server_from_workgroup(struct work_record
*work
, struct server_record
*servrec
);
1209 struct server_record
*create_server_on_workgroup(struct work_record
*work
,
1210 char *name
,int servertype
,
1211 int ttl
,char *comment
);
1212 void update_server_ttl(struct server_record
*servrec
, int ttl
);
1213 void expire_servers(struct work_record
*work
, time_t t
);
1214 void write_browse_list(time_t t
, BOOL force_write
);
1216 /*The following definitions come from nmbd/nmbd_subnetdb.c */
1218 void close_subnet(struct subnet_record
*subrec
);
1219 struct subnet_record
*make_normal_subnet(struct interface
*iface
);
1220 BOOL
create_subnets(void);
1221 BOOL
we_are_a_wins_client(void);
1222 struct subnet_record
*get_next_subnet_maybe_unicast(struct subnet_record
*subrec
);
1223 struct subnet_record
*get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record
*subrec
);
1225 /*The following definitions come from nmbd/nmbd_synclists.c */
1227 void sync_browse_lists(struct work_record
*work
,
1228 char *name
, int nm_type
,
1229 struct in_addr ip
, BOOL local
, BOOL servers
);
1230 void sync_check_completion(void);
1232 /*The following definitions come from nmbd/nmbd_winsproxy.c */
1234 void make_wins_proxy_name_query_request( struct subnet_record
*subrec
,
1235 struct packet_struct
*incoming_packet
,
1236 struct nmb_name
*question_name
);
1238 /*The following definitions come from nmbd/nmbd_winsserver.c */
1240 BOOL
packet_is_for_wins_server(struct packet_struct
*packet
);
1241 BOOL
initialise_wins(void);
1242 void wins_process_name_refresh_request(struct subnet_record
*subrec
,
1243 struct packet_struct
*p
);
1244 void wins_process_name_registration_request(struct subnet_record
*subrec
,
1245 struct packet_struct
*p
);
1246 void wins_process_multihomed_name_registration_request( struct subnet_record
*subrec
,
1247 struct packet_struct
*p
);
1248 void send_wins_name_query_response(int rcode
, struct packet_struct
*p
,
1249 struct name_record
*namerec
);
1250 void wins_process_name_query_request(struct subnet_record
*subrec
,
1251 struct packet_struct
*p
);
1252 void wins_process_name_release_request(struct subnet_record
*subrec
,
1253 struct packet_struct
*p
);
1254 void initiate_wins_processing(time_t t
);
1255 void wins_write_database(BOOL background
);
1257 /*The following definitions come from nmbd/nmbd_workgroupdb.c */
1259 struct work_record
*find_workgroup_on_subnet(struct subnet_record
*subrec
,
1261 struct work_record
*create_workgroup_on_subnet(struct subnet_record
*subrec
,
1262 fstring name
, int ttl
);
1263 void update_workgroup_ttl(struct work_record
*work
, int ttl
);
1264 void initiate_myworkgroup_startup(struct subnet_record
*subrec
, struct work_record
*work
);
1265 void dump_workgroups(BOOL force_write
);
1266 void expire_workgroups_and_servers(time_t t
);
1268 /*The following definitions come from nsswitch/wb_client.c */
1270 BOOL
winbind_lookup_name(char *name
, DOM_SID
*sid
, uint8
*name_type
);
1271 BOOL
winbind_lookup_sid(DOM_SID
*sid
, fstring dom_name
, fstring name
,
1273 BOOL
winbind_uid_to_sid(uid_t uid
, DOM_SID
*sid
);
1274 BOOL
winbind_gid_to_sid(gid_t gid
, DOM_SID
*sid
);
1276 /*The following definitions come from nsswitch/wb_common.c */
1278 void init_request(struct winbindd_request
*request
, int request_type
);
1279 void init_response(struct winbindd_response
*response
);
1280 void close_sock(void);
1281 int write_sock(void *buffer
, int count
);
1282 int read_reply(struct winbindd_response
*response
);
1283 void free_response(struct winbindd_response
*response
);
1284 enum nss_status
winbindd_request(int req_type
,
1285 struct winbindd_request
*request
,
1286 struct winbindd_response
*response
);
1288 /*The following definitions come from param/loadparm.c */
1290 void lp_talloc_free(void);
1291 char *lp_logfile(void);
1292 char *lp_smbrun(void);
1293 char *lp_configfile(void);
1294 char *lp_smb_passwd_file(void);
1295 char *lp_serverstring(void);
1296 char *lp_printcapname(void);
1297 char *lp_lockdir(void);
1298 char *lp_utmpdir(void);
1299 char *lp_rootdir(void);
1300 char *lp_source_environment(void);
1301 char *lp_defaultservice(void);
1302 char *lp_msg_command(void);
1303 char *lp_dfree_command(void);
1304 char *lp_hosts_equiv(void);
1305 char *lp_auto_services(void);
1306 char *lp_passwd_program(void);
1307 char *lp_passwd_chat(void);
1308 char *lp_passwordserver(void);
1309 char *lp_name_resolve_order(void);
1310 char *lp_workgroup(void);
1311 char *lp_username_map(void);
1312 char *lp_groupname_map(void);
1313 char *lp_logon_script(void);
1314 char *lp_logon_path(void);
1315 char *lp_logon_drive(void);
1316 char *lp_logon_home(void);
1317 char *lp_remote_announce(void);
1318 char *lp_remote_browse_sync(void);
1319 char *lp_wins_server(void);
1320 char *lp_interfaces(void);
1321 char *lp_socket_address(void);
1322 char *lp_nis_home_map_name(void);
1323 char *lp_netbios_aliases(void);
1324 char *lp_panic_action(void);
1325 char *lp_adduser_script(void);
1326 char *lp_deluser_script(void);
1327 char *lp_wins_hook(void);
1328 char *lp_domain_groups(void);
1329 char *lp_domain_admin_group(void);
1330 char *lp_domain_guest_group(void);
1331 char *lp_domain_admin_users(void);
1332 char *lp_domain_guest_users(void);
1333 char *lp_winbind_uid(void);
1334 char *lp_winbind_gid(void);
1335 char *lp_template_homedir(void);
1336 char *lp_template_shell(void);
1337 char *lp_winbind_separator(void);
1338 char *lp_ldap_server(void);
1339 char *lp_ldap_suffix(void);
1340 char *lp_ldap_filter(void);
1341 char *lp_ldap_root(void);
1342 char *lp_ldap_rootpasswd(void);
1343 int lp_ssl_version(void);
1344 char *lp_ssl_hosts(void);
1345 char *lp_ssl_hosts_resign(void);
1346 char *lp_ssl_cacertdir(void);
1347 char *lp_ssl_cacertfile(void);
1348 char *lp_ssl_cert(void);
1349 char *lp_ssl_privkey(void);
1350 char *lp_ssl_client_cert(void);
1351 char *lp_ssl_client_privkey(void);
1352 char *lp_ssl_ciphers(void);
1353 BOOL
lp_ssl_enabled(void);
1354 BOOL
lp_ssl_reqClientCert(void);
1355 BOOL
lp_ssl_reqServerCert(void);
1356 BOOL
lp_ssl_compatibility(void);
1357 BOOL
lp_dns_proxy(void);
1358 BOOL
lp_wins_support(void);
1359 BOOL
lp_we_are_a_wins_server(void);
1360 BOOL
lp_wins_proxy(void);
1361 BOOL
lp_local_master(void);
1362 BOOL
lp_domain_logons(void);
1363 BOOL
lp_load_printers(void);
1364 BOOL
lp_use_rhosts(void);
1365 BOOL
lp_readprediction(void);
1366 BOOL
lp_readbmpx(void);
1367 BOOL
lp_readraw(void);
1368 BOOL
lp_writeraw(void);
1369 BOOL
lp_null_passwords(void);
1370 BOOL
lp_strip_dot(void);
1371 BOOL
lp_encrypted_passwords(void);
1372 BOOL
lp_update_encrypted(void);
1373 BOOL
lp_syslog_only(void);
1374 BOOL
lp_timestamp_logs(void);
1375 BOOL
lp_debug_hires_timestamp(void);
1376 BOOL
lp_debug_pid(void);
1377 BOOL
lp_debug_uid(void);
1378 BOOL
lp_browse_list(void);
1379 BOOL
lp_unix_realname(void);
1380 BOOL
lp_nis_home_map(void);
1381 BOOL
lp_bind_interfaces_only(void);
1382 BOOL
lp_unix_password_sync(void);
1383 BOOL
lp_passwd_chat_debug(void);
1384 BOOL
lp_nt_smb_support(void);
1385 BOOL
lp_nt_pipe_support(void);
1386 BOOL
lp_nt_acl_support(void);
1387 BOOL
lp_stat_cache(void);
1388 BOOL
lp_allow_trusted_domains(void);
1389 BOOL
lp_restrict_anonymous(void);
1390 BOOL
lp_host_msdfs(void);
1391 BOOL
lp_kernel_oplocks(void);
1392 int lp_os_level(void);
1393 int lp_max_ttl(void);
1394 int lp_max_wins_ttl(void);
1395 int lp_min_wins_ttl(void);
1396 int lp_max_log_size(void);
1397 int lp_max_open_files(void);
1398 int lp_maxxmit(void);
1399 int lp_maxmux(void);
1400 int lp_passwordlevel(void);
1401 int lp_usernamelevel(void);
1402 int lp_readsize(void);
1403 int lp_deadtime(void);
1404 int lp_maxprotocol(void);
1405 int lp_security(void);
1406 int lp_maxdisksize(void);
1407 int lp_lpqcachetime(void);
1408 int lp_syslog(void);
1409 int lp_client_code_page(void);
1410 int lp_lm_announce(void);
1411 int lp_lm_interval(void);
1412 int lp_machine_password_timeout(void);
1413 int lp_change_notify_timeout(void);
1414 int lp_stat_cache_size(void);
1415 int lp_map_to_guest(void);
1416 int lp_min_passwd_length(void);
1417 int lp_oplock_break_wait_time(void);
1418 int lp_ldap_port(void);
1419 char *lp_preexec(int );
1420 char *lp_postexec(int );
1421 char *lp_rootpreexec(int );
1422 char *lp_rootpostexec(int );
1423 char *lp_servicename(int );
1424 char *lp_pathname(int );
1425 char *lp_dontdescend(int );
1426 char *lp_username(int );
1427 char *lp_guestaccount(int );
1428 char *lp_invalid_users(int );
1429 char *lp_valid_users(int );
1430 char *lp_admin_users(int );
1431 char *lp_printcommand(int );
1432 char *lp_lpqcommand(int );
1433 char *lp_lprmcommand(int );
1434 char *lp_lppausecommand(int );
1435 char *lp_lpresumecommand(int );
1436 char *lp_queuepausecommand(int );
1437 char *lp_queueresumecommand(int );
1438 char *lp_driverfile(int );
1439 char *lp_printerdriver(int );
1440 char *lp_hostsallow(int );
1441 char *lp_hostsdeny(int );
1442 char *lp_magicscript(int );
1443 char *lp_magicoutput(int );
1444 char *lp_comment(int );
1445 char *lp_force_user(int );
1446 char *lp_force_group(int );
1447 char *lp_readlist(int );
1448 char *lp_writelist(int );
1449 char *lp_fstype(int );
1450 char *lp_vfsobj(int );
1451 char *lp_mangled_map(int );
1452 char *lp_veto_files(int );
1453 char *lp_hide_files(int );
1454 char *lp_veto_oplocks(int );
1455 char *lp_driverlocation(int );
1456 BOOL
lp_msdfs_root(int );
1457 BOOL
lp_autoloaded(int );
1458 BOOL
lp_preexec_close(int );
1459 BOOL
lp_rootpreexec_close(int );
1460 BOOL
lp_casesensitive(int );
1461 BOOL
lp_preservecase(int );
1462 BOOL
lp_shortpreservecase(int );
1463 BOOL
lp_casemangle(int );
1464 BOOL
lp_status(int );
1465 BOOL
lp_hide_dot_files(int );
1466 BOOL
lp_browseable(int );
1467 BOOL
lp_readonly(int );
1468 BOOL
lp_no_set_dir(int );
1469 BOOL
lp_guest_ok(int );
1470 BOOL
lp_guest_only(int );
1471 BOOL
lp_print_ok(int );
1472 BOOL
lp_postscript(int );
1473 BOOL
lp_map_hidden(int );
1474 BOOL
lp_map_archive(int );
1475 BOOL
lp_locking(int );
1476 BOOL
lp_strict_locking(int );
1477 BOOL
lp_posix_locking(int );
1479 BOOL
lp_share_modes(int );
1480 BOOL
lp_oplocks(int );
1481 BOOL
lp_level2_oplocks(int );
1482 BOOL
lp_onlyuser(int );
1483 BOOL
lp_manglednames(int );
1484 BOOL
lp_widelinks(int );
1485 BOOL
lp_symlinks(int );
1486 BOOL
lp_syncalways(int );
1487 BOOL
lp_strict_sync(int );
1488 BOOL
lp_map_system(int );
1489 BOOL
lp_delete_readonly(int );
1490 BOOL
lp_fake_oplocks(int );
1491 BOOL
lp_recursive_veto_delete(int );
1492 BOOL
lp_dos_filetimes(int );
1493 BOOL
lp_dos_filetime_resolution(int );
1494 BOOL
lp_fake_dir_create_times(int );
1495 BOOL
lp_blocking_locks(int );
1496 BOOL
lp_inherit_perms(int );
1497 int lp_create_mask(int );
1498 int lp_force_create_mode(int );
1499 int _lp_security_mask(int );
1500 int _lp_force_security_mode(int );
1501 int lp_dir_mask(int );
1502 int lp_force_dir_mode(int );
1503 int _lp_dir_security_mask(int );
1504 int _lp_force_dir_security_mode(int );
1505 int lp_max_connections(int );
1506 int lp_defaultcase(int );
1507 int lp_minprintspace(int );
1508 int lp_printing(int );
1509 int lp_oplock_contention_limit(int );
1510 int lp_write_cache_size(int );
1511 char lp_magicchar(int );
1512 int lp_winbind_cache_time(void);
1513 BOOL
lp_add_home(char *pszHomename
, int iDefaultService
, char *pszHomedir
);
1514 int lp_add_service(char *pszService
, int iDefaultService
);
1515 BOOL
lp_add_printer(char *pszPrintername
, int iDefaultService
);
1516 BOOL
lp_file_list_changed(void);
1517 void *lp_local_ptr(int snum
, void *ptr
);
1518 BOOL
lp_do_parameter(int snum
, char *pszParmName
, char *pszParmValue
);
1519 BOOL
lp_is_default(int snum
, struct parm_struct
*parm
);
1520 struct parm_struct
*lp_next_parameter(int snum
, int *i
, int allparameters
);
1521 BOOL
lp_snum_ok(int iService
);
1522 void lp_add_one_printer(char *name
, char *comment
);
1523 BOOL
lp_loaded(void);
1524 void lp_killunused(BOOL (*snumused
) (int));
1525 BOOL
lp_load(char *pszFname
, BOOL global_only
, BOOL save_defaults
,
1527 void lp_resetnumservices(void);
1528 int lp_numservices(void);
1529 void lp_dump(FILE * f
, BOOL show_defaults
, int maxtoprint
);
1530 void lp_dump_one(FILE * f
, BOOL show_defaults
, int snum
);
1531 int lp_servicenumber(char *pszServiceName
);
1532 char *volume_label(int snum
);
1533 int lp_server_role(void);
1534 BOOL
lp_domain_master(void);
1535 BOOL
lp_preferred_master(void);
1536 void lp_remove_service(int snum
);
1537 void lp_copy_service(int snum
, char *new_name
);
1538 int lp_default_server_announce(void);
1539 int lp_major_announce_version(void);
1540 int lp_minor_announce_version(void);
1541 void lp_set_name_resolve_order(char *new_order
);
1542 int lp_security_mask(int snum
);
1543 int lp_force_security_mode(int snum
);
1544 int lp_dir_security_mask(int snum
);
1545 int lp_force_dir_security_mode(int snum
);
1546 char *lp_printername(int snum
);
1548 /*The following definitions come from param/params.c */
1550 BOOL
pm_process( char *FileName
,
1551 BOOL (*sfunc
)(char *),
1552 BOOL (*pfunc
)(char *, char *) );
1554 /*The following definitions come from passdb/ldap.c */
1556 struct passdb_ops
*ldap_initialize_password_db(void);
1558 /*The following definitions come from passdb/nispass.c */
1560 struct passdb_ops
*nisplus_initialize_password_db(void);
1562 /*The following definitions come from passdb/pass_check.c */
1564 void dfs_unlogin(void);
1565 BOOL
pass_check(char *user
, char *password
, int pwlen
, struct passwd
*pwd
,
1566 BOOL (*fn
) (char *, char *));
1568 /*The following definitions come from passdb/passdb.c */
1570 BOOL
initialize_password_db(void);
1571 struct smb_passwd
*iterate_getsmbpwrid(uint32 user_rid
);
1572 struct smb_passwd
*iterate_getsmbpwuid(uid_t smb_userid
);
1573 struct smb_passwd
*iterate_getsmbpwnam(char *name
);
1574 void *startsmbpwent(BOOL update
);
1575 void endsmbpwent(void *vp
);
1576 struct smb_passwd
*getsmbpwent(void *vp
);
1577 BOOL
add_smbpwd_entry(struct smb_passwd
*newpwd
);
1578 BOOL
mod_smbpwd_entry(struct smb_passwd
* pwd
, BOOL override
);
1579 BOOL
del_smbpwd_entry(const char *name
);
1580 struct smb_passwd
*getsmbpwnam(char *name
);
1581 struct smb_passwd
*getsmbpwrid(uint32 user_rid
);
1582 struct smb_passwd
*getsmbpwuid(uid_t smb_userid
);
1583 struct sam_passwd
*iterate_getsam21pwnam(char *name
);
1584 struct sam_passwd
*iterate_getsam21pwrid(uint32 rid
);
1585 struct sam_passwd
*iterate_getsam21pwuid(uid_t uid
);
1586 struct sam_disp_info
*getsamdisprid(uint32 rid
);
1587 struct sam_passwd
*getsam21pwent(void *vp
);
1588 struct sam_passwd
*getsam21pwnam(char *name
);
1589 struct sam_passwd
*getsam21pwrid(uint32 rid
);
1590 void pdb_init_smb(struct smb_passwd
*user
);
1591 void pdb_init_sam(struct sam_passwd
*user
);
1592 struct sam_disp_info
*pdb_sam_to_dispinfo(struct sam_passwd
*user
);
1593 struct smb_passwd
*pdb_sam_to_smb(struct sam_passwd
*user
);
1594 struct sam_passwd
*pdb_smb_to_sam(struct smb_passwd
*user
);
1595 char *pdb_encode_acct_ctrl(uint16 acct_ctrl
, size_t length
);
1596 uint16
pdb_decode_acct_ctrl(const char *p
);
1597 time_t pdb_get_last_set_time(const char *p
);
1598 void pdb_set_logon_time(char *p
, int max_len
, time_t t
);
1599 void pdb_set_logoff_time(char *p
, int max_len
, time_t t
);
1600 void pdb_set_kickoff_time(char *p
, int max_len
, time_t t
);
1601 void pdb_set_can_change_time(char *p
, int max_len
, time_t t
);
1602 void pdb_set_must_change_time(char *p
, int max_len
, time_t t
);
1603 void pdb_set_last_set_time(char *p
, int max_len
, time_t t
);
1604 void pdb_sethexpwd(char *p
, unsigned char *pwd
, uint16 acct_ctrl
);
1605 BOOL
pdb_gethexpwd(char *p
, unsigned char *pwd
);
1606 BOOL
pdb_name_to_rid(char *user_name
, uint32
*u_rid
, uint32
*g_rid
);
1607 BOOL
pdb_generate_sam_sid(void);
1608 uid_t
pdb_user_rid_to_uid(uint32 user_rid
);
1609 gid_t
pdb_user_rid_to_gid(uint32 user_rid
);
1610 uint32
pdb_uid_to_user_rid(uid_t uid
);
1611 uint32
pdb_gid_to_group_rid(gid_t gid
);
1612 BOOL
pdb_rid_is_user(uint32 rid
);
1613 BOOL
lookup_local_rid(uint32 rid
, char *name
, uint8
*psid_name_use
);
1614 BOOL
lookup_local_name(char *domain
, char *user
, DOM_SID
*psid
, uint8
*psid_name_use
);
1615 BOOL
setup_user_sids(user_struct
*vuser
);
1617 /*The following definitions come from passdb/secrets.c */
1619 BOOL
secrets_init(void);
1620 void *secrets_fetch(char *key
, size_t *size
);
1621 BOOL
secrets_store(char *key
, void *data
, size_t size
);
1622 BOOL
secrets_delete(char *key
);
1623 BOOL
secrets_store_domain_sid(char *domain
, DOM_SID
*sid
);
1624 BOOL
secrets_fetch_domain_sid(char *domain
, DOM_SID
*sid
);
1625 BOOL
secrets_fetch_trust_account_password(char *domain
, uint8 ret_pwd
[16],
1626 time_t *pass_last_set_time
);
1627 BOOL
secrets_store_trust_account_password(char *domain
, uint8 new_pwd
[16]);
1629 /*The following definitions come from passdb/smbpass.c */
1631 char *format_new_smbpasswd_entry(struct smb_passwd
*newpwd
);
1632 struct passdb_ops
*file_initialize_password_db(void);
1634 /*The following definitions come from passdb/smbpasschange.c */
1636 BOOL
local_password_change(char *user_name
, int local_flags
,
1638 char *err_str
, size_t err_str_len
,
1639 char *msg_str
, size_t msg_str_len
);
1641 /*The following definitions come from passdb/smbpassfile.c */
1643 BOOL
pw_file_lock(int fd
, int type
, int secs
, int *plock_depth
);
1644 BOOL
pw_file_unlock(int fd
, int *plock_depth
);
1645 BOOL
trust_password_delete(char *domain
);
1647 /*The following definitions come from printing/load.c */
1649 void load_printers(void);
1651 /*The following definitions come from printing/lpq_parse.c */
1653 BOOL
parse_lpq_entry(int snum
,char *line
,
1654 print_queue_struct
*buf
,
1655 print_status_struct
*status
,BOOL first
);
1657 /*The following definitions come from printing/nt_printing.c */
1659 BOOL
nt_printing_init(void);
1660 int get_ntforms(nt_forms_struct
**list
);
1661 int write_ntforms(nt_forms_struct
**list
, int number
);
1662 BOOL
add_a_form(nt_forms_struct
**list
, const FORM
*form
, int *count
);
1663 void update_a_form(nt_forms_struct
**list
, const FORM
*form
, int count
);
1664 int get_ntdrivers(fstring
**list
, char *architecture
);
1665 void get_short_archi(char *short_archi
, char *long_archi
);
1666 uint32
del_a_printer(char *portname
);
1667 BOOL
add_a_specific_param(NT_PRINTER_INFO_LEVEL_2
*info_2
, NT_PRINTER_PARAM
*param
);
1668 BOOL
unlink_specific_param_if_exist(NT_PRINTER_INFO_LEVEL_2
*info_2
, NT_PRINTER_PARAM
*param
);
1669 NT_DEVICEMODE
*construct_nt_devicemode(const fstring default_devicename
);
1670 NT_DEVICEMODE
*dup_nt_devicemode(NT_DEVICEMODE
*nt_devicemode
);
1671 void free_nt_devicemode(NT_DEVICEMODE
**devmode_ptr
);
1672 uint32
add_a_printer(NT_PRINTER_INFO_LEVEL printer
, uint32 level
);
1673 uint32
get_a_printer(NT_PRINTER_INFO_LEVEL
**pp_printer
, uint32 level
, fstring sharename
);
1674 uint32
free_a_printer(NT_PRINTER_INFO_LEVEL
**pp_printer
, uint32 level
);
1675 uint32
add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver
, uint32 level
);
1676 uint32
get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL
*driver
, uint32 level
,
1677 fstring printername
, fstring architecture
);
1678 uint32
free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver
, uint32 level
);
1679 BOOL
get_specific_param_by_index(NT_PRINTER_INFO_LEVEL printer
, uint32 level
, uint32 param_index
,
1680 fstring value
, uint8
**data
, uint32
*type
, uint32
*len
);
1681 BOOL
get_specific_param(NT_PRINTER_INFO_LEVEL printer
, uint32 level
,
1682 fstring value
, uint8
**data
, uint32
*type
, uint32
*len
);
1683 uint32
nt_printing_setsec(char *printername
, SEC_DESC_BUF
*secdesc_ctr
);
1684 BOOL
nt_printing_getsec(char *printername
, SEC_DESC_BUF
**secdesc_ctr
);
1685 BOOL
print_access_check(struct current_user
*user
, int snum
,
1686 uint32 required_access
);
1688 /*The following definitions come from printing/pcap.c */
1690 BOOL
pcap_printername_ok(char *pszPrintername
, char *pszPrintcapname
);
1691 void pcap_printer_fn(void (*fn
)(char *, char *));
1693 /*The following definitions come from printing/print_cups.c */
1695 void cups_printer_fn(void (*fn
)(char *, char *));
1696 int cups_printername_ok(char *name
);
1698 /*The following definitions come from printing/print_svid.c */
1700 void sysv_printer_fn(void (*fn
)(char *, char *));
1701 int sysv_printername_ok(char *name
);
1703 /*The following definitions come from printing/printfsp.c */
1706 files_struct
*print_fsp_open(connection_struct
*conn
,char *jobname
);
1707 void print_fsp_end(files_struct
*fsp
);
1710 /*The following definitions come from printing/printing.c */
1712 BOOL
print_backend_init(void);
1713 BOOL
print_job_exists(int jobid
);
1714 int print_job_snum(int jobid
);
1715 int print_job_fd(int jobid
);
1716 char *print_job_fname(int jobid
);
1717 BOOL
print_job_set_place(int jobid
, int place
);
1718 BOOL
print_job_set_name(int jobid
, char *name
);
1719 BOOL
print_job_delete(struct current_user
*user
, int jobid
);
1720 BOOL
print_job_pause(struct current_user
*user
, int jobid
);
1721 BOOL
print_job_resume(struct current_user
*user
, int jobid
);
1722 int print_job_write(int jobid
, const char *buf
, int size
);
1723 int print_job_start(struct current_user
*user
, int snum
, char *jobname
);
1724 BOOL
print_job_end(int jobid
);
1725 int print_queue_status(int snum
,
1726 print_queue_struct
**queue
,
1727 print_status_struct
*status
);
1728 int print_queue_snum(char *qname
);
1729 BOOL
print_queue_pause(struct current_user
*user
, int snum
);
1730 BOOL
print_queue_resume(struct current_user
*user
, int snum
);
1731 BOOL
print_queue_purge(struct current_user
*user
, int snum
);
1733 /*The following definitions come from profile/profile.c */
1735 BOOL
profile_setup(BOOL rdonly
);
1737 /*The following definitions come from rpc_client/cli_connect.c */
1739 void init_connections(void);
1740 void free_connections(void);
1741 void cli_connection_free(struct cli_connection
*con
);
1742 void cli_connection_unlink(struct cli_connection
*con
);
1743 BOOL
cli_connection_init(const char *srv_name
, const char *pipe_name
,
1744 struct cli_connection
**con
);
1745 BOOL
cli_connection_init_auth(const char *srv_name
, const char *pipe_name
,
1746 struct cli_connection
**con
,
1747 cli_auth_fns
* auth
, void *auth_creds
);
1748 struct _cli_auth_fns
*cli_conn_get_authfns(struct cli_connection
*con
);
1749 void *cli_conn_get_auth_creds(struct cli_connection
*con
);
1750 BOOL
rpc_hnd_pipe_req(const POLICY_HND
* hnd
, uint8 op_num
,
1751 prs_struct
* data
, prs_struct
* rdata
);
1752 BOOL
rpc_con_pipe_req(struct cli_connection
*con
, uint8 op_num
,
1753 prs_struct
* data
, prs_struct
* rdata
);
1754 BOOL
rpc_con_ok(struct cli_connection
*con
);
1756 /*The following definitions come from rpc_client/cli_login.c */
1758 BOOL
cli_nt_setup_creds(struct cli_state
*cli
, unsigned char mach_pwd
[16]);
1759 BOOL
cli_nt_srv_pwset(struct cli_state
*cli
, unsigned char *new_hashof_mach_pwd
);
1760 BOOL
cli_nt_login_interactive(struct cli_state
*cli
, char *domain
, char *username
,
1761 uint32 smb_userid_low
, char *password
,
1762 NET_ID_INFO_CTR
*ctr
, NET_USER_INFO_3
*user_info3
);
1763 BOOL
cli_nt_login_network(struct cli_state
*cli
, char *domain
, char *username
,
1764 uint32 smb_userid_low
, char lm_chal
[8],
1765 char *lm_chal_resp
, char *nt_chal_resp
,
1766 NET_ID_INFO_CTR
*ctr
, NET_USER_INFO_3
*user_info3
);
1767 BOOL
cli_nt_logoff(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
);
1769 /*The following definitions come from rpc_client/cli_lsarpc.c */
1771 BOOL
do_lsa_open_policy(struct cli_state
*cli
,
1772 char *system_name
, POLICY_HND
*hnd
,
1774 BOOL
do_lsa_lookup_sids(struct cli_state
*cli
,
1780 BOOL
do_lsa_query_info_pol(struct cli_state
*cli
,
1781 POLICY_HND
*hnd
, uint16 info_class
,
1782 fstring domain_name
, DOM_SID
*domain_sid
);
1783 BOOL
do_lsa_close(struct cli_state
*cli
, POLICY_HND
*hnd
);
1784 BOOL
cli_lsa_get_domain_sid(struct cli_state
*cli
, char *server
);
1786 /*The following definitions come from rpc_client/cli_netlogon.c */
1788 BOOL
cli_net_logon_ctrl2(struct cli_state
*cli
, uint32 status_level
);
1789 BOOL
cli_net_auth2(struct cli_state
*cli
, uint16 sec_chan
,
1790 uint32 neg_flags
, DOM_CHAL
*srv_chal
);
1791 BOOL
cli_net_req_chal(struct cli_state
*cli
, DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
);
1792 BOOL
cli_net_srv_pwset(struct cli_state
*cli
, uint8 hashed_mach_pwd
[16]);
1793 BOOL
cli_net_sam_logon(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
,
1794 NET_USER_INFO_3
*user_info3
);
1795 BOOL
cli_net_sam_logoff(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
);
1796 BOOL
change_trust_account_password( char *domain
, char *remote_machine_list
);
1798 /*The following definitions come from rpc_client/cli_pipe.c */
1800 BOOL
rpc_api_pipe_req(struct cli_state
*cli
, uint8 op_num
,
1801 prs_struct
*data
, prs_struct
*rdata
);
1802 BOOL
rpc_pipe_bind(struct cli_state
*cli
, char *pipe_name
, char *my_name
);
1803 void cli_nt_set_ntlmssp_flgs(struct cli_state
*cli
, uint32 ntlmssp_flgs
);
1804 BOOL
cli_nt_session_open(struct cli_state
*cli
, char *pipe_name
);
1805 void cli_nt_session_close(struct cli_state
*cli
);
1807 /*The following definitions come from rpc_client/cli_reg.c */
1809 BOOL
do_reg_connect(struct cli_state
*cli
, char *full_keyname
, char *key_name
,
1810 POLICY_HND
*reg_hnd
);
1811 BOOL
do_reg_open_hklm(struct cli_state
*cli
, uint16 unknown_0
, uint32 level
,
1813 BOOL
do_reg_open_hku(struct cli_state
*cli
, uint16 unknown_0
, uint32 level
,
1815 BOOL
do_reg_flush_key(struct cli_state
*cli
, POLICY_HND
*hnd
);
1816 BOOL
do_reg_query_key(struct cli_state
*cli
, POLICY_HND
*hnd
,
1817 char *class, uint32
*class_len
,
1818 uint32
*num_subkeys
, uint32
*max_subkeylen
,
1819 uint32
*max_subkeysize
, uint32
*num_values
,
1820 uint32
*max_valnamelen
, uint32
*max_valbufsize
,
1821 uint32
*sec_desc
, NTTIME
*mod_time
);
1822 BOOL
do_reg_unknown_1a(struct cli_state
*cli
, POLICY_HND
*hnd
, uint32
*unk
);
1823 BOOL
do_reg_query_info(struct cli_state
*cli
, POLICY_HND
*hnd
,
1824 char *key_value
, uint32
* key_type
);
1825 BOOL
do_reg_set_key_sec(struct cli_state
*cli
, POLICY_HND
*hnd
, SEC_DESC_BUF
*sec_desc_buf
);
1826 BOOL
do_reg_get_key_sec(struct cli_state
*cli
, POLICY_HND
*hnd
, uint32
*sec_buf_size
, SEC_DESC_BUF
**ppsec_desc_buf
);
1827 BOOL
do_reg_delete_val(struct cli_state
*cli
, POLICY_HND
*hnd
, char *val_name
);
1828 BOOL
do_reg_delete_key(struct cli_state
*cli
, POLICY_HND
*hnd
, char *key_name
);
1829 BOOL
do_reg_create_key(struct cli_state
*cli
, POLICY_HND
*hnd
,
1830 char *key_name
, char *key_class
,
1831 SEC_ACCESS
*sam_access
,
1833 BOOL
do_reg_enum_key(struct cli_state
*cli
, POLICY_HND
*hnd
,
1834 int key_index
, char *key_name
,
1835 uint32
*unk_1
, uint32
*unk_2
,
1837 BOOL
do_reg_create_val(struct cli_state
*cli
, POLICY_HND
*hnd
,
1838 char *val_name
, uint32 type
, BUFFER3
*data
);
1839 BOOL
do_reg_enum_val(struct cli_state
*cli
, POLICY_HND
*hnd
,
1840 int val_index
, int max_valnamelen
, int max_valbufsize
,
1842 uint32
*val_type
, BUFFER2
*value
);
1843 BOOL
do_reg_open_entry(struct cli_state
*cli
, POLICY_HND
*hnd
,
1844 char *key_name
, uint32 unk_0
,
1845 POLICY_HND
*key_hnd
);
1846 BOOL
do_reg_close(struct cli_state
*cli
, POLICY_HND
*hnd
);
1848 /*The following definitions come from rpc_client/cli_samr.c */
1851 BOOL
get_samr_query_usergroups(struct cli_state
*cli
,
1852 POLICY_HND
*pol_open_domain
, uint32 user_rid
,
1853 uint32
*num_groups
, DOM_GID
*gid
);
1854 BOOL
get_samr_query_userinfo(struct cli_state
*cli
,
1855 POLICY_HND
*pol_open_domain
,
1857 uint32 user_rid
, SAM_USER_INFO_21
*usr
);
1858 BOOL
do_samr_chgpasswd_user(struct cli_state
*cli
,
1859 char *srv_name
, char *user_name
,
1860 char nt_newpass
[516], uchar nt_oldhash
[16],
1861 char lm_newpass
[516], uchar lm_oldhash
[16]);
1862 BOOL
do_samr_unknown_38(struct cli_state
*cli
, char *srv_name
);
1863 BOOL
do_samr_query_dom_info(struct cli_state
*cli
,
1864 POLICY_HND
*domain_pol
, uint16 switch_value
);
1865 BOOL
do_samr_enum_dom_users(struct cli_state
*cli
,
1866 POLICY_HND
*pol
, uint16 num_entries
, uint16 unk_0
,
1867 uint16 acb_mask
, uint16 unk_1
, uint32 size
,
1868 struct acct_info
**sam
,
1869 int *num_sam_users
);
1870 BOOL
do_samr_connect(struct cli_state
*cli
,
1871 char *srv_name
, uint32 unknown_0
,
1872 POLICY_HND
*connect_pol
);
1873 BOOL
do_samr_open_user(struct cli_state
*cli
,
1874 POLICY_HND
*pol
, uint32 unk_0
, uint32 rid
,
1875 POLICY_HND
*user_pol
);
1876 BOOL
do_samr_open_domain(struct cli_state
*cli
,
1877 POLICY_HND
*connect_pol
, uint32 rid
, DOM_SID
*sid
,
1878 POLICY_HND
*domain_pol
);
1879 BOOL
do_samr_query_unknown_12(struct cli_state
*cli
,
1880 POLICY_HND
*pol
, uint32 rid
, uint32 num_gids
, uint32
*gids
,
1881 uint32
*num_aliases
,
1882 fstring als_names
[MAX_LOOKUP_SIDS
],
1883 uint32 num_als_users
[MAX_LOOKUP_SIDS
]);
1884 BOOL
do_samr_query_usergroups(struct cli_state
*cli
,
1885 POLICY_HND
*pol
, uint32
*num_groups
, DOM_GID
*gid
);
1886 BOOL
do_samr_query_userinfo(struct cli_state
*cli
,
1887 POLICY_HND
*pol
, uint16 switch_value
, void* usr
);
1888 BOOL
do_samr_close(struct cli_state
*cli
, POLICY_HND
*hnd
);
1891 /*The following definitions come from rpc_client/cli_spoolss.c */
1893 uint32
spoolss_enum_printerdrivers(const char * srv_name
,
1894 const char *environment
,
1896 NEW_BUFFER
*buffer
, uint32 offered
,
1897 uint32
*needed
, uint32
*returned
);
1898 uint32
spoolss_enum_printers(uint32 flags
, fstring srv_name
, uint32 level
,
1899 NEW_BUFFER
*buffer
, uint32 offered
,
1900 uint32
*needed
, uint32
*returned
);
1901 uint32
spoolss_enum_jobs(const POLICY_HND
*hnd
, uint32 firstjob
, uint32 numofjobs
,
1902 uint32 level
, NEW_BUFFER
*buffer
, uint32 offered
,
1903 uint32
*needed
, uint32
*returned
);
1904 uint32
spoolss_enum_printerdata(const POLICY_HND
*hnd
, uint32 idx
,
1905 uint32
*valuelen
, uint16
*value
, uint32
*rvaluelen
,
1907 uint32
*datalen
, uint8
*data
, uint32
*rdatalen
);
1908 uint32
spoolss_getprinter(const POLICY_HND
*hnd
, uint32 level
,
1909 NEW_BUFFER
*buffer
, uint32 offered
,
1911 uint32
spoolss_getprinterdriver(const POLICY_HND
*hnd
,
1912 const char *environment
, uint32 level
,
1913 NEW_BUFFER
*buffer
, uint32 offered
,
1915 BOOL
spoolss_open_printer_ex( const char *printername
,
1916 const char *datatype
, uint32 access_required
,
1917 const char *station
, const char *username
,
1919 BOOL
spoolss_closeprinter(POLICY_HND
*hnd
);
1920 uint32
spoolss_getprinterdata(const POLICY_HND
*hnd
, const UNISTR2
*valuename
,
1926 uint32
spoolss_getprinterdriverdir(fstring srv_name
, fstring env_name
, uint32 level
,
1927 NEW_BUFFER
*buffer
, uint32 offered
,
1930 /*The following definitions come from rpc_client/cli_srvsvc.c */
1932 BOOL
do_srv_net_srv_conn_enum(struct cli_state
*cli
,
1933 char *server_name
, char *qual_name
,
1934 uint32 switch_value
, SRV_CONN_INFO_CTR
*ctr
,
1935 uint32 preferred_len
,
1937 BOOL
do_srv_net_srv_sess_enum(struct cli_state
*cli
,
1938 char *server_name
, char *qual_name
,
1939 uint32 switch_value
, SRV_SESS_INFO_CTR
*ctr
,
1940 uint32 preferred_len
,
1942 BOOL
do_srv_net_srv_share_enum(struct cli_state
*cli
,
1944 uint32 switch_value
, SRV_R_NET_SHARE_ENUM
*r_o
,
1945 uint32 preferred_len
, ENUM_HND
*hnd
);
1946 BOOL
do_srv_net_srv_file_enum(struct cli_state
*cli
,
1947 char *server_name
, char *qual_name
,
1948 uint32 switch_value
, SRV_FILE_INFO_CTR
*ctr
,
1949 uint32 preferred_len
,
1951 BOOL
do_srv_net_srv_get_info(struct cli_state
*cli
,
1952 char *server_name
, uint32 switch_value
, SRV_INFO_CTR
*ctr
);
1954 /*The following definitions come from rpc_client/cli_use.c */
1956 void init_cli_use(void);
1957 void free_cli_use(void);
1958 struct cli_state
*cli_net_use_add(const char *srv_name
,
1959 const struct ntuser_creds
*usr_creds
,
1960 BOOL reuse
, BOOL
*is_new
);
1961 BOOL
cli_net_use_del(const char *srv_name
,
1962 const struct ntuser_creds
*usr_creds
,
1963 BOOL force_close
, BOOL
*connection_closed
);
1964 void cli_net_use_enum(uint32
*num_cons
, struct use_info
***use
);
1965 void cli_use_wait_keyboard(void);
1967 /*The following definitions come from rpc_client/cli_wkssvc.c */
1969 BOOL
do_wks_query_info(struct cli_state
*cli
,
1970 char *server_name
, uint32 switch_value
,
1971 WKS_INFO_100
*wks100
);
1973 /*The following definitions come from rpc_client/msrpc_spoolss.c */
1975 BOOL
msrpc_spoolss_enum_printers(char* srv_name
, uint32 flags
,
1976 uint32 level
, PRINTER_INFO_CTR ctr
);
1977 uint32
msrpc_spoolss_getprinterdata( const char* printer_name
,
1978 const char* station
,
1979 const char* user_name
,
1980 const char* value_name
,
1984 BOOL
msrpc_spoolss_enum_jobs( const char* printer_name
,
1985 const char* station
, const char* user_name
,
1987 void ***ctr
, JOB_INFO_FN(fn
));
1988 BOOL
msrpc_spoolss_enum_printerdata( const char* printer_name
,
1989 const char* station
, const char* user_name
);
1990 BOOL
msrpc_spoolss_getprinter( const char* printer_name
, const uint32 level
,
1991 const char* station
, const char* user_name
,
1992 PRINTER_INFO_CTR ctr
);
1993 BOOL
msrpc_spoolss_getprinterdriver( const char* printer_name
,
1994 const char *environment
, const uint32 level
,
1995 const char* station
, const char* user_name
,
1996 PRINTER_DRIVER_CTR ctr
);
1997 BOOL
msrpc_spoolss_enumprinterdrivers( const char* srv_name
,
1998 const char *environment
, const uint32 level
,
1999 PRINTER_DRIVER_CTR ctr
);
2000 BOOL
msrpc_spoolss_getprinterdriverdir(char* srv_name
, char* env_name
, uint32 level
, DRIVER_DIRECTORY_CTR ctr
);
2002 /*The following definitions come from rpc_client/ncacn_np_use.c */
2004 BOOL
ncacn_np_use_del(const char *srv_name
, const char *pipe_name
,
2005 const vuser_key
* key
,
2006 BOOL force_close
, BOOL
*connection_closed
);
2007 struct ncacn_np
*ncacn_np_initialise(struct ncacn_np
*msrpc
,
2008 const vuser_key
* key
);
2009 struct ncacn_np
*ncacn_np_use_add(const char *pipe_name
,
2010 const vuser_key
* key
,
2011 const char *srv_name
,
2012 const struct ntuser_creds
*ntc
,
2013 BOOL reuse
, BOOL
*is_new_connection
);
2015 /*The following definitions come from rpc_parse/parse_creds.c */
2017 BOOL
make_creds_unix(CREDS_UNIX
*r_u
, const char* user_name
,
2018 const char* requested_name
,
2019 const char* real_name
,
2021 BOOL
creds_io_unix(char *desc
, CREDS_UNIX
*r_u
, prs_struct
*ps
, int depth
);
2022 void creds_free_unix(CREDS_UNIX
*r_u
);
2023 BOOL
make_creds_unix_sec(CREDS_UNIX_SEC
*r_u
,
2024 uint32 uid
, uint32 gid
, uint32 num_grps
, gid_t
*grps
);
2025 BOOL
creds_io_unix_sec(char *desc
, CREDS_UNIX_SEC
*r_u
, prs_struct
*ps
, int depth
);
2026 void creds_free_unix_sec(CREDS_UNIX_SEC
*r_u
);
2027 BOOL
make_creds_nt_sec(CREDS_NT_SEC
*r_u
,
2028 DOM_SID
*sid
, uint32 num_grps
, uint32
*grps
);
2029 BOOL
creds_io_nt_sec(char *desc
, CREDS_NT_SEC
*r_u
, prs_struct
*ps
, int depth
);
2030 void creds_free_nt_sec(CREDS_NT_SEC
*r_u
);
2031 BOOL
creds_io_pwd_info(char *desc
, struct pwd_info
*pwd
, prs_struct
*ps
, int depth
);
2032 BOOL
creds_io_nt(char *desc
, CREDS_NT
*r_u
, prs_struct
*ps
, int depth
);
2033 void creds_free_nt(CREDS_NT
*r_u
);
2034 BOOL
creds_io_hybrid(char *desc
, CREDS_HYBRID
*r_u
, prs_struct
*ps
, int depth
);
2035 void copy_unix_creds(CREDS_UNIX
*to
, const CREDS_UNIX
*from
);
2036 void copy_nt_sec_creds(CREDS_NT_SEC
*to
, const CREDS_NT_SEC
*from
);
2037 void copy_unix_sec_creds(CREDS_UNIX_SEC
*to
, const CREDS_UNIX_SEC
*from
);
2038 void create_ntc_from_cli_state (CREDS_NT
*to
, const struct cli_state
*cli_from
);
2039 void copy_nt_creds(struct ntuser_creds
*to
,
2040 const struct ntuser_creds
*from
);
2041 void copy_user_creds(struct user_creds
*to
,
2042 const struct user_creds
*from
);
2043 void free_user_creds(struct user_creds
*creds
);
2044 BOOL
creds_io_cmd(char *desc
, CREDS_CMD
*r_u
, prs_struct
*ps
, int depth
);
2045 BOOL
create_ntuser_creds( prs_struct
*ps
,
2047 uint16 version
, uint16 command
,
2049 const struct ntuser_creds
*ntu
,
2051 BOOL
create_user_creds( prs_struct
*ps
,
2053 uint16 version
, uint16 command
,
2055 struct user_creds
*usr
);
2057 /*The following definitions come from rpc_parse/parse_dfs.c */
2059 BOOL
dfs_io_r_dfs_exist(char *desc
, DFS_R_DFS_EXIST
*q_d
, prs_struct
*ps
,
2061 BOOL
make_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE
*q_d
, char *entrypath
,
2062 char *servername
, char *sharename
);
2063 BOOL
dfs_io_q_dfs_remove(char *desc
, DFS_Q_DFS_REMOVE
*q_d
, prs_struct
*ps
,
2065 BOOL
dfs_io_r_dfs_remove(char *desc
, DFS_R_DFS_REMOVE
*r_d
, prs_struct
*ps
,
2067 BOOL
make_dfs_q_dfs_add(DFS_Q_DFS_ADD
*q_d
, char *entrypath
, char *servername
,
2068 char *sharename
, char *comment
, uint32 flags
);
2069 BOOL
dfs_io_q_dfs_add(char *desc
, DFS_Q_DFS_ADD
*q_d
, prs_struct
*ps
,
2071 BOOL
dfs_io_r_dfs_add(char *desc
, DFS_R_DFS_ADD
*r_d
, prs_struct
*ps
,
2073 BOOL
dfs_io_q_dfs_get_info(char* desc
, DFS_Q_DFS_GET_INFO
* q_i
,
2074 prs_struct
* ps
, int depth
);
2075 BOOL
dfs_io_r_dfs_get_info(char* desc
, DFS_R_DFS_GET_INFO
* r_i
,
2076 prs_struct
* ps
, int depth
);
2077 BOOL
make_dfs_q_dfs_enum(DFS_Q_DFS_ENUM
*q_d
, uint32 level
, DFS_INFO_CTR
*ctr
);
2078 BOOL
dfs_io_q_dfs_enum(char *desc
, DFS_Q_DFS_ENUM
*q_d
, prs_struct
*ps
,
2080 BOOL
dfs_io_dfs_info_ctr(char* desc
, DFS_INFO_CTR
* ctr
, uint32 num_entries
,
2082 prs_struct
* ps
, int depth
);
2083 BOOL
dfs_io_r_dfs_enum(char *desc
, DFS_R_DFS_ENUM
*q_d
, prs_struct
*ps
, int depth
);
2084 BOOL
dfs_io_dfs_storage_info(char *desc
, DFS_INFO_3
* info3
,
2085 prs_struct
*ps
, int depth
);
2087 /*The following definitions come from rpc_parse/parse_lsa.c */
2089 void init_lsa_trans_name(LSA_TRANS_NAME
*trn
, UNISTR2
*uni_name
,
2090 uint32 sid_name_use
, char *name
, uint32 idx
);
2091 void init_lsa_sec_qos(LSA_SEC_QOS
*qos
, uint16 imp_lev
, uint8 ctxt
, uint8 eff
,
2093 void init_lsa_obj_attr(LSA_OBJ_ATTR
*attr
, uint32 attributes
, LSA_SEC_QOS
*qos
);
2094 void init_q_open_pol(LSA_Q_OPEN_POL
*r_q
, uint16 system_name
,
2096 uint32 desired_access
,
2098 BOOL
lsa_io_q_open_pol(char *desc
, LSA_Q_OPEN_POL
*r_q
, prs_struct
*ps
, int depth
);
2099 BOOL
lsa_io_r_open_pol(char *desc
, LSA_R_OPEN_POL
*r_p
, prs_struct
*ps
, int depth
);
2100 void init_q_open_pol2(LSA_Q_OPEN_POL2
*r_q
, char *server_name
,
2102 uint32 desired_access
,
2104 BOOL
lsa_io_q_open_pol2(char *desc
, LSA_Q_OPEN_POL2
*r_q
, prs_struct
*ps
, int depth
);
2105 BOOL
lsa_io_r_open_pol2(char *desc
, LSA_R_OPEN_POL2
*r_p
, prs_struct
*ps
, int depth
);
2106 void init_q_query(LSA_Q_QUERY_INFO
*q_q
, POLICY_HND
*hnd
, uint16 info_class
);
2107 BOOL
lsa_io_q_query(char *desc
, LSA_Q_QUERY_INFO
*q_q
, prs_struct
*ps
, int depth
);
2108 BOOL
lsa_io_q_enum_trust_dom(char *desc
, LSA_Q_ENUM_TRUST_DOM
*q_e
, prs_struct
*ps
, int depth
);
2109 void init_r_enum_trust_dom(LSA_R_ENUM_TRUST_DOM
*r_e
,
2110 uint32 enum_context
, char *domain_name
, DOM_SID
*domain_sid
,
2112 BOOL
lsa_io_r_enum_trust_dom(char *desc
, LSA_R_ENUM_TRUST_DOM
*r_e
, prs_struct
*ps
, int depth
);
2113 BOOL
lsa_io_r_query(char *desc
, LSA_R_QUERY_INFO
*r_q
, prs_struct
*ps
, int depth
);
2114 void init_lsa_sid_enum(LSA_SID_ENUM
*sen
, int num_entries
, DOM_SID
**sids
);
2115 void init_q_lookup_sids(LSA_Q_LOOKUP_SIDS
*q_l
, POLICY_HND
*hnd
,
2116 int num_sids
, DOM_SID
**sids
,
2118 BOOL
lsa_io_q_lookup_sids(char *desc
, LSA_Q_LOOKUP_SIDS
*q_s
, prs_struct
*ps
, int depth
);
2119 BOOL
lsa_io_r_lookup_sids(char *desc
, LSA_R_LOOKUP_SIDS
*r_s
, prs_struct
*ps
, int depth
);
2120 void init_q_lookup_names(LSA_Q_LOOKUP_NAMES
*q_l
, POLICY_HND
*hnd
,
2121 int num_names
, char **names
);
2122 BOOL
lsa_io_q_lookup_names(char *desc
, LSA_Q_LOOKUP_NAMES
*q_r
, prs_struct
*ps
, int depth
);
2123 BOOL
lsa_io_r_lookup_names(char *desc
, LSA_R_LOOKUP_NAMES
*r_r
, prs_struct
*ps
, int depth
);
2124 void init_lsa_q_close(LSA_Q_CLOSE
*q_c
, POLICY_HND
*hnd
);
2125 BOOL
lsa_io_q_close(char *desc
, LSA_Q_CLOSE
*q_c
, prs_struct
*ps
, int depth
);
2126 BOOL
lsa_io_r_close(char *desc
, LSA_R_CLOSE
*r_c
, prs_struct
*ps
, int depth
);
2128 /*The following definitions come from rpc_parse/parse_misc.c */
2130 BOOL
smb_io_time(char *desc
, NTTIME
*nttime
, prs_struct
*ps
, int depth
);
2131 BOOL
smb_io_lookup_level(char *desc
, LOOKUP_LEVEL
*level
, prs_struct
*ps
, int depth
);
2132 uint32
get_enum_hnd(ENUM_HND
*enh
);
2133 void init_enum_hnd(ENUM_HND
*enh
, uint32 hnd
);
2134 BOOL
smb_io_enum_hnd(char *desc
, ENUM_HND
*hnd
, prs_struct
*ps
, int depth
);
2135 BOOL
smb_io_dom_sid(char *desc
, DOM_SID
*sid
, prs_struct
*ps
, int depth
);
2136 void init_dom_sid(DOM_SID
*sid
, char *str_sid
);
2137 void init_dom_sid2(DOM_SID2
*sid2
, DOM_SID
*sid
);
2138 BOOL
smb_io_dom_sid2(char *desc
, DOM_SID2
*sid
, prs_struct
*ps
, int depth
);
2139 void init_str_hdr(STRHDR
*hdr
, int max_len
, int len
, uint32 buffer
);
2140 BOOL
smb_io_strhdr(char *desc
, STRHDR
*hdr
, prs_struct
*ps
, int depth
);
2141 void init_uni_hdr(UNIHDR
*hdr
, int len
);
2142 BOOL
smb_io_unihdr(char *desc
, UNIHDR
*hdr
, prs_struct
*ps
, int depth
);
2143 void init_buf_hdr(BUFHDR
*hdr
, int max_len
, int len
);
2144 BOOL
smb_io_hdrbuf_pre(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
, uint32
*offset
);
2145 BOOL
smb_io_hdrbuf_post(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
,
2146 uint32 ptr_hdrbuf
, uint32 max_len
, uint32 len
);
2147 BOOL
smb_io_hdrbuf(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
);
2148 void init_uni_hdr2(UNIHDR2
*hdr
, int len
);
2149 BOOL
smb_io_unihdr2(char *desc
, UNIHDR2
*hdr2
, prs_struct
*ps
, int depth
);
2150 void init_unistr(UNISTR
*str
, const char *buf
);
2151 BOOL
smb_io_unistr(char *desc
, UNISTR
*uni
, prs_struct
*ps
, int depth
);
2152 void init_buffer3_uint32(BUFFER3
*str
, uint32 val
);
2153 void init_buffer3_str(BUFFER3
*str
, char *buf
, int len
);
2154 void init_buffer3_hex(BUFFER3
*str
, char *buf
);
2155 void init_buffer3_bytes(BUFFER3
*str
, uint8
*buf
, int len
);
2156 BOOL
smb_io_buffer3(char *desc
, BUFFER3
*buf3
, prs_struct
*ps
, int depth
);
2157 BOOL
smb_io_buffer5(char *desc
, BUFFER5
*buf5
, prs_struct
*ps
, int depth
);
2158 void free_buffer5(BUFFER5
*buf5
);
2159 void init_buffer2(BUFFER2
*str
, uint8
*buf
, int len
);
2160 BOOL
smb_io_buffer2(char *desc
, BUFFER2
*buf2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2161 void init_buf_unistr2(UNISTR2
*str
, uint32
*ptr
, const char *buf
);
2162 void copy_unistr2(UNISTR2
*str
, UNISTR2
*from
);
2163 void init_string2(STRING2
*str
, char *buf
, int len
);
2164 BOOL
smb_io_string2(char *desc
, STRING2
*str2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2165 void init_unistr2(UNISTR2
*str
, const char *buf
, size_t len
);
2166 BOOL
smb_io_unistr2(char *desc
, UNISTR2
*uni2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2167 void init_dom_rid2(DOM_RID2
*rid2
, uint32 rid
, uint8 type
, uint32 idx
);
2168 BOOL
smb_io_dom_rid2(char *desc
, DOM_RID2
*rid2
, prs_struct
*ps
, int depth
);
2169 void init_dom_rid3(DOM_RID3
*rid3
, uint32 rid
, uint8 type
);
2170 BOOL
smb_io_dom_rid3(char *desc
, DOM_RID3
*rid3
, prs_struct
*ps
, int depth
);
2171 void init_dom_rid4(DOM_RID4
*rid4
, uint16 unknown
, uint16 attr
, uint32 rid
);
2172 void init_log_info(DOM_LOG_INFO
*log
, char *logon_srv
, char *acct_name
,
2173 uint16 sec_chan
, char *comp_name
);
2174 BOOL
smb_io_log_info(char *desc
, DOM_LOG_INFO
*log
, prs_struct
*ps
, int depth
);
2175 BOOL
smb_io_chal(char *desc
, DOM_CHAL
*chal
, prs_struct
*ps
, int depth
);
2176 BOOL
smb_io_cred(char *desc
, DOM_CRED
*cred
, prs_struct
*ps
, int depth
);
2177 void init_clnt_info2(DOM_CLNT_INFO2
*clnt
,
2178 char *logon_srv
, char *comp_name
,
2179 DOM_CRED
*clnt_cred
);
2180 BOOL
smb_io_clnt_info2(char *desc
, DOM_CLNT_INFO2
*clnt
, prs_struct
*ps
, int depth
);
2181 void init_clnt_info(DOM_CLNT_INFO
*clnt
,
2182 char *logon_srv
, char *acct_name
,
2183 uint16 sec_chan
, char *comp_name
,
2185 BOOL
smb_io_clnt_info(char *desc
, DOM_CLNT_INFO
*clnt
, prs_struct
*ps
, int depth
);
2186 void init_logon_id(DOM_LOGON_ID
*log
, uint32 log_id_low
, uint32 log_id_high
);
2187 BOOL
smb_io_logon_id(char *desc
, DOM_LOGON_ID
*log
, prs_struct
*ps
, int depth
);
2188 void init_owf_info(OWF_INFO
*hash
, uint8 data
[16]);
2189 BOOL
smb_io_owf_info(char *desc
, OWF_INFO
*hash
, prs_struct
*ps
, int depth
);
2190 BOOL
smb_io_gid(char *desc
, DOM_GID
*gid
, prs_struct
*ps
, int depth
);
2191 BOOL
smb_io_pol_hnd(char *desc
, POLICY_HND
*pol
, prs_struct
*ps
, int depth
);
2192 BOOL
smb_io_dom_query_3(char *desc
, DOM_QUERY_3
*d_q
, prs_struct
*ps
, int depth
);
2193 BOOL
smb_io_dom_query_5(char *desc
, DOM_QUERY_3
*d_q
, prs_struct
*ps
, int depth
);
2194 BOOL
smb_io_unistr3(char *desc
, UNISTR3
*name
, prs_struct
*ps
, int depth
);
2195 BOOL
prs_uint64(char *name
, prs_struct
*ps
, int depth
, UINT64_S
*data64
);
2197 /*The following definitions come from rpc_parse/parse_net.c */
2199 BOOL
net_io_q_logon_ctrl2(char *desc
, NET_Q_LOGON_CTRL2
*q_l
, prs_struct
*ps
, int depth
);
2200 void init_r_logon_ctrl2(NET_R_LOGON_CTRL2
*r_l
, uint32 query_level
,
2201 uint32 flags
, uint32 pdc_status
, uint32 logon_attempts
,
2202 uint32 tc_status
, char *trusted_domain_name
);
2203 BOOL
net_io_r_logon_ctrl2(char *desc
, NET_R_LOGON_CTRL2
*r_l
, prs_struct
*ps
, int depth
);
2204 void init_r_trust_dom(NET_R_TRUST_DOM_LIST
*r_t
,
2205 uint32 num_doms
, char *dom_name
);
2206 BOOL
net_io_r_trust_dom(char *desc
, NET_R_TRUST_DOM_LIST
*r_t
, prs_struct
*ps
, int depth
);
2207 BOOL
net_io_q_trust_dom(char *desc
, NET_Q_TRUST_DOM_LIST
*q_l
, prs_struct
*ps
, int depth
);
2208 void init_q_req_chal(NET_Q_REQ_CHAL
*q_c
,
2209 char *logon_srv
, char *logon_clnt
,
2210 DOM_CHAL
*clnt_chal
);
2211 BOOL
net_io_q_req_chal(char *desc
, NET_Q_REQ_CHAL
*q_c
, prs_struct
*ps
, int depth
);
2212 BOOL
net_io_r_req_chal(char *desc
, NET_R_REQ_CHAL
*r_c
, prs_struct
*ps
, int depth
);
2213 void init_q_auth_2(NET_Q_AUTH_2
*q_a
,
2214 char *logon_srv
, char *acct_name
, uint16 sec_chan
, char *comp_name
,
2215 DOM_CHAL
*clnt_chal
, uint32 clnt_flgs
);
2216 BOOL
net_io_q_auth_2(char *desc
, NET_Q_AUTH_2
*q_a
, prs_struct
*ps
, int depth
);
2217 BOOL
net_io_r_auth_2(char *desc
, NET_R_AUTH_2
*r_a
, prs_struct
*ps
, int depth
);
2218 void init_q_srv_pwset(NET_Q_SRV_PWSET
*q_s
, char *logon_srv
, char *acct_name
,
2219 uint16 sec_chan
, char *comp_name
, DOM_CRED
*cred
, char nt_cypher
[16]);
2220 BOOL
net_io_q_srv_pwset(char *desc
, NET_Q_SRV_PWSET
*q_s
, prs_struct
*ps
, int depth
);
2221 BOOL
net_io_r_srv_pwset(char *desc
, NET_R_SRV_PWSET
*r_s
, prs_struct
*ps
, int depth
);
2222 void init_id_info1(NET_ID_INFO_1
*id
, char *domain_name
,
2223 uint32 param_ctrl
, uint32 log_id_low
, uint32 log_id_high
,
2224 char *user_name
, char *wksta_name
,
2226 unsigned char lm_cypher
[16], unsigned char nt_cypher
[16]);
2227 void init_id_info2(NET_ID_INFO_2
*id
, char *domain_name
,
2228 uint32 param_ctrl
, uint32 log_id_low
, uint32 log_id_high
,
2229 char *user_name
, char *wksta_name
,
2230 unsigned char lm_challenge
[8],
2231 unsigned char *lm_chal_resp
,
2232 unsigned char *nt_chal_resp
);
2233 void init_sam_info(DOM_SAM_INFO
*sam
,
2234 char *logon_srv
, char *comp_name
, DOM_CRED
*clnt_cred
,
2235 DOM_CRED
*rtn_cred
, uint16 logon_level
,
2236 NET_ID_INFO_CTR
*ctr
);
2237 void init_net_user_info3(NET_USER_INFO_3
*usr
,
2240 NTTIME
*logoff_time
,
2241 NTTIME
*kickoff_time
,
2242 NTTIME
*pass_last_set_time
,
2243 NTTIME
*pass_can_change_time
,
2244 NTTIME
*pass_must_change_time
,
2254 uint16 bad_pw_count
,
2269 BOOL
net_io_q_sam_logon(char *desc
, NET_Q_SAM_LOGON
*q_l
, prs_struct
*ps
, int depth
);
2270 BOOL
net_io_r_sam_logon(char *desc
, NET_R_SAM_LOGON
*r_l
, prs_struct
*ps
, int depth
);
2271 BOOL
net_io_q_sam_logoff(char *desc
, NET_Q_SAM_LOGOFF
*q_l
, prs_struct
*ps
, int depth
);
2272 BOOL
net_io_r_sam_logoff(char *desc
, NET_R_SAM_LOGOFF
*r_l
, prs_struct
*ps
, int depth
);
2274 /*The following definitions come from rpc_parse/parse_prs.c */
2276 void prs_dump(char *name
, int v
, prs_struct
*ps
);
2277 void prs_debug(prs_struct
*ps
, int depth
, char *desc
, char *fn_name
);
2278 BOOL
prs_init(prs_struct
*ps
, uint32 size
, uint8 align
, BOOL io
);
2279 BOOL
prs_read(prs_struct
*ps
, int fd
, size_t len
, int timeout
);
2280 void prs_mem_free(prs_struct
*ps
);
2281 void prs_give_memory(prs_struct
*ps
, char *buf
, uint32 size
, BOOL is_dynamic
);
2282 char *prs_take_memory(prs_struct
*ps
, uint32
*psize
);
2283 BOOL
prs_set_buffer_size(prs_struct
*ps
, uint32 newsize
);
2284 BOOL
prs_grow(prs_struct
*ps
, uint32 extra_space
);
2285 BOOL
prs_force_grow(prs_struct
*ps
, uint32 extra_space
);
2286 char *prs_data_p(prs_struct
*ps
);
2287 uint32
prs_data_size(prs_struct
*ps
);
2288 uint32
prs_offset(prs_struct
*ps
);
2289 BOOL
prs_set_offset(prs_struct
*ps
, uint32 offset
);
2290 BOOL
prs_append_prs_data(prs_struct
*dst
, prs_struct
*src
);
2291 BOOL
prs_append_some_prs_data(prs_struct
*dst
, prs_struct
*src
, int32 start
, uint32 len
);
2292 BOOL
prs_append_data(prs_struct
*dst
, char *src
, uint32 len
);
2293 void prs_set_bigendian_data(prs_struct
*ps
);
2294 BOOL
prs_align(prs_struct
*ps
);
2295 char *prs_mem_get(prs_struct
*ps
, uint32 extra_size
);
2296 void prs_switch_type(prs_struct
*ps
, BOOL io
);
2297 void prs_force_dynamic(prs_struct
*ps
);
2298 BOOL
prs_uint8(char *name
, prs_struct
*ps
, int depth
, uint8
*data8
);
2299 BOOL
prs_uint16(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
);
2300 BOOL
prs_uint32(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
);
2301 BOOL
prs_uint8s(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint8
*data8s
, int len
);
2302 BOOL
prs_uint16s(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint16
*data16s
, int len
);
2303 BOOL
prs_uint32s(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint32
*data32s
, int len
);
2304 BOOL
prs_buffer2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, BUFFER2
*str
);
2305 BOOL
prs_string2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, STRING2
*str
);
2306 BOOL
prs_unistr2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, UNISTR2
*str
);
2307 BOOL
prs_unistr3(BOOL charmode
, char *name
, UNISTR3
*str
, prs_struct
*ps
, int depth
);
2308 BOOL
prs_unistr(char *name
, prs_struct
*ps
, int depth
, UNISTR
*str
);
2309 BOOL
prs_unistr(char *name
, prs_struct
*ps
, int depth
, UNISTR
*str
);
2310 BOOL
prs_string(char *name
, prs_struct
*ps
, int depth
, char *str
, int len
, int max_buf_size
);
2311 BOOL
prs_uint16_pre(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
, uint32
*offset
);
2312 BOOL
prs_uint16_post(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
,
2313 uint32 ptr_uint16
, uint32 start_offset
);
2314 BOOL
prs_uint32_pre(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
, uint32
*offset
);
2315 BOOL
prs_uint32_post(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
,
2316 uint32 ptr_uint32
, uint32 data_size
);
2317 int tdb_prs_store(TDB_CONTEXT
*tdb
, char *keystr
, prs_struct
*ps
);
2318 int tdb_prs_fetch(TDB_CONTEXT
*tdb
, char *keystr
, prs_struct
*ps
);
2320 /*The following definitions come from rpc_parse/parse_reg.c */
2322 void init_reg_q_open_hklm(REG_Q_OPEN_HKLM
*q_o
,
2323 uint16 unknown_0
, uint32 level
);
2324 BOOL
reg_io_q_open_hklm(char *desc
, REG_Q_OPEN_HKLM
*r_q
, prs_struct
*ps
, int depth
);
2325 BOOL
reg_io_r_open_hklm(char *desc
, REG_R_OPEN_HKLM
*r_r
, prs_struct
*ps
, int depth
);
2326 void init_reg_q_flush_key(REG_Q_FLUSH_KEY
*q_u
, POLICY_HND
*pol
);
2327 BOOL
reg_io_q_flush_key(char *desc
, REG_Q_FLUSH_KEY
*r_q
, prs_struct
*ps
, int depth
);
2328 BOOL
reg_io_r_flush_key(char *desc
, REG_R_FLUSH_KEY
*r_r
, prs_struct
*ps
, int depth
);
2329 void init_reg_q_create_key(REG_Q_CREATE_KEY
*q_c
, POLICY_HND
*hnd
,
2330 char *name
, char *class, SEC_ACCESS
*sam_access
,
2331 SEC_DESC_BUF
*sec_buf
);
2332 BOOL
reg_io_q_create_key(char *desc
, REG_Q_CREATE_KEY
*r_q
, prs_struct
*ps
, int depth
);
2333 BOOL
reg_io_r_create_key(char *desc
, REG_R_CREATE_KEY
*r_r
, prs_struct
*ps
, int depth
);
2334 void init_reg_q_delete_val(REG_Q_DELETE_VALUE
*q_c
, POLICY_HND
*hnd
,
2336 BOOL
reg_io_q_delete_val(char *desc
, REG_Q_DELETE_VALUE
*r_q
, prs_struct
*ps
, int depth
);
2337 BOOL
reg_io_r_delete_val(char *desc
, REG_R_DELETE_VALUE
*r_r
, prs_struct
*ps
, int depth
);
2338 void init_reg_q_delete_key(REG_Q_DELETE_KEY
*q_c
, POLICY_HND
*hnd
,
2340 BOOL
reg_io_q_delete_key(char *desc
, REG_Q_DELETE_KEY
*r_q
, prs_struct
*ps
, int depth
);
2341 BOOL
reg_io_r_delete_key(char *desc
, REG_R_DELETE_KEY
*r_r
, prs_struct
*ps
, int depth
);
2342 void init_reg_q_query_key(REG_Q_QUERY_KEY
*q_o
, POLICY_HND
*hnd
,
2343 uint32 max_class_len
);
2344 BOOL
reg_io_q_query_key(char *desc
, REG_Q_QUERY_KEY
*r_q
, prs_struct
*ps
, int depth
);
2345 BOOL
reg_io_r_query_key(char *desc
, REG_R_QUERY_KEY
*r_r
, prs_struct
*ps
, int depth
);
2346 void init_reg_q_unk_1a(REG_Q_UNK_1A
*q_o
, POLICY_HND
*hnd
);
2347 BOOL
reg_io_q_unk_1a(char *desc
, REG_Q_UNK_1A
*r_q
, prs_struct
*ps
, int depth
);
2348 BOOL
reg_io_r_unk_1a(char *desc
, REG_R_UNK_1A
*r_r
, prs_struct
*ps
, int depth
);
2349 void init_reg_q_open_hku(REG_Q_OPEN_HKU
*q_o
,
2350 uint16 unknown_0
, uint32 level
);
2351 BOOL
reg_io_q_open_hku(char *desc
, REG_Q_OPEN_HKU
*r_q
, prs_struct
*ps
, int depth
);
2352 BOOL
reg_io_r_open_hku(char *desc
, REG_R_OPEN_HKU
*r_r
, prs_struct
*ps
, int depth
);
2353 void init_reg_q_close(REG_Q_CLOSE
*q_c
, POLICY_HND
*hnd
);
2354 BOOL
reg_io_q_close(char *desc
, REG_Q_CLOSE
*q_u
, prs_struct
*ps
, int depth
);
2355 BOOL
reg_io_r_close(char *desc
, REG_R_CLOSE
*r_u
, prs_struct
*ps
, int depth
);
2356 void init_reg_q_set_key_sec(REG_Q_SET_KEY_SEC
*q_i
, POLICY_HND
*pol
, SEC_DESC_BUF
*sec_desc_buf
);
2357 BOOL
reg_io_q_set_key_sec(char *desc
, REG_Q_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2358 BOOL
reg_io_r_set_key_sec(char *desc
, REG_R_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2359 void init_reg_q_get_key_sec(REG_Q_GET_KEY_SEC
*q_i
, POLICY_HND
*pol
,
2360 uint32 sec_buf_size
, SEC_DESC_BUF
*psdb
);
2361 BOOL
reg_io_q_get_key_sec(char *desc
, REG_Q_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2362 BOOL
reg_io_r_get_key_sec(char *desc
, REG_R_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2363 BOOL
init_reg_q_info(REG_Q_INFO
*q_i
, POLICY_HND
*pol
, char* val_name
);
2364 BOOL
reg_io_q_info(char *desc
, REG_Q_INFO
*r_q
, prs_struct
*ps
, int depth
);
2365 BOOL
init_reg_r_info(uint32 include_keyval
, REG_R_INFO
*r_r
,
2366 BUFFER2
* buf
, uint32 type
, uint32 status
);
2367 BOOL
reg_io_r_info(char *desc
, REG_R_INFO
*r_r
, prs_struct
*ps
, int depth
);
2368 void init_reg_q_enum_val(REG_Q_ENUM_VALUE
*q_i
, POLICY_HND
*pol
,
2369 uint32 val_idx
, uint32 max_val_len
,
2370 uint32 max_buf_len
);
2371 BOOL
reg_io_q_enum_val(char *desc
, REG_Q_ENUM_VALUE
*q_q
, prs_struct
*ps
, int depth
);
2372 BOOL
reg_io_r_enum_val(char *desc
, REG_R_ENUM_VALUE
*r_q
, prs_struct
*ps
, int depth
);
2373 void init_reg_q_create_val(REG_Q_CREATE_VALUE
*q_i
, POLICY_HND
*pol
,
2374 char *val_name
, uint32 type
,
2376 BOOL
reg_io_q_create_val(char *desc
, REG_Q_CREATE_VALUE
*q_q
, prs_struct
*ps
, int depth
);
2377 BOOL
reg_io_r_create_val(char *desc
, REG_R_CREATE_VALUE
*r_q
, prs_struct
*ps
, int depth
);
2378 void init_reg_q_enum_key(REG_Q_ENUM_KEY
*q_i
, POLICY_HND
*pol
, uint32 key_idx
);
2379 BOOL
reg_io_q_enum_key(char *desc
, REG_Q_ENUM_KEY
*q_q
, prs_struct
*ps
, int depth
);
2380 BOOL
reg_io_r_enum_key(char *desc
, REG_R_ENUM_KEY
*r_q
, prs_struct
*ps
, int depth
);
2381 void init_reg_q_open_entry(REG_Q_OPEN_ENTRY
*r_q
, POLICY_HND
*pol
,
2382 char *key_name
, uint32 unk
);
2383 BOOL
reg_io_q_open_entry(char *desc
, REG_Q_OPEN_ENTRY
*r_q
, prs_struct
*ps
, int depth
);
2384 void init_reg_r_open_entry(REG_R_OPEN_ENTRY
*r_r
,
2385 POLICY_HND
*pol
, uint32 status
);
2386 BOOL
reg_io_r_open_entry(char *desc
, REG_R_OPEN_ENTRY
*r_r
, prs_struct
*ps
, int depth
);
2388 /*The following definitions come from rpc_parse/parse_rpc.c */
2390 void init_rpc_hdr(RPC_HDR
*hdr
, enum RPC_PKT_TYPE pkt_type
, uint8 flags
,
2391 uint32 call_id
, int data_len
, int auth_len
);
2392 BOOL
smb_io_rpc_hdr(char *desc
, RPC_HDR
*rpc
, prs_struct
*ps
, int depth
);
2393 void init_rpc_hdr_rb(RPC_HDR_RB
*rpc
,
2394 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
2395 uint32 num_elements
, uint16 context_id
, uint8 num_syntaxes
,
2396 RPC_IFACE
*abstract
, RPC_IFACE
*transfer
);
2397 BOOL
smb_io_rpc_hdr_rb(char *desc
, RPC_HDR_RB
*rpc
, prs_struct
*ps
, int depth
);
2398 void init_rpc_hdr_ba(RPC_HDR_BA
*rpc
,
2399 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
2401 uint8 num_results
, uint16 result
, uint16 reason
,
2402 RPC_IFACE
*transfer
);
2403 BOOL
smb_io_rpc_hdr_ba(char *desc
, RPC_HDR_BA
*rpc
, prs_struct
*ps
, int depth
);
2404 void init_rpc_hdr_req(RPC_HDR_REQ
*hdr
, uint32 alloc_hint
, uint16 opnum
);
2405 BOOL
smb_io_rpc_hdr_req(char *desc
, RPC_HDR_REQ
*rpc
, prs_struct
*ps
, int depth
);
2406 BOOL
smb_io_rpc_hdr_resp(char *desc
, RPC_HDR_RESP
*rpc
, prs_struct
*ps
, int depth
);
2407 BOOL
smb_io_rpc_hdr_fault(char *desc
, RPC_HDR_FAULT
*rpc
, prs_struct
*ps
, int depth
);
2408 void init_rpc_hdr_autha(RPC_HDR_AUTHA
*rai
,
2409 uint16 max_tsize
, uint16 max_rsize
,
2410 uint8 auth_type
, uint8 auth_level
,
2411 uint8 stub_type_len
);
2412 BOOL
smb_io_rpc_hdr_autha(char *desc
, RPC_HDR_AUTHA
*rai
, prs_struct
*ps
, int depth
);
2413 BOOL
rpc_hdr_auth_chk(RPC_HDR_AUTH
*rai
);
2414 void init_rpc_hdr_auth(RPC_HDR_AUTH
*rai
,
2415 uint8 auth_type
, uint8 auth_level
,
2416 uint8 stub_type_len
,
2418 BOOL
smb_io_rpc_hdr_auth(char *desc
, RPC_HDR_AUTH
*rai
, prs_struct
*ps
, int depth
);
2419 BOOL
rpc_auth_verifier_chk(RPC_AUTH_VERIFIER
*rav
,
2420 char *signature
, uint32 msg_type
);
2421 void init_rpc_auth_verifier(RPC_AUTH_VERIFIER
*rav
,
2422 char *signature
, uint32 msg_type
);
2423 BOOL
smb_io_rpc_auth_verifier(char *desc
, RPC_AUTH_VERIFIER
*rav
, prs_struct
*ps
, int depth
);
2424 void init_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG
*neg
,
2426 fstring myname
, fstring domain
);
2427 BOOL
smb_io_rpc_auth_ntlmssp_neg(char *desc
, RPC_AUTH_NTLMSSP_NEG
*neg
, prs_struct
*ps
, int depth
);
2428 void init_rpc_auth_ntlmssp_chal(RPC_AUTH_NTLMSSP_CHAL
*chl
,
2430 uint8 challenge
[8]);
2431 BOOL
smb_io_rpc_auth_ntlmssp_chal(char *desc
, RPC_AUTH_NTLMSSP_CHAL
*chl
, prs_struct
*ps
, int depth
);
2432 void init_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP
*rsp
,
2433 uchar lm_resp
[24], uchar nt_resp
[24],
2434 char *domain
, char *user
, char *wks
,
2436 BOOL
smb_io_rpc_auth_ntlmssp_resp(char *desc
, RPC_AUTH_NTLMSSP_RESP
*rsp
, prs_struct
*ps
, int depth
);
2437 BOOL
rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
, uint32 crc32
, uint32 seq_num
);
2438 void init_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
,
2439 uint32 ver
, uint32 crc32
, uint32 seq_num
);
2440 BOOL
smb_io_rpc_auth_ntlmssp_chk(char *desc
, RPC_AUTH_NTLMSSP_CHK
*chk
, prs_struct
*ps
, int depth
);
2442 /*The following definitions come from rpc_parse/parse_samr.c */
2445 void init_samr_q_close_hnd(SAMR_Q_CLOSE_HND
*q_c
, POLICY_HND
*hnd
);
2446 BOOL
samr_io_q_close_hnd(char *desc
, SAMR_Q_CLOSE_HND
*q_u
, prs_struct
*ps
, int depth
);
2447 BOOL
samr_io_r_close_hnd(char *desc
, SAMR_R_CLOSE_HND
*r_u
, prs_struct
*ps
, int depth
);
2448 void init_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN
*q_u
,
2449 POLICY_HND
*connect_pol
, uint32 rid
,
2451 BOOL
samr_io_q_open_domain(char *desc
, SAMR_Q_OPEN_DOMAIN
*q_u
, prs_struct
*ps
, int depth
);
2452 BOOL
samr_io_r_open_domain(char *desc
, SAMR_R_OPEN_DOMAIN
*r_u
, prs_struct
*ps
, int depth
);
2453 void init_samr_q_unknown_2c(SAMR_Q_UNKNOWN_2C
*q_u
, POLICY_HND
*user_pol
);
2454 BOOL
samr_io_q_unknown_2c(char *desc
, SAMR_Q_UNKNOWN_2C
*q_u
, prs_struct
*ps
, int depth
);
2455 void init_samr_r_unknown_2c(SAMR_R_UNKNOWN_2C
*q_u
, uint32 status
);
2456 BOOL
samr_io_r_unknown_2c(char *desc
, SAMR_R_UNKNOWN_2C
*r_u
, prs_struct
*ps
, int depth
);
2457 void init_samr_q_unknown_3(SAMR_Q_UNKNOWN_3
*q_u
,
2458 POLICY_HND
*user_pol
, uint16 switch_value
);
2459 BOOL
samr_io_q_unknown_3(char *desc
, SAMR_Q_UNKNOWN_3
*q_u
, prs_struct
*ps
, int depth
);
2460 void init_samr_q_query_dom_info(SAMR_Q_QUERY_DOMAIN_INFO
*q_u
,
2461 POLICY_HND
*domain_pol
, uint16 switch_value
);
2462 BOOL
samr_io_q_query_dom_info(char *desc
, SAMR_Q_QUERY_DOMAIN_INFO
*q_u
, prs_struct
*ps
, int depth
);
2463 void init_unk_info2(SAM_UNK_INFO_2
*u_2
, char *domain
, char *server
);
2464 BOOL
sam_io_unk_info2(char *desc
, SAM_UNK_INFO_2
*u_2
, prs_struct
*ps
, int depth
);
2465 void init_samr_r_query_dom_info(SAMR_R_QUERY_DOMAIN_INFO
*r_u
,
2466 uint16 switch_value
, SAM_UNK_CTR
*ctr
,
2468 BOOL
samr_io_r_query_dom_info(char *desc
, SAMR_R_QUERY_DOMAIN_INFO
*r_u
, prs_struct
*ps
, int depth
);
2469 void init_dom_sid3(DOM_SID3
*sid3
, uint16 unk_0
, uint16 unk_1
, DOM_SID
*sid
);
2470 void init_samr_r_unknown_3(SAMR_R_UNKNOWN_3
*r_u
,
2471 uint16 unknown_2
, uint16 unknown_3
,
2472 uint32 unknown_4
, uint16 unknown_6
, uint16 unknown_7
,
2473 int num_sid3s
, DOM_SID3 sid3
[MAX_SAM_SIDS
],
2475 BOOL
samr_io_r_unknown_3(char *desc
, SAMR_R_UNKNOWN_3
*r_u
, prs_struct
*ps
, int depth
);
2476 void init_samr_q_enum_dom_users(SAMR_Q_ENUM_DOM_USERS
*q_e
, POLICY_HND
*pol
,
2477 uint16 req_num_entries
, uint16 unk_0
,
2478 uint16 acb_mask
, uint16 unk_1
, uint32 size
);
2479 BOOL
samr_io_q_enum_dom_users(char *desc
, SAMR_Q_ENUM_DOM_USERS
*q_e
, prs_struct
*ps
, int depth
);
2480 void init_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS
*r_u
,
2481 uint16 total_num_entries
, uint16 unk_0
,
2482 uint32 num_sam_entries
, SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
], uint32 status
);
2483 BOOL
samr_io_r_enum_dom_users(char *desc
, SAMR_R_ENUM_DOM_USERS
*r_u
, prs_struct
*ps
, int depth
);
2484 void init_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES
*q_e
, POLICY_HND
*pol
, uint32 size
);
2485 BOOL
samr_io_q_enum_dom_aliases(char *desc
, SAMR_Q_ENUM_DOM_ALIASES
*q_e
, prs_struct
*ps
, int depth
);
2486 void init_samr_r_enum_dom_aliases(SAMR_R_ENUM_DOM_ALIASES
*r_u
,
2487 uint32 num_sam_entries
, SAM_USER_INFO_21 grps
[MAX_SAM_ENTRIES
],
2489 BOOL
samr_io_r_enum_dom_aliases(char *desc
, SAMR_R_ENUM_DOM_ALIASES
*r_u
, prs_struct
*ps
, int depth
);
2490 void init_samr_q_query_dispinfo(SAMR_Q_QUERY_DISPINFO
*q_e
, POLICY_HND
*pol
,
2491 uint16 switch_level
, uint32 start_idx
, uint32 size
);
2492 BOOL
samr_io_q_query_dispinfo(char *desc
, SAMR_Q_QUERY_DISPINFO
*q_e
, prs_struct
*ps
, int depth
);
2493 void init_sam_info_2(SAM_INFO_2
*sam
, uint32 acb_mask
,
2494 uint32 start_idx
, uint32 num_sam_entries
,
2495 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
2496 void init_sam_info_1(SAM_INFO_1
*sam
, uint32 acb_mask
,
2497 uint32 start_idx
, uint32 num_sam_entries
,
2498 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
2499 void init_samr_r_query_dispinfo(SAMR_R_QUERY_DISPINFO
*r_u
,
2500 uint16 switch_level
, SAM_INFO_CTR
*ctr
, uint32 status
);
2501 BOOL
samr_io_r_query_dispinfo(char *desc
, SAMR_R_QUERY_DISPINFO
*r_u
, prs_struct
*ps
, int depth
);
2502 void init_samr_q_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS
*q_e
, POLICY_HND
*pol
,
2503 uint16 switch_level
, uint32 start_idx
, uint32 size
);
2504 BOOL
samr_io_q_enum_dom_groups(char *desc
, SAMR_Q_ENUM_DOM_GROUPS
*q_e
, prs_struct
*ps
, int depth
);
2505 void init_samr_r_enum_dom_groups(SAMR_R_ENUM_DOM_GROUPS
*r_u
,
2506 uint32 start_idx
, uint32 num_sam_entries
,
2507 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
],
2509 BOOL
samr_io_r_enum_dom_groups(char *desc
, SAMR_R_ENUM_DOM_GROUPS
*r_u
, prs_struct
*ps
, int depth
);
2510 void init_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO
*q_e
,
2512 uint16 switch_level
);
2513 BOOL
samr_io_q_query_aliasinfo(char *desc
, SAMR_Q_QUERY_ALIASINFO
*q_e
, prs_struct
*ps
, int depth
);
2514 void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO
*r_u
, uint32 switch_level
,
2515 char* alias
, char* alias_desc
);
2516 BOOL
samr_io_r_query_aliasinfo(char *desc
, SAMR_R_QUERY_ALIASINFO
*r_u
, prs_struct
*ps
, int depth
);
2517 BOOL
samr_io_q_lookup_ids(char *desc
, SAMR_Q_LOOKUP_IDS
*q_u
, prs_struct
*ps
, int depth
);
2518 void init_samr_r_lookup_ids(SAMR_R_LOOKUP_IDS
*r_u
,
2519 uint32 num_rids
, uint32
*rid
, uint32 status
);
2520 BOOL
samr_io_r_lookup_ids(char *desc
, SAMR_R_LOOKUP_IDS
*r_u
, prs_struct
*ps
, int depth
);
2521 BOOL
samr_io_q_lookup_names(char *desc
, SAMR_Q_LOOKUP_NAMES
*q_u
, prs_struct
*ps
, int depth
);
2522 void init_samr_r_lookup_names(SAMR_R_LOOKUP_NAMES
*r_u
,
2523 uint32 num_rids
, uint32
*rid
, uint8
*type
, uint32 status
);
2524 BOOL
samr_io_r_lookup_names(char *desc
, SAMR_R_LOOKUP_NAMES
*r_u
, prs_struct
*ps
, int depth
);
2525 BOOL
samr_io_q_unknown_12(char *desc
, SAMR_Q_UNKNOWN_12
*q_u
, prs_struct
*ps
, int depth
);
2526 void init_samr_r_unknown_12(SAMR_R_UNKNOWN_12
*r_u
,
2527 uint32 num_aliases
, fstring
*als_name
, uint32
*num_als_usrs
,
2529 BOOL
samr_io_r_unknown_12(char *desc
, SAMR_R_UNKNOWN_12
*r_u
, prs_struct
*ps
, int depth
);
2530 void init_samr_q_open_user(SAMR_Q_OPEN_USER
*q_u
,
2532 uint32 unk_0
, uint32 rid
);
2533 BOOL
samr_io_q_open_user(char *desc
, SAMR_Q_OPEN_USER
*q_u
, prs_struct
*ps
, int depth
);
2534 BOOL
samr_io_r_open_user(char *desc
, SAMR_R_OPEN_USER
*r_u
, prs_struct
*ps
, int depth
);
2535 void init_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS
*q_u
,
2537 BOOL
samr_io_q_query_usergroups(char *desc
, SAMR_Q_QUERY_USERGROUPS
*q_u
, prs_struct
*ps
, int depth
);
2538 void init_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS
*r_u
,
2539 uint32 num_gids
, DOM_GID
*gid
, uint32 status
);
2540 BOOL
samr_io_r_query_usergroups(char *desc
, SAMR_R_QUERY_USERGROUPS
*r_u
, prs_struct
*ps
, int depth
);
2541 void init_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO
*q_u
,
2542 POLICY_HND
*hnd
, uint16 switch_value
);
2543 BOOL
samr_io_q_query_userinfo(char *desc
, SAMR_Q_QUERY_USERINFO
*q_u
, prs_struct
*ps
, int depth
);
2544 void init_sam_user_info10(SAM_USER_INFO_10
*usr
,
2546 BOOL
sam_io_user_info10(char *desc
, SAM_USER_INFO_10
*usr
, prs_struct
*ps
, int depth
);
2547 void init_sam_user_info11(SAM_USER_INFO_11
*usr
,
2553 BOOL
sam_io_user_info11(char *desc
, SAM_USER_INFO_11
*usr
, prs_struct
*ps
, int depth
);
2554 void init_sam_user_info21(SAM_USER_INFO_21
*usr
,
2556 NTTIME
*logoff_time
,
2557 NTTIME
*kickoff_time
,
2558 NTTIME
*pass_last_set_time
,
2559 NTTIME
*pass_can_change_time
,
2560 NTTIME
*pass_must_change_time
,
2582 void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO
*r_u
,
2583 uint16 switch_value
, void *info
, uint32 status
);
2584 BOOL
samr_io_r_query_userinfo(char *desc
, SAMR_R_QUERY_USERINFO
*r_u
, prs_struct
*ps
, int depth
);
2585 BOOL
samr_io_q_unknown_32(char *desc
, SAMR_Q_UNKNOWN_32
*q_u
, prs_struct
*ps
, int depth
);
2586 BOOL
samr_io_r_unknown_32(char *desc
, SAMR_R_UNKNOWN_32
*r_u
, prs_struct
*ps
, int depth
);
2587 void init_samr_q_connect(SAMR_Q_CONNECT
*q_u
,
2588 char *srv_name
, uint32 unknown_0
);
2589 BOOL
samr_io_q_connect(char *desc
, SAMR_Q_CONNECT
*q_u
, prs_struct
*ps
, int depth
);
2590 BOOL
samr_io_r_connect(char *desc
, SAMR_R_CONNECT
*r_u
, prs_struct
*ps
, int depth
);
2591 void init_samr_q_connect_anon(SAMR_Q_CONNECT_ANON
*q_u
);
2592 BOOL
samr_io_q_connect_anon(char *desc
, SAMR_Q_CONNECT_ANON
*q_u
, prs_struct
*ps
, int depth
);
2593 BOOL
samr_io_r_connect_anon(char *desc
, SAMR_R_CONNECT_ANON
*r_u
, prs_struct
*ps
, int depth
);
2594 void init_samr_q_open_alias(SAMR_Q_OPEN_ALIAS
*q_u
,
2595 uint32 unknown_0
, uint32 rid
);
2596 BOOL
samr_io_q_open_alias(char *desc
, SAMR_Q_OPEN_ALIAS
*q_u
, prs_struct
*ps
, int depth
);
2597 BOOL
samr_io_r_open_alias(char *desc
, SAMR_R_OPEN_ALIAS
*r_u
, prs_struct
*ps
, int depth
);
2598 void init_samr_q_unknown_12(SAMR_Q_UNKNOWN_12
*q_u
,
2599 POLICY_HND
*pol
, uint32 rid
,
2600 uint32 num_gids
, uint32
*gid
);
2601 void init_samr_q_unknown_21(SAMR_Q_UNKNOWN_21
*q_c
,
2602 POLICY_HND
*hnd
, uint16 unk_1
, uint16 unk_2
);
2603 void init_samr_q_unknown_13(SAMR_Q_UNKNOWN_13
*q_c
,
2604 POLICY_HND
*hnd
, uint16 unk_1
, uint16 unk_2
);
2605 void init_samr_q_unknown_38(SAMR_Q_UNKNOWN_38
*q_u
, char *srv_name
);
2606 BOOL
samr_io_q_unknown_38(char *desc
, SAMR_Q_UNKNOWN_38
*q_u
, prs_struct
*ps
, int depth
);
2607 void init_samr_r_unknown_38(SAMR_R_UNKNOWN_38
*r_u
);
2608 BOOL
samr_io_r_unknown_38(char *desc
, SAMR_R_UNKNOWN_38
*r_u
, prs_struct
*ps
, int depth
);
2609 void init_enc_passwd(SAMR_ENC_PASSWD
*pwd
, char pass
[512]);
2610 BOOL
samr_io_enc_passwd(char *desc
, SAMR_ENC_PASSWD
*pwd
, prs_struct
*ps
, int depth
);
2611 void init_enc_hash(SAMR_ENC_HASH
*hsh
, uchar hash
[16]);
2612 BOOL
samr_io_enc_hash(char *desc
, SAMR_ENC_HASH
*hsh
, prs_struct
*ps
, int depth
);
2613 void init_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER
*q_u
,
2614 char *dest_host
, char *user_name
,
2615 char nt_newpass
[516], uchar nt_oldhash
[16],
2616 char lm_newpass
[516], uchar lm_oldhash
[16]);
2617 BOOL
samr_io_q_chgpasswd_user(char *desc
, SAMR_Q_CHGPASSWD_USER
*q_u
, prs_struct
*ps
, int depth
);
2618 void init_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER
*r_u
, uint32 status
);
2619 BOOL
samr_io_r_chgpasswd_user(char *desc
, SAMR_R_CHGPASSWD_USER
*r_u
, prs_struct
*ps
, int depth
);
2620 BOOL
samr_io_q_lookup_domain(char* desc
, SAMR_Q_LOOKUP_DOMAIN
* q_u
, prs_struct
*ps
, int depth
);
2621 BOOL
init_samr_r_lookup_domain(SAMR_R_LOOKUP_DOMAIN
* r_u
,
2622 DOM_SID
*dom_sid
, uint32 status
);
2623 BOOL
samr_io_r_lookup_domain(char *desc
, SAMR_R_LOOKUP_DOMAIN
* r_u
,
2624 prs_struct
*ps
, int depth
);
2625 BOOL
samr_io_q_enum_domains(char *desc
, SAMR_Q_ENUM_DOMAINS
* q_e
,
2626 prs_struct
*ps
, int depth
);
2627 BOOL
init_samr_r_enum_domains(SAMR_R_ENUM_DOMAINS
* r_u
,
2628 uint32 next_idx
, fstring
* domains
, uint32 num_sam_entries
);
2629 BOOL
samr_io_r_enum_domains(char *desc
, SAMR_R_ENUM_DOMAINS
* r_u
,
2630 prs_struct
*ps
, int depth
);
2633 /*The following definitions come from rpc_parse/parse_sec.c */
2635 void init_sec_access(SEC_ACCESS
*t
, uint32 mask
);
2636 BOOL
sec_io_access(char *desc
, SEC_ACCESS
*t
, prs_struct
*ps
, int depth
);
2637 void init_sec_ace(SEC_ACE
*t
, DOM_SID
*sid
, uint8 type
, SEC_ACCESS mask
, uint8 flag
);
2638 BOOL
sec_io_ace(char *desc
, SEC_ACE
*psa
, prs_struct
*ps
, int depth
);
2639 SEC_ACL
*make_sec_acl(uint16 revision
, int num_aces
, SEC_ACE
*ace_list
);
2640 SEC_ACL
*dup_sec_acl( SEC_ACL
*src
);
2641 void free_sec_acl(SEC_ACL
**ppsa
);
2642 BOOL
sec_io_acl(char *desc
, SEC_ACL
**ppsa
, prs_struct
*ps
, int depth
);
2643 size_t sec_desc_size(SEC_DESC
*psd
);
2644 SEC_DESC
*make_sec_desc(uint16 revision
, uint16 type
,
2645 DOM_SID
*owner_sid
, DOM_SID
*grp_sid
,
2646 SEC_ACL
*sacl
, SEC_ACL
*dacl
, size_t *sd_size
);
2647 SEC_DESC
*dup_sec_desc( SEC_DESC
*src
);
2648 void free_sec_desc(SEC_DESC
**ppsd
);
2649 SEC_DESC
*make_standard_sec_desc(DOM_SID
*owner_sid
, DOM_SID
*grp_sid
,
2650 SEC_ACL
*dacl
, size_t *sd_size
);
2651 BOOL
sec_io_desc(char *desc
, SEC_DESC
**ppsd
, prs_struct
*ps
, int depth
);
2652 SEC_DESC_BUF
*make_sec_desc_buf(size_t len
, SEC_DESC
*sec_desc
);
2653 SEC_DESC_BUF
*dup_sec_desc_buf(SEC_DESC_BUF
*src
);
2654 void free_sec_desc_buf(SEC_DESC_BUF
**ppsdb
);
2655 BOOL
sec_io_desc_buf(char *desc
, SEC_DESC_BUF
**ppsdb
, prs_struct
*ps
, int depth
);
2657 /*The following definitions come from rpc_parse/parse_spoolss.c */
2659 BOOL
make_systemtime(SYSTEMTIME
*systime
, struct tm
*unixtime
);
2660 BOOL
smb_io_notify_info_data_strings(char *desc
,SPOOL_NOTIFY_INFO_DATA
*data
,
2661 prs_struct
*ps
, int depth
);
2662 void free_spoolss_devmode(DEVICEMODE
*devmode
);
2663 BOOL
make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX
*q_u
,
2664 const fstring printername
,
2665 const fstring datatype
,
2666 uint32 access_required
,
2667 const fstring clientname
,
2668 const fstring user_name
);
2669 BOOL
spoolss_io_q_open_printer_ex(char *desc
, SPOOL_Q_OPEN_PRINTER_EX
*q_u
, prs_struct
*ps
, int depth
);
2670 void free_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX
*q_u
);
2671 BOOL
spoolss_io_r_open_printer_ex(char *desc
, SPOOL_R_OPEN_PRINTER_EX
*r_u
, prs_struct
*ps
, int depth
);
2672 BOOL
make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA
*q_u
,
2673 const POLICY_HND
*handle
,
2674 const UNISTR2
*valuename
,
2676 BOOL
spoolss_io_q_getprinterdata(char *desc
, SPOOL_Q_GETPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
2677 BOOL
spoolss_io_r_getprinterdata(char *desc
, SPOOL_R_GETPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
2678 BOOL
make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER
*q_u
, POLICY_HND
*hnd
);
2679 BOOL
spoolss_io_q_deleteprinter(char *desc
, SPOOL_Q_DELETEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2680 BOOL
spoolss_io_r_deleteprinter(char *desc
, SPOOL_R_DELETEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2681 BOOL
spoolss_io_q_closeprinter(char *desc
, SPOOL_Q_CLOSEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2682 BOOL
spoolss_io_r_closeprinter(char *desc
, SPOOL_R_CLOSEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2683 BOOL
spoolss_io_q_startdocprinter(char *desc
, SPOOL_Q_STARTDOCPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2684 BOOL
spoolss_io_r_startdocprinter(char *desc
, SPOOL_R_STARTDOCPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2685 BOOL
spoolss_io_q_enddocprinter(char *desc
, SPOOL_Q_ENDDOCPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2686 BOOL
spoolss_io_r_enddocprinter(char *desc
, SPOOL_R_ENDDOCPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2687 BOOL
spoolss_io_q_startpageprinter(char *desc
, SPOOL_Q_STARTPAGEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2688 BOOL
spoolss_io_r_startpageprinter(char *desc
, SPOOL_R_STARTPAGEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2689 BOOL
spoolss_io_q_endpageprinter(char *desc
, SPOOL_Q_ENDPAGEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2690 BOOL
spoolss_io_r_endpageprinter(char *desc
, SPOOL_R_ENDPAGEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2691 BOOL
spoolss_io_q_writeprinter(char *desc
, SPOOL_Q_WRITEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2692 BOOL
spoolss_io_r_writeprinter(char *desc
, SPOOL_R_WRITEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2693 BOOL
spoolss_io_q_rffpcnex(char *desc
, SPOOL_Q_RFFPCNEX
*q_u
, prs_struct
*ps
, int depth
);
2694 BOOL
spoolss_io_r_rffpcnex(char *desc
, SPOOL_R_RFFPCNEX
*r_u
, prs_struct
*ps
, int depth
);
2695 BOOL
spoolss_io_q_rfnpcnex(char *desc
, SPOOL_Q_RFNPCNEX
*q_u
, prs_struct
*ps
, int depth
);
2696 BOOL
spoolss_io_r_rfnpcnex(char *desc
, SPOOL_R_RFNPCNEX
*r_u
, prs_struct
*ps
, int depth
);
2697 BOOL
new_smb_io_printer_info_0(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_0
*info
, int depth
);
2698 BOOL
new_smb_io_printer_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_1
*info
, int depth
);
2699 BOOL
new_smb_io_printer_info_2(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_2
*info
, int depth
);
2700 BOOL
new_smb_io_printer_info_3(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_3
*info
, int depth
);
2701 BOOL
new_smb_io_printer_driver_info_1(char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_1
*info
, int depth
) ;
2702 BOOL
new_smb_io_printer_driver_info_2(char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_2
*info
, int depth
) ;
2703 BOOL
new_smb_io_printer_driver_info_3(char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_3
*info
, int depth
);
2704 BOOL
new_smb_io_job_info_1(char *desc
, NEW_BUFFER
*buffer
, JOB_INFO_1
*info
, int depth
);
2705 BOOL
new_smb_io_job_info_2(char *desc
, NEW_BUFFER
*buffer
, JOB_INFO_2
*info
, int depth
);
2706 BOOL
new_smb_io_form_1(char *desc
, NEW_BUFFER
*buffer
, FORM_1
*info
, int depth
);
2707 void new_spoolss_move_buffer(NEW_BUFFER
*src
, NEW_BUFFER
**dest
);
2708 BOOL
new_spoolss_allocate_buffer(NEW_BUFFER
**buffer
);
2709 void new_spoolss_free_buffer(NEW_BUFFER
*buffer
);
2710 uint32
new_get_buffer_size(NEW_BUFFER
*buffer
);
2711 BOOL
new_smb_io_driverdir_1(char *desc
, NEW_BUFFER
*buffer
, DRIVER_DIRECTORY_1
*info
, int depth
);
2712 BOOL
new_smb_io_port_1(char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_1
*info
, int depth
);
2713 BOOL
new_smb_io_port_2(char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_2
*info
, int depth
);
2714 BOOL
smb_io_printprocessor_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTPROCESSOR_1
*info
, int depth
);
2715 BOOL
smb_io_printprocdatatype_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTPROCDATATYPE_1
*info
, int depth
);
2716 BOOL
smb_io_printmonitor_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTMONITOR_1
*info
, int depth
);
2717 BOOL
smb_io_printmonitor_info_2(char *desc
, NEW_BUFFER
*buffer
, PRINTMONITOR_2
*info
, int depth
);
2718 uint32
spoolss_size_printer_info_0(PRINTER_INFO_0
*info
);
2719 uint32
spoolss_size_printer_info_1(PRINTER_INFO_1
*info
);
2720 uint32
spoolss_size_printer_info_2(PRINTER_INFO_2
*info
);
2721 uint32
spoolss_size_printer_info_3(PRINTER_INFO_3
*info
);
2722 uint32
spoolss_size_printer_driver_info_1(DRIVER_INFO_1
*info
);
2723 uint32
spoolss_size_printer_driver_info_2(DRIVER_INFO_2
*info
);
2724 uint32
spoolss_size_printer_driver_info_3(DRIVER_INFO_3
*info
);
2725 uint32
spoolss_size_job_info_1(JOB_INFO_1
*info
);
2726 uint32
spoolss_size_job_info_2(JOB_INFO_2
*info
);
2727 uint32
spoolss_size_form_1(FORM_1
*info
);
2728 uint32
spoolss_size_port_info_1(PORT_INFO_1
*info
);
2729 uint32
spoolss_size_driverdir_info_1(DRIVER_DIRECTORY_1
*info
);
2730 uint32
spoolss_size_port_info_2(PORT_INFO_2
*info
);
2731 uint32
spoolss_size_printprocessor_info_1(PRINTPROCESSOR_1
*info
);
2732 uint32
spoolss_size_printprocdatatype_info_1(PRINTPROCDATATYPE_1
*info
);
2733 uint32
spoolss_size_printmonitor_info_1(PRINTMONITOR_1
*info
);
2734 uint32
spoolss_size_printmonitor_info_2(PRINTMONITOR_2
*info
);
2735 BOOL
make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2
*q_u
,
2736 const POLICY_HND
*hnd
,
2737 const fstring architecture
,
2738 uint32 level
, uint32 clientmajor
, uint32 clientminor
,
2739 NEW_BUFFER
*buffer
, uint32 offered
);
2740 BOOL
spoolss_io_q_getprinterdriver2(char *desc
, SPOOL_Q_GETPRINTERDRIVER2
*q_u
, prs_struct
*ps
, int depth
);
2741 BOOL
spoolss_io_r_getprinterdriver2(char *desc
, SPOOL_R_GETPRINTERDRIVER2
*r_u
, prs_struct
*ps
, int depth
);
2742 BOOL
make_spoolss_q_enumprinters(SPOOL_Q_ENUMPRINTERS
*q_u
, uint32 flags
,
2743 fstring servername
, uint32 level
,
2744 NEW_BUFFER
*buffer
, uint32 offered
);
2745 BOOL
spoolss_io_q_enumprinters(char *desc
, SPOOL_Q_ENUMPRINTERS
*q_u
, prs_struct
*ps
, int depth
);
2746 BOOL
new_spoolss_io_r_enumprinters(char *desc
, SPOOL_R_ENUMPRINTERS
*r_u
, prs_struct
*ps
, int depth
);
2747 BOOL
spoolss_io_r_getprinter(char *desc
, SPOOL_R_GETPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2748 BOOL
spoolss_io_q_getprinter(char *desc
, SPOOL_Q_GETPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2749 BOOL
make_spoolss_q_getprinter(SPOOL_Q_GETPRINTER
*q_u
, const POLICY_HND
*hnd
, uint32 level
,
2750 NEW_BUFFER
*buffer
, uint32 offered
);
2751 BOOL
spoolss_io_r_setprinter(char *desc
, SPOOL_R_SETPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2752 void free_spoolss_q_setprinter(SPOOL_Q_SETPRINTER
*q_u
);
2753 BOOL
spoolss_io_q_setprinter(char *desc
, SPOOL_Q_SETPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2754 BOOL
spoolss_io_r_fcpn(char *desc
, SPOOL_R_FCPN
*r_u
, prs_struct
*ps
, int depth
);
2755 BOOL
spoolss_io_q_fcpn(char *desc
, SPOOL_Q_FCPN
*q_u
, prs_struct
*ps
, int depth
);
2756 BOOL
spoolss_io_r_addjob(char *desc
, SPOOL_R_ADDJOB
*r_u
, prs_struct
*ps
, int depth
);
2757 BOOL
spoolss_io_q_addjob(char *desc
, SPOOL_Q_ADDJOB
*q_u
, prs_struct
*ps
, int depth
);
2758 BOOL
spoolss_io_r_enumjobs(char *desc
, SPOOL_R_ENUMJOBS
*r_u
, prs_struct
*ps
, int depth
);
2759 BOOL
make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS
*q_u
, const POLICY_HND
*hnd
,
2765 BOOL
spoolss_io_q_enumjobs(char *desc
, SPOOL_Q_ENUMJOBS
*q_u
, prs_struct
*ps
, int depth
);
2766 BOOL
spoolss_io_r_schedulejob(char *desc
, SPOOL_R_SCHEDULEJOB
*r_u
, prs_struct
*ps
, int depth
);
2767 BOOL
spoolss_io_q_schedulejob(char *desc
, SPOOL_Q_SCHEDULEJOB
*q_u
, prs_struct
*ps
, int depth
);
2768 BOOL
spoolss_io_r_setjob(char *desc
, SPOOL_R_SETJOB
*r_u
, prs_struct
*ps
, int depth
);
2769 BOOL
spoolss_io_q_setjob(char *desc
, SPOOL_Q_SETJOB
*q_u
, prs_struct
*ps
, int depth
);
2770 BOOL
new_spoolss_io_r_enumprinterdrivers(char *desc
, SPOOL_R_ENUMPRINTERDRIVERS
*r_u
, prs_struct
*ps
, int depth
);
2771 BOOL
make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS
*q_u
,
2773 const char *environment
,
2775 NEW_BUFFER
*buffer
, uint32 offered
);
2776 BOOL
spoolss_io_q_enumprinterdrivers(char *desc
, SPOOL_Q_ENUMPRINTERDRIVERS
*q_u
, prs_struct
*ps
, int depth
);
2777 BOOL
spoolss_io_q_enumforms(char *desc
, SPOOL_Q_ENUMFORMS
*q_u
, prs_struct
*ps
, int depth
);
2778 BOOL
new_spoolss_io_r_enumforms(char *desc
, SPOOL_R_ENUMFORMS
*r_u
, prs_struct
*ps
, int depth
);
2779 BOOL
new_spoolss_io_r_enumports(char *desc
, SPOOL_R_ENUMPORTS
*r_u
, prs_struct
*ps
, int depth
);
2780 BOOL
spoolss_io_q_enumports(char *desc
, SPOOL_Q_ENUMPORTS
*q_u
, prs_struct
*ps
, int depth
);
2781 BOOL
spool_io_printer_info_level_1(char *desc
, SPOOL_PRINTER_INFO_LEVEL_1
*il
, prs_struct
*ps
, int depth
);
2782 BOOL
spool_io_printer_info_level_3(char *desc
, SPOOL_PRINTER_INFO_LEVEL_3
*il
, prs_struct
*ps
, int depth
);
2783 BOOL
spool_io_printer_info_level_2(char *desc
, SPOOL_PRINTER_INFO_LEVEL_2
*il
, prs_struct
*ps
, int depth
);
2784 BOOL
spool_io_printer_info_level(char *desc
, SPOOL_PRINTER_INFO_LEVEL
*il
, prs_struct
*ps
, int depth
);
2785 BOOL
spoolss_io_q_addprinterex(char *desc
, SPOOL_Q_ADDPRINTEREX
*q_u
, prs_struct
*ps
, int depth
);
2786 BOOL
spoolss_io_r_addprinterex(char *desc
, SPOOL_R_ADDPRINTEREX
*r_u
, prs_struct
*ps
, int depth
);
2787 BOOL
spool_io_printer_driver_info_level_3(char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
**q_u
,
2788 prs_struct
*ps
, int depth
);
2789 void free_spool_printer_driver_info_level_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
**q_u
);
2790 BOOL
spool_io_printer_driver_info_level_6(char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6
**q_u
,
2791 prs_struct
*ps
, int depth
);
2792 void free_spool_printer_driver_info_level_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6
**q_u
);
2793 BOOL
smb_io_unibuffer(char *desc
, UNISTR2
*buffer
, prs_struct
*ps
, int depth
);
2794 BOOL
spool_io_printer_driver_info_level(char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL
*il
, prs_struct
*ps
, int depth
);
2795 void free_spool_printer_driver_info_level(SPOOL_PRINTER_DRIVER_INFO_LEVEL
*il
);
2796 BOOL
spoolss_io_q_addprinterdriver(char *desc
, SPOOL_Q_ADDPRINTERDRIVER
*q_u
, prs_struct
*ps
, int depth
);
2797 void free_spoolss_q_addprinterdriver(SPOOL_Q_ADDPRINTERDRIVER
*q_u
);
2798 BOOL
spoolss_io_r_addprinterdriver(char *desc
, SPOOL_R_ADDPRINTERDRIVER
*q_u
, prs_struct
*ps
, int depth
);
2799 BOOL
uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
*uni
,
2800 NT_PRINTER_DRIVER_INFO_LEVEL_3
**asc
);
2801 BOOL
uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6
*uni
,
2802 NT_PRINTER_DRIVER_INFO_LEVEL_6
**asc
);
2803 BOOL
uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2
*uni
,
2804 NT_PRINTER_INFO_LEVEL_2
**asc
);
2805 BOOL
make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR
*q_u
,
2806 fstring servername
, fstring env_name
, uint32 level
,
2807 NEW_BUFFER
*buffer
, uint32 offered
);
2808 BOOL
spoolss_io_q_getprinterdriverdir(char *desc
, SPOOL_Q_GETPRINTERDRIVERDIR
*q_u
, prs_struct
*ps
, int depth
);
2809 BOOL
spoolss_io_r_getprinterdriverdir(char *desc
, SPOOL_R_GETPRINTERDRIVERDIR
*r_u
, prs_struct
*ps
, int depth
);
2810 BOOL
spoolss_io_r_enumprintprocessors(char *desc
, SPOOL_R_ENUMPRINTPROCESSORS
*r_u
, prs_struct
*ps
, int depth
);
2811 BOOL
spoolss_io_q_enumprintprocessors(char *desc
, SPOOL_Q_ENUMPRINTPROCESSORS
*q_u
, prs_struct
*ps
, int depth
);
2812 BOOL
spoolss_io_r_enumprintprocdatatypes(char *desc
, SPOOL_R_ENUMPRINTPROCDATATYPES
*r_u
, prs_struct
*ps
, int depth
);
2813 BOOL
spoolss_io_q_enumprintprocdatatypes(char *desc
, SPOOL_Q_ENUMPRINTPROCDATATYPES
*q_u
, prs_struct
*ps
, int depth
);
2814 BOOL
spoolss_io_q_enumprintmonitors(char *desc
, SPOOL_Q_ENUMPRINTMONITORS
*q_u
, prs_struct
*ps
, int depth
);
2815 BOOL
spoolss_io_r_enumprintmonitors(char *desc
, SPOOL_R_ENUMPRINTMONITORS
*r_u
, prs_struct
*ps
, int depth
);
2816 BOOL
spoolss_io_r_enumprinterdata(char *desc
, SPOOL_R_ENUMPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
2817 BOOL
spoolss_io_q_enumprinterdata(char *desc
, SPOOL_Q_ENUMPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
2818 BOOL
make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA
*q_u
,
2819 const POLICY_HND
*hnd
,
2820 uint32 idx
, uint32 valuelen
, uint32 datalen
);
2821 BOOL
spoolss_io_q_setprinterdata(char *desc
, SPOOL_Q_SETPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
2822 void free_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA
*q_u
);
2823 BOOL
spoolss_io_r_setprinterdata(char *desc
, SPOOL_R_SETPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
2824 BOOL
convert_specific_param(NT_PRINTER_PARAM
**param
, const UNISTR2
*value
,
2825 uint32 type
, const uint8
*data
, uint32 len
);
2826 BOOL
spoolss_io_q_addform(char *desc
, SPOOL_Q_ADDFORM
*q_u
, prs_struct
*ps
, int depth
);
2827 BOOL
spoolss_io_r_addform(char *desc
, SPOOL_R_ADDFORM
*r_u
, prs_struct
*ps
, int depth
);
2828 BOOL
spoolss_io_q_setform(char *desc
, SPOOL_Q_SETFORM
*q_u
, prs_struct
*ps
, int depth
);
2829 BOOL
spoolss_io_r_setform(char *desc
, SPOOL_R_SETFORM
*r_u
, prs_struct
*ps
, int depth
);
2830 BOOL
spoolss_io_r_getjob(char *desc
, SPOOL_R_GETJOB
*r_u
, prs_struct
*ps
, int depth
);
2831 BOOL
spoolss_io_q_getjob(char *desc
, SPOOL_Q_GETJOB
*q_u
, prs_struct
*ps
, int depth
);
2832 void free_devmode(DEVICEMODE
*devmode
);
2833 void free_printer_info_1(PRINTER_INFO_1
*printer
);
2834 void free_printer_info_2(PRINTER_INFO_2
*printer
);
2835 void free_printer_info_3(PRINTER_INFO_3
*printer
);
2836 void free_spool_printer_info_1(SPOOL_PRINTER_INFO_LEVEL_1
*printer
);
2837 void free_spool_printer_info_2(SPOOL_PRINTER_INFO_LEVEL_2
*printer
);
2838 void free_spool_printer_info_3(SPOOL_PRINTER_INFO_LEVEL_3
*printer
);
2839 void free_spool_printer_info_level(SPOOL_PRINTER_INFO_LEVEL
*pil
);
2840 void free_print2_array(uint32 num_entries
, PRINTER_INFO_2
**entries
);
2841 void free_print1_array(uint32 num_entries
, PRINTER_INFO_1
**entries
);
2842 void free_job1_array(uint32 num_entries
, JOB_INFO_1
**entries
);
2843 void free_job_info_2(JOB_INFO_2
*job
);
2844 void free_job2_array(uint32 num_entries
, JOB_INFO_2
**entries
);
2845 BOOL
spoolss_io_q_replyopenprinter(char *desc
, SPOOL_Q_REPLYOPENPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2846 BOOL
spoolss_io_r_replyopenprinter(char *desc
, SPOOL_R_REPLYOPENPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2847 BOOL
spoolss_io_q_replycloseprinter(char *desc
, SPOOL_Q_REPLYCLOSEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2848 BOOL
spoolss_io_r_replycloseprinter(char *desc
, SPOOL_R_REPLYCLOSEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2850 /*The following definitions come from rpc_parse/parse_srv.c */
2852 void init_srv_share_info1_str(SH_INFO_1_STR
*sh1
, char *net_name
, char *remark
);
2853 void init_srv_share_info1(SH_INFO_1
*sh1
, char *net_name
, uint32 type
, char *remark
);
2854 void init_srv_share_info2_str(SH_INFO_2_STR
*sh2
,
2855 char *net_name
, char *remark
,
2856 char *path
, char *passwd
);
2857 void init_srv_share_info2(SH_INFO_2
*sh2
,
2858 char *net_name
, uint32 type
, char *remark
,
2859 uint32 perms
, uint32 max_uses
, uint32 num_uses
,
2860 char *path
, char *passwd
);
2861 void free_srv_share_info_ctr(SRV_SHARE_INFO_CTR
*ctr
);
2862 void free_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM
*q_n
);
2863 void free_srv_r_net_share_enum(SRV_R_NET_SHARE_ENUM
*r_n
);
2864 void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM
*q_n
,
2865 char *srv_name
, uint32 info_level
,
2866 uint32 preferred_len
, ENUM_HND
*hnd
);
2867 BOOL
srv_io_q_net_share_enum(char *desc
, SRV_Q_NET_SHARE_ENUM
*q_n
, prs_struct
*ps
, int depth
);
2868 BOOL
srv_io_r_net_share_enum(char *desc
, SRV_R_NET_SHARE_ENUM
*r_n
, prs_struct
*ps
, int depth
);
2869 void free_srv_q_net_share_get_info(SRV_Q_NET_SHARE_GET_INFO
*q_n
);
2870 void free_srv_r_net_share_get_info(SRV_R_NET_SHARE_GET_INFO
*r_n
);
2871 BOOL
srv_io_q_net_share_get_info(char *desc
, SRV_Q_NET_SHARE_GET_INFO
*q_n
, prs_struct
*ps
, int depth
);
2872 BOOL
srv_io_r_net_share_get_info(char *desc
, SRV_R_NET_SHARE_GET_INFO
*r_n
, prs_struct
*ps
, int depth
);
2873 void init_srv_sess_info0_str(SESS_INFO_0_STR
*ss0
, char *name
);
2874 void init_srv_sess_info0(SESS_INFO_0
*ss0
, char *name
);
2875 void init_srv_sess_info1_str(SESS_INFO_1_STR
*ss1
, char *name
, char *user
);
2876 void init_srv_sess_info1(SESS_INFO_1
*ss1
,
2877 char *name
, char *user
,
2878 uint32 num_opens
, uint32 open_time
, uint32 idle_time
,
2880 void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM
*q_n
,
2881 char *srv_name
, char *qual_name
,
2882 uint32 sess_level
, SRV_SESS_INFO_CTR
*ctr
,
2883 uint32 preferred_len
,
2885 BOOL
srv_io_q_net_sess_enum(char *desc
, SRV_Q_NET_SESS_ENUM
*q_n
, prs_struct
*ps
, int depth
);
2886 BOOL
srv_io_r_net_sess_enum(char *desc
, SRV_R_NET_SESS_ENUM
*r_n
, prs_struct
*ps
, int depth
);
2887 void init_srv_conn_info0(CONN_INFO_0
*ss0
, uint32 id
);
2888 void init_srv_conn_info1_str(CONN_INFO_1_STR
*ss1
, char *usr_name
, char *net_name
);
2889 void init_srv_conn_info1(CONN_INFO_1
*ss1
,
2890 uint32 id
, uint32 type
,
2891 uint32 num_opens
, uint32 num_users
, uint32 open_time
,
2892 char *usr_name
, char *net_name
);
2893 void init_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM
*q_n
,
2894 char *srv_name
, char *qual_name
,
2895 uint32 conn_level
, SRV_CONN_INFO_CTR
*ctr
,
2896 uint32 preferred_len
,
2898 BOOL
srv_io_q_net_conn_enum(char *desc
, SRV_Q_NET_CONN_ENUM
*q_n
, prs_struct
*ps
, int depth
);
2899 BOOL
srv_io_r_net_conn_enum(char *desc
, SRV_R_NET_CONN_ENUM
*r_n
, prs_struct
*ps
, int depth
);
2900 void init_srv_file_info3_str(FILE_INFO_3_STR
*fi3
, char *user_name
, char *path_name
);
2901 void init_srv_file_info3(FILE_INFO_3
*fl3
,
2902 uint32 id
, uint32 perms
, uint32 num_locks
,
2903 char *path_name
, char *user_name
);
2904 void init_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM
*q_n
,
2905 char *srv_name
, char *qual_name
,
2906 uint32 file_level
, SRV_FILE_INFO_CTR
*ctr
,
2907 uint32 preferred_len
,
2909 BOOL
srv_io_q_net_file_enum(char *desc
, SRV_Q_NET_FILE_ENUM
*q_n
, prs_struct
*ps
, int depth
);
2910 BOOL
srv_io_r_net_file_enum(char *desc
, SRV_R_NET_FILE_ENUM
*r_n
, prs_struct
*ps
, int depth
);
2911 void init_srv_info_101(SRV_INFO_101
*sv101
, uint32 platform_id
, char *name
,
2912 uint32 ver_major
, uint32 ver_minor
,
2913 uint32 srv_type
, char *comment
);
2914 void init_srv_info_102(SRV_INFO_102
*sv102
, uint32 platform_id
, char *name
,
2915 char *comment
, uint32 ver_major
, uint32 ver_minor
,
2916 uint32 srv_type
, uint32 users
, uint32 disc
, uint32 hidden
,
2917 uint32 announce
, uint32 ann_delta
, uint32 licenses
,
2919 void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO
*srv
,
2920 char *server_name
, uint32 switch_value
);
2921 BOOL
srv_io_q_net_srv_get_info(char *desc
, SRV_Q_NET_SRV_GET_INFO
*q_n
, prs_struct
*ps
, int depth
);
2922 void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO
*srv
,
2923 uint32 switch_value
, SRV_INFO_CTR
*ctr
, uint32 status
);
2924 BOOL
srv_io_r_net_srv_get_info(char *desc
, SRV_R_NET_SRV_GET_INFO
*r_n
, prs_struct
*ps
, int depth
);
2925 BOOL
srv_io_q_net_remote_tod(char *desc
, SRV_Q_NET_REMOTE_TOD
*q_n
, prs_struct
*ps
, int depth
);
2926 void init_time_of_day_info(TIME_OF_DAY_INFO
*tod
, uint32 elapsedt
, uint32 msecs
,
2927 uint32 hours
, uint32 mins
, uint32 secs
, uint32 hunds
,
2928 uint32 zone
, uint32 tintervals
, uint32 day
,
2929 uint32 month
, uint32 year
, uint32 weekday
);
2930 BOOL
srv_io_r_net_remote_tod(char *desc
, SRV_R_NET_REMOTE_TOD
*r_n
, prs_struct
*ps
, int depth
);
2932 /*The following definitions come from rpc_parse/parse_wks.c */
2934 void init_wks_q_query_info(WKS_Q_QUERY_INFO
*q_u
,
2935 char *server
, uint16 switch_value
) ;
2936 BOOL
wks_io_q_query_info(char *desc
, WKS_Q_QUERY_INFO
*q_u
, prs_struct
*ps
, int depth
);
2937 void init_wks_info_100(WKS_INFO_100
*inf
,
2938 uint32 platform_id
, uint32 ver_major
, uint32 ver_minor
,
2939 char *my_name
, char *domain_name
);
2940 void init_wks_r_query_info(WKS_R_QUERY_INFO
*r_u
,
2941 uint32 switch_value
, WKS_INFO_100
*wks100
,
2943 BOOL
wks_io_r_query_info(char *desc
, WKS_R_QUERY_INFO
*r_u
, prs_struct
*ps
, int depth
);
2945 /*The following definitions come from rpc_server/srv_dfs.c */
2947 BOOL
api_netdfs_rpc(pipes_struct
*p
);
2949 /*The following definitions come from rpc_server/srv_lsa.c */
2952 BOOL
api_ntlsa_rpc(pipes_struct
*p
);
2955 /*The following definitions come from rpc_server/srv_lsa_hnd.c */
2958 void init_lsa_policy_hnd(void);
2959 BOOL
open_lsa_policy_hnd(POLICY_HND
*hnd
);
2960 int find_lsa_policy_by_hnd(POLICY_HND
*hnd
);
2961 BOOL
set_lsa_policy_samr_rid(POLICY_HND
*hnd
, uint32 rid
);
2962 BOOL
set_lsa_policy_samr_pol_status(POLICY_HND
*hnd
, uint32 pol_status
);
2963 BOOL
set_lsa_policy_samr_sid(POLICY_HND
*hnd
, DOM_SID
*sid
);
2964 BOOL
get_lsa_policy_samr_sid(POLICY_HND
*hnd
, DOM_SID
*sid
);
2965 uint32
get_lsa_policy_samr_rid(POLICY_HND
*hnd
);
2966 BOOL
set_lsa_policy_reg_name(POLICY_HND
*hnd
, fstring name
);
2967 BOOL
close_lsa_policy_hnd(POLICY_HND
*hnd
);
2970 /*The following definitions come from rpc_server/srv_netlog.c */
2973 BOOL
api_netlog_rpc(pipes_struct
*p
);
2976 /*The following definitions come from rpc_server/srv_pipe.c */
2979 BOOL
create_next_pdu(pipes_struct
*p
);
2980 BOOL
api_pipe_bind_auth_resp(pipes_struct
*p
, prs_struct
*rpc_in_p
);
2981 BOOL
setup_fault_pdu(pipes_struct
*p
);
2982 BOOL
check_bind_req(char* pipe_name
, RPC_IFACE
* abstract
,
2983 RPC_IFACE
* transfer
);
2984 BOOL
api_pipe_bind_req(pipes_struct
*p
, prs_struct
*rpc_in_p
);
2985 BOOL
api_pipe_auth_process(pipes_struct
*p
, prs_struct
*rpc_in
);
2986 BOOL
api_pipe_request(pipes_struct
*p
);
2987 BOOL
api_rpcTNP(pipes_struct
*p
, char *rpc_name
,
2988 struct api_struct
*api_rpc_cmds
);
2991 /*The following definitions come from rpc_server/srv_pipe_hnd.c */
2994 void set_pipe_handle_offset(int max_open_files
);
2995 void reset_chain_p(void);
2996 void init_rpc_pipe_hnd(void);
2997 pipes_struct
*open_rpc_pipe_p(char *pipe_name
,
2998 connection_struct
*conn
, uint16 vuid
);
2999 ssize_t
write_to_pipe(pipes_struct
*p
, char *data
, size_t n
);
3000 ssize_t
read_from_pipe(pipes_struct
*p
, char *data
, size_t n
);
3001 BOOL
wait_rpc_pipe_hnd_state(pipes_struct
*p
, uint16 priority
);
3002 BOOL
set_rpc_pipe_hnd_state(pipes_struct
*p
, uint16 device_state
);
3003 BOOL
close_rpc_pipe_hnd(pipes_struct
*p
, connection_struct
*conn
);
3004 pipes_struct
*get_rpc_pipe_p(char *buf
, int where
);
3005 pipes_struct
*get_rpc_pipe(int pnum
);
3008 /*The following definitions come from rpc_server/srv_reg.c */
3011 BOOL
api_reg_rpc(pipes_struct
*p
);
3014 /*The following definitions come from rpc_server/srv_samr.c */
3017 BOOL
api_samr_rpc(pipes_struct
*p
);
3020 /*The following definitions come from rpc_server/srv_spoolss.c */
3023 BOOL
api_spoolss_rpc(pipes_struct
*p
);
3026 /*The following definitions come from rpc_server/srv_spoolss_nt.c */
3029 void init_printer_hnd(void);
3030 uint32
_spoolss_open_printer_ex( const UNISTR2
*printername
,
3031 const PRINTER_DEFAULT
*printer_default
,
3032 uint32 user_switch
, SPOOL_USER_CTR user_ctr
,
3033 POLICY_HND
*handle
);
3034 uint32
_spoolss_closeprinter(POLICY_HND
*handle
);
3035 uint32
_spoolss_deleteprinter(POLICY_HND
*handle
);
3036 uint32
_spoolss_getprinterdata(const POLICY_HND
*handle
, UNISTR2
*valuename
,
3042 uint32
_spoolss_rffpcnex(const POLICY_HND
*handle
, uint32 flags
, uint32 options
,
3043 const UNISTR2
*localmachine
, uint32 printerlocal
,
3044 SPOOL_NOTIFY_OPTION
*option
);
3045 uint32
_spoolss_rfnpcnex( const POLICY_HND
*handle
, uint32 change
,
3046 SPOOL_NOTIFY_OPTION
*option
, SPOOL_NOTIFY_INFO
*info
);
3047 uint32
_spoolss_enumprinters( uint32 flags
, const UNISTR2
*servername
, uint32 level
,
3048 NEW_BUFFER
*buffer
, uint32 offered
,
3049 uint32
*needed
, uint32
*returned
);
3050 uint32
_spoolss_getprinter(POLICY_HND
*handle
, uint32 level
,
3051 NEW_BUFFER
*buffer
, uint32 offered
, uint32
*needed
);
3052 uint32
_spoolss_getprinterdriver2(const POLICY_HND
*handle
, const UNISTR2
*uni_arch
, uint32 level
,
3053 uint32 clientmajorversion
, uint32 clientminorversion
,
3054 NEW_BUFFER
*buffer
, uint32 offered
,
3055 uint32
*needed
, uint32
*servermajorversion
, uint32
*serverminorversion
);
3056 uint32
_spoolss_startpageprinter(const POLICY_HND
*handle
);
3057 uint32
_spoolss_endpageprinter(const POLICY_HND
*handle
);
3058 uint32
_spoolss_startdocprinter(const POLICY_HND
*handle
, uint32 level
,
3059 pipes_struct
*p
, DOC_INFO
*docinfo
,
3061 uint32
_spoolss_enddocprinter(const POLICY_HND
*handle
);
3062 uint32
_spoolss_writeprinter( const POLICY_HND
*handle
,
3064 const uint8
*buffer
,
3065 uint32
*buffer_written
);
3066 uint32
_spoolss_setprinter(const POLICY_HND
*handle
, uint32 level
,
3067 const SPOOL_PRINTER_INFO_LEVEL
*info
,
3068 DEVMODE_CTR devmode_ctr
,
3069 SEC_DESC_BUF
*secdesc_ctr
,
3070 uint32 command
, pipes_struct
*p
);
3071 uint32
_spoolss_fcpn(const POLICY_HND
*handle
);
3072 uint32
_spoolss_addjob(const POLICY_HND
*handle
, uint32 level
,
3073 NEW_BUFFER
*buffer
, uint32 offered
);
3074 uint32
_spoolss_enumjobs( POLICY_HND
*handle
, uint32 firstjob
, uint32 numofjobs
, uint32 level
,
3075 NEW_BUFFER
*buffer
, uint32 offered
,
3076 uint32
*needed
, uint32
*returned
);
3077 uint32
_spoolss_schedulejob( const POLICY_HND
*handle
, uint32 jobid
);
3078 uint32
_spoolss_setjob( const POLICY_HND
*handle
,
3084 uint32
_spoolss_enumprinterdrivers( UNISTR2
*name
, UNISTR2
*environment
, uint32 level
,
3085 NEW_BUFFER
*buffer
, uint32 offered
,
3086 uint32
*needed
, uint32
*returned
);
3087 uint32
_new_spoolss_enumforms( const POLICY_HND
*handle
, uint32 level
,
3088 NEW_BUFFER
*buffer
, uint32 offered
,
3089 uint32
*needed
, uint32
*numofforms
);
3090 uint32
_spoolss_enumports( UNISTR2
*name
, uint32 level
,
3091 NEW_BUFFER
*buffer
, uint32 offered
,
3092 uint32
*needed
, uint32
*returned
);
3093 uint32
_spoolss_addprinterex( const UNISTR2
*uni_srv_name
, uint32 level
,
3094 const SPOOL_PRINTER_INFO_LEVEL
*info
,
3095 uint32 unk0
, uint32 unk1
, uint32 unk2
, uint32 unk3
,
3096 uint32 user_switch
, const SPOOL_USER_CTR
*user
,
3097 POLICY_HND
*handle
);
3098 uint32
_spoolss_addprinterdriver( const UNISTR2
*server_name
,
3100 const SPOOL_PRINTER_DRIVER_INFO_LEVEL
*info
);
3101 uint32
_spoolss_getprinterdriverdirectory(UNISTR2
*name
, UNISTR2
*uni_environment
, uint32 level
,
3102 NEW_BUFFER
*buffer
, uint32 offered
,
3104 uint32
_spoolss_enumprinterdata(const POLICY_HND
*handle
, uint32 idx
,
3105 uint32 in_value_len
, uint32 in_data_len
,
3106 uint32
*out_max_value_len
, uint16
**out_value
, uint32
*out_value_len
,
3108 uint32
*out_max_data_len
, uint8
**data_out
, uint32
*out_data_len
);
3109 uint32
_spoolss_setprinterdata( const POLICY_HND
*handle
,
3110 const UNISTR2
*value
,
3115 uint32 numeric_data
);
3116 uint32
_spoolss_addform( const POLICY_HND
*handle
,
3119 uint32
_spoolss_setform( const POLICY_HND
*handle
,
3120 const UNISTR2
*uni_name
,
3123 uint32
_spoolss_enumprintprocessors(UNISTR2
*name
, UNISTR2
*environment
, uint32 level
,
3124 NEW_BUFFER
*buffer
, uint32 offered
,
3125 uint32
*needed
, uint32
*returned
);
3126 uint32
_spoolss_enumprintprocdatatypes(UNISTR2
*name
, UNISTR2
*processor
, uint32 level
,
3127 NEW_BUFFER
*buffer
, uint32 offered
,
3128 uint32
*needed
, uint32
*returned
);
3129 uint32
_spoolss_enumprintmonitors(UNISTR2
*name
,uint32 level
,
3130 NEW_BUFFER
*buffer
, uint32 offered
,
3131 uint32
*needed
, uint32
*returned
);
3132 uint32
_spoolss_getjob( POLICY_HND
*handle
, uint32 jobid
, uint32 level
,
3133 NEW_BUFFER
*buffer
, uint32 offered
,
3137 /*The following definitions come from rpc_server/srv_srvsvc.c */
3140 BOOL
api_srvsvc_rpc(pipes_struct
*p
);
3143 /*The following definitions come from rpc_server/srv_util.c */
3146 int make_dom_gids(char *gids_str
, DOM_GID
**ppgids
);
3147 void get_domain_user_groups(char *domain_groups
, char *user
);
3148 uint32
lookup_group_name(uint32 rid
, char *group_name
, uint32
*type
);
3149 uint32
lookup_alias_name(uint32 rid
, char *alias_name
, uint32
*type
);
3150 uint32
lookup_user_name(uint32 rid
, char *user_name
, uint32
*type
);
3151 uint32
lookup_group_rid(char *group_name
, uint32
*rid
);
3152 uint32
lookup_alias_rid(char *alias_name
, uint32
*rid
);
3153 uint32
lookup_user_rid(char *user_name
, uint32
*rid
);
3156 /*The following definitions come from rpc_server/srv_wkssvc.c */
3159 BOOL
api_wkssvc_rpc(pipes_struct
*p
);
3162 /*The following definitions come from rpcclient/cmd_spoolss.c */
3164 uint32
cmd_spoolss_enum_printers(struct client_info
*info
, int argc
, char *argv
[]);
3165 uint32
cmd_spoolss_enum_printerdata(struct client_info
*info
, int argc
, char *argv
[]);
3166 uint32
cmd_spoolss_getprinter(struct client_info
*info
, int argc
, char *argv
[]);
3167 uint32
cmd_spoolss_enum_jobs(struct client_info
*info
, int argc
, char *argv
[]);
3168 uint32
cmd_spoolss_open_printer_ex(struct client_info
*info
, int argc
, char *argv
[]);
3169 uint32
cmd_spoolss_getprinterdata(struct client_info
*info
, int argc
, char *argv
[]);
3170 uint32
cmd_spoolss_getprinterdriver(struct client_info
*info
, int argc
, char *argv
[]);
3171 uint32
cmd_spoolss_enumprinterdrivers(struct client_info
*info
, int argc
, char *argv
[]);
3172 uint32
cmd_spoolss_getprinterdriverdir(struct client_info
*info
, int argc
, char *argv
[]);
3174 /*The following definitions come from rpcclient/display_sec.c */
3176 void display_sec_desc(FILE *out_hnd
, enum action_type action
, SEC_DESC
*const sec
);
3178 /*The following definitions come from rpcclient/display_spool.c */
3180 void display_printer_info_ctr(FILE *out_hnd
, enum action_type action
, uint32 level
,
3181 uint32 count
, PRINTER_INFO_CTR ctr
);
3182 void display_printer_enumdata(FILE *out_hnd
, enum action_type action
, uint32 idx
,
3183 uint32 valuelen
, uint16
*value
, uint32 rvaluelen
,
3185 uint32 datalen
, uint8
*data
, uint32 rdatalen
);
3186 void display_job_info_2(FILE *out_hnd
, enum action_type action
,
3187 JOB_INFO_2
*const i2
);
3188 void display_job_info_1(FILE *out_hnd
, enum action_type action
,
3189 JOB_INFO_1
*const i1
);
3190 void display_job_info_2_ctr(FILE *out_hnd
, enum action_type action
,
3191 uint32 count
, JOB_INFO_2
*const *const ctr
);
3192 void display_job_info_1_ctr(FILE *out_hnd
, enum action_type action
,
3193 uint32 count
, JOB_INFO_1
*const *const ctr
);
3194 void display_job_info_ctr(FILE *out_hnd
, enum action_type action
,
3195 uint32 level
, uint32 count
,
3196 void *const *const ctr
);
3197 void display_printer_driver_ctr(FILE *out_hnd
, enum action_type action
, uint32 level
,
3198 uint32 count
, PRINTER_DRIVER_CTR ctr
);
3199 void display_printerdriverdir_info_ctr(FILE *out_hnd
, enum action_type action
, uint32 level
,
3200 DRIVER_DIRECTORY_CTR ctr
);
3202 /*The following definitions come from rpcclient/rpcclient.c */
3205 /*The following definitions come from rpcclient/spoolss_cmds.c */
3207 void add_spl_commands(void);
3209 /*The following definitions come from smbd/blocking.c */
3212 BOOL
push_blocking_lock_request( char *inbuf
, int length
, int lock_timeout
, int lock_num
);
3213 void remove_pending_lock_requests_by_fid(files_struct
*fsp
);
3214 void remove_pending_lock_requests_by_mid(int mid
);
3215 BOOL
blocking_locks_pending(void);
3216 void process_blocking_lock_queue(time_t t
);
3219 /*The following definitions come from smbd/chgpasswd.c */
3222 BOOL
chgpasswd(char *name
, char *oldpass
, char *newpass
, BOOL as_root
);
3223 BOOL
chgpasswd(char *name
, char *oldpass
, char *newpass
, BOOL as_root
);
3224 BOOL
check_lanman_password(char *user
, uchar
* pass1
,
3225 uchar
* pass2
, struct smb_passwd
**psmbpw
);
3226 BOOL
change_lanman_password(struct smb_passwd
*smbpw
, uchar
* pass1
,
3228 BOOL
pass_oem_change(char *user
,
3229 uchar
* lmdata
, uchar
* lmhash
,
3230 uchar
* ntdata
, uchar
* nthash
);
3231 BOOL
check_oem_password(char *user
,
3232 uchar
* lmdata
, uchar
* lmhash
,
3233 uchar
* ntdata
, uchar
* nthash
,
3234 struct smb_passwd
**psmbpw
, char *new_passwd
,
3235 int new_passwd_size
);
3236 BOOL
change_oem_password(struct smb_passwd
*smbpw
, char *new_passwd
,
3238 BOOL
check_plaintext_password(char *user
, char *old_passwd
,
3239 int old_passwd_size
, struct smb_passwd
**psmbpw
);
3242 /*The following definitions come from smbd/close.c */
3245 void close_filestruct(files_struct
*fsp
);
3246 int close_file(files_struct
*fsp
, BOOL normal_close
);
3249 /*The following definitions come from smbd/conn.c */
3252 void conn_init(void);
3253 int conn_num_open(void);
3254 BOOL
conn_snum_used(int snum
);
3255 connection_struct
*conn_find(int cnum
);
3256 connection_struct
*conn_new(void);
3257 void conn_close_all(void);
3258 BOOL
conn_idle_all(time_t t
, int deadtime
);
3259 void conn_free(connection_struct
*conn
);
3262 /*The following definitions come from smbd/connection.c */
3264 BOOL
yield_connection(connection_struct
*conn
,char *name
,int max_connections
);
3265 BOOL
claim_connection(connection_struct
*conn
,char *name
,int max_connections
,BOOL Clear
);
3267 /*The following definitions come from smbd/dfree.c */
3269 SMB_BIG_UINT
sys_disk_free(char *path
, BOOL small_query
,
3270 SMB_BIG_UINT
*bsize
,SMB_BIG_UINT
*dfree
,SMB_BIG_UINT
*dsize
);
3272 /*The following definitions come from smbd/dir.c */
3275 void init_dptrs(void);
3276 char *dptr_path(int key
);
3277 char *dptr_wcard(int key
);
3278 BOOL
dptr_set_wcard(int key
, char *wcard
);
3279 BOOL
dptr_set_attr(int key
, uint16 attr
);
3280 uint16
dptr_attr(int key
);
3281 void dptr_close(int *key
);
3282 void dptr_closecnum(connection_struct
*conn
);
3283 void dptr_idlecnum(connection_struct
*conn
);
3284 void dptr_closepath(char *path
,uint16 spid
);
3285 int dptr_create(connection_struct
*conn
,char *path
, BOOL old_handle
, BOOL expect_close
,uint16 spid
);
3286 BOOL
dptr_fill(char *buf1
,unsigned int key
);
3287 void *dptr_fetch(char *buf
,int *num
);
3288 void *dptr_fetch_lanman2(int dptr_num
);
3289 BOOL
dir_check_ftype(connection_struct
*conn
,int mode
,SMB_STRUCT_STAT
*st
,int dirtype
);
3290 BOOL
get_dir_entry(connection_struct
*conn
,char *mask
,int dirtype
,char *fname
,
3291 SMB_OFF_T
*size
,int *mode
,time_t *date
,BOOL check_descend
);
3292 void *OpenDir(connection_struct
*conn
, char *name
, BOOL use_veto
);
3293 void CloseDir(void *p
);
3294 char *ReadDirName(void *p
);
3295 BOOL
SeekDir(void *p
,int pos
);
3296 int TellDir(void *p
);
3297 void DirCacheAdd( char *path
, char *name
, char *dname
, int snum
);
3298 char *DirCacheCheck( char *path
, char *name
, int snum
);
3299 void DirCacheFlush(int snum
);
3302 /*The following definitions come from smbd/dosmode.c */
3305 mode_t
unix_mode(connection_struct
*conn
,int dosmode
,const char *fname
);
3306 int dos_mode(connection_struct
*conn
,char *path
,SMB_STRUCT_STAT
*sbuf
);
3307 int file_chmod(connection_struct
*conn
,char *fname
,int dosmode
,SMB_STRUCT_STAT
*st
);
3308 int file_utime(connection_struct
*conn
, char *fname
, struct utimbuf
*times
);
3309 BOOL
set_filetime(connection_struct
*conn
, char *fname
, time_t mtime
);
3312 /*The following definitions come from smbd/error.c */
3315 int cached_error_packet(char *inbuf
,char *outbuf
,files_struct
*fsp
,int line
);
3316 int unix_error_packet(char *inbuf
,char *outbuf
,int def_class
,uint32 def_code
,int line
);
3317 int error_packet(char *inbuf
,char *outbuf
,int error_class
,uint32 error_code
,int line
);
3320 /*The following definitions come from smbd/fileio.c */
3323 SMB_OFF_T
seek_file(files_struct
*fsp
,SMB_OFF_T pos
);
3324 BOOL
read_from_write_cache(files_struct
*fsp
,char *data
,SMB_OFF_T pos
,size_t n
);
3325 ssize_t
read_file(files_struct
*fsp
,char *data
,SMB_OFF_T pos
,size_t n
);
3326 ssize_t
write_file(files_struct
*fsp
, char *data
, SMB_OFF_T pos
, size_t n
);
3327 void delete_write_cache(files_struct
*fsp
);
3328 void set_filelen_write_cache(files_struct
*fsp
, SMB_OFF_T file_size
);
3329 ssize_t
flush_write_cache(files_struct
*fsp
, enum flush_reason_enum reason
);
3330 void sync_file(connection_struct
*conn
, files_struct
*fsp
);
3333 /*The following definitions come from smbd/filename.c */
3336 BOOL
unix_convert(char *name
,connection_struct
*conn
,char *saved_last_component
,
3337 BOOL
*bad_path
, SMB_STRUCT_STAT
*pst
);
3338 BOOL
check_name(char *name
,connection_struct
*conn
);
3341 /*The following definitions come from smbd/files.c */
3344 files_struct
*file_new(void );
3345 void file_close_conn(connection_struct
*conn
);
3346 void file_init(void);
3347 void file_close_user(int vuid
);
3348 files_struct
*file_find_dit(SMB_DEV_T dev
, SMB_INO_T inode
, struct timeval
*tval
);
3349 files_struct
*file_find_fsp(files_struct
*orig_fsp
);
3350 files_struct
*file_find_di_first(SMB_DEV_T dev
, SMB_INO_T inode
);
3351 files_struct
*file_find_di_next(files_struct
*start_fsp
);
3352 files_struct
*file_find_print(void);
3353 void file_sync_all(connection_struct
*conn
);
3354 void file_free(files_struct
*fsp
);
3355 files_struct
*file_fsp(char *buf
, int where
);
3356 void file_chain_reset(void);
3357 void file_chain_save(void);
3358 void file_chain_restore(void);
3361 /*The following definitions come from smbd/ipc.c */
3364 void send_trans_reply(char *outbuf
,
3365 char *rparam
, int rparam_len
,
3366 char *rdata
, int rdata_len
,
3367 BOOL buffer_too_large
);
3368 int reply_trans(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int bufsize
);
3371 /*The following definitions come from smbd/lanman.c */
3374 int api_reply(connection_struct
*conn
,uint16 vuid
,char *outbuf
,char *data
,char *params
,
3375 int tdscnt
,int tpscnt
,int mdrcnt
,int mprcnt
);
3378 /*The following definitions come from smbd/mangle.c */
3380 BOOL
is_mangled( char *s
);
3381 BOOL
is_8_3( char *fname
, BOOL check_case
);
3382 void reset_mangled_cache( void );
3383 BOOL
check_mangled_cache( char *s
);
3384 void mangle_name_83( char *s
);
3385 BOOL
name_map_mangle(char *OutName
, BOOL need83
, BOOL cache83
, int snum
);
3387 /*The following definitions come from smbd/message.c */
3390 int reply_sends(connection_struct
*conn
,
3391 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3392 int reply_sendstrt(connection_struct
*conn
,
3393 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3394 int reply_sendtxt(connection_struct
*conn
,
3395 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3396 int reply_sendend(connection_struct
*conn
,
3397 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3400 /*The following definitions come from smbd/negprot.c */
3403 int reply_negprot(connection_struct
*conn
,
3404 char *inbuf
,char *outbuf
, int dum_size
,
3408 /*The following definitions come from smbd/noquotas.c */
3410 BOOL
disk_quotas(char *path
,SMB_BIG_UINT
*bsize
,SMB_BIG_UINT
*dfree
,SMB_BIG_UINT
*dsize
);
3412 /*The following definitions come from smbd/notify.c */
3415 void remove_pending_change_notify_requests_by_fid(files_struct
*fsp
);
3416 void remove_pending_change_notify_requests_by_mid(int mid
);
3417 void remove_pending_change_notify_requests_by_filename(files_struct
*fsp
);
3418 int change_notify_timeout(void);
3419 BOOL
process_pending_change_notify_queue(time_t t
);
3420 BOOL
change_notify_set(char *inbuf
, files_struct
*fsp
, connection_struct
*conn
, uint32 flags
);
3421 BOOL
init_change_notify(void);
3424 /*The following definitions come from smbd/notify_hash.c */
3427 struct cnotify_fns
*hash_notify_init(void) ;
3430 /*The following definitions come from smbd/notify_kernel.c */
3433 struct cnotify_fns
*kernel_notify_init(void) ;
3436 /*The following definitions come from smbd/nttrans.c */
3439 void fail_next_srvsvc_open(void);
3440 BOOL
should_fail_next_srvsvc_open(const char *pipename
);
3441 int reply_ntcreate_and_X(connection_struct
*conn
,
3442 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3443 int reply_ntcancel(connection_struct
*conn
,
3444 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3445 int reply_nttranss(connection_struct
*conn
,
3446 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3447 int reply_nttrans(connection_struct
*conn
,
3448 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3451 /*The following definitions come from smbd/open.c */
3454 int fd_close(struct connection_struct
*conn
, files_struct
*fsp
);
3455 files_struct
*open_file_shared(connection_struct
*conn
,char *fname
,int share_mode
,int ofun
,
3456 mode_t mode
,int oplock_request
, int *Access
,int *action
);
3457 files_struct
*open_file_stat(connection_struct
*conn
,
3458 char *fname
, int smb_ofun
, SMB_STRUCT_STAT
*pst
, int *action
);
3459 files_struct
*open_directory(connection_struct
*conn
,
3460 char *fname
, int smb_ofun
, mode_t unixmode
, int *action
);
3461 BOOL
check_file_sharing(connection_struct
*conn
,char *fname
, BOOL rename_op
);
3464 /*The following definitions come from smbd/oplock.c */
3467 int32
get_number_of_exclusive_open_oplocks(void);
3468 BOOL
receive_local_message(fd_set
*fds
, char *buffer
, int buffer_len
, int timeout
);
3469 BOOL
set_file_oplock(files_struct
*fsp
, int oplock_type
);
3470 void release_file_oplock(files_struct
*fsp
);
3471 BOOL
remove_oplock(files_struct
*fsp
);
3472 int setup_oplock_select_set( fd_set
*fds
);
3473 BOOL
process_local_message(char *buffer
, int buf_size
);
3474 BOOL
oplock_break_level2(files_struct
*fsp
, BOOL local_request
, int token
);
3475 BOOL
request_oplock_break(share_mode_entry
*share_entry
,
3476 SMB_DEV_T dev
, SMB_INO_T inode
);
3477 BOOL
attempt_close_oplocked_file(files_struct
*fsp
);
3478 BOOL
init_oplocks(void);
3481 /*The following definitions come from smbd/oplock_irix.c */
3484 struct kernel_oplocks
*irix_init_kernel_oplocks(void) ;
3487 /*The following definitions come from smbd/oplock_linux.c */
3490 struct kernel_oplocks
*linux_init_kernel_oplocks(void) ;
3493 /*The following definitions come from smbd/password.c */
3496 void generate_next_challenge(char *challenge
);
3497 BOOL
set_challenge(unsigned char *challenge
);
3498 user_struct
*get_valid_user_struct(uint16 vuid
);
3499 void invalidate_vuid(uint16 vuid
);
3500 char *validated_username(uint16 vuid
);
3501 char *validated_domain(uint16 vuid
);
3502 int setup_groups(char *user
, char *domain
,
3503 uid_t uid
, gid_t gid
, int *p_ngroups
, gid_t
**p_groups
);
3504 uint16
register_vuid(uid_t uid
,gid_t gid
, char *unix_name
, char *requested_name
,
3505 char *domain
,BOOL guest
);
3506 void add_session_user(char *user
);
3507 BOOL
smb_password_check(char *password
, unsigned char *part_passwd
, unsigned char *c8
);
3508 BOOL
smb_password_ok(struct smb_passwd
*smb_pass
, uchar chal
[8],
3509 uchar lm_pass
[24], uchar nt_pass
[24]);
3510 BOOL
pass_check_smb(char *user
, char *domain
,
3511 uchar
*chal
, uchar
*lm_pwd
, uchar
*nt_pwd
,
3512 struct passwd
*pwd
);
3513 BOOL
password_ok(char *user
, char *password
, int pwlen
, struct passwd
*pwd
);
3514 BOOL
user_ok(char *user
,int snum
);
3515 BOOL
authorise_login(int snum
,char *user
,char *password
, int pwlen
,
3516 BOOL
*guest
,BOOL
*force
,uint16 vuid
);
3517 BOOL
check_hosts_equiv(char *user
);
3518 struct cli_state
*server_client(void);
3519 struct cli_state
*server_cryptkey(void);
3520 BOOL
server_validate(char *user
, char *domain
,
3521 char *pass
, int passlen
,
3522 char *ntpass
, int ntpasslen
);
3523 BOOL
domain_client_validate( char *user
, char *domain
,
3524 char *smb_apasswd
, int smb_apasslen
,
3525 char *smb_ntpasswd
, int smb_ntpasslen
,
3529 /*The following definitions come from smbd/pipes.c */
3532 int reply_open_pipe_and_X(connection_struct
*conn
,
3533 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3534 int reply_pipe_write(char *inbuf
,char *outbuf
,int length
,int dum_bufsize
);
3535 int reply_pipe_write_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
3536 int reply_pipe_read_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
3537 int reply_pipe_close(connection_struct
*conn
, char *inbuf
,char *outbuf
);
3540 /*The following definitions come from smbd/process.c */
3543 BOOL
push_oplock_pending_smb_message(char *buf
, int msg_len
);
3544 BOOL
receive_next_smb(char *inbuf
, int bufsize
, int timeout
);
3545 void respond_to_all_remaining_local_messages(void);
3546 void process_smb(char *inbuf
, char *outbuf
);
3547 char *smb_fn_name(int type
);
3548 void construct_reply_common(char *inbuf
,char *outbuf
);
3549 int chain_reply(char *inbuf
,char *outbuf
,int size
,int bufsize
);
3550 void check_reload(int t
);
3551 void smbd_process(void);
3554 /*The following definitions come from smbd/reply.c */
3557 int reply_special(char *inbuf
,char *outbuf
);
3558 int reply_tcon(connection_struct
*conn
,
3559 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3560 int reply_tcon_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3561 int reply_unknown(char *inbuf
,char *outbuf
);
3562 int reply_ioctl(connection_struct
*conn
,
3563 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3564 int reply_sesssetup_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3565 int reply_chkpth(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3566 int reply_getatr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3567 int reply_setatr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3568 int reply_dskattr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3569 int reply_search(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3570 int reply_fclose(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3571 int reply_open(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3572 int reply_open_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3573 int reply_ulogoffX(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3574 int reply_mknew(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3575 int reply_ctemp(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3576 int reply_unlink(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3577 int reply_readbraw(connection_struct
*conn
, char *inbuf
, char *outbuf
, int dum_size
, int dum_buffsize
);
3578 int reply_lockread(connection_struct
*conn
, char *inbuf
,char *outbuf
, int length
, int dum_buffsiz
);
3579 int reply_read(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3580 int reply_read_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3581 int reply_writebraw(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3582 int reply_writeunlock(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3583 int reply_write(connection_struct
*conn
, char *inbuf
,char *outbuf
,int size
,int dum_buffsize
);
3584 int reply_write_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3585 int reply_lseek(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3586 int reply_flush(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3587 int reply_exit(connection_struct
*conn
,
3588 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3589 int reply_close(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
,
3591 int reply_writeclose(connection_struct
*conn
,
3592 char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3593 int reply_lock(connection_struct
*conn
,
3594 char *inbuf
,char *outbuf
, int length
, int dum_buffsize
);
3595 int reply_unlock(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3596 int reply_tdis(connection_struct
*conn
,
3597 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3598 int reply_echo(connection_struct
*conn
,
3599 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3600 int reply_printopen(connection_struct
*conn
,
3601 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3602 int reply_printclose(connection_struct
*conn
,
3603 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3604 int reply_printqueue(connection_struct
*conn
,
3605 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3606 int reply_printwrite(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3607 int reply_mkdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3608 BOOL
rmdir_internals(connection_struct
*conn
, char *directory
);
3609 int reply_rmdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3610 int rename_internals(connection_struct
*conn
,
3611 char *inbuf
, char *outbuf
, char *name
,
3612 char *newname
, BOOL replace_if_exists
);
3613 int reply_mv(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3614 int reply_copy(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3615 int reply_setdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3616 SMB_BIG_UINT
get_lock_count( char *data
, int data_offset
, BOOL large_file_format
);
3617 SMB_BIG_UINT
get_lock_offset( char *data
, int data_offset
, BOOL large_file_format
, BOOL
*err
);
3618 int reply_lockingX(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3619 int reply_readbmpx(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3620 int reply_writebmpx(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3621 int reply_writebs(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3622 int reply_setattrE(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3623 int reply_getattrE(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3626 /*The following definitions come from smbd/sec_ctx.c */
3628 BOOL
push_sec_ctx(void);
3629 void set_sec_ctx(uid_t uid
, gid_t gid
, int ngroups
, gid_t
*groups
);
3630 void set_root_sec_ctx(void);
3631 BOOL
pop_sec_ctx(void);
3632 void init_sec_ctx(void);
3634 /*The following definitions come from smbd/server.c */
3637 int smbd_server_fd(void);
3638 void smbd_set_server_fd(int fd
);
3639 BOOL
reload_services(BOOL test
);
3640 void exit_server(char *reason
);
3643 /*The following definitions come from smbd/service.c */
3646 BOOL
become_service(connection_struct
*conn
,BOOL do_chdir
);
3647 int find_service(char *service
);
3648 connection_struct
*make_connection(char *service
,char *user
,char *password
, int pwlen
, char *dev
,uint16 vuid
, int *ecode
);
3649 void close_cnum(connection_struct
*conn
, uint16 vuid
);
3652 /*The following definitions come from smbd/ssl.c */
3654 int sslutil_init(int isServer
);
3655 int sslutil_accept(int fd
);
3656 int sslutil_fd_is_ssl(int fd
);
3657 int sslutil_connect(int fd
);
3658 int sslutil_disconnect(int fd
);
3659 int sslutil_negotiate_ssl(int fd
, int msg_type
);
3661 /*The following definitions come from smbd/statcache.c */
3663 void print_stat_cache_statistics(void);
3664 void stat_cache_add( char *full_orig_name
, char *orig_translated_path
);
3665 BOOL
stat_cache_lookup(connection_struct
*conn
, char *name
, char *dirpath
,
3666 char **start
, SMB_STRUCT_STAT
*pst
);
3667 BOOL
reset_stat_cache( void );
3669 /*The following definitions come from smbd/trans2.c */
3672 int reply_findclose(connection_struct
*conn
,
3673 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3674 int reply_findnclose(connection_struct
*conn
,
3675 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3676 int reply_transs2(connection_struct
*conn
,
3677 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3678 int reply_trans2(connection_struct
*conn
,
3679 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3682 /*The following definitions come from smbd/uid.c */
3685 BOOL
become_guest(void);
3686 BOOL
become_user(connection_struct
*conn
, uint16 vuid
);
3687 BOOL
unbecome_user(void );
3688 BOOL
become_authenticated_pipe_user(pipes_struct
*p
);
3689 BOOL
unbecome_authenticated_pipe_user(pipes_struct
*p
);
3690 void become_root(void);
3691 void unbecome_root(void);
3694 /*The following definitions come from smbd/unix_acls.c */
3697 size_t get_nt_acl(files_struct
*fsp
, SEC_DESC
**ppdesc
);
3698 BOOL
set_nt_acl(files_struct
*fsp
, uint32 security_info_sent
, SEC_DESC
*psd
);
3701 /*The following definitions come from smbd/vfs-wrap.c */
3703 int vfswrap_dummy_connect(struct vfs_connection_struct
*conn
, char *service
,
3705 void vfswrap_dummy_disconnect(void);
3706 SMB_BIG_UINT
vfswrap_disk_free(char *path
, BOOL small_query
, SMB_BIG_UINT
*bsize
,
3707 SMB_BIG_UINT
*dfree
, SMB_BIG_UINT
*dsize
);
3708 DIR *vfswrap_opendir(char *fname
);
3709 struct dirent
*vfswrap_readdir(DIR *dirp
);
3710 int vfswrap_mkdir(char *path
, mode_t mode
);
3711 int vfswrap_rmdir(char *path
);
3712 int vfswrap_closedir(DIR *dirp
);
3713 int vfswrap_open(char *fname
, int flags
, mode_t mode
);
3714 int vfswrap_close(int fd
);
3715 ssize_t
vfswrap_read(int fd
, char *data
, size_t n
);
3716 ssize_t
vfswrap_write(int fd
, char *data
, size_t n
);
3717 SMB_OFF_T
vfswrap_lseek(int filedes
, SMB_OFF_T offset
, int whence
);
3718 int vfswrap_rename(char *old
, char *new);
3719 int vfswrap_fsync(int fd
);
3720 int vfswrap_stat(char *fname
, SMB_STRUCT_STAT
*sbuf
);
3721 int vfswrap_fstat(int fd
, SMB_STRUCT_STAT
*sbuf
);
3722 int vfswrap_lstat(char *path
,
3723 SMB_STRUCT_STAT
*sbuf
);
3724 int vfswrap_unlink(char *path
);
3725 int vfswrap_chmod(char *path
, mode_t mode
);
3726 int vfswrap_utime(char *path
, struct utimbuf
*times
);
3727 int vfswrap_ftruncate(int fd
, SMB_OFF_T offset
);
3728 BOOL
vfswrap_lock(int fd
, int op
, SMB_OFF_T offset
, SMB_OFF_T count
, int type
);
3730 /*The following definitions come from smbd/vfs.c */
3732 int vfs_init_default(connection_struct
*conn
);
3733 BOOL
vfs_init_custom(connection_struct
*conn
);
3734 BOOL
vfs_directory_exist(connection_struct
*conn
, char *dname
,
3735 SMB_STRUCT_STAT
*st
);
3736 BOOL
vfs_file_exist(connection_struct
*conn
,char *fname
,SMB_STRUCT_STAT
*sbuf
);
3737 ssize_t
vfs_write_data(files_struct
*fsp
,char *buffer
,size_t N
);
3738 SMB_OFF_T
vfs_transfer_file(int in_fd
, files_struct
*in_fsp
,
3739 int out_fd
, files_struct
*out_fsp
,
3740 SMB_OFF_T n
, char *header
, int headlen
, int align
);
3741 char *vfs_readdirname(connection_struct
*conn
, void *p
);
3743 /*The following definitions come from smbwrapper/realcalls.c */
3745 int real_utime(const char *name
, struct utimbuf
*buf
);
3746 int real_utimes(const char *name
, struct timeval tv
[2]);
3748 /*The following definitions come from smbwrapper/shared.c */
3750 void smbw_setup_shared(void);
3751 char *smbw_getshared(const char *name
);
3752 void smbw_setshared(const char *name
, const char *val
);
3753 int smbw_setenv(const char *name
, const char *value
);
3754 int smbw_shared_fd(int fd
);
3756 /*The following definitions come from smbwrapper/smbw.c */
3758 void smbw_init(void);
3759 int smbw_fd(int fd
);
3760 int smbw_local_fd(int fd
);
3761 ino_t
smbw_inode(const char *name
);
3762 void clean_fname(char *name
);
3763 char *smbw_parse_path(const char *fname
, char *server
, char *share
, char *path
);
3764 int smbw_path(const char *path
);
3765 int smbw_errno(struct cli_state
*c
);
3766 struct smbw_server
*smbw_server(char *server
, char *share
);
3767 struct smbw_file
*smbw_file(int fd
);
3768 int smbw_open(const char *fname
, int flags
, mode_t mode
);
3769 ssize_t
smbw_pread(int fd
, void *buf
, size_t count
, off_t ofs
);
3770 ssize_t
smbw_read(int fd
, void *buf
, size_t count
);
3771 ssize_t
smbw_write(int fd
, void *buf
, size_t count
);
3772 ssize_t
smbw_pwrite(int fd
, void *buf
, size_t count
, off_t ofs
);
3773 int smbw_close(int fd
);
3774 int smbw_fcntl(int fd
, int cmd
, long arg
);
3775 int smbw_access(const char *name
, int mode
);
3776 int smbw_readlink(const char *path
, char *buf
, size_t bufsize
);
3777 int smbw_unlink(const char *fname
);
3778 int smbw_rename(const char *oldname
, const char *newname
);
3779 int smbw_utime(const char *fname
, void *buf
);
3780 int smbw_utimes(const char *fname
, void *buf
);
3781 int smbw_chown(const char *fname
, uid_t owner
, gid_t group
);
3782 int smbw_chmod(const char *fname
, mode_t newmode
);
3783 off_t
smbw_lseek(int fd
, off_t offset
, int whence
);
3784 int smbw_dup(int fd
);
3785 int smbw_dup2(int fd
, int fd2
);
3786 int smbw_fork(void);
3788 /*The following definitions come from smbwrapper/smbw_dir.c */
3790 struct smbw_dir
*smbw_dir(int fd
);
3791 int smbw_dirp(DIR *dirp
);
3792 int smbw_dir_open(const char *fname
);
3793 int smbw_dir_fstat(int fd
, struct stat
*st
);
3794 int smbw_dir_close(int fd
);
3795 int smbw_getdents(unsigned int fd
, struct dirent
*dirp
, int count
);
3796 int smbw_chdir(const char *name
);
3797 off_t
smbw_dir_lseek(int fd
, off_t offset
, int whence
);
3798 int smbw_mkdir(const char *fname
, mode_t mode
);
3799 int smbw_rmdir(const char *fname
);
3800 char *smbw_getcwd(char *buf
, size_t size
);
3801 int smbw_fchdir(unsigned int fd
);
3802 DIR *smbw_opendir(const char *fname
);
3803 struct dirent
*smbw_readdir(DIR *dirp
);
3804 int smbw_closedir(DIR *dirp
);
3805 void smbw_seekdir(DIR *dirp
, off_t offset
);
3806 off_t
smbw_telldir(DIR *dirp
);
3808 /*The following definitions come from smbwrapper/smbw_stat.c */
3810 void smbw_setup_stat(struct stat
*st
, char *fname
, size_t size
, int mode
);
3811 BOOL
smbw_getatr(struct smbw_server
*srv
, char *path
,
3812 uint16
*mode
, size_t *size
,
3813 time_t *c_time
, time_t *a_time
, time_t *m_time
,
3815 int smbw_stat_printjob(struct smbw_server
*srv
,char *path
,
3816 size_t *size
, time_t *m_time
);
3817 int smbw_fstat(int fd
, struct stat
*st
);
3818 int smbw_stat(const char *fname
, struct stat
*st
);
3820 /*The following definitions come from tdb/tdb.c */
3822 char *tdb_error(TDB_CONTEXT
*tdb
);
3823 int tdb_update(TDB_CONTEXT
*tdb
, TDB_DATA key
, TDB_DATA dbuf
);
3824 TDB_DATA
tdb_fetch(TDB_CONTEXT
*tdb
, TDB_DATA key
);
3825 int tdb_exists(TDB_CONTEXT
*tdb
, TDB_DATA key
);
3826 int tdb_traverse(TDB_CONTEXT
*tdb
, int (*fn
)(TDB_CONTEXT
*tdb
, TDB_DATA key
, TDB_DATA dbuf
, void* state
), void* state
);
3827 TDB_DATA
tdb_firstkey(TDB_CONTEXT
*tdb
);
3828 TDB_DATA
tdb_nextkey(TDB_CONTEXT
*tdb
, TDB_DATA key
);
3829 int tdb_delete(TDB_CONTEXT
*tdb
, TDB_DATA key
);
3830 int tdb_store(TDB_CONTEXT
*tdb
, TDB_DATA key
, TDB_DATA dbuf
, int flag
);
3831 TDB_CONTEXT
*tdb_open(char *name
, int hash_size
, int tdb_flags
,
3832 int open_flags
, mode_t mode
);
3833 int tdb_close(TDB_CONTEXT
*tdb
);
3834 int tdb_writelock(TDB_CONTEXT
*tdb
);
3835 int tdb_writeunlock(TDB_CONTEXT
*tdb
);
3836 int tdb_lockchain(TDB_CONTEXT
*tdb
, TDB_DATA key
);
3837 int tdb_unlockchain(TDB_CONTEXT
*tdb
, TDB_DATA key
);
3839 /*The following definitions come from tdb/tdbutil.c */
3841 int tdb_fetch_int_byblob(TDB_CONTEXT
*tdb
, char *keyval
, size_t len
);
3842 int tdb_fetch_int(TDB_CONTEXT
*tdb
, char *keystr
);
3843 int tdb_store_int_byblob(TDB_CONTEXT
*tdb
, char *keystr
, size_t len
, int v
);
3844 int tdb_store_int(TDB_CONTEXT
*tdb
, char *keystr
, int v
);
3845 int tdb_store_by_string(TDB_CONTEXT
*tdb
, char *keystr
, void *buffer
, int len
);
3846 TDB_DATA
tdb_fetch_by_string(TDB_CONTEXT
*tdb
, char *keystr
);
3847 size_t tdb_pack(char *buf
, int bufsize
, char *fmt
, ...);
3848 int tdb_unpack(char *buf
, int bufsize
, char *fmt
, ...);
3850 /*The following definitions come from utils/nbio.c */
3852 void nb_setup(struct cli_state
*cli
);
3853 void nb_unlink(char *fname
);
3854 void nb_open(char *fname
, int handle
, int size
);
3855 void nb_write(int handle
, int size
, int offset
);
3856 void nb_read(int handle
, int size
, int offset
);
3857 void nb_close(int handle
);
3858 void nb_mkdir(char *fname
);
3859 void nb_rmdir(char *fname
);
3860 void nb_rename(char *old
, char *new);
3861 void nb_stat(char *fname
, int size
);
3862 void nb_create(char *fname
, int size
);
3864 /*The following definitions come from utils/torture.c */
3867 /*The following definitions come from web/cgi.c */
3869 void cgi_load_variables(FILE *f1
);
3870 char *cgi_variable(char *name
);
3872 char *cgi_user_name(void);
3873 void cgi_setup(char *rootdir
, int auth_required
);
3874 char *cgi_baseurl(void);
3875 char *cgi_pathinfo(void);
3876 char *cgi_remote_host(void);
3877 char *cgi_remote_addr(void);
3878 BOOL
cgi_waspost(void);
3880 /*The following definitions come from web/diagnose.c */
3882 BOOL
nmbd_running(void);
3883 BOOL
smbd_running(void);
3885 /*The following definitions come from web/startstop.c */
3887 void start_smbd(void);
3888 void start_nmbd(void);
3889 void stop_smbd(void);
3890 void stop_nmbd(void);
3891 void kill_pid(pid_t pid
);
3893 /*The following definitions come from web/statuspage.c */
3895 void status_page(void);
3897 /*The following definitions come from web/swat.c */
3899 #endif /* _PROTO_H_ */