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
, struct command_set
***array
,
50 const struct command_set
*cmd
);
51 void add_command_set(const struct command_set
*cmds
);
52 void cmd_set_no_autoconnect(void);
53 int command_main(int argc
, char *argv
[]);
55 /*The following definitions come from lib/crc32.c */
57 uint32
crc32_calc_buffer( char *buffer
, uint32 count
);
59 /*The following definitions come from lib/debug.c */
61 void debug_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
62 void debug_message_send(pid_t pid
, int level
);
63 void setup_logging(char *pname
, BOOL interactive
);
64 void reopen_logs( void );
65 void force_check_log_size( void );
66 BOOL
need_to_check_log_size( void );
67 void check_log_size( void );
68 void dbgflush( void );
69 BOOL
dbghdr( int level
, char *file
, char *func
, int line
);
71 /*The following definitions come from lib/doscalls.c */
73 int dos_unlink(char *fname
);
74 int dos_open(char *fname
,int flags
,mode_t mode
);
75 DIR *dos_opendir(char *dname
);
76 char *dos_readdirname(DIR *p
);
77 int dos_chown(char *fname
, uid_t uid
, gid_t gid
);
78 int dos_stat(char *fname
,SMB_STRUCT_STAT
*sbuf
);
79 int dos_lstat(char *fname
,SMB_STRUCT_STAT
*sbuf
);
80 int dos_mkdir(char *dname
,mode_t mode
);
81 int dos_rmdir(char *dname
);
82 int dos_chdir(char *dname
);
83 int dos_utime(char *fname
,struct utimbuf
*times
);
84 int copy_reg(char *source
, const char *dest
);
85 int dos_rename(char *from
, char *to
);
86 int dos_chmod(char *fname
,mode_t mode
);
87 char *dos_getwd(char *unix_path
);
88 BOOL
dos_file_exist(char *fname
,SMB_STRUCT_STAT
*sbuf
);
89 BOOL
dos_directory_exist(char *dname
,SMB_STRUCT_STAT
*st
);
90 time_t dos_file_modtime(char *fname
);
91 SMB_OFF_T
dos_file_size(char *file_name
);
93 /*The following definitions come from lib/error.c */
95 uint32
map_nt_error_from_unix(int unix_error
);
97 /*The following definitions come from lib/fault.c */
99 void fault_setup(void (*fn
)(void *));
101 /*The following definitions come from lib/fsusage.c */
103 int sys_fsusage(const char *path
, SMB_BIG_UINT
*dfree
, SMB_BIG_UINT
*dsize
);
105 /*The following definitions come from lib/genrand.c */
107 void generate_random_buffer( unsigned char *out
, int len
, BOOL re_seed
);
109 /*The following definitions come from lib/getsmbpass.c */
111 char *getsmbpass(char *prompt
) ;
113 /*The following definitions come from lib/hash.c */
115 BOOL
hash_table_init(hash_table
*table
, int num_buckets
, compare_function compare_func
);
116 int string_hash(int hash_size
, const char *key
);
117 hash_element
*hash_lookup(hash_table
*table
, char *key
);
118 hash_element
*hash_insert(hash_table
*table
, char *value
, char *key
);
119 void hash_remove(hash_table
*table
, hash_element
*hash_elem
);
120 BOOL
hash_clear(hash_table
*table
);
122 /*The following definitions come from lib/interface.c */
124 void load_interfaces(void);
125 BOOL
interfaces_changed(void);
126 BOOL
ismyip(struct in_addr ip
);
127 BOOL
is_local_net(struct in_addr from
);
128 int iface_count(void);
129 BOOL
we_are_multihomed(void);
130 struct interface
*get_interface(int n
);
131 struct in_addr
*iface_n_ip(int n
);
132 struct in_addr
*iface_n_bcast(int n
);
133 unsigned iface_hash(void);
134 struct in_addr
*iface_bcast(struct in_addr ip
);
135 struct in_addr
*iface_ip(struct in_addr ip
);
137 /*The following definitions come from lib/interfaces.c */
139 int get_interfaces(struct iface_struct
*ifaces
, int max_interfaces
);
141 /*The following definitions come from lib/kanji.c */
143 void interpret_coding_system(char *str
);
144 void initialize_multibyte_vectors( int client_codepage
);
146 /*The following definitions come from lib/md4.c */
148 void mdfour(unsigned char *out
, unsigned char *in
, int n
);
150 /*The following definitions come from lib/messages.c */
152 void ping_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
153 void debuglevel_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
154 BOOL
message_init(void);
155 BOOL
message_send_pid(pid_t pid
, int msg_type
, void *buf
, size_t len
, BOOL duplicates_allowed
);
156 void message_dispatch(void);
157 void message_register(int msg_type
,
158 void (*fn
)(int msg_type
, pid_t pid
, void *buf
, size_t len
));
159 void message_deregister(int msg_type
);
160 BOOL
message_send_all(TDB_CONTEXT
*conn_tdb
, int msg_type
, void *buf
, size_t len
, BOOL duplicates_allowed
);
162 /*The following definitions come from lib/ms_fnmatch.c */
164 int ms_fnmatch(char *pattern
, char *string
);
166 /*The following definitions come from lib/msrpc-client.c */
168 BOOL
receive_msrpc(int fd
, prs_struct
*data
, unsigned int timeout
);
169 BOOL
msrpc_send(int fd
, prs_struct
*ps
);
170 BOOL
msrpc_receive(int fd
, prs_struct
*ps
);
171 BOOL
msrpc_connect(struct msrpc_state
*msrpc
, const char *pipe_name
);
172 void msrpc_init_creds(struct msrpc_state
*msrpc
, const struct user_creds
*usr
);
173 void msrpc_close_socket(struct msrpc_state
*msrpc
);
174 void msrpc_sockopt(struct msrpc_state
*msrpc
, char *options
);
175 BOOL
msrpc_connect_auth(struct msrpc_state
*msrpc
,
177 const char* pipename
,
178 const struct user_creds
*usr
);
179 struct msrpc_state
*msrpc_initialise(struct msrpc_state
*msrpc
, uint32 pid
);
180 void msrpc_shutdown(struct msrpc_state
*msrpc
);
181 BOOL
msrpc_establish_connection(struct msrpc_state
*msrpc
,
182 const char *pipe_name
);
184 /*The following definitions come from lib/msrpc_use.c */
187 void init_msrpc_use(void);
188 void free_msrpc_use(void);
189 struct msrpc_state
*msrpc_use_add(const char* pipe_name
,
191 const struct user_creds
*usr_creds
,
193 BOOL
msrpc_use_del(const char* pipe_name
,
194 const struct user_creds
*usr_creds
,
196 BOOL
*connection_closed
);
197 void msrpc_net_use_enum(uint32
*num_cons
, struct use_info
***use
);
200 /*The following definitions come from lib/pidfile.c */
202 pid_t
pidfile_pid(char *name
);
203 void pidfile_create(char *name
);
205 /*The following definitions come from lib/replace.c */
207 char *rep_inet_ntoa(struct in_addr ip
);
209 /*The following definitions come from lib/select.c */
211 void sys_select_signal(void);
212 int sys_select(int maxfd
, fd_set
*fds
,struct timeval
*tval
);
213 int sys_select_intr(int maxfd
, fd_set
*fds
,struct timeval
*tval
);
215 /*The following definitions come from lib/signal.c */
217 void BlockSignals(BOOL block
,int signum
);
218 void CatchSignal(int signum
,void (*handler
)(int ));
219 void CatchChild(void);
220 void CatchChildLeaveStatus(void);
222 /*The following definitions come from lib/slprintf.c */
224 int vslprintf(char *str
, int n
, char *format
, va_list ap
);
226 /*The following definitions come from libsmb/cliconnect.c */
228 BOOL
cli_session_setup(struct cli_state
*cli
,
230 char *pass
, int passlen
,
231 char *ntpass
, int ntpasslen
,
233 BOOL
cli_ulogoff(struct cli_state
*cli
);
234 BOOL
cli_send_tconX(struct cli_state
*cli
,
235 char *share
, char *dev
, char *pass
, int passlen
);
236 BOOL
cli_tdis(struct cli_state
*cli
);
237 void cli_negprot_send(struct cli_state
*cli
);
238 BOOL
cli_negprot(struct cli_state
*cli
);
239 BOOL
cli_session_request(struct cli_state
*cli
,
240 struct nmb_name
*calling
, struct nmb_name
*called
);
241 BOOL
cli_connect(struct cli_state
*cli
, const char *host
, struct in_addr
*ip
);
242 BOOL
cli_reestablish_connection(struct cli_state
*cli
);
243 BOOL
cli_establish_connection(struct cli_state
*cli
,
244 char *dest_host
, struct in_addr
*dest_ip
,
245 struct nmb_name
*calling
, struct nmb_name
*called
,
246 char *service
, char *service_type
,
247 BOOL do_shutdown
, BOOL do_tcon
);
248 BOOL
attempt_netbios_session_request(struct cli_state
*cli
, char *srchost
, char *desthost
,
249 struct in_addr
*pdest_ip
);
251 /*The following definitions come from libsmb/clidgram.c */
253 int cli_send_mailslot(int dgram_sock
, BOOL unique
, char *mailslot
,
255 const char *srcname
, int src_type
,
256 const char *dstname
, int dest_type
,
257 struct in_addr dest_ip
, struct in_addr src_ip
,
258 int dest_port
, int src_port
);
259 int cli_get_response(int dgram_sock
, BOOL unique
, char *mailslot
, char *buf
, int bufsiz
);
260 int cli_get_backup_list(const char *myname
, const char *send_to_name
);
261 int cli_get_backup_server(char *my_name
, char *target
, char *servername
, int namesize
);
263 /*The following definitions come from libsmb/clientgen.c */
265 int cli_set_port(struct cli_state
*cli
, int port
);
266 BOOL
cli_receive_smb(struct cli_state
*cli
);
267 BOOL
cli_send_smb(struct cli_state
*cli
);
268 void cli_setup_packet(struct cli_state
*cli
);
269 void cli_init_creds(struct cli_state
*cli
, const struct ntuser_creds
*usr
);
270 struct cli_state
*cli_initialise(struct cli_state
*cli
);
271 void cli_shutdown(struct cli_state
*cli
);
272 void cli_sockopt(struct cli_state
*cli
, char *options
);
273 uint16
cli_setpid(struct cli_state
*cli
, uint16 pid
);
275 /*The following definitions come from libsmb/clierror.c */
277 char *cli_errstr(struct cli_state
*cli
);
278 int cli_error(struct cli_state
*cli
, uint8
*eclass
, uint32
*num
, uint32
*nt_rpc_error
);
280 /*The following definitions come from libsmb/clifile.c */
282 BOOL
cli_rename(struct cli_state
*cli
, char *fname_src
, char *fname_dst
);
283 BOOL
cli_unlink(struct cli_state
*cli
, char *fname
);
284 BOOL
cli_mkdir(struct cli_state
*cli
, char *dname
);
285 BOOL
cli_rmdir(struct cli_state
*cli
, char *dname
);
286 int cli_nt_create(struct cli_state
*cli
, char *fname
, uint32 DesiredAccess
);
287 int cli_open(struct cli_state
*cli
, char *fname
, int flags
, int share_mode
);
288 BOOL
cli_close(struct cli_state
*cli
, int fnum
);
289 BOOL
cli_lock(struct cli_state
*cli
, int fnum
,
290 uint32 offset
, uint32 len
, int timeout
, enum brl_type lock_type
);
291 BOOL
cli_unlock(struct cli_state
*cli
, int fnum
, uint32 offset
, uint32 len
);
292 BOOL
cli_lock64(struct cli_state
*cli
, int fnum
,
293 SMB_BIG_UINT offset
, SMB_BIG_UINT len
, int timeout
, enum brl_type lock_type
);
294 BOOL
cli_unlock64(struct cli_state
*cli
, int fnum
, SMB_BIG_UINT offset
, SMB_BIG_UINT len
);
295 BOOL
cli_getattrE(struct cli_state
*cli
, int fd
,
296 uint16
*attr
, size_t *size
,
297 time_t *c_time
, time_t *a_time
, time_t *m_time
);
298 BOOL
cli_getatr(struct cli_state
*cli
, char *fname
,
299 uint16
*attr
, size_t *size
, time_t *t
);
300 BOOL
cli_setatr(struct cli_state
*cli
, char *fname
, uint16 attr
, time_t t
);
301 BOOL
cli_chkpath(struct cli_state
*cli
, char *path
);
302 BOOL
cli_dskattr(struct cli_state
*cli
, int *bsize
, int *total
, int *avail
);
304 /*The following definitions come from libsmb/clilist.c */
306 int cli_list(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
307 void (*fn
)(file_info
*, const char *, void *state
), void *state
);
308 int cli_list_old(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
309 void (*fn
)(file_info
*, const char *));
311 /*The following definitions come from libsmb/cli_lsarpc.c */
313 struct cli_state
*cli_lsa_initialise(struct cli_state
*cli
, char *system_name
,
314 struct ntuser_creds
*creds
);
315 void cli_lsa_shutdown(struct cli_state
*cli
);
316 uint32
cli_lsa_open_policy(struct cli_state
*cli
, BOOL sec_qos
,
317 uint32 des_access
, POLICY_HND
*hnd
);
318 uint32
cli_lsa_close(struct cli_state
*cli
, POLICY_HND
*hnd
);
319 uint32
cli_lsa_lookup_sids(struct cli_state
*cli
, POLICY_HND
*hnd
,
320 int num_sids
, DOM_SID
*sids
, char ***names
,
321 uint32
**types
, int *num_names
);
322 uint32
cli_lsa_lookup_names(struct cli_state
*cli
, POLICY_HND
*hnd
,
323 int num_names
, char **names
, DOM_SID
**sids
,
324 uint32
**types
, int *num_sids
);
325 uint32
cli_lsa_query_info_policy(struct cli_state
*cli
, POLICY_HND
*hnd
,
326 uint16 info_class
, fstring domain_name
,
327 DOM_SID
* domain_sid
);
329 /*The following definitions come from libsmb/climessage.c */
331 BOOL
cli_message_start(struct cli_state
*cli
, char *host
, char *username
,
333 BOOL
cli_message_text(struct cli_state
*cli
, char *msg
, int len
, int grp
);
334 BOOL
cli_message_end(struct cli_state
*cli
, int grp
);
336 /*The following definitions come from libsmb/cliprint.c */
338 int cli_print_queue(struct cli_state
*cli
,
339 void (*fn
)(struct print_job_info
*));
340 int cli_printjob_del(struct cli_state
*cli
, int job
);
342 /*The following definitions come from libsmb/clirap.c */
344 BOOL
cli_api_pipe(struct cli_state
*cli
, char *pipe_name
, int pipe_name_len
,
345 uint16
*setup
, uint32 setup_count
, uint32 max_setup_count
,
346 char *params
, uint32 param_count
, uint32 max_param_count
,
347 char *data
, uint32 data_count
, uint32 max_data_count
,
348 char **rparam
, uint32
*rparam_count
,
349 char **rdata
, uint32
*rdata_count
);
350 BOOL
cli_api(struct cli_state
*cli
,
351 char *param
, int prcnt
, int mprcnt
,
352 char *data
, int drcnt
, int mdrcnt
,
353 char **rparam
, int *rprcnt
,
354 char **rdata
, int *rdrcnt
);
355 BOOL
cli_NetWkstaUserLogon(struct cli_state
*cli
,char *user
, char *workstation
);
356 int cli_RNetShareEnum(struct cli_state
*cli
, void (*fn
)(const char *, uint32
, const char *, void *), void *state
);
357 BOOL
cli_NetServerEnum(struct cli_state
*cli
, char *workgroup
, uint32 stype
,
358 void (*fn
)(const char *, uint32
, const char *, void *),
360 BOOL
cli_oem_change_password(struct cli_state
*cli
, const char *user
, const char *new_password
,
361 const char *old_password
);
362 BOOL
cli_qpathinfo(struct cli_state
*cli
, const char *fname
,
363 time_t *c_time
, time_t *a_time
, time_t *m_time
,
364 size_t *size
, uint16
*mode
);
365 BOOL
cli_qpathinfo2(struct cli_state
*cli
, const char *fname
,
366 time_t *c_time
, time_t *a_time
, time_t *m_time
,
367 time_t *w_time
, size_t *size
, uint16
*mode
,
369 BOOL
cli_qfileinfo(struct cli_state
*cli
, int fnum
,
370 uint16
*mode
, size_t *size
,
371 time_t *c_time
, time_t *a_time
, time_t *m_time
,
372 time_t *w_time
, SMB_INO_T
*ino
);
374 /*The following definitions come from libsmb/clireadwrite.c */
376 size_t cli_read(struct cli_state
*cli
, int fnum
, char *buf
, off_t offset
, size_t size
);
377 ssize_t
cli_write(struct cli_state
*cli
,
378 int fnum
, uint16 write_mode
,
379 char *buf
, off_t offset
, size_t size
);
380 ssize_t
cli_smbwrite(struct cli_state
*cli
,
381 int fnum
, char *buf
, off_t offset
, size_t size1
);
383 /*The following definitions come from libsmb/clisecdesc.c */
385 SEC_DESC
*cli_query_secdesc(struct cli_state
*cli
,int fd
);
386 BOOL
cli_set_secdesc(struct cli_state
*cli
,int fd
, SEC_DESC
*sd
);
388 /*The following definitions come from libsmb/clitrans.c */
390 BOOL
cli_send_trans(struct cli_state
*cli
, int trans
,
391 char *name
, int pipe_name_len
,
393 uint16
*setup
, int lsetup
, int msetup
,
394 char *param
, int lparam
, int mparam
,
395 char *data
, int ldata
, int mdata
);
396 BOOL
cli_receive_trans(struct cli_state
*cli
,int trans
,
397 char **param
, int *param_len
,
398 char **data
, int *data_len
);
399 BOOL
cli_send_nt_trans(struct cli_state
*cli
,
402 uint16
*setup
, int lsetup
, int msetup
,
403 char *param
, int lparam
, int mparam
,
404 char *data
, int ldata
, int mdata
);
405 BOOL
cli_receive_nt_trans(struct cli_state
*cli
,
406 char **param
, int *param_len
,
407 char **data
, int *data_len
);
409 /*The following definitions come from libsmb/credentials.c */
411 char *credstr(uchar
*cred
);
412 void cred_session_key(DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
, char *pass
,
413 uchar session_key
[8]);
414 void cred_create(uchar session_key
[8], DOM_CHAL
*stor_cred
, UTIME timestamp
,
416 int cred_assert(DOM_CHAL
*cred
, uchar session_key
[8], DOM_CHAL
*stored_cred
,
418 BOOL
clnt_deal_with_creds(uchar sess_key
[8],
419 DOM_CRED
*sto_clnt_cred
, DOM_CRED
*rcv_srv_cred
);
420 BOOL
deal_with_creds(uchar sess_key
[8],
421 DOM_CRED
*sto_clnt_cred
,
422 DOM_CRED
*rcv_clnt_cred
, DOM_CRED
*rtn_srv_cred
);
424 /*The following definitions come from libsmb/namequery.c */
426 struct node_status
*name_status_query(int fd
,struct nmb_name
*name
,
427 struct in_addr to_ip
, int *num_names
);
428 BOOL
name_status_find(int type
, struct in_addr to_ip
, char *name
);
429 BOOL
name_register(int fd
, const char *name
, int name_type
,
430 struct in_addr name_ip
, int opcode
,
432 struct in_addr to_ip
, int *count
);
433 struct in_addr
*name_query(int fd
,const char *name
,int name_type
,
434 BOOL bcast
,BOOL recurse
,
435 struct in_addr to_ip
, int *count
);
436 FILE *startlmhosts(char *fname
);
437 BOOL
getlmhostsent( FILE *fp
, pstring name
, int *name_type
, struct in_addr
*ipaddr
);
438 void endlmhosts(FILE *fp
);
439 BOOL
name_register_wins(const char *name
, int name_type
);
440 BOOL
name_resolve_bcast(const char *name
, int name_type
,
441 struct in_addr
**return_ip_list
, int *return_count
);
442 BOOL
is_ip_address(const char *name
);
443 BOOL
resolve_name(const char *name
, struct in_addr
*return_ip
, int name_type
);
444 BOOL
resolve_srv_name(const char* srv_name
, fstring dest_host
,
446 BOOL
find_master_ip(char *group
, struct in_addr
*master_ip
);
447 BOOL
lookup_pdc_name(const char *srcname
, const char *domain
, struct in_addr
*pdc_ip
, char *ret_name
);
448 BOOL
get_dc_list(BOOL pdc_only
, char *group
, struct in_addr
**ip_list
, int *count
);
450 /*The following definitions come from libsmb/nmblib.c */
452 void debug_nmb_packet(struct packet_struct
*p
);
453 char *nmb_namestr(struct nmb_name
*n
);
454 struct packet_struct
*copy_packet(struct packet_struct
*packet
);
455 void free_packet(struct packet_struct
*packet
);
456 struct packet_struct
*parse_packet(char *buf
,int length
,
457 enum packet_type packet_type
);
458 struct packet_struct
*read_packet(int fd
,enum packet_type packet_type
);
459 void make_nmb_name( struct nmb_name
*n
, const char *name
, int type
);
460 BOOL
nmb_name_equal(struct nmb_name
*n1
, struct nmb_name
*n2
);
461 int build_packet(char *buf
, struct packet_struct
*p
);
462 BOOL
send_packet(struct packet_struct
*p
);
463 struct packet_struct
*receive_packet(int fd
,enum packet_type type
,int t
);
464 struct packet_struct
*receive_nmb_packet(int fd
, int t
, int trn_id
);
465 struct packet_struct
*receive_dgram_packet(int fd
, int t
, char *mailslot_name
);
466 BOOL
match_mailslot_name(struct packet_struct
*p
, char *mailslot_name
);
467 void sort_query_replies(char *data
, int n
, struct in_addr ip
);
468 char *dns_to_netbios_name(char *dns_name
);
469 int name_mangle( char *In
, char *Out
, char name_type
);
470 int name_extract(char *buf
,int ofs
,char *name
);
471 int name_len(char *s1
);
473 /*The following definitions come from libsmb/nterr.c */
475 BOOL
get_safe_nt_error_msg(uint32 nt_code
,char *msg
, size_t len
);
476 char *get_nt_error_msg(uint32 nt_code
);
478 /*The following definitions come from libsmb/passchange.c */
480 BOOL
remote_password_change(const char *remote_machine
, const char *user_name
,
481 const char *old_passwd
, const char *new_passwd
,
482 char *err_str
, size_t err_str_len
);
484 /*The following definitions come from libsmb/pwd_cache.c */
486 void pwd_init(struct pwd_info
*pwd
);
487 BOOL
pwd_is_nullpwd(const struct pwd_info
*pwd
);
488 BOOL
pwd_compare(struct pwd_info
*pwd1
, struct pwd_info
*pwd2
);
489 void pwd_read(struct pwd_info
*pwd
, char *passwd_report
, BOOL do_encrypt
);
490 void pwd_set_nullpwd(struct pwd_info
*pwd
);
491 void pwd_set_cleartext(struct pwd_info
*pwd
, char *clr
);
492 void pwd_get_cleartext(struct pwd_info
*pwd
, char *clr
);
493 void pwd_set_lm_nt_16(struct pwd_info
*pwd
, uchar lm_pwd
[16], uchar nt_pwd
[16]);
494 void pwd_get_lm_nt_16(struct pwd_info
*pwd
, uchar lm_pwd
[16], uchar nt_pwd
[16]);
495 void pwd_make_lm_nt_16(struct pwd_info
*pwd
, char *clr
);
496 void pwd_make_lm_nt_owf(struct pwd_info
*pwd
, uchar cryptkey
[8]);
497 void pwd_get_lm_nt_owf(struct pwd_info
*pwd
, uchar lm_owf
[24], uchar nt_owf
[24]);
499 /*The following definitions come from lib/smbrun.c */
501 int smbrun(char *cmd
,char *outfile
,BOOL shared
);
503 /*The following definitions come from libsmb/smbdes.c */
505 void E_P16(unsigned char *p14
,unsigned char *p16
);
506 void E_P24(unsigned char *p21
, unsigned char *c8
, unsigned char *p24
);
507 void D_P16(unsigned char *p14
, unsigned char *in
, unsigned char *out
);
508 void E_old_pw_hash( unsigned char *p14
, unsigned char *in
, unsigned char *out
);
509 void cred_hash1(unsigned char *out
,unsigned char *in
,unsigned char *key
);
510 void cred_hash2(unsigned char *out
,unsigned char *in
,unsigned char *key
);
511 void cred_hash3(unsigned char *out
,unsigned char *in
,unsigned char *key
, int forw
);
512 void SamOEMhash( unsigned char *data
, unsigned char *key
, int val
);
514 /*The following definitions come from libsmb/smbencrypt.c */
516 void SMBencrypt(uchar
*passwd
, uchar
*c8
, uchar
*p24
);
517 void E_md4hash(uchar
*passwd
, uchar
*p16
);
518 void nt_lm_owf_gen(char *pwd
, uchar nt_p16
[16], uchar p16
[16]);
519 void SMBOWFencrypt(uchar passwd
[16], uchar
*c8
, uchar p24
[24]);
520 void NTLMSSPOWFencrypt(uchar passwd
[8], uchar
*ntlmchalresp
, uchar p24
[24]);
521 void SMBNTencrypt(uchar
*passwd
, uchar
*c8
, uchar
*p24
);
522 BOOL
make_oem_passwd_hash(char data
[516], const char *passwd
, uchar old_pw_hash
[16], BOOL unicode
);
523 BOOL
decode_pw_buffer(char buffer
[516], char *new_pwrd
,
524 int new_pwrd_size
, uint32
*new_pw_len
);
526 /*The following definitions come from libsmb/smberr.c */
528 char *smb_errstr(char *inbuf
);
530 /*The following definitions come from libsmb/unexpected.c */
532 void unexpected_packet(struct packet_struct
*p
);
533 void clear_unexpected(time_t t
);
534 struct packet_struct
*receive_unexpected(enum packet_type packet_type
, int id
,
535 char *mailslot_name
);
537 /*The following definitions come from lib/snprintf.c */
540 /*The following definitions come from lib/substitute.c */
542 void standard_sub_basic(char *str
);
543 void standard_sub_advanced(int snum
, char *user
, char *connectpath
, gid_t gid
, char *str
);
544 void standard_sub_conn(connection_struct
*conn
, char *str
);
545 void standard_sub_snum(int snum
, char *str
);
546 void standard_sub_vuser(char *str
, user_struct
*vuser
);
547 void standard_sub_vsnum(char *str
, user_struct
*vuser
, int snum
);
549 /*The following definitions come from lib/sysacls.c */
551 int sys_acl_get_entry( SMB_ACL_T the_acl
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
552 int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*tag_type_p
);
553 int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
554 void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d
);
555 SMB_ACL_T
sys_acl_get_file( const char *path_p
, SMB_ACL_TYPE_T type
);
556 SMB_ACL_T
sys_acl_get_fd(int fd
);
557 int sys_acl_free( void *obj_p
);
558 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset
);
559 int sys_acl_add_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
560 int sys_acl_get_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
561 char *sys_acl_to_text( SMB_ACL_T the_acl
, ssize_t
*plen
);
562 int sys_acl_get_entry( SMB_ACL_T the_acl
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
563 int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*tag_type_p
);
564 int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
565 void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d
);
566 SMB_ACL_T
sys_acl_get_file( const char *path_p
, SMB_ACL_TYPE_T type
);
567 SMB_ACL_T
sys_acl_get_fd(int fd
);
568 int sys_acl_free( void *obj_p
);
569 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset
);
570 int sys_acl_add_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
571 int sys_acl_get_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
572 char *sys_acl_to_text( SMB_ACL_T the_acl
, ssize_t
*plen
);
574 /*The following definitions come from lib/system.c */
576 int sys_usleep(long usecs
);
577 int sys_stat(const char *fname
,SMB_STRUCT_STAT
*sbuf
);
578 int sys_fstat(int fd
,SMB_STRUCT_STAT
*sbuf
);
579 int sys_lstat(const char *fname
,SMB_STRUCT_STAT
*sbuf
);
580 int sys_ftruncate(int fd
, SMB_OFF_T offset
);
581 SMB_OFF_T
sys_lseek(int fd
, SMB_OFF_T offset
, int whence
);
582 int sys_fseek(FILE *fp
, SMB_OFF_T offset
, int whence
);
583 SMB_OFF_T
sys_ftell(FILE *fp
);
584 int sys_creat(const char *path
, mode_t mode
);
585 int sys_open(const char *path
, int oflag
, mode_t mode
);
586 FILE *sys_fopen(const char *path
, const char *type
);
587 SMB_STRUCT_DIRENT
*sys_readdir(DIR *dirp
);
588 int sys_waitpid(pid_t pid
,int *status
,int options
);
589 char *sys_getwd(char *s
);
590 int sys_chown(const char *fname
,uid_t uid
,gid_t gid
);
591 int sys_chroot(const char *dname
);
592 struct hostent
*sys_gethostbyname(const char *name
);
593 void oplock_set_capability(BOOL this_process
, BOOL inherit
);
594 long sys_random(void);
595 void sys_srandom(unsigned int seed
);
596 int groups_max(void);
597 int sys_getgroups(int setlen
, gid_t
*gidset
);
598 int sys_setgroups(int setlen
, gid_t
*gidset
);
599 struct passwd
*sys_getpwnam(const char *name
);
600 struct passwd
*sys_getpwuid(uid_t uid
);
601 int wsys_stat(const smb_ucs2_t
*wfname
,SMB_STRUCT_STAT
*sbuf
);
602 int wsys_lstat(const smb_ucs2_t
*wfname
,SMB_STRUCT_STAT
*sbuf
);
603 int wsys_creat(const smb_ucs2_t
*wfname
, mode_t mode
);
604 int wsys_open(const smb_ucs2_t
*wfname
, int oflag
, mode_t mode
);
605 FILE *wsys_fopen(const smb_ucs2_t
*wfname
, const char *type
);
606 DIR *wsys_opendir(const smb_ucs2_t
*wfname
);
607 smb_ucs2_t
*wsys_getwd(smb_ucs2_t
*s
);
608 int wsys_chown(const smb_ucs2_t
*wfname
, uid_t uid
, gid_t gid
);
609 int wsys_chroot(const smb_ucs2_t
*wfname
);
610 pid_t
sys_fork(void);
611 pid_t
sys_getpid(void);
612 int sys_popen(const char *command
);
613 int sys_pclose(int fd
);
615 /*The following definitions come from lib/talloc.c */
617 TALLOC_CTX
*talloc_init(void);
618 void *talloc(TALLOC_CTX
*t
, size_t size
);
619 void talloc_destroy_pool(TALLOC_CTX
*t
);
620 void talloc_destroy(TALLOC_CTX
*t
);
622 /*The following definitions come from lib/time.c */
624 void GetTimeOfDay(struct timeval
*tval
);
626 int TimeDiff(time_t t
);
627 struct tm
*LocalTime(time_t *t
);
628 time_t nt_time_to_unix(NTTIME
*nt
);
629 time_t interpret_long_date(char *p
);
630 void unix_to_nt_time(NTTIME
*nt
, time_t t
);
631 void put_long_date(char *p
,time_t t
);
632 BOOL
null_mtime(time_t mtime
);
633 void put_dos_date(char *buf
,int offset
,time_t unixdate
);
634 void put_dos_date2(char *buf
,int offset
,time_t unixdate
);
635 void put_dos_date3(char *buf
,int offset
,time_t unixdate
);
636 time_t make_unix_date(void *date_ptr
);
637 time_t make_unix_date2(void *date_ptr
);
638 time_t make_unix_date3(void *date_ptr
);
639 char *http_timestring(time_t t
);
640 char *timestring(BOOL hires
);
641 time_t get_create_time(SMB_STRUCT_STAT
*st
,BOOL fake_dirs
);
643 /*The following definitions come from lib/ufc.c */
645 char *ufc_crypt(char *key
,char *salt
);
647 /*The following definitions come from lib/username.c */
649 char *get_user_home_dir(char *user
);
650 BOOL
map_username(char *user
);
651 struct passwd
*Get_Pwnam(char *user
,BOOL allow_change
);
652 BOOL
user_in_group_list(char *user
,char *gname
);
653 BOOL
user_in_list(char *user
,char *list
);
654 struct passwd
*smb_getpwnam(char *user
, BOOL allow_change
);
656 /*The following definitions come from lib/util_array.c */
658 void free_void_array(uint32 num_entries
, void **entries
,
659 void(free_item
)(void*));
660 void* add_copy_to_array(uint32
*len
, void ***array
, const void *item
,
661 void*(item_dup
)(const void*), BOOL alloc_anyway
);
662 void* add_item_to_array(uint32
*len
, void ***array
, void *item
);
663 void free_use_info_array(uint32 num_entries
, struct use_info
**entries
);
664 struct use_info
* add_use_info_to_array(uint32
*len
, struct use_info
***array
,
665 const struct use_info
*name
);
666 void free_char_array(uint32 num_entries
, char **entries
);
667 char* add_chars_to_array(uint32
*len
, char ***array
, const char *name
);
668 void free_uint32_array(uint32 num_entries
, uint32
**entries
);
669 uint32
* add_uint32s_to_array(uint32
*len
, uint32
***array
, const uint32
*name
);
670 void free_sid_array(uint32 num_entries
, DOM_SID
**entries
);
671 DOM_SID
* add_sid_to_array(uint32
*len
, DOM_SID
***array
, const DOM_SID
*sid
);
673 /*The following definitions come from lib/util.c */
676 BOOL
in_group(gid_t group
, gid_t current_gid
, int ngroups
, gid_t
*groups
);
677 char *Atoic(char *p
, int *n
, char *c
);
678 char *get_numlist(char *p
, uint32
**num
, int *count
);
679 BOOL
file_exist(char *fname
,SMB_STRUCT_STAT
*sbuf
);
680 int file_rename(char *from
, char *to
);
681 time_t file_modtime(char *fname
);
682 BOOL
directory_exist(char *dname
,SMB_STRUCT_STAT
*st
);
683 SMB_OFF_T
get_file_size(char *file_name
);
684 char *attrib_string(uint16 mode
);
685 void show_msg(char *buf
);
686 void smb_setlen(char *buf
,int len
);
687 int set_message(char *buf
,int num_words
,int num_bytes
,BOOL zero
);
688 void dos_clean_name(char *s
);
689 void unix_clean_name(char *s
);
690 void make_dir_struct(char *buf
,char *mask
,char *fname
,SMB_OFF_T size
,int mode
,time_t date
);
691 void close_low_fds(void);
692 int set_blocking(int fd
, BOOL set
);
693 SMB_OFF_T
transfer_file(int infd
,int outfd
,SMB_OFF_T n
,char *header
,int headlen
,int align
);
695 void become_daemon(void);
697 void *Realloc(void *p
,size_t size
);
698 void safe_free(void *p
);
699 BOOL
get_myname(char *my_name
);
700 int interpret_protocol(char *str
,int def
);
701 BOOL
is_ipaddress(const char *str
);
702 uint32
interpret_addr(char *str
);
703 struct in_addr
*interpret_addr2(char *str
);
704 BOOL
zero_ip(struct in_addr ip
);
705 BOOL
same_net(struct in_addr ip1
,struct in_addr ip2
,struct in_addr mask
);
706 struct hostent
*Get_Hostbyname(const char *name
);
707 BOOL
process_exists(pid_t pid
);
708 char *uidtoname(uid_t uid
);
709 char *gidtoname(gid_t gid
);
710 uid_t
nametouid(char *name
);
711 gid_t
nametogid(char *name
);
712 void smb_panic(char *why
);
713 char *readdirname(DIR *p
);
714 BOOL
is_in_path(char *name
, name_compare_entry
*namelist
);
715 void set_namearray(name_compare_entry
**ppname_array
, char *namelist
);
716 void free_namearray(name_compare_entry
*name_array
);
717 BOOL
fcntl_lock(int fd
, int op
, SMB_OFF_T offset
, SMB_OFF_T count
, int type
);
718 BOOL
is_myname(char *s
);
719 void set_remote_arch(enum remote_arch_types type
);
720 enum remote_arch_types
get_remote_arch(void);
721 void out_ascii(FILE *f
, unsigned char *buf
,int len
);
722 void out_data(FILE *f
,char *buf1
,int len
, int per_line
);
723 void print_asc(int level
, unsigned char *buf
,int len
);
724 void dump_data(int level
,char *buf1
,int len
);
725 char *tab_depth(int depth
);
726 int str_checksum(const char *s
);
727 void zero_free(void *p
, size_t size
);
728 int set_maxfiles(int requested_max
);
729 BOOL
reg_split_key(char *full_keyname
, uint32
*reg_type
, char *key_name
);
730 char *smbd_mktemp(char *template);
731 void *memdup(void *p
, size_t size
);
732 char *myhostname(void);
733 char *lock_path(char *name
);
734 char *parent_dirname(const char *path
);
735 BOOL
ms_has_wild(char *s
);
736 BOOL
mask_match(char *string
, char *pattern
, BOOL is_case_sensitive
);
737 int _Insure_trap_error(int a1
, int a2
, int a3
, int a4
, int a5
, int a6
);
739 /*The following definitions come from lib/util_file.c */
741 BOOL
do_file_lock(int fd
, int waitsecs
, int type
);
742 BOOL
file_lock(int fd
, int type
, int secs
, int *plock_depth
);
743 BOOL
file_unlock(int fd
, int *plock_depth
);
744 void *startfilepwent(char *pfile
, char *s_readbuf
, int bufsize
,
745 int *file_lock_depth
, BOOL update
);
746 void endfilepwent(void *vp
, int *file_lock_depth
);
747 SMB_BIG_UINT
getfilepwpos(void *vp
);
748 BOOL
setfilepwpos(void *vp
, SMB_BIG_UINT tok
);
749 int getfileline(void *vp
, char *linebuf
, int linebuf_size
);
750 char *fgets_slash(char *s2
,int maxlen
,FILE *f
);
751 char *file_pload(char *syscmd
, size_t *size
);
752 char *file_load(char *fname
, size_t *size
);
753 char **file_lines_load(char *fname
, int *numlines
, BOOL convert
);
754 char **file_lines_pload(char *syscmd
, int *numlines
, BOOL convert
);
755 void file_lines_free(char **lines
);
756 void file_lines_slashcont(char **lines
);
758 /*The following definitions come from lib/util_list.c */
760 BOOL
copy_policy_hnd (POLICY_HND
*dest
, const POLICY_HND
*src
);
761 BOOL
compare_rpc_hnd_node(const RPC_HND_NODE
*x
,
762 const RPC_HND_NODE
*y
);
763 BOOL
RpcHndList_set_connection(const POLICY_HND
*hnd
,
764 struct cli_connection
*con
);
765 BOOL
RpcHndList_del_connection(const POLICY_HND
*hnd
);
766 struct cli_connection
* RpcHndList_get_connection(const POLICY_HND
*hnd
);
768 /*The following definitions come from lib/util_seaccess.c */
770 BOOL
se_access_check(SEC_DESC
*sd
, struct current_user
*user
,
771 uint32 acc_desired
, uint32
*acc_granted
, uint32
*status
);
773 /*The following definitions come from lib/util_sec.c */
775 void gain_root_privilege(void);
776 void gain_root_group_privilege(void);
777 void set_effective_uid(uid_t uid
);
778 void set_effective_gid(gid_t gid
);
779 void save_re_uid(void);
780 void restore_re_uid(void);
781 int set_re_uid(void);
782 void become_user_permanently(uid_t uid
, gid_t gid
);
784 /*The following definitions come from lib/util_sid.c */
786 void generate_wellknown_sids(void);
787 BOOL
map_domain_sid_to_name(DOM_SID
*sid
, char *nt_domain
);
788 BOOL
lookup_known_rid(DOM_SID
*sid
, uint32 rid
, char *name
, enum SID_NAME_USE
*psid_name_use
);
789 BOOL
map_domain_name_to_sid(DOM_SID
*sid
, char *nt_domain
);
790 void split_domain_name(const char *fullname
, char *domain
, char *name
);
791 char *sid_to_string(fstring sidstr_out
, DOM_SID
*sid
);
792 BOOL
string_to_sid(DOM_SID
*sidout
, char *sidstr
);
793 BOOL
sid_append_rid(DOM_SID
*sid
, uint32 rid
);
794 BOOL
sid_split_rid(DOM_SID
*sid
, uint32
*rid
);
795 void sid_copy(DOM_SID
*dst
, const DOM_SID
*src
);
796 DOM_SID
*sid_dup(DOM_SID
*src
);
797 BOOL
sid_linearize(char *outbuf
, size_t len
, DOM_SID
*sid
);
798 BOOL
sid_equal(const DOM_SID
*sid1
, const DOM_SID
*sid2
);
799 size_t sid_size(DOM_SID
*sid
);
801 /*The following definitions come from lib/util_sock.c */
803 BOOL
is_a_socket(int fd
);
804 void set_socket_options(int fd
, char *options
);
805 ssize_t
read_udp_socket(int fd
,char *buf
,size_t len
);
806 ssize_t
read_with_timeout(int fd
,char *buf
,size_t mincnt
,size_t maxcnt
,unsigned int time_out
);
807 BOOL
send_keepalive(int client
);
808 ssize_t
read_data(int fd
,char *buffer
,size_t N
);
809 ssize_t
write_data(int fd
,char *buffer
,size_t N
);
810 ssize_t
write_socket_data(int fd
,char *buffer
,size_t N
);
811 ssize_t
write_socket(int fd
,char *buf
,size_t len
);
812 ssize_t
read_smb_length(int fd
,char *inbuf
,unsigned int timeout
);
813 BOOL
receive_smb(int fd
,char *buffer
, unsigned int timeout
);
814 BOOL
client_receive_smb(int fd
,char *buffer
, unsigned int timeout
);
815 BOOL
send_null_session_msg(int fd
);
816 BOOL
send_smb(int fd
,char *buffer
);
817 BOOL
send_one_packet(char *buf
,int len
,struct in_addr ip
,int port
,int type
);
818 int open_socket_in(int type
, int port
, int dlevel
,uint32 socket_addr
, BOOL rebind
);
819 int open_socket_out(int type
, struct in_addr
*addr
, int port
,int timeout
);
820 void reset_globals_after_fork(void);
821 void client_setfd(int fd
);
822 char *client_name(void);
823 char *client_addr(void);
824 char *get_socket_name(int fd
);
825 char *get_socket_addr(int fd
);
826 int open_pipe_sock(char *path
);
827 int create_pipe_socket(char *dir
, int dir_perms
,
828 char *path
, int path_perms
);
830 /*The following definitions come from lib/util_str.c */
832 void set_first_token(char *ptr
);
833 BOOL
next_token(char **ptr
,char *buff
,char *sep
, size_t bufsize
);
834 char **toktocliplist(int *ctok
, char *sep
);
835 int StrCaseCmp(const char *s
, const char *t
);
836 int StrnCaseCmp(const char *s
, const char *t
, size_t n
);
837 BOOL
strequal(const char *s1
, const char *s2
);
838 BOOL
strnequal(const char *s1
,const char *s2
,size_t n
);
839 BOOL
strcsequal(const char *s1
,const char *s2
);
840 int strwicmp(char *psz1
, char *psz2
);
841 void strlower(char *s
);
842 void strupper(char *s
);
843 void strnorm(char *s
);
844 BOOL
strisnormal(char *s
);
845 void string_replace(char *s
,char oldc
,char newc
);
846 char *skip_string(char *buf
,size_t n
);
847 size_t str_charnum(const char *s
);
848 BOOL
trim_string(char *s
,const char *front
,const char *back
);
849 BOOL
strhasupper(const char *s
);
850 BOOL
strhaslower(const char *s
);
851 size_t count_chars(const char *s
,char c
);
852 BOOL
str_is_all(const char *s
,char c
);
853 char *safe_strcpy(char *dest
,const char *src
, size_t maxlength
);
854 char *safe_strcat(char *dest
, const char *src
, size_t maxlength
);
855 char *alpha_strcpy(char *dest
, const char *src
, size_t maxlength
);
856 char *StrnCpy(char *dest
,const char *src
,size_t n
);
857 char *strncpyn(char *dest
, const char *src
,size_t n
, char c
);
858 size_t strhex_to_str(char *p
, size_t len
, const char *strhex
);
859 BOOL
in_list(char *s
,char *list
,BOOL casesensitive
);
860 void string_free(char **s
);
861 BOOL
string_set(char **dest
,const char *src
);
862 void string_sub(char *s
,const char *pattern
,const char *insert
, size_t len
);
863 void fstring_sub(char *s
,const char *pattern
,const char *insert
);
864 void pstring_sub(char *s
,const char *pattern
,const char *insert
);
865 void all_string_sub(char *s
,const char *pattern
,const char *insert
, size_t len
);
866 void split_at_last_component(char *path
, char *front
, char sep
, char *back
);
867 char *octal_string(int i
);
868 char *string_truncate(char *s
, int length
);
869 void parse_domain_user(char *domuser
, fstring domain
, fstring user
);
871 /*The following definitions come from lib/util_unistr.c */
873 size_t dos_PutUniCode(char *dst
,const char *src
, ssize_t len
, BOOL null_terminate
);
874 void unistr_to_dos(char *dest
, const char *src
, size_t len
);
875 char *skip_unibuf(char *src
, size_t len
);
876 char *dos_unistrn2(uint16
*src
, int len
);
877 char *dos_unistr2(uint16
*src
);
878 char *dos_unistr2_to_str(UNISTR2
*str
);
879 void ascii_to_unistr(uint16
*dest
, const char *src
, int maxlen
);
880 void unistr_to_ascii(char *dest
, const uint16
*src
, int len
);
881 void unistr2_to_ascii(char *dest
, const UNISTR2
*str
, size_t maxlen
);
882 uint32
buffer2_to_uint32(BUFFER2
*str
);
883 char *dos_buffer2_to_str(BUFFER2
*str
);
884 char *dos_buffer2_to_multistr(BUFFER2
*str
);
885 size_t dos_struni2(char *dst
, const char *src
, size_t max_len
);
886 char *dos_unistr(char *buf
);
887 int unistrcpy(char *dst
, char *src
);
888 void default_unicode_map(smb_ucs2_t
**pp_cp_to_ucs2
, uint16
**pp_ucs2_to_cp
);
889 BOOL
load_unicode_map(const char *codepage
, smb_ucs2_t
**pp_cp_to_ucs2
, uint16
**pp_ucs2_to_cp
);
890 BOOL
load_dos_unicode_map(int codepage
);
891 BOOL
load_unix_unicode_map(const char *unix_char_set
);
892 smb_ucs2_t
*multibyte_to_unicode(smb_ucs2_t
*dst
, const char *src
,
893 size_t dst_len
, smb_ucs2_t
*cp_to_ucs2
);
894 char *unicode_to_unix(char *dst
, const smb_ucs2_t
*src
, size_t dst_len
);
895 smb_ucs2_t
*unix_to_unicode(smb_ucs2_t
*dst
, const char *src
, size_t dst_len
);
896 char *unicode_to_dos(char *dst
, const smb_ucs2_t
*src
, size_t dst_len
);
897 size_t unicode_to_dos_char(char *dst
, const smb_ucs2_t src
);
898 smb_ucs2_t
*dos_to_unicode(smb_ucs2_t
*dst
, const char *src
, size_t dst_len
);
899 size_t strlen_w(const smb_ucs2_t
*src
);
900 smb_ucs2_t
*safe_strcpy_w(smb_ucs2_t
*dest
,const smb_ucs2_t
*src
, size_t maxlength
);
901 smb_ucs2_t
*safe_strcat_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
, size_t maxlength
);
902 int strcmp_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
903 int strncmp_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
, size_t len
);
904 smb_ucs2_t
*strstr_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
905 smb_ucs2_t
*strchr_w(const smb_ucs2_t
*s
, smb_ucs2_t c
);
906 smb_ucs2_t
*strrchr_w(const smb_ucs2_t
*s
, smb_ucs2_t c
);
907 smb_ucs2_t
*strtok_w(smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
908 smb_ucs2_t
*strdup_w(const smb_ucs2_t
*s
);
909 int isupper_w( smb_ucs2_t val
);
910 int islower_w( smb_ucs2_t val
);
911 int isdigit_w( smb_ucs2_t val
);
912 int isxdigit_w( smb_ucs2_t val
);
913 int isspace_w( smb_ucs2_t val
);
914 smb_ucs2_t
toupper_w( smb_ucs2_t val
);
915 smb_ucs2_t
tolower_w( smb_ucs2_t val
);
916 void set_first_token_w(smb_ucs2_t
*ptr
);
917 BOOL
next_token_w(smb_ucs2_t
**ptr
, smb_ucs2_t
*buff
, smb_ucs2_t
*sep
, size_t bufsize
);
918 smb_ucs2_t
**toktocliplist_w(int *ctok
, smb_ucs2_t
*sep
);
919 int StrCaseCmp_w(const smb_ucs2_t
*s
, const smb_ucs2_t
*t
);
920 int StrnCaseCmp_w(const smb_ucs2_t
*s
, const smb_ucs2_t
*t
, size_t n
);
921 BOOL
strequal_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
922 BOOL
strnequal_w(const smb_ucs2_t
*s1
,const smb_ucs2_t
*s2
,size_t n
);
923 BOOL
strcsequal_w(const smb_ucs2_t
*s1
,const smb_ucs2_t
*s2
);
924 void strlower_w(smb_ucs2_t
*s
);
925 void strupper_w(smb_ucs2_t
*s
);
926 void strnorm_w(smb_ucs2_t
*s
);
927 BOOL
strisnormal_w(smb_ucs2_t
*s
);
928 void string_replace_w(smb_ucs2_t
*s
, smb_ucs2_t oldc
, smb_ucs2_t newc
);
929 smb_ucs2_t
*skip_string_w(smb_ucs2_t
*buf
,size_t n
);
930 size_t str_charnum_w(const smb_ucs2_t
*s
);
931 BOOL
trim_string_w(smb_ucs2_t
*s
,const smb_ucs2_t
*front
,const smb_ucs2_t
*back
);
932 BOOL
strhasupper_w(const smb_ucs2_t
*s
);
933 BOOL
strhaslower_w(const smb_ucs2_t
*s
);
934 size_t count_chars_w(const smb_ucs2_t
*s
,smb_ucs2_t c
);
935 BOOL
str_is_all_w(const smb_ucs2_t
*s
,smb_ucs2_t c
);
936 smb_ucs2_t
*alpha_strcpy_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
, size_t maxlength
);
937 smb_ucs2_t
*StrnCpy_w(smb_ucs2_t
*dest
,const smb_ucs2_t
*src
,size_t n
);
938 smb_ucs2_t
*strncpyn_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
,size_t n
, smb_ucs2_t c
);
939 size_t strhex_to_str_w(char *p
, size_t len
, const smb_ucs2_t
*strhex
);
940 BOOL
in_list_w(smb_ucs2_t
*s
,smb_ucs2_t
*list
,BOOL casesensitive
);
941 BOOL
string_init_w(smb_ucs2_t
**dest
,const smb_ucs2_t
*src
);
942 void string_free_w(smb_ucs2_t
**s
);
943 BOOL
string_set_w(smb_ucs2_t
**dest
,const smb_ucs2_t
*src
);
944 void string_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
, size_t len
);
945 void fstring_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
);
946 void pstring_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,smb_ucs2_t
*insert
);
947 void all_string_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
, size_t len
);
948 void split_at_last_component_w(smb_ucs2_t
*path
, smb_ucs2_t
*front
, smb_ucs2_t sep
, smb_ucs2_t
*back
);
949 smb_ucs2_t
*octal_string_w(int i
);
950 smb_ucs2_t
*string_truncate_w(smb_ucs2_t
*s
, size_t length
);
951 smb_ucs2_t
doscp2ucs2(int w
);
952 int ucs2doscp(smb_ucs2_t w
);
954 /*The following definitions come from lib/wins_srv.c */
956 BOOL
wins_srv_load_list( char *src
);
957 struct in_addr
wins_srv_ip( void );
958 void wins_srv_died( struct in_addr boothill_ip
);
959 unsigned long wins_srv_count( void );
961 /*The following definitions come from locking/brlock.c */
963 void brl_init(int read_only
);
964 BOOL
brl_lock(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
965 uint16 smbpid
, pid_t pid
, uint16 tid
,
966 br_off start
, br_off size
,
967 enum brl_type lock_type
);
968 BOOL
brl_unlock(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
969 uint16 smbpid
, pid_t pid
, uint16 tid
,
970 br_off start
, br_off size
);
971 BOOL
brl_locktest(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
972 uint16 smbpid
, pid_t pid
, uint16 tid
,
973 br_off start
, br_off size
,
974 enum brl_type lock_type
);
975 void brl_close(SMB_DEV_T dev
, SMB_INO_T ino
, pid_t pid
, int tid
, int fnum
);
976 int brl_forall(BRLOCK_FN(fn
));
978 /*The following definitions come from locking/locking.c */
980 BOOL
is_locked(files_struct
*fsp
,connection_struct
*conn
,
981 SMB_BIG_UINT count
,SMB_BIG_UINT offset
,
982 enum brl_type lock_type
);
983 BOOL
do_lock(files_struct
*fsp
,connection_struct
*conn
,
984 SMB_BIG_UINT count
,SMB_BIG_UINT offset
,enum brl_type lock_type
,
985 int *eclass
,uint32
*ecode
);
986 BOOL
do_unlock(files_struct
*fsp
,connection_struct
*conn
,
987 SMB_BIG_UINT count
,SMB_BIG_UINT offset
,
988 int *eclass
,uint32
*ecode
);
989 void locking_close_file(files_struct
*fsp
);
990 BOOL
locking_init(int read_only
);
991 BOOL
locking_end(void);
992 BOOL
lock_share_entry(connection_struct
*conn
,
993 SMB_DEV_T dev
, SMB_INO_T inode
);
994 void unlock_share_entry(connection_struct
*conn
,
995 SMB_DEV_T dev
, SMB_INO_T inode
);
996 BOOL
lock_share_entry_fsp(files_struct
*fsp
);
997 void unlock_share_entry_fsp(files_struct
*fsp
);
998 int get_share_modes(connection_struct
*conn
,
999 SMB_DEV_T dev
, SMB_INO_T inode
,
1000 share_mode_entry
**shares
);
1001 void del_share_mode(files_struct
*fsp
);
1002 BOOL
set_share_mode(files_struct
*fsp
, uint16 port
, uint16 op_type
);
1003 BOOL
remove_share_oplock(files_struct
*fsp
);
1004 BOOL
downgrade_share_oplock(files_struct
*fsp
);
1005 BOOL
modify_share_mode(files_struct
*fsp
, int new_mode
, uint16 new_oplock
);
1006 int share_mode_forall(SHAREMODE_FN(fn
));
1008 /*The following definitions come from locking/posix.c */
1010 int fd_close_posix(struct connection_struct
*conn
, files_struct
*fsp
);
1011 BOOL
is_posix_locked(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
, enum brl_type lock_type
);
1012 BOOL
set_posix_lock(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
, enum brl_type lock_type
);
1013 BOOL
release_posix_lock(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
);
1014 void posix_locking_close_file(files_struct
*fsp
);
1015 BOOL
posix_locking_init(int read_only
);
1016 BOOL
posix_locking_end(void);
1018 /*The following definitions come from msdfs/msdfs.c */
1020 BOOL
create_junction(char* pathname
, struct junction_map
* jn
);
1021 BOOL
is_msdfs_link(connection_struct
* conn
, char* path
);
1022 BOOL
get_referred_path(struct junction_map
* junction
);
1023 BOOL
dfs_redirect(char* pathname
, connection_struct
* conn
);
1024 BOOL
dfs_findfirst_redirect(char* pathname
, connection_struct
* conn
);
1025 int setup_dfs_referral(char* pathname
, int max_referral_level
,
1027 int dfs_path_error(char* inbuf
, char* outbuf
);
1028 BOOL
create_msdfs_link(struct junction_map
* jn
, BOOL exists
);
1029 BOOL
remove_msdfs_link(struct junction_map
* jn
);
1030 int enum_msdfs_links(struct junction_map
* jn
);
1031 int setup_dfs_referral(char* pathname
, int max_referral_level
,
1033 BOOL
is_msdfs_link(connection_struct
* conn
, char* path
);
1035 /*The following definitions come from nmbd/asyncdns.c */
1037 int asyncdns_fd(void);
1038 void kill_async_dns_child(void);
1039 void start_async_dns(void);
1040 void run_dns_queue(void);
1041 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
1042 struct name_record
**n
);
1043 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
1044 struct name_record
**n
);
1045 void kill_async_dns_child(void);
1047 /*The following definitions come from nmbd/nmbd_become_dmb.c */
1049 void add_domain_names(time_t t
);
1051 /*The following definitions come from nmbd/nmbd_become_lmb.c */
1053 void insert_permanent_name_into_unicast( struct subnet_record
*subrec
,
1054 struct nmb_name
*nmbname
, uint16 nb_type
);
1055 void unbecome_local_master_browser(struct subnet_record
*subrec
, struct work_record
*work
,
1056 BOOL force_new_election
);
1057 void become_local_master_browser(struct subnet_record
*subrec
, struct work_record
*work
);
1058 void set_workgroup_local_master_browser_name( struct work_record
*work
, char *newname
);
1060 /*The following definitions come from nmbd/nmbd_browserdb.c */
1062 void update_browser_death_time( struct browse_cache_record
*browc
);
1063 struct browse_cache_record
*create_browser_in_lmb_cache( char *work_name
,
1065 struct in_addr ip
);
1066 struct browse_cache_record
*find_browser_in_lmb_cache( char *browser_name
);
1067 void expire_lmb_browsers( time_t t
);
1069 /*The following definitions come from nmbd/nmbd_browsesync.c */
1071 void dmb_expire_and_sync_browser_lists(time_t t
);
1072 void announce_and_sync_with_domain_master_browser( struct subnet_record
*subrec
,
1073 struct work_record
*work
);
1074 void collect_all_workgroup_names_from_wins_server(time_t t
);
1075 void sync_all_dmbs(time_t t
);
1077 /*The following definitions come from nmbd/nmbd.c */
1080 /*The following definitions come from nmbd/nmbd_elections.c */
1082 void check_master_browser_exists(time_t t
);
1083 void run_elections(time_t t
);
1084 void process_election(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1085 BOOL
check_elections(void);
1086 void nmbd_message_election(int msg_type
, pid_t src
, void *buf
, size_t len
);
1088 /*The following definitions come from nmbd/nmbd_incomingdgrams.c */
1090 void tell_become_backup(void);
1091 void process_host_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1092 void process_workgroup_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1093 void process_local_master_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1094 void process_master_browser_announce(struct subnet_record
*subrec
,
1095 struct packet_struct
*p
,char *buf
);
1096 void process_lm_host_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1097 void process_get_backup_list_request(struct subnet_record
*subrec
,
1098 struct packet_struct
*p
,char *buf
);
1099 void process_reset_browser(struct subnet_record
*subrec
,
1100 struct packet_struct
*p
,char *buf
);
1101 void process_announce_request(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1102 void process_lm_announce_request(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1104 /*The following definitions come from nmbd/nmbd_incomingrequests.c */
1106 void process_name_release_request(struct subnet_record
*subrec
,
1107 struct packet_struct
*p
);
1108 void process_name_refresh_request(struct subnet_record
*subrec
,
1109 struct packet_struct
*p
);
1110 void process_name_registration_request(struct subnet_record
*subrec
,
1111 struct packet_struct
*p
);
1112 void process_node_status_request(struct subnet_record
*subrec
, struct packet_struct
*p
);
1113 void process_name_query_request(struct subnet_record
*subrec
, struct packet_struct
*p
);
1115 /*The following definitions come from nmbd/nmbd_lmhosts.c */
1117 void load_lmhosts_file(char *fname
);
1118 BOOL
find_name_in_lmhosts(struct nmb_name
*nmbname
, struct name_record
**namerecp
);
1120 /*The following definitions come from nmbd/nmbd_logonnames.c */
1122 void add_logon_names(void);
1124 /*The following definitions come from nmbd/nmbd_mynames.c */
1126 void register_my_workgroup_one_subnet(struct subnet_record
*subrec
);
1127 BOOL
register_my_workgroup_and_names(void);
1128 void release_my_names(void);
1129 void refresh_my_names(time_t t
);
1131 /*The following definitions come from nmbd/nmbd_namelistdb.c */
1133 void set_samba_nb_type(void);
1134 void remove_name_from_namelist( struct subnet_record
*subrec
,
1135 struct name_record
*namerec
);
1136 struct name_record
*find_name_on_subnet( struct subnet_record
*subrec
,
1137 struct nmb_name
*nmbname
,
1139 struct name_record
*find_name_for_remote_broadcast_subnet(
1140 struct nmb_name
*nmbname
,
1142 void update_name_ttl( struct name_record
*namerec
, int ttl
);
1143 struct name_record
*add_name_to_subnet( struct subnet_record
*subrec
,
1148 enum name_source source
,
1150 struct in_addr
*iplist
);
1151 void standard_success_register(struct subnet_record
*subrec
,
1152 struct userdata_struct
*userdata
,
1153 struct nmb_name
*nmbname
, uint16 nb_flags
, int ttl
,
1154 struct in_addr registered_ip
);
1155 void standard_fail_register( struct subnet_record
*subrec
,
1156 struct response_record
*rrec
,
1157 struct nmb_name
*nmbname
);
1158 BOOL
find_ip_in_name_record( struct name_record
*namerec
, struct in_addr ip
);
1159 void add_ip_to_name_record( struct name_record
*namerec
, struct in_addr new_ip
);
1160 void remove_ip_from_name_record( struct name_record
*namerec
,
1161 struct in_addr remove_ip
);
1162 void standard_success_release( struct subnet_record
*subrec
,
1163 struct userdata_struct
*userdata
,
1164 struct nmb_name
*nmbname
,
1165 struct in_addr released_ip
);
1166 void expire_names_on_subnet(struct subnet_record
*subrec
, time_t t
);
1167 void expire_names(time_t t
);
1168 void add_samba_names_to_subnet( struct subnet_record
*subrec
);
1169 void dump_all_namelists(void);
1171 /*The following definitions come from nmbd/nmbd_namequery.c */
1173 BOOL
query_name(struct subnet_record
*subrec
, char *name
, int type
,
1174 query_name_success_function success_fn
,
1175 query_name_fail_function fail_fn
,
1176 struct userdata_struct
*userdata
);
1177 BOOL
query_name_from_wins_server(struct in_addr ip_to
,
1178 char *name
, int type
,
1179 query_name_success_function success_fn
,
1180 query_name_fail_function fail_fn
,
1181 struct userdata_struct
*userdata
);
1183 /*The following definitions come from nmbd/nmbd_nameregister.c */
1185 BOOL
register_name(struct subnet_record
*subrec
,
1186 char *name
, int type
, uint16 nb_flags
,
1187 register_name_success_function success_fn
,
1188 register_name_fail_function fail_fn
,
1189 struct userdata_struct
*userdata
);
1190 BOOL
refresh_name(struct subnet_record
*subrec
, struct name_record
*namerec
,
1191 refresh_name_success_function success_fn
,
1192 refresh_name_fail_function fail_fn
,
1193 struct userdata_struct
*userdata
);
1195 /*The following definitions come from nmbd/nmbd_namerelease.c */
1197 BOOL
release_name(struct subnet_record
*subrec
, struct name_record
*namerec
,
1198 release_name_success_function success_fn
,
1199 release_name_fail_function fail_fn
,
1200 struct userdata_struct
*userdata
);
1202 /*The following definitions come from nmbd/nmbd_nodestatus.c */
1204 BOOL
node_status(struct subnet_record
*subrec
, struct nmb_name
*nmbname
,
1205 struct in_addr send_ip
, node_status_success_function success_fn
,
1206 node_status_fail_function fail_fn
, struct userdata_struct
*userdata
);
1208 /*The following definitions come from nmbd/nmbd_packets.c */
1210 uint16
get_nb_flags(char *buf
);
1211 void set_nb_flags(char *buf
, uint16 nb_flags
);
1212 struct response_record
*queue_register_name( struct subnet_record
*subrec
,
1213 response_function resp_fn
,
1214 timeout_response_function timeout_fn
,
1215 register_name_success_function success_fn
,
1216 register_name_fail_function fail_fn
,
1217 struct userdata_struct
*userdata
,
1218 struct nmb_name
*nmbname
,
1220 struct response_record
*queue_register_multihomed_name( struct subnet_record
*subrec
,
1221 response_function resp_fn
,
1222 timeout_response_function timeout_fn
,
1223 register_name_success_function success_fn
,
1224 register_name_fail_function fail_fn
,
1225 struct userdata_struct
*userdata
,
1226 struct nmb_name
*nmbname
,
1228 struct in_addr register_ip
);
1229 struct response_record
*queue_release_name( struct subnet_record
*subrec
,
1230 response_function resp_fn
,
1231 timeout_response_function timeout_fn
,
1232 release_name_success_function success_fn
,
1233 release_name_fail_function fail_fn
,
1234 struct userdata_struct
*userdata
,
1235 struct nmb_name
*nmbname
,
1237 struct in_addr release_ip
);
1238 struct response_record
*queue_refresh_name( struct subnet_record
*subrec
,
1239 response_function resp_fn
,
1240 timeout_response_function timeout_fn
,
1241 refresh_name_success_function success_fn
,
1242 refresh_name_fail_function fail_fn
,
1243 struct userdata_struct
*userdata
,
1244 struct name_record
*namerec
,
1245 struct in_addr refresh_ip
);
1246 struct response_record
*queue_query_name( struct subnet_record
*subrec
,
1247 response_function resp_fn
,
1248 timeout_response_function timeout_fn
,
1249 query_name_success_function success_fn
,
1250 query_name_fail_function fail_fn
,
1251 struct userdata_struct
*userdata
,
1252 struct nmb_name
*nmbname
);
1253 struct response_record
*queue_query_name_from_wins_server( struct in_addr to_ip
,
1254 response_function resp_fn
,
1255 timeout_response_function timeout_fn
,
1256 query_name_success_function success_fn
,
1257 query_name_fail_function fail_fn
,
1258 struct userdata_struct
*userdata
,
1259 struct nmb_name
*nmbname
);
1260 struct response_record
*queue_node_status( struct subnet_record
*subrec
,
1261 response_function resp_fn
,
1262 timeout_response_function timeout_fn
,
1263 node_status_success_function success_fn
,
1264 node_status_fail_function fail_fn
,
1265 struct userdata_struct
*userdata
,
1266 struct nmb_name
*nmbname
,
1267 struct in_addr send_ip
);
1268 void reply_netbios_packet(struct packet_struct
*orig_packet
,
1269 int rcode
, enum netbios_reply_type_code rcv_code
, int opcode
,
1270 int ttl
, char *data
,int len
);
1271 void run_packet_queue(void);
1272 void retransmit_or_expire_response_records(time_t t
);
1273 BOOL
listen_for_packets(BOOL run_election
);
1274 BOOL
send_mailslot(BOOL unique
, char *mailslot
,char *buf
,int len
,
1275 char *srcname
, int src_type
,
1276 char *dstname
, int dest_type
,
1277 struct in_addr dest_ip
,struct in_addr src_ip
,
1280 /*The following definitions come from nmbd/nmbd_processlogon.c */
1282 void process_logon_packet(struct packet_struct
*p
,char *buf
,int len
,
1285 /*The following definitions come from nmbd/nmbd_responserecordsdb.c */
1287 void remove_response_record(struct subnet_record
*subrec
,
1288 struct response_record
*rrec
);
1289 struct response_record
*make_response_record( struct subnet_record
*subrec
,
1290 struct packet_struct
*p
,
1291 response_function resp_fn
,
1292 timeout_response_function timeout_fn
,
1293 success_function success_fn
,
1294 fail_function fail_fn
,
1295 struct userdata_struct
*userdata
);
1296 struct response_record
*find_response_record(struct subnet_record
**ppsubrec
,
1298 BOOL
is_refresh_already_queued(struct subnet_record
*subrec
, struct name_record
*namerec
);
1300 /*The following definitions come from nmbd/nmbd_sendannounce.c */
1302 void send_browser_reset(int reset_type
, char *to_name
, int to_type
, struct in_addr to_ip
);
1303 void broadcast_announce_request(struct subnet_record
*subrec
, struct work_record
*work
);
1304 void announce_my_server_names(time_t t
);
1305 void announce_my_lm_server_names(time_t t
);
1306 void reset_announce_timer(void);
1307 void announce_myself_to_domain_master_browser(time_t t
);
1308 void announce_my_servers_removed(void);
1309 void announce_remote(time_t t
);
1310 void browse_sync_remote(time_t t
);
1312 /*The following definitions come from nmbd/nmbd_serverlistdb.c */
1314 void remove_all_servers(struct work_record
*work
);
1315 struct server_record
*find_server_in_workgroup(struct work_record
*work
, char *name
);
1316 void remove_server_from_workgroup(struct work_record
*work
, struct server_record
*servrec
);
1317 struct server_record
*create_server_on_workgroup(struct work_record
*work
,
1318 char *name
,int servertype
,
1319 int ttl
,char *comment
);
1320 void update_server_ttl(struct server_record
*servrec
, int ttl
);
1321 void expire_servers(struct work_record
*work
, time_t t
);
1322 void write_browse_list(time_t t
, BOOL force_write
);
1324 /*The following definitions come from nmbd/nmbd_subnetdb.c */
1326 void close_subnet(struct subnet_record
*subrec
);
1327 struct subnet_record
*make_normal_subnet(struct interface
*iface
);
1328 BOOL
create_subnets(void);
1329 BOOL
we_are_a_wins_client(void);
1330 struct subnet_record
*get_next_subnet_maybe_unicast(struct subnet_record
*subrec
);
1331 struct subnet_record
*get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record
*subrec
);
1333 /*The following definitions come from nmbd/nmbd_synclists.c */
1335 void sync_browse_lists(struct work_record
*work
,
1336 char *name
, int nm_type
,
1337 struct in_addr ip
, BOOL local
, BOOL servers
);
1338 void sync_check_completion(void);
1340 /*The following definitions come from nmbd/nmbd_winsproxy.c */
1342 void make_wins_proxy_name_query_request( struct subnet_record
*subrec
,
1343 struct packet_struct
*incoming_packet
,
1344 struct nmb_name
*question_name
);
1346 /*The following definitions come from nmbd/nmbd_winsserver.c */
1348 BOOL
packet_is_for_wins_server(struct packet_struct
*packet
);
1349 BOOL
initialise_wins(void);
1350 void wins_process_name_refresh_request(struct subnet_record
*subrec
,
1351 struct packet_struct
*p
);
1352 void wins_process_name_registration_request(struct subnet_record
*subrec
,
1353 struct packet_struct
*p
);
1354 void wins_process_multihomed_name_registration_request( struct subnet_record
*subrec
,
1355 struct packet_struct
*p
);
1356 void send_wins_name_query_response(int rcode
, struct packet_struct
*p
,
1357 struct name_record
*namerec
);
1358 void wins_process_name_query_request(struct subnet_record
*subrec
,
1359 struct packet_struct
*p
);
1360 void wins_process_name_release_request(struct subnet_record
*subrec
,
1361 struct packet_struct
*p
);
1362 void initiate_wins_processing(time_t t
);
1363 void wins_write_database(BOOL background
);
1365 /*The following definitions come from nmbd/nmbd_workgroupdb.c */
1367 struct work_record
*find_workgroup_on_subnet(struct subnet_record
*subrec
,
1369 struct work_record
*create_workgroup_on_subnet(struct subnet_record
*subrec
,
1370 fstring name
, int ttl
);
1371 void update_workgroup_ttl(struct work_record
*work
, int ttl
);
1372 void initiate_myworkgroup_startup(struct subnet_record
*subrec
, struct work_record
*work
);
1373 void dump_workgroups(BOOL force_write
);
1374 void expire_workgroups_and_servers(time_t t
);
1375 void nmbd_message_getbackuplist(int msg_type
, pid_t src
, void *buf
, size_t len
);
1377 /*The following definitions come from nsswitch/wb_client.c */
1379 BOOL
winbind_lookup_name(char *name
, DOM_SID
*sid
, enum SID_NAME_USE
*name_type
);
1380 BOOL
winbind_lookup_sid(DOM_SID
*sid
, fstring dom_name
, fstring name
, enum SID_NAME_USE
*name_type
);
1381 BOOL
winbind_sid_to_uid(uid_t
*puid
, DOM_SID
*sid
);
1382 BOOL
winbind_uid_to_sid(DOM_SID
*sid
, uid_t uid
);
1383 BOOL
winbind_sid_to_gid(gid_t
*pgid
, DOM_SID
*sid
);
1384 BOOL
winbind_gid_to_sid(DOM_SID
*sid
, gid_t gid
);
1385 int winbind_initgroups(char *user
, gid_t gid
);
1386 int winbind_getgroups(char *user
, int size
, gid_t
*list
);
1387 BOOL
winbind_uidtoname(fstring name
, uid_t uid
);
1388 BOOL
winbind_gidtoname(fstring name
, gid_t gid
);
1389 BOOL
winbind_nametouid(uid_t
*puid
, char *name
);
1390 BOOL
winbind_nametogid(gid_t
*pgid
, char *gname
);
1392 /*The following definitions come from nsswitch/wb_common.c */
1394 void init_request(struct winbindd_request
*request
, int request_type
);
1395 void init_response(struct winbindd_response
*response
);
1396 void close_sock(void);
1397 int write_sock(void *buffer
, int count
);
1398 int read_reply(struct winbindd_response
*response
);
1399 void free_response(struct winbindd_response
*response
);
1400 enum nss_status
winbindd_request(int req_type
,
1401 struct winbindd_request
*request
,
1402 struct winbindd_response
*response
);
1404 /*The following definitions come from param/loadparm.c */
1406 void lp_talloc_free(void);
1407 char *lp_logfile(void);
1408 char *lp_smbrun(void);
1409 char *lp_configfile(void);
1410 char *lp_smb_passwd_file(void);
1411 char *lp_private_dir(void);
1412 char *lp_passdb_module_path(void);
1413 char *lp_serverstring(void);
1414 char *lp_printcapname(void);
1415 char *lp_enumports_cmd(void);
1416 char *lp_addprinter_cmd(void);
1417 char *lp_deleteprinter_cmd(void);
1418 char *lp_lockdir(void);
1419 char *lp_utmpdir(void);
1420 char *lp_wtmpdir(void);
1421 char *lp_utmp_hostname(void);
1422 BOOL
lp_utmp_consolidate(void);
1423 char *lp_rootdir(void);
1424 char *lp_source_environment(void);
1425 char *lp_defaultservice(void);
1426 char *lp_msg_command(void);
1427 char *lp_dfree_command(void);
1428 char *lp_hosts_equiv(void);
1429 char *lp_auto_services(void);
1430 char *lp_passwd_program(void);
1431 char *lp_passwd_chat(void);
1432 char *lp_passwordserver(void);
1433 char *lp_name_resolve_order(void);
1434 char *lp_workgroup(void);
1435 char *lp_username_map(void);
1436 char *lp_groupname_map(void);
1437 char *lp_logon_script(void);
1438 char *lp_logon_path(void);
1439 char *lp_logon_drive(void);
1440 char *lp_logon_home(void);
1441 char *lp_remote_announce(void);
1442 char *lp_remote_browse_sync(void);
1443 char *lp_wins_server(void);
1444 char *lp_interfaces(void);
1445 char *lp_socket_address(void);
1446 char *lp_nis_home_map_name(void);
1447 char *lp_netbios_aliases(void);
1448 char *lp_panic_action(void);
1449 char *lp_adduser_script(void);
1450 char *lp_deluser_script(void);
1451 char *lp_wins_hook(void);
1452 char *lp_domain_groups(void);
1453 char *lp_domain_admin_group(void);
1454 char *lp_domain_guest_group(void);
1455 char *lp_domain_admin_users(void);
1456 char *lp_domain_guest_users(void);
1457 char *lp_winbind_uid(void);
1458 char *lp_winbind_gid(void);
1459 char *lp_template_homedir(void);
1460 char *lp_template_shell(void);
1461 char *lp_winbind_separator(void);
1462 char *lp_codepagedir(void);
1463 char *lp_ldap_server(void);
1464 char *lp_ldap_suffix(void);
1465 char *lp_ldap_filter(void);
1466 char *lp_ldap_root(void);
1467 char *lp_ldap_rootpasswd(void);
1468 int lp_ssl_version(void);
1469 char *lp_ssl_hosts(void);
1470 char *lp_ssl_hosts_resign(void);
1471 char *lp_ssl_cacertdir(void);
1472 char *lp_ssl_cacertfile(void);
1473 char *lp_ssl_cert(void);
1474 char *lp_ssl_privkey(void);
1475 char *lp_ssl_client_cert(void);
1476 char *lp_ssl_client_privkey(void);
1477 char *lp_ssl_ciphers(void);
1478 BOOL
lp_ssl_enabled(void);
1479 BOOL
lp_ssl_reqClientCert(void);
1480 BOOL
lp_ssl_reqServerCert(void);
1481 BOOL
lp_ssl_compatibility(void);
1482 BOOL
lp_ms_add_printer_wizard(void);
1483 BOOL
lp_dns_proxy(void);
1484 BOOL
lp_wins_support(void);
1485 BOOL
lp_we_are_a_wins_server(void);
1486 BOOL
lp_wins_proxy(void);
1487 BOOL
lp_local_master(void);
1488 BOOL
lp_domain_logons(void);
1489 BOOL
lp_load_printers(void);
1490 BOOL
lp_use_rhosts(void);
1491 BOOL
lp_readprediction(void);
1492 BOOL
lp_readbmpx(void);
1493 BOOL
lp_readraw(void);
1494 BOOL
lp_writeraw(void);
1495 BOOL
lp_null_passwords(void);
1496 BOOL
lp_strip_dot(void);
1497 BOOL
lp_encrypted_passwords(void);
1498 BOOL
lp_update_encrypted(void);
1499 BOOL
lp_syslog_only(void);
1500 BOOL
lp_timestamp_logs(void);
1501 BOOL
lp_debug_hires_timestamp(void);
1502 BOOL
lp_debug_pid(void);
1503 BOOL
lp_debug_uid(void);
1504 BOOL
lp_browse_list(void);
1505 BOOL
lp_unix_realname(void);
1506 BOOL
lp_nis_home_map(void);
1507 BOOL
lp_bind_interfaces_only(void);
1508 BOOL
lp_unix_password_sync(void);
1509 BOOL
lp_passwd_chat_debug(void);
1510 BOOL
lp_nt_smb_support(void);
1511 BOOL
lp_nt_pipe_support(void);
1512 BOOL
lp_nt_acl_support(void);
1513 BOOL
lp_stat_cache(void);
1514 BOOL
lp_allow_trusted_domains(void);
1515 BOOL
lp_restrict_anonymous(void);
1516 BOOL
lp_host_msdfs(void);
1517 BOOL
lp_kernel_oplocks(void);
1518 int lp_os_level(void);
1519 int lp_max_ttl(void);
1520 int lp_max_wins_ttl(void);
1521 int lp_min_wins_ttl(void);
1522 int lp_max_log_size(void);
1523 int lp_max_open_files(void);
1524 int lp_maxxmit(void);
1525 int lp_maxmux(void);
1526 int lp_passwordlevel(void);
1527 int lp_usernamelevel(void);
1528 int lp_readsize(void);
1529 int lp_deadtime(void);
1530 int lp_maxprotocol(void);
1531 int lp_security(void);
1532 int lp_maxdisksize(void);
1533 int lp_lpqcachetime(void);
1534 int lp_syslog(void);
1535 int lp_client_code_page(void);
1536 int lp_lm_announce(void);
1537 int lp_lm_interval(void);
1538 int lp_machine_password_timeout(void);
1539 int lp_change_notify_timeout(void);
1540 int lp_stat_cache_size(void);
1541 int lp_map_to_guest(void);
1542 int lp_min_passwd_length(void);
1543 int lp_oplock_break_wait_time(void);
1544 int lp_ldap_port(void);
1545 char *lp_preexec(int );
1546 char *lp_postexec(int );
1547 char *lp_rootpreexec(int );
1548 char *lp_rootpostexec(int );
1549 char *lp_servicename(int );
1550 char *lp_pathname(int );
1551 char *lp_dontdescend(int );
1552 char *lp_username(int );
1553 char *lp_guestaccount(int );
1554 char *lp_invalid_users(int );
1555 char *lp_valid_users(int );
1556 char *lp_admin_users(int );
1557 char *lp_printcommand(int );
1558 char *lp_lpqcommand(int );
1559 char *lp_lprmcommand(int );
1560 char *lp_lppausecommand(int );
1561 char *lp_lpresumecommand(int );
1562 char *lp_queuepausecommand(int );
1563 char *lp_queueresumecommand(int );
1564 char *lp_driverfile(int );
1565 char *lp_printerdriver(int );
1566 char *lp_hostsallow(int );
1567 char *lp_hostsdeny(int );
1568 char *lp_magicscript(int );
1569 char *lp_magicoutput(int );
1570 char *lp_comment(int );
1571 char *lp_force_user(int );
1572 char *lp_force_group(int );
1573 char *lp_readlist(int );
1574 char *lp_writelist(int );
1575 char *lp_printer_admin(int );
1576 char *lp_fstype(int );
1577 char *lp_vfsobj(int );
1578 char *lp_mangled_map(int );
1579 char *lp_veto_files(int );
1580 char *lp_hide_files(int );
1581 char *lp_veto_oplocks(int );
1582 char *lp_driverlocation(int );
1583 BOOL
lp_msdfs_root(int );
1584 BOOL
lp_autoloaded(int );
1585 BOOL
lp_preexec_close(int );
1586 BOOL
lp_rootpreexec_close(int );
1587 BOOL
lp_casesensitive(int );
1588 BOOL
lp_preservecase(int );
1589 BOOL
lp_shortpreservecase(int );
1590 BOOL
lp_casemangle(int );
1591 BOOL
lp_status(int );
1592 BOOL
lp_hide_dot_files(int );
1593 BOOL
lp_browseable(int );
1594 BOOL
lp_readonly(int );
1595 BOOL
lp_no_set_dir(int );
1596 BOOL
lp_guest_ok(int );
1597 BOOL
lp_guest_only(int );
1598 BOOL
lp_print_ok(int );
1599 BOOL
lp_postscript(int );
1600 BOOL
lp_map_hidden(int );
1601 BOOL
lp_map_archive(int );
1602 BOOL
lp_locking(int );
1603 BOOL
lp_strict_locking(int );
1604 BOOL
lp_posix_locking(int );
1606 BOOL
lp_share_modes(int );
1607 BOOL
lp_oplocks(int );
1608 BOOL
lp_level2_oplocks(int );
1609 BOOL
lp_onlyuser(int );
1610 BOOL
lp_manglednames(int );
1611 BOOL
lp_widelinks(int );
1612 BOOL
lp_symlinks(int );
1613 BOOL
lp_syncalways(int );
1614 BOOL
lp_strict_sync(int );
1615 BOOL
lp_map_system(int );
1616 BOOL
lp_delete_readonly(int );
1617 BOOL
lp_fake_oplocks(int );
1618 BOOL
lp_recursive_veto_delete(int );
1619 BOOL
lp_dos_filetimes(int );
1620 BOOL
lp_dos_filetime_resolution(int );
1621 BOOL
lp_fake_dir_create_times(int );
1622 BOOL
lp_blocking_locks(int );
1623 BOOL
lp_inherit_perms(int );
1624 int lp_create_mask(int );
1625 int lp_force_create_mode(int );
1626 int _lp_security_mask(int );
1627 int _lp_force_security_mode(int );
1628 int lp_dir_mask(int );
1629 int lp_force_dir_mode(int );
1630 int _lp_dir_security_mask(int );
1631 int _lp_force_dir_security_mode(int );
1632 int lp_max_connections(int );
1633 int lp_defaultcase(int );
1634 int lp_minprintspace(int );
1635 int lp_maxprintjobs(int );
1636 int lp_printing(int );
1637 int lp_oplock_contention_limit(int );
1638 int lp_write_cache_size(int );
1639 char lp_magicchar(int );
1640 int lp_winbind_cache_time(void);
1641 BOOL
lp_add_home(char *pszHomename
, int iDefaultService
, char *pszHomedir
);
1642 int lp_add_service(char *pszService
, int iDefaultService
);
1643 BOOL
lp_add_printer(char *pszPrintername
, int iDefaultService
);
1644 BOOL
lp_file_list_changed(void);
1645 void *lp_local_ptr(int snum
, void *ptr
);
1646 BOOL
lp_do_parameter(int snum
, char *pszParmName
, char *pszParmValue
);
1647 void init_locals(void);
1648 BOOL
lp_is_default(int snum
, struct parm_struct
*parm
);
1649 struct parm_struct
*lp_next_parameter(int snum
, int *i
, int allparameters
);
1650 BOOL
lp_snum_ok(int iService
);
1651 void lp_add_one_printer(char *name
, char *comment
);
1652 BOOL
lp_loaded(void);
1653 void lp_killunused(BOOL (*snumused
) (int));
1654 void lp_killservice(int iServiceIn
);
1655 BOOL
lp_load(char *pszFname
, BOOL global_only
, BOOL save_defaults
,
1657 void lp_resetnumservices(void);
1658 int lp_numservices(void);
1659 void lp_dump(FILE * f
, BOOL show_defaults
, int maxtoprint
);
1660 void lp_dump_one(FILE * f
, BOOL show_defaults
, int snum
);
1661 int lp_servicenumber(char *pszServiceName
);
1662 char *volume_label(int snum
);
1663 int lp_server_role(void);
1664 BOOL
lp_domain_master(void);
1665 BOOL
lp_preferred_master(void);
1666 void lp_remove_service(int snum
);
1667 void lp_copy_service(int snum
, char *new_name
);
1668 int lp_default_server_announce(void);
1669 int lp_major_announce_version(void);
1670 int lp_minor_announce_version(void);
1671 void lp_set_name_resolve_order(char *new_order
);
1672 int lp_security_mask(int snum
);
1673 int lp_force_security_mode(int snum
);
1674 int lp_dir_security_mask(int snum
);
1675 int lp_force_dir_security_mode(int snum
);
1676 char *lp_printername(int snum
);
1678 /*The following definitions come from param/params.c */
1680 BOOL
pm_process( char *FileName
,
1681 BOOL (*sfunc
)(char *),
1682 BOOL (*pfunc
)(char *, char *) );
1684 /*The following definitions come from passdb/machine_sid.c */
1686 BOOL
pdb_generate_sam_sid(void);
1688 /*The following definitions come from passdb/pass_check.c */
1690 void dfs_unlogin(void);
1691 BOOL
pass_check(char *user
, char *password
, int pwlen
, struct passwd
*pwd
,
1692 BOOL (*fn
) (char *, char *));
1694 /*The following definitions come from passdb/passdb.c */
1696 BOOL
initialize_password_db(BOOL reload
);
1697 void pdb_init_sam(SAM_ACCOUNT
*user
);
1698 void pdb_clear_sam(SAM_ACCOUNT
*user
);
1699 struct sam_disp_info
*pdb_sam_to_dispinfo(SAM_ACCOUNT
*user
);
1700 char *pdb_encode_acct_ctrl(uint16 acct_ctrl
, size_t length
);
1701 uint16
pdb_decode_acct_ctrl(const char *p
);
1702 void pdb_sethexpwd(char *p
, unsigned char *pwd
, uint16 acct_ctrl
);
1703 BOOL
pdb_gethexpwd(char *p
, unsigned char *pwd
);
1704 BOOL
pdb_name_to_rid(char *user_name
, uint32
*u_rid
, uint32
*g_rid
);
1705 uid_t
pdb_user_rid_to_uid(uint32 user_rid
);
1706 gid_t
pdb_user_rid_to_gid(uint32 user_rid
);
1707 uint32
pdb_uid_to_user_rid(uid_t uid
);
1708 uint32
pdb_gid_to_group_rid(gid_t gid
);
1709 BOOL
pdb_rid_is_user(uint32 rid
);
1710 BOOL
local_lookup_rid(uint32 rid
, char *name
, enum SID_NAME_USE
*psid_name_use
);
1711 BOOL
local_lookup_name(char *domain
, char *user
, DOM_SID
*psid
, enum SID_NAME_USE
*psid_name_use
);
1712 DOM_SID
*local_uid_to_sid(DOM_SID
*psid
, uid_t uid
);
1713 BOOL
local_sid_to_uid(uid_t
*puid
, DOM_SID
*psid
, enum SID_NAME_USE
*name_type
);
1714 DOM_SID
*local_gid_to_sid(DOM_SID
*psid
, gid_t gid
);
1715 BOOL
local_sid_to_gid(gid_t
*pgid
, DOM_SID
*psid
, enum SID_NAME_USE
*name_type
);
1716 void copy_id23_to_sam_passwd(SAM_ACCOUNT
*to
, SAM_USER_INFO_23
*from
);
1717 void copy_id21_to_sam_passwd(SAM_ACCOUNT
*to
, SAM_USER_INFO_21
*from
);
1718 void copy_sam_passwd(SAM_ACCOUNT
*to
, const SAM_ACCOUNT
*from
);
1719 BOOL
local_password_change(char *user_name
, int local_flags
,
1721 char *err_str
, size_t err_str_len
,
1722 char *msg_str
, size_t msg_str_len
);
1723 uint16
pdb_get_acct_ctrl (SAM_ACCOUNT
*sampass
);
1724 time_t pdb_get_logon_time (SAM_ACCOUNT
*sampass
);
1725 time_t pdb_get_logoff_time (SAM_ACCOUNT
*sampass
);
1726 time_t pdb_get_kickoff_time (SAM_ACCOUNT
*sampass
);
1727 time_t pdb_get_pass_last_set_time (SAM_ACCOUNT
*sampass
);
1728 time_t pdb_get_pass_can_change_time (SAM_ACCOUNT
*sampass
);
1729 time_t pdb_get_pass_must_change_time (SAM_ACCOUNT
*sampass
);
1730 uint16
pdb_get_logon_divs (SAM_ACCOUNT
*sampass
);
1731 uint32
pdb_get_hours_len (SAM_ACCOUNT
*sampass
);
1732 uint8
* pdb_get_hours (SAM_ACCOUNT
*sampass
);
1733 BYTE
* pdb_get_nt_passwd (SAM_ACCOUNT
*sampass
);
1734 BYTE
* pdb_get_lanman_passwd (SAM_ACCOUNT
*sampass
);
1735 uint32
pdb_get_user_rid (SAM_ACCOUNT
*sampass
);
1736 uint32
pdb_get_group_rid (SAM_ACCOUNT
*sampass
);
1737 uid_t
pdb_get_uid (SAM_ACCOUNT
*sampass
);
1738 gid_t
pdb_get_gid (SAM_ACCOUNT
*sampass
);
1739 char* pdb_get_username (SAM_ACCOUNT
*sampass
);
1740 char* pdb_get_domain (SAM_ACCOUNT
*sampass
);
1741 char* pdb_get_nt_username (SAM_ACCOUNT
*sampass
);
1742 char* pdb_get_fullname (SAM_ACCOUNT
*sampass
);
1743 char* pdb_get_homedir (SAM_ACCOUNT
*sampass
);
1744 char* pdb_get_dirdrive (SAM_ACCOUNT
*sampass
);
1745 char* pdb_get_logon_script (SAM_ACCOUNT
*sampass
);
1746 char* pdb_get_profile_path (SAM_ACCOUNT
*sampass
);
1747 char* pdb_get_acct_desc (SAM_ACCOUNT
*sampass
);
1748 char* pdb_get_workstations (SAM_ACCOUNT
*sampass
);
1749 char* pdb_get_munged_dial (SAM_ACCOUNT
*sampass
);
1750 uint32
pdb_get_unknown3 (SAM_ACCOUNT
*sampass
);
1751 uint32
pdb_get_unknown5 (SAM_ACCOUNT
*sampass
);
1752 uint32
pdb_get_unknown6 (SAM_ACCOUNT
*sampass
);
1753 void pdb_set_mem_ownership (SAM_ACCOUNT
*sampass
, BOOL flag
);
1754 BOOL
pdb_set_acct_ctrl (SAM_ACCOUNT
*sampass
, uint16 flags
);
1755 BOOL
pdb_set_logon_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
1756 BOOL
pdb_set_logoff_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
1757 BOOL
pdb_set_kickoff_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
1758 BOOL
pdb_set_pass_can_change_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
1759 BOOL
pdb_set_pass_must_change_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
1760 BOOL
pdb_set_pass_last_set_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
1761 BOOL
pdb_set_hours_len (SAM_ACCOUNT
*sampass
, uint32 len
);
1762 BOOL
pdb_set_logons_divs (SAM_ACCOUNT
*sampass
, uint16 hours
);
1763 BOOL
pdb_set_uid (SAM_ACCOUNT
*sampass
, uid_t uid
);
1764 BOOL
pdb_set_gid (SAM_ACCOUNT
*sampass
, gid_t gid
);
1765 BOOL
pdb_set_user_rid (SAM_ACCOUNT
*sampass
, uint32 rid
);
1766 BOOL
pdb_set_group_rid (SAM_ACCOUNT
*sampass
, uint32 grid
);
1767 BOOL
pdb_set_username (SAM_ACCOUNT
*sampass
, char *username
);
1768 BOOL
pdb_set_domain (SAM_ACCOUNT
*sampass
, char *domain
);
1769 BOOL
pdb_set_nt_username (SAM_ACCOUNT
*sampass
, char *nt_username
);
1770 BOOL
pdb_set_fullname (SAM_ACCOUNT
*sampass
, char *fullname
);
1771 BOOL
pdb_set_logon_script (SAM_ACCOUNT
*sampass
, char *logon_script
);
1772 BOOL
pdb_set_profile_path (SAM_ACCOUNT
*sampass
, char *profile_path
);
1773 BOOL
pdb_set_dir_drive (SAM_ACCOUNT
*sampass
, char *dir_drive
);
1774 BOOL
pdb_set_homedir (SAM_ACCOUNT
*sampass
, char *homedir
);
1775 BOOL
pdb_set_acct_desc (SAM_ACCOUNT
*sampass
, char *acct_desc
);
1776 BOOL
pdb_set_workstations (SAM_ACCOUNT
*sampass
, char *workstations
);
1777 BOOL
pdb_set_munged_dial (SAM_ACCOUNT
*sampass
, char *munged_dial
);
1778 BOOL
pdb_set_nt_passwd (SAM_ACCOUNT
*sampass
, BYTE
*pwd
);
1779 BOOL
pdb_set_lanman_passwd (SAM_ACCOUNT
*sampass
, BYTE
*pwd
);
1781 /*The following definitions come from passdb/pdb_smbpasswd.c */
1783 BOOL
pdb_setsampwent (BOOL update
);
1784 void pdb_endsampwent (void);
1785 SAM_ACCOUNT
* pdb_getsampwent (void);
1786 SAM_ACCOUNT
* pdb_getsampwnam (char *username
);
1787 SAM_ACCOUNT
* pdb_getsampwuid (uid_t uid
);
1788 SAM_ACCOUNT
* pdb_getsampwrid (uint32 rid
);
1789 BOOL
pdb_add_sam_account (SAM_ACCOUNT
*sampass
);
1790 BOOL
pdb_update_sam_account (SAM_ACCOUNT
*sampass
, BOOL override
);
1791 BOOL
pdb_delete_sam_account (char* username
);
1793 /*The following definitions come from passdb/pdb_tdb.c */
1795 BOOL
pdb_setsampwent(BOOL update
);
1796 void pdb_endsampwent(void);
1797 SAM_ACCOUNT
* pdb_getsampwent(void);
1798 SAM_ACCOUNT
* pdb_getsampwnam (char *sname
);
1799 SAM_ACCOUNT
* pdb_getsampwuid (uid_t uid
);
1800 SAM_ACCOUNT
* pdb_getsampwrid (uint32 rid
);
1801 BOOL
pdb_delete_sam_account(char *sname
);
1802 BOOL
pdb_update_sam_account (SAM_ACCOUNT
*newpwd
, BOOL override
);
1803 BOOL
pdb_add_sam_account (SAM_ACCOUNT
*newpwd
);
1805 /*The following definitions come from passdb/secrets.c */
1807 BOOL
secrets_init(void);
1808 void *secrets_fetch(char *key
, size_t *size
);
1809 BOOL
secrets_store(char *key
, void *data
, size_t size
);
1810 BOOL
secrets_delete(char *key
);
1811 BOOL
secrets_store_domain_sid(char *domain
, DOM_SID
*sid
);
1812 BOOL
secrets_fetch_domain_sid(char *domain
, DOM_SID
*sid
);
1813 char *trust_keystr(char *domain
);
1814 BOOL
secrets_fetch_trust_account_password(char *domain
, uint8 ret_pwd
[16],
1815 time_t *pass_last_set_time
);
1816 BOOL
secrets_store_trust_account_password(char *domain
, uint8 new_pwd
[16]);
1817 BOOL
trust_password_delete(char *domain
);
1819 /*The following definitions come from passdb/smbpassfile.c */
1821 BOOL
migrate_from_old_password_file(char *domain
);
1823 /*The following definitions come from printing/load.c */
1825 void add_all_printers(void);
1826 void load_printers(void);
1828 /*The following definitions come from printing/lpq_parse.c */
1830 BOOL
parse_lpq_entry(int snum
,char *line
,
1831 print_queue_struct
*buf
,
1832 print_status_struct
*status
,BOOL first
);
1834 /*The following definitions come from printing/nt_printing.c */
1837 BOOL
nt_printing_init(void);
1838 int get_ntforms(nt_forms_struct
**list
);
1839 int write_ntforms(nt_forms_struct
**list
, int number
);
1840 BOOL
add_a_form(nt_forms_struct
**list
, const FORM
*form
, int *count
);
1841 BOOL
delete_a_form(nt_forms_struct
**list
, UNISTR2
*del_name
, int *count
, uint32
*ret
);
1842 void update_a_form(nt_forms_struct
**list
, const FORM
*form
, int count
);
1843 int get_ntdrivers(fstring
**list
, char *architecture
, uint32 version
);
1844 BOOL
get_short_archi(char *short_archi
, char *long_archi
);
1845 uint32
clean_up_driver_struct(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
,
1846 uint32 level
, struct current_user
*user
);
1847 BOOL
move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
, uint32 level
, struct current_user
*user
, uint32
*perr
);
1848 uint32
get_a_printer_driver_9x_compatible(pstring line
, fstring model
);
1849 uint32
del_a_printer(char *sharename
);
1850 void add_a_specific_param(NT_PRINTER_INFO_LEVEL_2
*info_2
, NT_PRINTER_PARAM
**param
);
1851 BOOL
unlink_specific_param_if_exist(NT_PRINTER_INFO_LEVEL_2
*info_2
, NT_PRINTER_PARAM
*param
);
1852 void free_nt_printer_param(NT_PRINTER_PARAM
**param_ptr
);
1853 NT_DEVICEMODE
*construct_nt_devicemode(const fstring default_devicename
);
1854 NT_DEVICEMODE
*dup_nt_devicemode(NT_DEVICEMODE
*nt_devicemode
);
1855 void free_nt_devicemode(NT_DEVICEMODE
**devmode_ptr
);
1856 void get_printer_subst_params(int snum
, fstring
*printername
, fstring
*sharename
, fstring
*portname
);
1857 uint32
mod_a_printer(NT_PRINTER_INFO_LEVEL printer
, uint32 level
);
1858 uint32
add_a_printer(NT_PRINTER_INFO_LEVEL printer
, uint32 level
);
1859 uint32
get_a_printer(NT_PRINTER_INFO_LEVEL
**pp_printer
, uint32 level
, fstring sharename
);
1860 uint32
free_a_printer(NT_PRINTER_INFO_LEVEL
**pp_printer
, uint32 level
);
1861 uint32
add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver
, uint32 level
);
1862 uint32
get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL
*driver
, uint32 level
,
1863 fstring printername
, fstring architecture
, uint32 version
);
1864 uint32
free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver
, uint32 level
);
1865 BOOL
get_specific_param_by_index(NT_PRINTER_INFO_LEVEL printer
, uint32 level
, uint32 param_index
,
1866 fstring value
, uint8
**data
, uint32
*type
, uint32
*len
);
1867 BOOL
get_specific_param(NT_PRINTER_INFO_LEVEL printer
, uint32 level
,
1868 fstring value
, uint8
**data
, uint32
*type
, uint32
*len
);
1869 uint32
nt_printing_setsec(char *printername
, SEC_DESC_BUF
*secdesc_ctr
);
1870 BOOL
nt_printing_getsec(char *printername
, SEC_DESC_BUF
**secdesc_ctr
);
1871 BOOL
print_access_check(struct current_user
*user
, int snum
, int access_type
);
1872 BOOL
print_time_access_check(int snum
);
1875 /*The following definitions come from printing/pcap.c */
1877 BOOL
pcap_printername_ok(char *pszPrintername
, char *pszPrintcapname
);
1878 void pcap_printer_fn(void (*fn
)(char *, char *));
1880 /*The following definitions come from printing/print_cups.c */
1882 void cups_printer_fn(void (*fn
)(char *, char *));
1883 int cups_printername_ok(char *name
);
1885 /*The following definitions come from printing/printfsp.c */
1888 files_struct
*print_fsp_open(connection_struct
*conn
,char *jobname
);
1889 void print_fsp_end(files_struct
*fsp
);
1892 /*The following definitions come from printing/printing.c */
1895 BOOL
print_backend_init(void);
1896 BOOL
print_job_exists(int jobid
);
1897 int print_job_snum(int jobid
);
1898 int print_job_fd(int jobid
);
1899 char *print_job_fname(int jobid
);
1900 BOOL
print_job_set_place(int jobid
, int place
);
1901 BOOL
print_job_set_name(int jobid
, char *name
);
1902 BOOL
print_job_delete(struct current_user
*user
, int jobid
, int *errcode
);
1903 BOOL
print_job_pause(struct current_user
*user
, int jobid
, int *errcode
);
1904 BOOL
print_job_resume(struct current_user
*user
, int jobid
, int *errcode
);
1905 int print_job_write(int jobid
, const char *buf
, int size
);
1906 int print_job_start(struct current_user
*user
, int snum
, char *jobname
);
1907 BOOL
print_job_end(int jobid
);
1908 int print_queue_status(int snum
,
1909 print_queue_struct
**queue
,
1910 print_status_struct
*status
);
1911 int print_queue_snum(char *qname
);
1912 BOOL
print_queue_pause(struct current_user
*user
, int snum
, int *errcode
);
1913 BOOL
print_queue_resume(struct current_user
*user
, int snum
, int *errcode
);
1914 BOOL
print_queue_purge(struct current_user
*user
, int snum
, int *errcode
);
1917 /*The following definitions come from printing/print_svid.c */
1919 void sysv_printer_fn(void (*fn
)(char *, char *));
1920 int sysv_printername_ok(char *name
);
1922 /*The following definitions come from profile/profile.c */
1924 void profile_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
1925 void reqprofile_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
1926 BOOL
profile_setup(BOOL rdonly
);
1928 /*The following definitions come from rpc_client/cli_connect.c */
1930 void init_connections(void);
1931 void free_connections(void);
1932 void cli_connection_free(struct cli_connection
*con
);
1933 void cli_connection_unlink(struct cli_connection
*con
);
1934 BOOL
cli_connection_init(const char *srv_name
, char *pipe_name
,
1935 struct cli_connection
**con
);
1936 BOOL
cli_connection_init_auth(const char *srv_name
, char *pipe_name
,
1937 struct cli_connection
**con
,
1938 cli_auth_fns
* auth
, void *auth_creds
);
1939 struct _cli_auth_fns
*cli_conn_get_authfns(struct cli_connection
*con
);
1940 void *cli_conn_get_auth_creds(struct cli_connection
*con
);
1941 BOOL
rpc_hnd_pipe_req(const POLICY_HND
* hnd
, uint8 op_num
,
1942 prs_struct
* data
, prs_struct
* rdata
);
1943 BOOL
rpc_con_pipe_req(struct cli_connection
*con
, uint8 op_num
,
1944 prs_struct
* data
, prs_struct
* rdata
);
1945 BOOL
rpc_con_ok(struct cli_connection
*con
);
1947 /*The following definitions come from rpc_client/cli_login.c */
1949 BOOL
cli_nt_setup_creds(struct cli_state
*cli
, unsigned char mach_pwd
[16]);
1950 BOOL
cli_nt_srv_pwset(struct cli_state
*cli
, unsigned char *new_hashof_mach_pwd
);
1951 BOOL
cli_nt_login_interactive(struct cli_state
*cli
, char *domain
, char *username
,
1952 uint32 smb_userid_low
, char *password
,
1953 NET_ID_INFO_CTR
*ctr
, NET_USER_INFO_3
*user_info3
);
1954 BOOL
cli_nt_login_network(struct cli_state
*cli
, char *domain
, char *username
,
1955 uint32 smb_userid_low
, char lm_chal
[8],
1956 char *lm_chal_resp
, char *nt_chal_resp
,
1957 NET_ID_INFO_CTR
*ctr
, NET_USER_INFO_3
*user_info3
);
1958 BOOL
cli_nt_logoff(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
);
1960 /*The following definitions come from rpc_client/cli_lsarpc.c */
1962 BOOL
do_lsa_open_policy(struct cli_state
*cli
,
1963 char *system_name
, POLICY_HND
*hnd
,
1965 BOOL
do_lsa_query_info_pol(struct cli_state
*cli
,
1966 POLICY_HND
*hnd
, uint16 info_class
,
1967 fstring domain_name
, DOM_SID
*domain_sid
);
1968 BOOL
do_lsa_close(struct cli_state
*cli
, POLICY_HND
*hnd
);
1969 BOOL
cli_lsa_get_domain_sid(struct cli_state
*cli
, char *server
);
1970 uint32
lsa_open_policy(const char *system_name
, POLICY_HND
*hnd
,
1971 BOOL sec_qos
, uint32 des_access
);
1972 uint32
lsa_close(POLICY_HND
*hnd
);
1973 uint32
lsa_lookup_sids(POLICY_HND
*hnd
, int num_sids
, DOM_SID
*sids
,
1974 char ***names
, uint32
**types
, int *num_names
);
1975 uint32
lsa_lookup_names(POLICY_HND
*hnd
, int num_names
, char **names
,
1976 DOM_SID
**sids
, uint32
**types
, int *num_sids
);
1978 /*The following definitions come from rpc_client/cli_netlogon.c */
1980 BOOL
cli_net_logon_ctrl2(struct cli_state
*cli
, uint32 status_level
);
1981 BOOL
cli_net_auth2(struct cli_state
*cli
, uint16 sec_chan
,
1982 uint32 neg_flags
, DOM_CHAL
*srv_chal
);
1983 BOOL
cli_net_req_chal(struct cli_state
*cli
, DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
);
1984 BOOL
cli_net_srv_pwset(struct cli_state
*cli
, uint8 hashed_mach_pwd
[16]);
1985 BOOL
cli_net_sam_logon(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
,
1986 NET_USER_INFO_3
*user_info3
);
1987 BOOL
cli_net_sam_logoff(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
);
1988 BOOL
change_trust_account_password( char *domain
, char *remote_machine_list
);
1990 /*The following definitions come from rpc_client/cli_pipe.c */
1992 BOOL
rpc_api_pipe_req(struct cli_state
*cli
, uint8 op_num
,
1993 prs_struct
*data
, prs_struct
*rdata
);
1994 BOOL
rpc_pipe_bind(struct cli_state
*cli
, char *pipe_name
, char *my_name
);
1995 void cli_nt_set_ntlmssp_flgs(struct cli_state
*cli
, uint32 ntlmssp_flgs
);
1996 BOOL
cli_nt_session_open(struct cli_state
*cli
, char *pipe_name
);
1997 void cli_nt_session_close(struct cli_state
*cli
);
1999 /*The following definitions come from rpc_client/cli_reg.c */
2001 BOOL
do_reg_connect(struct cli_state
*cli
, char *full_keyname
, char *key_name
,
2002 POLICY_HND
*reg_hnd
);
2003 BOOL
do_reg_open_hklm(struct cli_state
*cli
, uint16 unknown_0
, uint32 level
,
2005 BOOL
do_reg_open_hku(struct cli_state
*cli
, uint16 unknown_0
, uint32 level
,
2007 BOOL
do_reg_flush_key(struct cli_state
*cli
, POLICY_HND
*hnd
);
2008 BOOL
do_reg_query_key(struct cli_state
*cli
, POLICY_HND
*hnd
,
2009 char *class, uint32
*class_len
,
2010 uint32
*num_subkeys
, uint32
*max_subkeylen
,
2011 uint32
*max_subkeysize
, uint32
*num_values
,
2012 uint32
*max_valnamelen
, uint32
*max_valbufsize
,
2013 uint32
*sec_desc
, NTTIME
*mod_time
);
2014 BOOL
do_reg_unknown_1a(struct cli_state
*cli
, POLICY_HND
*hnd
, uint32
*unk
);
2015 BOOL
do_reg_query_info(struct cli_state
*cli
, POLICY_HND
*hnd
,
2016 char *key_value
, uint32
* key_type
);
2017 BOOL
do_reg_set_key_sec(struct cli_state
*cli
, POLICY_HND
*hnd
, SEC_DESC_BUF
*sec_desc_buf
);
2018 BOOL
do_reg_get_key_sec(struct cli_state
*cli
, POLICY_HND
*hnd
, uint32
*sec_buf_size
, SEC_DESC_BUF
**ppsec_desc_buf
);
2019 BOOL
do_reg_delete_val(struct cli_state
*cli
, POLICY_HND
*hnd
, char *val_name
);
2020 BOOL
do_reg_delete_key(struct cli_state
*cli
, POLICY_HND
*hnd
, char *key_name
);
2021 BOOL
do_reg_create_key(struct cli_state
*cli
, POLICY_HND
*hnd
,
2022 char *key_name
, char *key_class
,
2023 SEC_ACCESS
*sam_access
,
2025 BOOL
do_reg_enum_key(struct cli_state
*cli
, POLICY_HND
*hnd
,
2026 int key_index
, char *key_name
,
2027 uint32
*unk_1
, uint32
*unk_2
,
2029 BOOL
do_reg_create_val(struct cli_state
*cli
, POLICY_HND
*hnd
,
2030 char *val_name
, uint32 type
, BUFFER3
*data
);
2031 BOOL
do_reg_enum_val(struct cli_state
*cli
, POLICY_HND
*hnd
,
2032 int val_index
, int max_valnamelen
, int max_valbufsize
,
2034 uint32
*val_type
, BUFFER2
*value
);
2035 BOOL
do_reg_open_entry(struct cli_state
*cli
, POLICY_HND
*hnd
,
2036 char *key_name
, uint32 unk_0
,
2037 POLICY_HND
*key_hnd
);
2038 BOOL
do_reg_close(struct cli_state
*cli
, POLICY_HND
*hnd
);
2040 /*The following definitions come from rpc_client/cli_samr.c */
2043 BOOL
get_samr_query_usergroups(struct cli_state
*cli
,
2044 POLICY_HND
*pol_open_domain
, uint32 user_rid
,
2045 uint32
*num_groups
, DOM_GID
*gid
);
2046 BOOL
get_samr_query_userinfo(struct cli_state
*cli
,
2047 POLICY_HND
*pol_open_domain
,
2049 uint32 user_rid
, SAM_USER_INFO_21
*usr
);
2050 BOOL
do_samr_chgpasswd_user(struct cli_state
*cli
,
2051 char *srv_name
, char *user_name
,
2052 char nt_newpass
[516], uchar nt_oldhash
[16],
2053 char lm_newpass
[516], uchar lm_oldhash
[16]);
2054 BOOL
do_samr_unknown_38(struct cli_state
*cli
, char *srv_name
);
2055 BOOL
do_samr_query_dom_info(struct cli_state
*cli
,
2056 POLICY_HND
*domain_pol
, uint16 switch_value
);
2057 BOOL
do_samr_enum_dom_users(struct cli_state
*cli
,
2058 POLICY_HND
*pol
, uint16 num_entries
, uint16 unk_0
,
2059 uint16 acb_mask
, uint16 unk_1
, uint32 size
,
2060 struct acct_info
**sam
,
2061 int *num_sam_users
);
2062 BOOL
do_samr_connect(struct cli_state
*cli
,
2063 char *srv_name
, uint32 unknown_0
,
2064 POLICY_HND
*connect_pol
);
2065 BOOL
do_samr_open_user(struct cli_state
*cli
,
2066 POLICY_HND
*pol
, uint32 unk_0
, uint32 rid
,
2067 POLICY_HND
*user_pol
);
2068 BOOL
do_samr_open_domain(struct cli_state
*cli
,
2069 POLICY_HND
*connect_pol
, uint32 rid
, DOM_SID
*sid
,
2070 POLICY_HND
*domain_pol
);
2071 BOOL
do_samr_query_unknown_12(struct cli_state
*cli
,
2072 POLICY_HND
*pol
, uint32 rid
, uint32 num_gids
, uint32
*gids
,
2073 uint32
*num_aliases
,
2074 fstring als_names
[MAX_LOOKUP_SIDS
],
2075 uint32 num_als_users
[MAX_LOOKUP_SIDS
]);
2076 BOOL
do_samr_query_usergroups(struct cli_state
*cli
,
2077 POLICY_HND
*pol
, uint32
*num_groups
, DOM_GID
*gid
);
2078 BOOL
do_samr_query_userinfo(struct cli_state
*cli
,
2079 POLICY_HND
*pol
, uint16 switch_value
, void* usr
);
2080 BOOL
do_samr_close(struct cli_state
*cli
, POLICY_HND
*hnd
);
2083 /*The following definitions come from rpc_client/cli_spoolss.c */
2085 uint32
spoolss_enum_printerdrivers(const char *srv_name
, const char *environment
,
2086 uint32 level
, NEW_BUFFER
*buffer
, uint32 offered
,
2087 uint32
*needed
, uint32
*returned
);
2088 uint32
spoolss_enum_printers(uint32 flags
, fstring srv_name
, uint32 level
,
2089 NEW_BUFFER
*buffer
, uint32 offered
,
2090 uint32
*needed
, uint32
*returned
);
2091 uint32
spoolss_enum_ports(fstring srv_name
, uint32 level
,
2092 NEW_BUFFER
*buffer
, uint32 offered
,
2093 uint32
*needed
, uint32
*returned
);
2094 uint32
spoolss_enum_jobs(const POLICY_HND
*hnd
, uint32 firstjob
, uint32 numofjobs
,
2095 uint32 level
, NEW_BUFFER
*buffer
, uint32 offered
,
2096 uint32
*needed
, uint32
*returned
);
2097 uint32
spoolss_enum_printerdata(const POLICY_HND
*hnd
, uint32 idx
,
2098 uint32
*valuelen
, uint16
*value
, uint32
*rvaluelen
,
2099 uint32
*type
, uint32
*datalen
, uint8
*data
,
2101 uint32
spoolss_getprinter(const POLICY_HND
*hnd
, uint32 level
,
2102 NEW_BUFFER
*buffer
, uint32 offered
,
2104 uint32
spoolss_getprinterdriver(const POLICY_HND
*hnd
,
2105 const char *environment
, uint32 level
,
2106 NEW_BUFFER
*buffer
, uint32 offered
,
2108 BOOL
spoolss_open_printer_ex( const char *printername
,
2109 const char *datatype
, uint32 access_required
,
2110 const char *station
, const char *username
,
2112 BOOL
spoolss_addprinterex(POLICY_HND
*hnd
, const char* srv_name
, PRINTER_INFO_2
*info2
);
2113 BOOL
spoolss_closeprinter(POLICY_HND
*hnd
);
2114 uint32
spoolss_getprinterdata(const POLICY_HND
*hnd
, const UNISTR2
*valuename
,
2120 uint32
spoolss_getprinterdriverdir(fstring srv_name
, fstring env_name
, uint32 level
,
2121 NEW_BUFFER
*buffer
, uint32 offered
,
2123 uint32
spoolss_addprinterdriver(const char *srv_name
, uint32 level
, PRINTER_DRIVER_CTR
*info
);
2125 /*The following definitions come from rpc_client/cli_spoolss_notify.c */
2127 BOOL
spoolss_disconnect_from_client( struct cli_state
*cli
);
2128 BOOL
spoolss_connect_to_client( struct cli_state
*cli
, char *remote_machine
);
2129 BOOL
cli_spoolss_reply_open_printer(struct cli_state
*cli
, char *printer
, uint32 localprinter
, uint32 type
, uint32
*status
, POLICY_HND
*handle
);
2130 BOOL
cli_spoolss_reply_rrpcn(struct cli_state
*cli
, POLICY_HND
*handle
,
2131 uint32 change_low
, uint32 change_high
, uint32
*status
);
2132 BOOL
cli_spoolss_reply_close_printer(struct cli_state
*cli
, POLICY_HND
*handle
, uint32
*status
);
2134 /*The following definitions come from rpc_client/cli_srvsvc.c */
2136 BOOL
do_srv_net_srv_conn_enum(struct cli_state
*cli
,
2137 char *server_name
, char *qual_name
,
2138 uint32 switch_value
, SRV_CONN_INFO_CTR
*ctr
,
2139 uint32 preferred_len
,
2141 BOOL
do_srv_net_srv_sess_enum(struct cli_state
*cli
,
2142 char *server_name
, char *qual_name
,
2143 uint32 switch_value
, SRV_SESS_INFO_CTR
*ctr
,
2144 uint32 preferred_len
,
2146 BOOL
do_srv_net_srv_share_enum(struct cli_state
*cli
,
2148 uint32 switch_value
, SRV_R_NET_SHARE_ENUM
*r_o
,
2149 uint32 preferred_len
, ENUM_HND
*hnd
);
2150 BOOL
do_srv_net_srv_file_enum(struct cli_state
*cli
,
2151 char *server_name
, char *qual_name
,
2152 uint32 switch_value
, SRV_FILE_INFO_CTR
*ctr
,
2153 uint32 preferred_len
,
2155 BOOL
do_srv_net_srv_get_info(struct cli_state
*cli
,
2156 char *server_name
, uint32 switch_value
, SRV_INFO_CTR
*ctr
);
2158 /*The following definitions come from rpc_client/cli_use.c */
2160 void init_cli_use(void);
2161 void free_cli_use(void);
2162 struct cli_state
*cli_net_use_add(const char *srv_name
,
2163 const struct ntuser_creds
*usr_creds
,
2164 BOOL reuse
, BOOL
*is_new
);
2165 BOOL
cli_net_use_del(const char *srv_name
,
2166 const struct ntuser_creds
*usr_creds
,
2167 BOOL force_close
, BOOL
*connection_closed
);
2168 void cli_net_use_enum(uint32
*num_cons
, struct use_info
***use
);
2169 void cli_use_wait_keyboard(void);
2171 /*The following definitions come from rpc_client/cli_wkssvc.c */
2173 BOOL
do_wks_query_info(struct cli_state
*cli
,
2174 char *server_name
, uint32 switch_value
,
2175 WKS_INFO_100
*wks100
);
2177 /*The following definitions come from rpcclient/cmd_lsarpc.c */
2179 uint32
cmd_lsa_lookup_sids(struct client_info
*info
, int argc
, char *argv
[]);
2180 uint32
cmd_lsa_lookup_names(struct client_info
*info
, int argc
, char *argv
[]);
2181 void add_lsa_commands(void);
2183 /*The following definitions come from rpcclient/cmd_spoolss.c */
2185 uint32
cmd_spoolss_enum_printers(struct client_info
*info
, int argc
, char *argv
[]);
2186 uint32
cmd_spoolss_enum_ports(struct client_info
*info
, int argc
, char *argv
[]);
2187 uint32
cmd_spoolss_enum_printerdata(struct client_info
*info
, int argc
, char *argv
[]);
2188 uint32
cmd_spoolss_getprinter(struct client_info
*info
, int argc
, char *argv
[]);
2189 uint32
cmd_spoolss_enum_jobs(struct client_info
*info
, int argc
, char *argv
[]);
2190 uint32
cmd_spoolss_open_printer_ex(struct client_info
*info
, int argc
, char *argv
[]);
2191 uint32
cmd_spoolss_getprinterdata(struct client_info
*info
, int argc
, char *argv
[]);
2192 uint32
cmd_spoolss_getprinterdriver(struct client_info
*info
, int argc
, char *argv
[]);
2193 uint32
cmd_spoolss_enumprinterdrivers(struct client_info
*info
, int argc
, char *argv
[]);
2194 uint32
cmd_spoolss_getprinterdriverdir(struct client_info
*info
, int argc
, char *argv
[]);
2195 uint32
cmd_spoolss_addprinterex(struct client_info
*info
, int argc
, char *argv
[]);
2196 uint32
cmd_spoolss_addprinterdriver(struct client_info
*info
, int argc
, char *argv
[]);
2197 void set_drv_info_3_env (DRIVER_INFO_3
*info
, const char *arch
);
2198 BOOL
init_drv_info_3_members (DRIVER_INFO_3
*info
, char *args
);
2199 void free_drv_info_3 (DRIVER_INFO_3
*info
);
2201 /*The following definitions come from rpcclient/display_sec.c */
2203 void display_sec_desc(FILE *out_hnd
, enum action_type action
, SEC_DESC
*const sec
);
2205 /*The following definitions come from rpcclient/display_spool.c */
2207 void display_printer_info_ctr(FILE *out_hnd
, enum action_type action
, uint32 level
,
2208 uint32 count
, PRINTER_INFO_CTR ctr
);
2209 void display_port_info_ctr(FILE *out_hnd
, enum action_type action
, uint32 level
,
2210 uint32 count
, PORT_INFO_CTR
*ctr
);
2211 void display_port_info_1(FILE *out_hnd
, enum action_type action
, PORT_INFO_1
*i1
);
2212 void display_port_info_2(FILE *out_hnd
, enum action_type action
, PORT_INFO_2
*i2
);
2213 void display_printer_enumdata(FILE *out_hnd
, enum action_type action
, uint32 idx
,
2214 uint32 valuelen
, uint16
*value
, uint32 rvaluelen
,
2216 uint32 datalen
, uint8
*data
, uint32 rdatalen
);
2217 void display_job_info_2(FILE *out_hnd
, enum action_type action
,
2218 JOB_INFO_2
*const i2
);
2219 void display_job_info_1(FILE *out_hnd
, enum action_type action
,
2220 JOB_INFO_1
*const i1
);
2221 void display_job_info_2_ctr(FILE *out_hnd
, enum action_type action
,
2222 uint32 count
, JOB_INFO_2
*const *const ctr
);
2223 void display_job_info_1_ctr(FILE *out_hnd
, enum action_type action
,
2224 uint32 count
, JOB_INFO_1
*const *const ctr
);
2225 void display_job_info_ctr(FILE *out_hnd
, enum action_type action
,
2226 uint32 level
, uint32 count
,
2227 void *const *const ctr
);
2228 void display_printer_driver_ctr(FILE *out_hnd
, enum action_type action
, uint32 level
,
2229 uint32 count
, PRINTER_DRIVER_CTR ctr
);
2230 void display_printerdriverdir_info_ctr(FILE *out_hnd
, enum action_type action
, uint32 level
,
2231 DRIVER_DIRECTORY_CTR ctr
);
2233 /*The following definitions come from rpc_client/msrpc_spoolss.c */
2235 void init_buffer(NEW_BUFFER
*buffer
, uint32 size
, TALLOC_CTX
*ctx
);
2236 void decode_port_info_1(NEW_BUFFER
*buffer
, uint32 returned
,
2237 PORT_INFO_1
**info
);
2238 void decode_port_info_2(NEW_BUFFER
*buffer
, uint32 returned
,
2239 PORT_INFO_2
**info
);
2240 BOOL
msrpc_spoolss_enum_printers(char* srv_name
, uint32 flags
,
2241 uint32 level
, PRINTER_INFO_CTR ctr
);
2242 BOOL
msrpc_spoolss_enum_ports(char* srv_name
,
2243 uint32 level
, PORT_INFO_CTR
*ctr
);
2244 uint32
msrpc_spoolss_getprinterdata( const char* printer_name
,
2245 const char* station
,
2246 const char* user_name
,
2247 const char* value_name
,
2251 BOOL
msrpc_spoolss_enum_jobs( const char* printer_name
,
2252 const char* station
, const char* user_name
,
2254 void ***ctr
, JOB_INFO_FN(fn
));
2255 BOOL
msrpc_spoolss_enum_printerdata( const char* printer_name
,
2256 const char* station
, const char* user_name
);
2257 BOOL
msrpc_spoolss_getprinter( const char* printer_name
, const uint32 level
,
2258 const char* station
, const char* user_name
,
2259 PRINTER_INFO_CTR ctr
);
2260 BOOL
msrpc_spoolss_getprinterdriver( const char* printer_name
,
2261 const char *environment
, const uint32 level
,
2262 const char* station
, const char* user_name
,
2263 PRINTER_DRIVER_CTR ctr
);
2264 BOOL
msrpc_spoolss_enumprinterdrivers( const char* srv_name
,
2265 const char *environment
, const uint32 level
,
2266 PRINTER_DRIVER_CTR ctr
);
2267 BOOL
msrpc_spoolss_getprinterdriverdir(char* srv_name
, char* env_name
, uint32 level
, DRIVER_DIRECTORY_CTR ctr
);
2269 /*The following definitions come from rpc_client/ncacn_np_use.c */
2271 BOOL
ncacn_np_use_del(const char *srv_name
, const char *pipe_name
,
2272 const vuser_key
* key
,
2273 BOOL force_close
, BOOL
*connection_closed
);
2274 struct ncacn_np
*ncacn_np_initialise(struct ncacn_np
*msrpc
,
2275 const vuser_key
* key
);
2276 struct ncacn_np
*ncacn_np_use_add(const char *pipe_name
,
2277 const vuser_key
* key
,
2278 const char *srv_name
,
2279 const struct ntuser_creds
*ntc
,
2280 BOOL reuse
, BOOL
*is_new_connection
);
2282 /*The following definitions come from rpcclient/rpcclient.c */
2285 /*The following definitions come from rpcclient/spoolss_cmds.c */
2287 void add_spl_commands(void);
2289 /*The following definitions come from rpc_parse/parse_creds.c */
2291 BOOL
make_creds_unix(CREDS_UNIX
*r_u
, const char* user_name
,
2292 const char* requested_name
,
2293 const char* real_name
,
2295 BOOL
creds_io_unix(char *desc
, CREDS_UNIX
*r_u
, prs_struct
*ps
, int depth
);
2296 void creds_free_unix(CREDS_UNIX
*r_u
);
2297 BOOL
make_creds_unix_sec(CREDS_UNIX_SEC
*r_u
,
2298 uint32 uid
, uint32 gid
, uint32 num_grps
, gid_t
*grps
);
2299 BOOL
creds_io_unix_sec(char *desc
, CREDS_UNIX_SEC
*r_u
, prs_struct
*ps
, int depth
);
2300 void creds_free_unix_sec(CREDS_UNIX_SEC
*r_u
);
2301 BOOL
make_creds_nt_sec(CREDS_NT_SEC
*r_u
,
2302 DOM_SID
*sid
, uint32 num_grps
, uint32
*grps
);
2303 BOOL
creds_io_nt_sec(char *desc
, CREDS_NT_SEC
*r_u
, prs_struct
*ps
, int depth
);
2304 void creds_free_nt_sec(CREDS_NT_SEC
*r_u
);
2305 BOOL
creds_io_pwd_info(char *desc
, struct pwd_info
*pwd
, prs_struct
*ps
, int depth
);
2306 BOOL
creds_io_nt(char *desc
, CREDS_NT
*r_u
, prs_struct
*ps
, int depth
);
2307 void creds_free_nt(CREDS_NT
*r_u
);
2308 BOOL
creds_io_hybrid(char *desc
, CREDS_HYBRID
*r_u
, prs_struct
*ps
, int depth
);
2309 void copy_unix_creds(CREDS_UNIX
*to
, const CREDS_UNIX
*from
);
2310 void copy_nt_sec_creds(CREDS_NT_SEC
*to
, const CREDS_NT_SEC
*from
);
2311 void copy_unix_sec_creds(CREDS_UNIX_SEC
*to
, const CREDS_UNIX_SEC
*from
);
2312 void create_ntc_from_cli_state (CREDS_NT
*to
, const struct cli_state
*cli_from
);
2313 void copy_nt_creds(struct ntuser_creds
*to
,
2314 const struct ntuser_creds
*from
);
2315 void copy_user_creds(struct user_creds
*to
,
2316 const struct user_creds
*from
);
2317 void free_user_creds(struct user_creds
*creds
);
2318 BOOL
creds_io_cmd(char *desc
, CREDS_CMD
*r_u
, prs_struct
*ps
, int depth
);
2319 BOOL
create_ntuser_creds( prs_struct
*ps
,
2321 uint16 version
, uint16 command
,
2323 const struct ntuser_creds
*ntu
,
2325 BOOL
create_user_creds( prs_struct
*ps
,
2327 uint16 version
, uint16 command
,
2329 struct user_creds
*usr
);
2331 /*The following definitions come from rpc_parse/parse_dfs.c */
2333 BOOL
dfs_io_r_dfs_exist(char *desc
, DFS_R_DFS_EXIST
*q_d
, prs_struct
*ps
,
2335 BOOL
make_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE
*q_d
, char *entrypath
,
2336 char *servername
, char *sharename
);
2337 BOOL
dfs_io_q_dfs_remove(char *desc
, DFS_Q_DFS_REMOVE
*q_d
, prs_struct
*ps
,
2339 BOOL
dfs_io_r_dfs_remove(char *desc
, DFS_R_DFS_REMOVE
*r_d
, prs_struct
*ps
,
2341 BOOL
make_dfs_q_dfs_add(DFS_Q_DFS_ADD
*q_d
, char *entrypath
, char *servername
,
2342 char *sharename
, char *comment
, uint32 flags
);
2343 BOOL
dfs_io_q_dfs_add(char *desc
, DFS_Q_DFS_ADD
*q_d
, prs_struct
*ps
,
2345 BOOL
dfs_io_r_dfs_add(char *desc
, DFS_R_DFS_ADD
*r_d
, prs_struct
*ps
,
2347 BOOL
dfs_io_q_dfs_get_info(char* desc
, DFS_Q_DFS_GET_INFO
* q_i
,
2348 prs_struct
* ps
, int depth
);
2349 BOOL
dfs_io_r_dfs_get_info(char* desc
, DFS_R_DFS_GET_INFO
* r_i
,
2350 prs_struct
* ps
, int depth
);
2351 BOOL
make_dfs_q_dfs_enum(DFS_Q_DFS_ENUM
*q_d
, uint32 level
, DFS_INFO_CTR
*ctr
);
2352 BOOL
dfs_io_q_dfs_enum(char *desc
, DFS_Q_DFS_ENUM
*q_d
, prs_struct
*ps
,
2354 BOOL
dfs_io_dfs_info_ctr(char* desc
, DFS_INFO_CTR
* ctr
, uint32 num_entries
,
2356 prs_struct
* ps
, int depth
);
2357 BOOL
dfs_io_r_dfs_enum(char *desc
, DFS_R_DFS_ENUM
*q_d
, prs_struct
*ps
, int depth
);
2358 BOOL
dfs_io_dfs_storage_info(char *desc
, DFS_INFO_3
* info3
,
2359 prs_struct
*ps
, int depth
);
2361 /*The following definitions come from rpc_parse/parse_lsa.c */
2363 void init_lsa_trans_name(LSA_TRANS_NAME
*trn
, UNISTR2
*uni_name
,
2364 uint16 sid_name_use
, char *name
, uint32 idx
);
2365 void init_lsa_sec_qos(LSA_SEC_QOS
*qos
, uint16 imp_lev
, uint8 ctxt
, uint8 eff
,
2367 void init_lsa_obj_attr(LSA_OBJ_ATTR
*attr
, uint32 attributes
, LSA_SEC_QOS
*qos
);
2368 void init_q_open_pol(LSA_Q_OPEN_POL
*r_q
, uint16 system_name
,
2370 uint32 desired_access
,
2372 BOOL
lsa_io_q_open_pol(char *desc
, LSA_Q_OPEN_POL
*r_q
, prs_struct
*ps
, int depth
);
2373 BOOL
lsa_io_r_open_pol(char *desc
, LSA_R_OPEN_POL
*r_p
, prs_struct
*ps
, int depth
);
2374 void init_q_open_pol2(LSA_Q_OPEN_POL2
*r_q
, char *server_name
,
2376 uint32 desired_access
,
2378 BOOL
lsa_io_q_open_pol2(char *desc
, LSA_Q_OPEN_POL2
*r_q
, prs_struct
*ps
, int depth
);
2379 BOOL
lsa_io_r_open_pol2(char *desc
, LSA_R_OPEN_POL2
*r_p
, prs_struct
*ps
, int depth
);
2380 void init_q_query_sec_obj(LSA_Q_QUERY_SEC_OBJ
*q_q
, const POLICY_HND
*hnd
, uint32 sec_info
);
2381 BOOL
lsa_io_q_query_sec_obj(char *desc
, LSA_Q_QUERY_SEC_OBJ
*q_q
, prs_struct
*ps
, int depth
);
2382 BOOL
lsa_io_r_query_sec_obj(char *desc
, LSA_R_QUERY_SEC_OBJ
*r_u
, prs_struct
*ps
, int depth
);
2383 void init_q_query(LSA_Q_QUERY_INFO
*q_q
, POLICY_HND
*hnd
, uint16 info_class
);
2384 BOOL
lsa_io_q_query(char *desc
, LSA_Q_QUERY_INFO
*q_q
, prs_struct
*ps
, int depth
);
2385 BOOL
lsa_io_q_enum_trust_dom(char *desc
, LSA_Q_ENUM_TRUST_DOM
*q_e
, prs_struct
*ps
, int depth
);
2386 void init_r_enum_trust_dom(LSA_R_ENUM_TRUST_DOM
*r_e
,
2387 uint32 enum_context
, char *domain_name
, DOM_SID
*domain_sid
,
2389 BOOL
lsa_io_r_enum_trust_dom(char *desc
, LSA_R_ENUM_TRUST_DOM
*r_e
, prs_struct
*ps
, int depth
);
2390 BOOL
lsa_io_r_query(char *desc
, LSA_R_QUERY_INFO
*r_q
, prs_struct
*ps
, int depth
);
2391 void init_lsa_sid_enum(TALLOC_CTX
*mem_ctx
, LSA_SID_ENUM
*sen
,
2392 int num_entries
, DOM_SID
*sids
);
2393 void init_q_lookup_sids(TALLOC_CTX
*mem_ctx
, LSA_Q_LOOKUP_SIDS
*q_l
,
2394 POLICY_HND
*hnd
, int num_sids
, DOM_SID
*sids
,
2396 BOOL
lsa_io_q_lookup_sids(char *desc
, LSA_Q_LOOKUP_SIDS
*q_s
, prs_struct
*ps
, int depth
);
2397 BOOL
lsa_io_r_lookup_sids(char *desc
, LSA_R_LOOKUP_SIDS
*r_s
, prs_struct
*ps
, int depth
);
2398 void init_q_lookup_names(TALLOC_CTX
*mem_ctx
, LSA_Q_LOOKUP_NAMES
*q_l
,
2399 POLICY_HND
*hnd
, int num_names
, char **names
);
2400 BOOL
lsa_io_q_lookup_names(char *desc
, LSA_Q_LOOKUP_NAMES
*q_r
, prs_struct
*ps
, int depth
);
2401 BOOL
lsa_io_r_lookup_names(char *desc
, LSA_R_LOOKUP_NAMES
*r_r
, prs_struct
*ps
, int depth
);
2402 void init_lsa_q_close(LSA_Q_CLOSE
*q_c
, POLICY_HND
*hnd
);
2403 BOOL
lsa_io_q_close(char *desc
, LSA_Q_CLOSE
*q_c
, prs_struct
*ps
, int depth
);
2404 BOOL
lsa_io_r_close(char *desc
, LSA_R_CLOSE
*r_c
, prs_struct
*ps
, int depth
);
2406 /*The following definitions come from rpc_parse/parse_misc.c */
2408 void parse_talloc_free(void);
2409 BOOL
smb_io_time(char *desc
, NTTIME
*nttime
, prs_struct
*ps
, int depth
);
2410 BOOL
smb_io_lookup_level(char *desc
, LOOKUP_LEVEL
*level
, prs_struct
*ps
, int depth
);
2411 uint32
get_enum_hnd(ENUM_HND
*enh
);
2412 void init_enum_hnd(ENUM_HND
*enh
, uint32 hnd
);
2413 BOOL
smb_io_enum_hnd(char *desc
, ENUM_HND
*hnd
, prs_struct
*ps
, int depth
);
2414 BOOL
smb_io_dom_sid(char *desc
, DOM_SID
*sid
, prs_struct
*ps
, int depth
);
2415 void init_dom_sid(DOM_SID
*sid
, char *str_sid
);
2416 void init_dom_sid2(DOM_SID2
*sid2
, DOM_SID
*sid
);
2417 BOOL
smb_io_dom_sid2(char *desc
, DOM_SID2
*sid
, prs_struct
*ps
, int depth
);
2418 void init_str_hdr(STRHDR
*hdr
, int max_len
, int len
, uint32 buffer
);
2419 BOOL
smb_io_strhdr(char *desc
, STRHDR
*hdr
, prs_struct
*ps
, int depth
);
2420 void init_uni_hdr(UNIHDR
*hdr
, int len
);
2421 BOOL
smb_io_unihdr(char *desc
, UNIHDR
*hdr
, prs_struct
*ps
, int depth
);
2422 void init_buf_hdr(BUFHDR
*hdr
, int max_len
, int len
);
2423 BOOL
smb_io_hdrbuf_pre(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
, uint32
*offset
);
2424 BOOL
smb_io_hdrbuf_post(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
,
2425 uint32 ptr_hdrbuf
, uint32 max_len
, uint32 len
);
2426 BOOL
smb_io_hdrbuf(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
);
2427 void init_uni_hdr2(UNIHDR2
*hdr
, int len
);
2428 BOOL
smb_io_unihdr2(char *desc
, UNIHDR2
*hdr2
, prs_struct
*ps
, int depth
);
2429 void init_unistr(UNISTR
*str
, const char *buf
);
2430 BOOL
smb_io_unistr(char *desc
, UNISTR
*uni
, prs_struct
*ps
, int depth
);
2431 void init_buffer3_uint32(BUFFER3
*str
, uint32 val
);
2432 void init_buffer3_str(BUFFER3
*str
, char *buf
, int len
);
2433 void init_buffer3_hex(BUFFER3
*str
, char *buf
);
2434 void init_buffer3_bytes(BUFFER3
*str
, uint8
*buf
, int len
);
2435 BOOL
smb_io_buffer3(char *desc
, BUFFER3
*buf3
, prs_struct
*ps
, int depth
);
2436 BOOL
smb_io_buffer5(char *desc
, BUFFER5
*buf5
, prs_struct
*ps
, int depth
);
2437 void init_buffer2(BUFFER2
*str
, uint8
*buf
, int len
);
2438 BOOL
smb_io_buffer2(char *desc
, BUFFER2
*buf2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2439 void init_buf_unistr2(UNISTR2
*str
, uint32
*ptr
, const char *buf
);
2440 void copy_unistr2(UNISTR2
*str
, UNISTR2
*from
);
2441 void init_string2(STRING2
*str
, char *buf
, int len
);
2442 BOOL
smb_io_string2(char *desc
, STRING2
*str2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2443 void init_unistr2(UNISTR2
*str
, const char *buf
, size_t len
);
2444 void init_unistr2_from_unistr (UNISTR2
*to
, UNISTR
*from
);
2445 BOOL
smb_io_unistr2(char *desc
, UNISTR2
*uni2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2446 void init_dom_rid2(DOM_RID2
*rid2
, uint32 rid
, uint8 type
, uint32 idx
);
2447 BOOL
smb_io_dom_rid2(char *desc
, DOM_RID2
*rid2
, prs_struct
*ps
, int depth
);
2448 void init_dom_rid3(DOM_RID3
*rid3
, uint32 rid
, uint8 type
);
2449 BOOL
smb_io_dom_rid3(char *desc
, DOM_RID3
*rid3
, prs_struct
*ps
, int depth
);
2450 void init_dom_rid4(DOM_RID4
*rid4
, uint16 unknown
, uint16 attr
, uint32 rid
);
2451 void init_log_info(DOM_LOG_INFO
*log
, char *logon_srv
, char *acct_name
,
2452 uint16 sec_chan
, char *comp_name
);
2453 BOOL
smb_io_log_info(char *desc
, DOM_LOG_INFO
*log
, prs_struct
*ps
, int depth
);
2454 BOOL
smb_io_chal(char *desc
, DOM_CHAL
*chal
, prs_struct
*ps
, int depth
);
2455 BOOL
smb_io_cred(char *desc
, DOM_CRED
*cred
, prs_struct
*ps
, int depth
);
2456 void init_clnt_info2(DOM_CLNT_INFO2
*clnt
,
2457 char *logon_srv
, char *comp_name
,
2458 DOM_CRED
*clnt_cred
);
2459 BOOL
smb_io_clnt_info2(char *desc
, DOM_CLNT_INFO2
*clnt
, prs_struct
*ps
, int depth
);
2460 void init_clnt_info(DOM_CLNT_INFO
*clnt
,
2461 char *logon_srv
, char *acct_name
,
2462 uint16 sec_chan
, char *comp_name
,
2464 BOOL
smb_io_clnt_info(char *desc
, DOM_CLNT_INFO
*clnt
, prs_struct
*ps
, int depth
);
2465 void init_logon_id(DOM_LOGON_ID
*log
, uint32 log_id_low
, uint32 log_id_high
);
2466 BOOL
smb_io_logon_id(char *desc
, DOM_LOGON_ID
*log
, prs_struct
*ps
, int depth
);
2467 void init_owf_info(OWF_INFO
*hash
, uint8 data
[16]);
2468 BOOL
smb_io_owf_info(char *desc
, OWF_INFO
*hash
, prs_struct
*ps
, int depth
);
2469 BOOL
smb_io_gid(char *desc
, DOM_GID
*gid
, prs_struct
*ps
, int depth
);
2470 BOOL
smb_io_pol_hnd(char *desc
, POLICY_HND
*pol
, prs_struct
*ps
, int depth
);
2471 BOOL
smb_io_dom_query_3(char *desc
, DOM_QUERY_3
*d_q
, prs_struct
*ps
, int depth
);
2472 BOOL
smb_io_dom_query_5(char *desc
, DOM_QUERY_3
*d_q
, prs_struct
*ps
, int depth
);
2473 BOOL
smb_io_unistr3(char *desc
, UNISTR3
*name
, prs_struct
*ps
, int depth
);
2474 BOOL
prs_uint64(char *name
, prs_struct
*ps
, int depth
, UINT64_S
*data64
);
2476 /*The following definitions come from rpc_parse/parse_net.c */
2478 BOOL
net_io_q_logon_ctrl2(char *desc
, NET_Q_LOGON_CTRL2
*q_l
, prs_struct
*ps
, int depth
);
2479 void init_r_logon_ctrl2(NET_R_LOGON_CTRL2
*r_l
, uint32 query_level
,
2480 uint32 flags
, uint32 pdc_status
, uint32 logon_attempts
,
2481 uint32 tc_status
, char *trusted_domain_name
);
2482 BOOL
net_io_r_logon_ctrl2(char *desc
, NET_R_LOGON_CTRL2
*r_l
, prs_struct
*ps
, int depth
);
2483 void init_r_trust_dom(NET_R_TRUST_DOM_LIST
*r_t
,
2484 uint32 num_doms
, char *dom_name
);
2485 BOOL
net_io_r_trust_dom(char *desc
, NET_R_TRUST_DOM_LIST
*r_t
, prs_struct
*ps
, int depth
);
2486 BOOL
net_io_q_trust_dom(char *desc
, NET_Q_TRUST_DOM_LIST
*q_l
, prs_struct
*ps
, int depth
);
2487 void init_q_req_chal(NET_Q_REQ_CHAL
*q_c
,
2488 char *logon_srv
, char *logon_clnt
,
2489 DOM_CHAL
*clnt_chal
);
2490 BOOL
net_io_q_req_chal(char *desc
, NET_Q_REQ_CHAL
*q_c
, prs_struct
*ps
, int depth
);
2491 BOOL
net_io_r_req_chal(char *desc
, NET_R_REQ_CHAL
*r_c
, prs_struct
*ps
, int depth
);
2492 void init_q_auth_2(NET_Q_AUTH_2
*q_a
,
2493 char *logon_srv
, char *acct_name
, uint16 sec_chan
, char *comp_name
,
2494 DOM_CHAL
*clnt_chal
, uint32 clnt_flgs
);
2495 BOOL
net_io_q_auth_2(char *desc
, NET_Q_AUTH_2
*q_a
, prs_struct
*ps
, int depth
);
2496 BOOL
net_io_r_auth_2(char *desc
, NET_R_AUTH_2
*r_a
, prs_struct
*ps
, int depth
);
2497 void init_q_srv_pwset(NET_Q_SRV_PWSET
*q_s
, char *logon_srv
, char *acct_name
,
2498 uint16 sec_chan
, char *comp_name
, DOM_CRED
*cred
, char nt_cypher
[16]);
2499 BOOL
net_io_q_srv_pwset(char *desc
, NET_Q_SRV_PWSET
*q_s
, prs_struct
*ps
, int depth
);
2500 BOOL
net_io_r_srv_pwset(char *desc
, NET_R_SRV_PWSET
*r_s
, prs_struct
*ps
, int depth
);
2501 void init_id_info1(NET_ID_INFO_1
*id
, char *domain_name
,
2502 uint32 param_ctrl
, uint32 log_id_low
, uint32 log_id_high
,
2503 char *user_name
, char *wksta_name
,
2505 unsigned char lm_cypher
[16], unsigned char nt_cypher
[16]);
2506 void init_id_info2(NET_ID_INFO_2
*id
, char *domain_name
,
2507 uint32 param_ctrl
, uint32 log_id_low
, uint32 log_id_high
,
2508 char *user_name
, char *wksta_name
,
2509 unsigned char lm_challenge
[8],
2510 unsigned char *lm_chal_resp
,
2511 unsigned char *nt_chal_resp
);
2512 void init_sam_info(DOM_SAM_INFO
*sam
,
2513 char *logon_srv
, char *comp_name
, DOM_CRED
*clnt_cred
,
2514 DOM_CRED
*rtn_cred
, uint16 logon_level
,
2515 NET_ID_INFO_CTR
*ctr
);
2516 void init_net_user_info3(NET_USER_INFO_3
*usr
, SAM_ACCOUNT
*sampw
,
2517 uint16 logon_count
, uint16 bad_pw_count
,
2518 uint32 num_groups
, DOM_GID
*gids
,
2519 uint32 user_flgs
, char *sess_key
,
2520 char *logon_srv
, char *logon_dom
,
2521 DOM_SID
*dom_sid
, char *other_sids
);
2522 void free_user_info3(NET_USER_INFO_3
*usr
);
2523 BOOL
net_io_q_sam_logon(char *desc
, NET_Q_SAM_LOGON
*q_l
, prs_struct
*ps
, int depth
);
2524 BOOL
net_io_r_sam_logon(char *desc
, NET_R_SAM_LOGON
*r_l
, prs_struct
*ps
, int depth
);
2525 BOOL
net_io_q_sam_logoff(char *desc
, NET_Q_SAM_LOGOFF
*q_l
, prs_struct
*ps
, int depth
);
2526 BOOL
net_io_r_sam_logoff(char *desc
, NET_R_SAM_LOGOFF
*r_l
, prs_struct
*ps
, int depth
);
2528 /*The following definitions come from rpc_parse/parse_prs.c */
2530 void prs_dump(char *name
, int v
, prs_struct
*ps
);
2531 void prs_debug(prs_struct
*ps
, int depth
, char *desc
, char *fn_name
);
2532 BOOL
prs_init(prs_struct
*ps
, uint32 size
, uint8 align
, TALLOC_CTX
*ctx
, BOOL io
);
2533 BOOL
prs_read(prs_struct
*ps
, int fd
, size_t len
, int timeout
);
2534 void prs_mem_free(prs_struct
*ps
);
2535 char *prs_alloc_mem(prs_struct
*ps
, size_t size
);
2536 TALLOC_CTX
*prs_get_mem_context(prs_struct
*ps
);
2537 void prs_give_memory(prs_struct
*ps
, char *buf
, uint32 size
, BOOL is_dynamic
);
2538 char *prs_take_memory(prs_struct
*ps
, uint32
*psize
);
2539 BOOL
prs_set_buffer_size(prs_struct
*ps
, uint32 newsize
);
2540 BOOL
prs_grow(prs_struct
*ps
, uint32 extra_space
);
2541 BOOL
prs_force_grow(prs_struct
*ps
, uint32 extra_space
);
2542 char *prs_data_p(prs_struct
*ps
);
2543 uint32
prs_data_size(prs_struct
*ps
);
2544 uint32
prs_offset(prs_struct
*ps
);
2545 BOOL
prs_set_offset(prs_struct
*ps
, uint32 offset
);
2546 BOOL
prs_append_prs_data(prs_struct
*dst
, prs_struct
*src
);
2547 BOOL
prs_append_some_prs_data(prs_struct
*dst
, prs_struct
*src
, int32 start
, uint32 len
);
2548 BOOL
prs_append_data(prs_struct
*dst
, char *src
, uint32 len
);
2549 void prs_set_bigendian_data(prs_struct
*ps
);
2550 BOOL
prs_align(prs_struct
*ps
);
2551 BOOL
prs_align_needed(prs_struct
*ps
, uint32 needed
);
2552 char *prs_mem_get(prs_struct
*ps
, uint32 extra_size
);
2553 void prs_switch_type(prs_struct
*ps
, BOOL io
);
2554 void prs_force_dynamic(prs_struct
*ps
);
2555 BOOL
prs_uint8(char *name
, prs_struct
*ps
, int depth
, uint8
*data8
);
2556 BOOL
prs_uint16(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
);
2557 BOOL
prs_uint32(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
);
2558 BOOL
prs_uint8s(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint8
*data8s
, int len
);
2559 BOOL
prs_uint16s(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint16
*data16s
, int len
);
2560 BOOL
prs_uint32s(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint32
*data32s
, int len
);
2561 BOOL
prs_buffer5(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, BUFFER5
*str
);
2562 BOOL
prs_buffer2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, BUFFER2
*str
);
2563 BOOL
prs_string2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, STRING2
*str
);
2564 BOOL
prs_unistr2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, UNISTR2
*str
);
2565 BOOL
prs_unistr3(BOOL charmode
, char *name
, UNISTR3
*str
, prs_struct
*ps
, int depth
);
2566 BOOL
prs_unistr(char *name
, prs_struct
*ps
, int depth
, UNISTR
*str
);
2567 BOOL
prs_string(char *name
, prs_struct
*ps
, int depth
, char *str
, int len
, int max_buf_size
);
2568 BOOL
prs_uint16_pre(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
, uint32
*offset
);
2569 BOOL
prs_uint16_post(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
,
2570 uint32 ptr_uint16
, uint32 start_offset
);
2571 BOOL
prs_uint32_pre(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
, uint32
*offset
);
2572 BOOL
prs_uint32_post(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
,
2573 uint32 ptr_uint32
, uint32 data_size
);
2574 int tdb_prs_store(TDB_CONTEXT
*tdb
, char *keystr
, prs_struct
*ps
);
2575 int tdb_prs_fetch(TDB_CONTEXT
*tdb
, char *keystr
, prs_struct
*ps
, TALLOC_CTX
*mem_ctx
);
2577 /*The following definitions come from rpc_parse/parse_reg.c */
2579 void init_reg_q_open_hklm(REG_Q_OPEN_HKLM
*q_o
,
2580 uint16 unknown_0
, uint32 level
);
2581 BOOL
reg_io_q_open_hklm(char *desc
, REG_Q_OPEN_HKLM
*r_q
, prs_struct
*ps
, int depth
);
2582 BOOL
reg_io_r_open_hklm(char *desc
, REG_R_OPEN_HKLM
*r_r
, prs_struct
*ps
, int depth
);
2583 void init_reg_q_flush_key(REG_Q_FLUSH_KEY
*q_u
, POLICY_HND
*pol
);
2584 BOOL
reg_io_q_flush_key(char *desc
, REG_Q_FLUSH_KEY
*r_q
, prs_struct
*ps
, int depth
);
2585 BOOL
reg_io_r_flush_key(char *desc
, REG_R_FLUSH_KEY
*r_r
, prs_struct
*ps
, int depth
);
2586 void init_reg_q_create_key(REG_Q_CREATE_KEY
*q_c
, POLICY_HND
*hnd
,
2587 char *name
, char *class, SEC_ACCESS
*sam_access
,
2588 SEC_DESC_BUF
*sec_buf
);
2589 BOOL
reg_io_q_create_key(char *desc
, REG_Q_CREATE_KEY
*r_q
, prs_struct
*ps
, int depth
);
2590 BOOL
reg_io_r_create_key(char *desc
, REG_R_CREATE_KEY
*r_r
, prs_struct
*ps
, int depth
);
2591 void init_reg_q_delete_val(REG_Q_DELETE_VALUE
*q_c
, POLICY_HND
*hnd
,
2593 BOOL
reg_io_q_delete_val(char *desc
, REG_Q_DELETE_VALUE
*r_q
, prs_struct
*ps
, int depth
);
2594 BOOL
reg_io_r_delete_val(char *desc
, REG_R_DELETE_VALUE
*r_r
, prs_struct
*ps
, int depth
);
2595 void init_reg_q_delete_key(REG_Q_DELETE_KEY
*q_c
, POLICY_HND
*hnd
,
2597 BOOL
reg_io_q_delete_key(char *desc
, REG_Q_DELETE_KEY
*r_q
, prs_struct
*ps
, int depth
);
2598 BOOL
reg_io_r_delete_key(char *desc
, REG_R_DELETE_KEY
*r_r
, prs_struct
*ps
, int depth
);
2599 void init_reg_q_query_key(REG_Q_QUERY_KEY
*q_o
, POLICY_HND
*hnd
,
2600 uint32 max_class_len
);
2601 BOOL
reg_io_q_query_key(char *desc
, REG_Q_QUERY_KEY
*r_q
, prs_struct
*ps
, int depth
);
2602 BOOL
reg_io_r_query_key(char *desc
, REG_R_QUERY_KEY
*r_r
, prs_struct
*ps
, int depth
);
2603 void init_reg_q_unk_1a(REG_Q_UNK_1A
*q_o
, POLICY_HND
*hnd
);
2604 BOOL
reg_io_q_unk_1a(char *desc
, REG_Q_UNK_1A
*r_q
, prs_struct
*ps
, int depth
);
2605 BOOL
reg_io_r_unk_1a(char *desc
, REG_R_UNK_1A
*r_r
, prs_struct
*ps
, int depth
);
2606 void init_reg_q_open_hku(REG_Q_OPEN_HKU
*q_o
,
2607 uint16 unknown_0
, uint32 level
);
2608 BOOL
reg_io_q_open_hku(char *desc
, REG_Q_OPEN_HKU
*r_q
, prs_struct
*ps
, int depth
);
2609 BOOL
reg_io_r_open_hku(char *desc
, REG_R_OPEN_HKU
*r_r
, prs_struct
*ps
, int depth
);
2610 void init_reg_q_close(REG_Q_CLOSE
*q_c
, POLICY_HND
*hnd
);
2611 BOOL
reg_io_q_close(char *desc
, REG_Q_CLOSE
*q_u
, prs_struct
*ps
, int depth
);
2612 BOOL
reg_io_r_close(char *desc
, REG_R_CLOSE
*r_u
, prs_struct
*ps
, int depth
);
2613 void init_reg_q_set_key_sec(REG_Q_SET_KEY_SEC
*q_i
, POLICY_HND
*pol
, SEC_DESC_BUF
*sec_desc_buf
);
2614 BOOL
reg_io_q_set_key_sec(char *desc
, REG_Q_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2615 BOOL
reg_io_r_set_key_sec(char *desc
, REG_R_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2616 void init_reg_q_get_key_sec(REG_Q_GET_KEY_SEC
*q_i
, POLICY_HND
*pol
,
2617 uint32 sec_buf_size
, SEC_DESC_BUF
*psdb
);
2618 BOOL
reg_io_q_get_key_sec(char *desc
, REG_Q_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2619 BOOL
reg_io_r_get_key_sec(char *desc
, REG_R_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2620 BOOL
init_reg_q_info(REG_Q_INFO
*q_i
, POLICY_HND
*pol
, char* val_name
);
2621 BOOL
reg_io_q_info(char *desc
, REG_Q_INFO
*r_q
, prs_struct
*ps
, int depth
);
2622 BOOL
init_reg_r_info(uint32 include_keyval
, REG_R_INFO
*r_r
,
2623 BUFFER2
* buf
, uint32 type
, uint32 status
);
2624 BOOL
reg_io_r_info(char *desc
, REG_R_INFO
*r_r
, prs_struct
*ps
, int depth
);
2625 void init_reg_q_enum_val(REG_Q_ENUM_VALUE
*q_i
, POLICY_HND
*pol
,
2626 uint32 val_idx
, uint32 max_val_len
,
2627 uint32 max_buf_len
);
2628 BOOL
reg_io_q_enum_val(char *desc
, REG_Q_ENUM_VALUE
*q_q
, prs_struct
*ps
, int depth
);
2629 BOOL
reg_io_r_enum_val(char *desc
, REG_R_ENUM_VALUE
*r_q
, prs_struct
*ps
, int depth
);
2630 void init_reg_q_create_val(REG_Q_CREATE_VALUE
*q_i
, POLICY_HND
*pol
,
2631 char *val_name
, uint32 type
,
2633 BOOL
reg_io_q_create_val(char *desc
, REG_Q_CREATE_VALUE
*q_q
, prs_struct
*ps
, int depth
);
2634 BOOL
reg_io_r_create_val(char *desc
, REG_R_CREATE_VALUE
*r_q
, prs_struct
*ps
, int depth
);
2635 void init_reg_q_enum_key(REG_Q_ENUM_KEY
*q_i
, POLICY_HND
*pol
, uint32 key_idx
);
2636 BOOL
reg_io_q_enum_key(char *desc
, REG_Q_ENUM_KEY
*q_q
, prs_struct
*ps
, int depth
);
2637 BOOL
reg_io_r_enum_key(char *desc
, REG_R_ENUM_KEY
*r_q
, prs_struct
*ps
, int depth
);
2638 void init_reg_q_open_entry(REG_Q_OPEN_ENTRY
*r_q
, POLICY_HND
*pol
,
2639 char *key_name
, uint32 unk
);
2640 BOOL
reg_io_q_open_entry(char *desc
, REG_Q_OPEN_ENTRY
*r_q
, prs_struct
*ps
, int depth
);
2641 void init_reg_r_open_entry(REG_R_OPEN_ENTRY
*r_r
,
2642 POLICY_HND
*pol
, uint32 status
);
2643 BOOL
reg_io_r_open_entry(char *desc
, REG_R_OPEN_ENTRY
*r_r
, prs_struct
*ps
, int depth
);
2645 /*The following definitions come from rpc_parse/parse_rpc.c */
2647 void init_rpc_hdr(RPC_HDR
*hdr
, enum RPC_PKT_TYPE pkt_type
, uint8 flags
,
2648 uint32 call_id
, int data_len
, int auth_len
);
2649 BOOL
smb_io_rpc_hdr(char *desc
, RPC_HDR
*rpc
, prs_struct
*ps
, int depth
);
2650 void init_rpc_hdr_rb(RPC_HDR_RB
*rpc
,
2651 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
2652 uint32 num_elements
, uint16 context_id
, uint8 num_syntaxes
,
2653 RPC_IFACE
*abstract
, RPC_IFACE
*transfer
);
2654 BOOL
smb_io_rpc_hdr_rb(char *desc
, RPC_HDR_RB
*rpc
, prs_struct
*ps
, int depth
);
2655 void init_rpc_hdr_ba(RPC_HDR_BA
*rpc
,
2656 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
2658 uint8 num_results
, uint16 result
, uint16 reason
,
2659 RPC_IFACE
*transfer
);
2660 BOOL
smb_io_rpc_hdr_ba(char *desc
, RPC_HDR_BA
*rpc
, prs_struct
*ps
, int depth
);
2661 void init_rpc_hdr_req(RPC_HDR_REQ
*hdr
, uint32 alloc_hint
, uint16 opnum
);
2662 BOOL
smb_io_rpc_hdr_req(char *desc
, RPC_HDR_REQ
*rpc
, prs_struct
*ps
, int depth
);
2663 BOOL
smb_io_rpc_hdr_resp(char *desc
, RPC_HDR_RESP
*rpc
, prs_struct
*ps
, int depth
);
2664 BOOL
smb_io_rpc_hdr_fault(char *desc
, RPC_HDR_FAULT
*rpc
, prs_struct
*ps
, int depth
);
2665 void init_rpc_hdr_autha(RPC_HDR_AUTHA
*rai
,
2666 uint16 max_tsize
, uint16 max_rsize
,
2667 uint8 auth_type
, uint8 auth_level
,
2668 uint8 stub_type_len
);
2669 BOOL
smb_io_rpc_hdr_autha(char *desc
, RPC_HDR_AUTHA
*rai
, prs_struct
*ps
, int depth
);
2670 BOOL
rpc_hdr_auth_chk(RPC_HDR_AUTH
*rai
);
2671 void init_rpc_hdr_auth(RPC_HDR_AUTH
*rai
,
2672 uint8 auth_type
, uint8 auth_level
,
2673 uint8 stub_type_len
,
2675 BOOL
smb_io_rpc_hdr_auth(char *desc
, RPC_HDR_AUTH
*rai
, prs_struct
*ps
, int depth
);
2676 BOOL
rpc_auth_verifier_chk(RPC_AUTH_VERIFIER
*rav
,
2677 char *signature
, uint32 msg_type
);
2678 void init_rpc_auth_verifier(RPC_AUTH_VERIFIER
*rav
,
2679 char *signature
, uint32 msg_type
);
2680 BOOL
smb_io_rpc_auth_verifier(char *desc
, RPC_AUTH_VERIFIER
*rav
, prs_struct
*ps
, int depth
);
2681 void init_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG
*neg
,
2683 fstring myname
, fstring domain
);
2684 BOOL
smb_io_rpc_auth_ntlmssp_neg(char *desc
, RPC_AUTH_NTLMSSP_NEG
*neg
, prs_struct
*ps
, int depth
);
2685 void init_rpc_auth_ntlmssp_chal(RPC_AUTH_NTLMSSP_CHAL
*chl
,
2687 uint8 challenge
[8]);
2688 BOOL
smb_io_rpc_auth_ntlmssp_chal(char *desc
, RPC_AUTH_NTLMSSP_CHAL
*chl
, prs_struct
*ps
, int depth
);
2689 void init_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP
*rsp
,
2690 uchar lm_resp
[24], uchar nt_resp
[24],
2691 char *domain
, char *user
, char *wks
,
2693 BOOL
smb_io_rpc_auth_ntlmssp_resp(char *desc
, RPC_AUTH_NTLMSSP_RESP
*rsp
, prs_struct
*ps
, int depth
);
2694 BOOL
rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
, uint32 crc32
, uint32 seq_num
);
2695 void init_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
,
2696 uint32 ver
, uint32 crc32
, uint32 seq_num
);
2697 BOOL
smb_io_rpc_auth_ntlmssp_chk(char *desc
, RPC_AUTH_NTLMSSP_CHK
*chk
, prs_struct
*ps
, int depth
);
2699 /*The following definitions come from rpc_parse/parse_samr.c */
2702 void init_samr_q_close_hnd(SAMR_Q_CLOSE_HND
*q_c
, POLICY_HND
*hnd
);
2703 BOOL
samr_io_q_close_hnd(char *desc
, SAMR_Q_CLOSE_HND
*q_u
, prs_struct
*ps
, int depth
);
2704 BOOL
samr_io_r_close_hnd(char *desc
, SAMR_R_CLOSE_HND
*r_u
, prs_struct
*ps
, int depth
);
2705 void init_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN
*q_u
,
2706 POLICY_HND
*connect_pol
, uint32 rid
,
2708 BOOL
samr_io_q_open_domain(char *desc
, SAMR_Q_OPEN_DOMAIN
*q_u
, prs_struct
*ps
, int depth
);
2709 BOOL
samr_io_r_open_domain(char *desc
, SAMR_R_OPEN_DOMAIN
*r_u
, prs_struct
*ps
, int depth
);
2710 void init_samr_q_unknown_2c(SAMR_Q_UNKNOWN_2C
*q_u
, POLICY_HND
*user_pol
);
2711 BOOL
samr_io_q_unknown_2c(char *desc
, SAMR_Q_UNKNOWN_2C
*q_u
, prs_struct
*ps
, int depth
);
2712 void init_samr_r_unknown_2c(SAMR_R_UNKNOWN_2C
*q_u
, uint32 status
);
2713 BOOL
samr_io_r_unknown_2c(char *desc
, SAMR_R_UNKNOWN_2C
*r_u
, prs_struct
*ps
, int depth
);
2714 void init_samr_q_unknown_3(SAMR_Q_UNKNOWN_3
*q_u
,
2715 POLICY_HND
*user_pol
, uint16 switch_value
);
2716 BOOL
samr_io_q_unknown_3(char *desc
, SAMR_Q_UNKNOWN_3
*q_u
, prs_struct
*ps
, int depth
);
2717 void init_samr_q_query_dom_info(SAMR_Q_QUERY_DOMAIN_INFO
*q_u
,
2718 POLICY_HND
*domain_pol
, uint16 switch_value
);
2719 BOOL
samr_io_q_query_dom_info(char *desc
, SAMR_Q_QUERY_DOMAIN_INFO
*q_u
, prs_struct
*ps
, int depth
);
2720 BOOL
init_unk_info1(SAM_UNK_INFO_1
*u_1
);
2721 void init_unk_info2(SAM_UNK_INFO_2
*u_2
, char *domain
, char *server
);
2722 BOOL
sam_io_unk_info2(char *desc
, SAM_UNK_INFO_2
*u_2
, prs_struct
*ps
, int depth
);
2723 BOOL
init_unk_info3(SAM_UNK_INFO_3
* u_3
);
2724 BOOL
init_unk_info6(SAM_UNK_INFO_6
* u_6
);
2725 BOOL
init_unk_info7(SAM_UNK_INFO_7
*u_7
);
2726 BOOL
init_unk_info12(SAM_UNK_INFO_12
* u_12
);
2727 void init_samr_r_query_dom_info(SAMR_R_QUERY_DOMAIN_INFO
*r_u
,
2728 uint16 switch_value
, SAM_UNK_CTR
*ctr
,
2730 BOOL
samr_io_r_query_dom_info(char *desc
, SAMR_R_QUERY_DOMAIN_INFO
*r_u
, prs_struct
*ps
, int depth
);
2731 void init_dom_sid3(DOM_SID3
*sid3
, uint16 unk_0
, uint16 unk_1
, DOM_SID
*sid
);
2732 void init_samr_r_unknown_3(SAMR_R_UNKNOWN_3
*r_u
,
2733 uint16 unknown_2
, uint16 unknown_3
,
2734 uint32 unknown_4
, uint16 unknown_6
, uint16 unknown_7
,
2735 int num_sid3s
, DOM_SID3 sid3
[MAX_SAM_SIDS
],
2737 BOOL
samr_io_r_unknown_3(char *desc
, SAMR_R_UNKNOWN_3
*r_u
, prs_struct
*ps
, int depth
);
2738 void init_samr_q_enum_dom_users(SAMR_Q_ENUM_DOM_USERS
*q_e
, POLICY_HND
*pol
,
2739 uint16 req_num_entries
, uint16 unk_0
,
2740 uint16 acb_mask
, uint16 unk_1
, uint32 size
);
2741 BOOL
samr_io_q_enum_dom_users(char *desc
, SAMR_Q_ENUM_DOM_USERS
*q_e
, prs_struct
*ps
, int depth
);
2742 void init_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS
*r_u
,
2743 uint16 total_num_entries
, uint16 unk_0
,
2744 uint32 num_sam_entries
, SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
], uint32 status
);
2745 BOOL
samr_io_r_enum_dom_users(char *desc
, SAMR_R_ENUM_DOM_USERS
*r_u
, prs_struct
*ps
, int depth
);
2746 void init_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES
*q_e
, POLICY_HND
*pol
, uint32 size
);
2747 BOOL
samr_io_q_enum_dom_aliases(char *desc
, SAMR_Q_ENUM_DOM_ALIASES
*q_e
, prs_struct
*ps
, int depth
);
2748 void init_samr_r_enum_dom_aliases(SAMR_R_ENUM_DOM_ALIASES
*r_u
,
2749 uint32 num_sam_entries
, SAM_USER_INFO_21 grps
[MAX_SAM_ENTRIES
],
2751 BOOL
samr_io_r_enum_dom_aliases(char *desc
, SAMR_R_ENUM_DOM_ALIASES
*r_u
, prs_struct
*ps
, int depth
);
2752 void init_samr_q_query_dispinfo(SAMR_Q_QUERY_DISPINFO
*q_e
, POLICY_HND
*pol
,
2753 uint16 switch_level
, uint32 start_idx
, uint32 size
);
2754 BOOL
samr_io_q_query_dispinfo(char *desc
, SAMR_Q_QUERY_DISPINFO
*q_e
, prs_struct
*ps
, int depth
);
2755 void init_sam_info_2(SAM_INFO_2
*sam
, uint32 acb_mask
,
2756 uint32 start_idx
, uint32 num_sam_entries
,
2757 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
2758 void init_sam_info_1(SAM_INFO_1
*sam
, uint32 acb_mask
,
2759 uint32 start_idx
, uint32 num_sam_entries
,
2760 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
2761 void init_samr_r_query_dispinfo(SAMR_R_QUERY_DISPINFO
*r_u
,
2762 uint16 switch_level
, SAM_INFO_CTR
*ctr
, uint32 status
);
2763 BOOL
samr_io_r_query_dispinfo(char *desc
, SAMR_R_QUERY_DISPINFO
*r_u
, prs_struct
*ps
, int depth
);
2764 void init_samr_q_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS
*q_e
, POLICY_HND
*pol
,
2765 uint16 switch_level
, uint32 start_idx
, uint32 size
);
2766 BOOL
samr_io_q_enum_dom_groups(char *desc
, SAMR_Q_ENUM_DOM_GROUPS
*q_e
, prs_struct
*ps
, int depth
);
2767 void init_samr_r_enum_dom_groups(SAMR_R_ENUM_DOM_GROUPS
*r_u
,
2768 uint32 start_idx
, uint32 num_sam_entries
,
2769 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
],
2771 BOOL
samr_io_r_enum_dom_groups(char *desc
, SAMR_R_ENUM_DOM_GROUPS
*r_u
, prs_struct
*ps
, int depth
);
2772 void init_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO
*q_e
,
2774 uint16 switch_level
);
2775 BOOL
samr_io_q_query_aliasinfo(char *desc
, SAMR_Q_QUERY_ALIASINFO
*q_e
, prs_struct
*ps
, int depth
);
2776 void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO
*r_u
, uint32 switch_level
,
2777 char* alias
, char* alias_desc
);
2778 BOOL
samr_io_r_query_aliasinfo(char *desc
, SAMR_R_QUERY_ALIASINFO
*r_u
, prs_struct
*ps
, int depth
);
2779 BOOL
samr_io_q_lookup_ids(char *desc
, SAMR_Q_LOOKUP_IDS
*q_u
, prs_struct
*ps
, int depth
);
2780 void init_samr_r_lookup_ids(SAMR_R_LOOKUP_IDS
*r_u
,
2781 uint32 num_rids
, uint32
*rid
, uint32 status
);
2782 BOOL
samr_io_r_lookup_ids(char *desc
, SAMR_R_LOOKUP_IDS
*r_u
, prs_struct
*ps
, int depth
);
2783 BOOL
samr_io_q_lookup_names(char *desc
, SAMR_Q_LOOKUP_NAMES
*q_u
, prs_struct
*ps
, int depth
);
2784 void init_samr_r_lookup_names(SAMR_R_LOOKUP_NAMES
*r_u
,
2785 uint32 num_rids
, uint32
*rid
, enum SID_NAME_USE
*type
, uint32 status
);
2786 BOOL
samr_io_r_lookup_names(char *desc
, SAMR_R_LOOKUP_NAMES
*r_u
, prs_struct
*ps
, int depth
);
2787 BOOL
samr_io_q_lookup_rids(char *desc
, SAMR_Q_LOOKUP_RIDS
*q_u
, prs_struct
*ps
, int depth
);
2788 void init_samr_r_lookup_rids(SAMR_R_LOOKUP_RIDS
*r_u
,
2789 uint32 num_aliases
, fstring
*als_name
, uint32
*num_als_usrs
,
2791 BOOL
samr_io_r_lookup_rids(char *desc
, SAMR_R_LOOKUP_RIDS
*r_u
, prs_struct
*ps
, int depth
);
2792 void init_samr_q_open_user(SAMR_Q_OPEN_USER
*q_u
,
2794 uint32 unk_0
, uint32 rid
);
2795 BOOL
samr_io_q_open_user(char *desc
, SAMR_Q_OPEN_USER
*q_u
, prs_struct
*ps
, int depth
);
2796 BOOL
samr_io_r_open_user(char *desc
, SAMR_R_OPEN_USER
*r_u
, prs_struct
*ps
, int depth
);
2797 void init_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS
*q_u
,
2799 BOOL
samr_io_q_query_usergroups(char *desc
, SAMR_Q_QUERY_USERGROUPS
*q_u
, prs_struct
*ps
, int depth
);
2800 void init_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS
*r_u
,
2801 uint32 num_gids
, DOM_GID
*gid
, uint32 status
);
2802 BOOL
samr_io_r_query_usergroups(char *desc
, SAMR_R_QUERY_USERGROUPS
*r_u
, prs_struct
*ps
, int depth
);
2803 void init_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO
*q_u
,
2804 POLICY_HND
*hnd
, uint16 switch_value
);
2805 BOOL
samr_io_q_query_userinfo(char *desc
, SAMR_Q_QUERY_USERINFO
*q_u
, prs_struct
*ps
, int depth
);
2806 void init_sam_user_info10(SAM_USER_INFO_10
*usr
,
2808 BOOL
sam_io_user_info10(char *desc
, SAM_USER_INFO_10
*usr
, prs_struct
*ps
, int depth
);
2809 void init_sam_user_info11(SAM_USER_INFO_11
*usr
,
2815 BOOL
sam_io_user_info11(char *desc
, SAM_USER_INFO_11
*usr
, prs_struct
*ps
, int depth
);
2816 void init_sam_user_info21(SAM_USER_INFO_21
*usr
, SAM_ACCOUNT
*pw
);
2817 void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO
*r_u
,
2818 uint16 switch_value
, void *info
, uint32 status
);
2819 BOOL
samr_io_r_query_userinfo(char *desc
, SAMR_R_QUERY_USERINFO
*r_u
, prs_struct
*ps
, int depth
);
2820 BOOL
samr_io_q_create_user(char *desc
, SAMR_Q_CREATE_USER
*q_u
, prs_struct
*ps
, int depth
);
2821 BOOL
samr_io_r_create_user(char *desc
, SAMR_R_CREATE_USER
*r_u
, prs_struct
*ps
, int depth
);
2822 void init_samr_q_connect(SAMR_Q_CONNECT
*q_u
,
2823 char *srv_name
, uint32 unknown_0
);
2824 BOOL
samr_io_q_connect(char *desc
, SAMR_Q_CONNECT
*q_u
, prs_struct
*ps
, int depth
);
2825 BOOL
samr_io_r_connect(char *desc
, SAMR_R_CONNECT
*r_u
, prs_struct
*ps
, int depth
);
2826 void init_samr_q_connect_anon(SAMR_Q_CONNECT_ANON
*q_u
);
2827 BOOL
samr_io_q_connect_anon(char *desc
, SAMR_Q_CONNECT_ANON
*q_u
, prs_struct
*ps
, int depth
);
2828 BOOL
samr_io_r_connect_anon(char *desc
, SAMR_R_CONNECT_ANON
*r_u
, prs_struct
*ps
, int depth
);
2829 void init_samr_q_open_alias(SAMR_Q_OPEN_ALIAS
*q_u
,
2830 uint32 unknown_0
, uint32 rid
);
2831 BOOL
samr_io_q_open_alias(char *desc
, SAMR_Q_OPEN_ALIAS
*q_u
, prs_struct
*ps
, int depth
);
2832 BOOL
samr_io_r_open_alias(char *desc
, SAMR_R_OPEN_ALIAS
*r_u
, prs_struct
*ps
, int depth
);
2833 void init_samr_q_lookup_rids(SAMR_Q_LOOKUP_RIDS
*q_u
,
2834 POLICY_HND
*pol
, uint32 rid
,
2835 uint32 num_gids
, uint32
*gid
);
2836 void init_samr_q_unknown_21(SAMR_Q_UNKNOWN_21
*q_c
,
2837 POLICY_HND
*hnd
, uint16 unk_1
, uint16 unk_2
);
2838 void init_samr_q_unknown_13(SAMR_Q_UNKNOWN_13
*q_c
,
2839 POLICY_HND
*hnd
, uint16 unk_1
, uint16 unk_2
);
2840 void init_samr_q_unknown_38(SAMR_Q_UNKNOWN_38
*q_u
, char *srv_name
);
2841 BOOL
samr_io_q_unknown_38(char *desc
, SAMR_Q_UNKNOWN_38
*q_u
, prs_struct
*ps
, int depth
);
2842 void init_samr_r_unknown_38(SAMR_R_UNKNOWN_38
*r_u
);
2843 BOOL
samr_io_r_unknown_38(char *desc
, SAMR_R_UNKNOWN_38
*r_u
, prs_struct
*ps
, int depth
);
2844 void init_enc_passwd(SAMR_ENC_PASSWD
*pwd
, char pass
[512]);
2845 BOOL
samr_io_enc_passwd(char *desc
, SAMR_ENC_PASSWD
*pwd
, prs_struct
*ps
, int depth
);
2846 void init_enc_hash(SAMR_ENC_HASH
*hsh
, uchar hash
[16]);
2847 BOOL
samr_io_enc_hash(char *desc
, SAMR_ENC_HASH
*hsh
, prs_struct
*ps
, int depth
);
2848 void init_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER
*q_u
,
2849 char *dest_host
, char *user_name
,
2850 char nt_newpass
[516], uchar nt_oldhash
[16],
2851 char lm_newpass
[516], uchar lm_oldhash
[16]);
2852 BOOL
samr_io_q_chgpasswd_user(char *desc
, SAMR_Q_CHGPASSWD_USER
*q_u
, prs_struct
*ps
, int depth
);
2853 void init_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER
*r_u
, uint32 status
);
2854 BOOL
samr_io_r_chgpasswd_user(char *desc
, SAMR_R_CHGPASSWD_USER
*r_u
, prs_struct
*ps
, int depth
);
2855 BOOL
samr_io_q_lookup_domain(char* desc
, SAMR_Q_LOOKUP_DOMAIN
* q_u
, prs_struct
*ps
, int depth
);
2856 BOOL
init_samr_r_lookup_domain(SAMR_R_LOOKUP_DOMAIN
* r_u
,
2857 DOM_SID
*dom_sid
, uint32 status
);
2858 BOOL
samr_io_r_lookup_domain(char *desc
, SAMR_R_LOOKUP_DOMAIN
* r_u
,
2859 prs_struct
*ps
, int depth
);
2860 BOOL
samr_io_q_enum_domains(char *desc
, SAMR_Q_ENUM_DOMAINS
* q_e
,
2861 prs_struct
*ps
, int depth
);
2862 BOOL
init_samr_r_enum_domains(SAMR_R_ENUM_DOMAINS
* r_u
,
2863 uint32 next_idx
, fstring
* domains
, uint32 num_sam_entries
);
2864 BOOL
samr_io_r_enum_domains(char *desc
, SAMR_R_ENUM_DOMAINS
* r_u
,
2865 prs_struct
*ps
, int depth
);
2866 void free_samr_userinfo_ctr(SAM_USERINFO_CTR
* ctr
);
2867 BOOL
samr_io_q_set_userinfo(char *desc
, SAMR_Q_SET_USERINFO
*q_u
, prs_struct
*ps
, int depth
);
2868 void free_samr_q_set_userinfo(SAMR_Q_SET_USERINFO
* q_u
);
2869 BOOL
samr_io_r_set_userinfo(char *desc
, SAMR_R_SET_USERINFO
*r_u
, prs_struct
*ps
, int depth
);
2870 BOOL
samr_io_q_set_userinfo2(char *desc
, SAMR_Q_SET_USERINFO2
*q_u
, prs_struct
*ps
, int depth
);
2871 void free_samr_q_set_userinfo2(SAMR_Q_SET_USERINFO2
*q_u
);
2872 BOOL
make_samr_r_set_userinfo2(SAMR_R_SET_USERINFO2
*r_u
, uint32 status
);
2873 BOOL
samr_io_r_set_userinfo2(char *desc
, SAMR_R_SET_USERINFO2
*r_u
, prs_struct
*ps
, int depth
);
2876 /*The following definitions come from rpc_parse/parse_sec.c */
2878 void init_sec_access(SEC_ACCESS
*t
, uint32 mask
);
2879 BOOL
sec_io_access(char *desc
, SEC_ACCESS
*t
, prs_struct
*ps
, int depth
);
2880 void init_sec_ace(SEC_ACE
*t
, DOM_SID
*sid
, uint8 type
, SEC_ACCESS mask
, uint8 flag
);
2881 BOOL
sec_io_ace(char *desc
, SEC_ACE
*psa
, prs_struct
*ps
, int depth
);
2882 SEC_ACL
*make_sec_acl(uint16 revision
, int num_aces
, SEC_ACE
*ace_list
);
2883 SEC_ACL
*dup_sec_acl( SEC_ACL
*src
);
2884 void free_sec_acl(SEC_ACL
**ppsa
);
2885 BOOL
sec_io_acl(char *desc
, SEC_ACL
**ppsa
, prs_struct
*ps
, int depth
);
2886 size_t sec_desc_size(SEC_DESC
*psd
);
2887 BOOL
sec_ace_equal(SEC_ACE
*s1
, SEC_ACE
*s2
);
2888 BOOL
sec_acl_equal(SEC_ACL
*s1
, SEC_ACL
*s2
);
2889 BOOL
sec_desc_equal(SEC_DESC
*s1
, SEC_DESC
*s2
);
2890 SEC_DESC_BUF
*sec_desc_merge(SEC_DESC_BUF
*new_sdb
, SEC_DESC_BUF
*old_sdb
);
2891 SEC_DESC
*make_sec_desc(uint16 revision
,
2892 DOM_SID
*owner_sid
, DOM_SID
*grp_sid
,
2893 SEC_ACL
*sacl
, SEC_ACL
*dacl
, size_t *sd_size
);
2894 SEC_DESC
*dup_sec_desc( SEC_DESC
*src
);
2895 void free_sec_desc(SEC_DESC
**ppsd
);
2896 SEC_DESC
*make_standard_sec_desc(DOM_SID
*owner_sid
, DOM_SID
*grp_sid
,
2897 SEC_ACL
*dacl
, size_t *sd_size
);
2898 BOOL
sec_io_desc(char *desc
, SEC_DESC
**ppsd
, prs_struct
*ps
, int depth
);
2899 SEC_DESC_BUF
*make_sec_desc_buf(size_t len
, SEC_DESC
*sec_desc
);
2900 SEC_DESC_BUF
*dup_sec_desc_buf(SEC_DESC_BUF
*src
);
2901 void free_sec_desc_buf(SEC_DESC_BUF
**ppsdb
);
2902 BOOL
sec_io_desc_buf(char *desc
, SEC_DESC_BUF
**ppsdb
, prs_struct
*ps
, int depth
);
2904 /*The following definitions come from rpc_parse/parse_spoolss.c */
2906 BOOL
make_systemtime(SYSTEMTIME
*systime
, struct tm
*unixtime
);
2907 BOOL
smb_io_notify_info_data_strings(char *desc
,SPOOL_NOTIFY_INFO_DATA
*data
,
2908 prs_struct
*ps
, int depth
);
2909 void free_spoolss_devmode(DEVICEMODE
*devmode
);
2910 BOOL
make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX
*q_u
,
2911 const fstring printername
,
2912 const fstring datatype
,
2913 uint32 access_required
,
2914 const fstring clientname
,
2915 const fstring user_name
);
2916 BOOL
make_spoolss_q_addprinterex(SPOOL_Q_ADDPRINTEREX
*q_u
, const char *srv_name
,
2917 const char* clientname
, const char* user_name
,
2918 uint32 level
, PRINTER_INFO_2
*info
);
2919 void free_spoolss_q_addprinterex(SPOOL_Q_ADDPRINTEREX
*q_u
);
2920 BOOL
make_spool_printer_info_2(SPOOL_PRINTER_INFO_LEVEL_2
**spool_info2
,
2921 PRINTER_INFO_2
*info
);
2922 BOOL
spoolss_io_q_open_printer_ex(char *desc
, SPOOL_Q_OPEN_PRINTER_EX
*q_u
, prs_struct
*ps
, int depth
);
2923 void free_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX
*q_u
);
2924 BOOL
spoolss_io_r_open_printer_ex(char *desc
, SPOOL_R_OPEN_PRINTER_EX
*r_u
, prs_struct
*ps
, int depth
);
2925 BOOL
make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA
*q_u
,
2926 const POLICY_HND
*handle
,
2927 UNISTR2
*valuename
, uint32 size
);
2928 BOOL
spoolss_io_q_getprinterdata(char *desc
, SPOOL_Q_GETPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
2929 BOOL
spoolss_io_q_deleteprinterdata(char *desc
, SPOOL_Q_DELETEPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
2930 BOOL
spoolss_io_r_deleteprinterdata(char *desc
, SPOOL_R_DELETEPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
2931 BOOL
spoolss_io_r_getprinterdata(char *desc
, SPOOL_R_GETPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
2932 BOOL
make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER
*q_u
, POLICY_HND
*hnd
);
2933 BOOL
spoolss_io_q_abortprinter(char *desc
, SPOOL_Q_ABORTPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2934 BOOL
spoolss_io_r_abortprinter(char *desc
, SPOOL_R_ABORTPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2935 BOOL
spoolss_io_q_deleteprinter(char *desc
, SPOOL_Q_DELETEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2936 BOOL
spoolss_io_r_deleteprinter(char *desc
, SPOOL_R_DELETEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2937 BOOL
spoolss_io_q_closeprinter(char *desc
, SPOOL_Q_CLOSEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2938 BOOL
spoolss_io_r_closeprinter(char *desc
, SPOOL_R_CLOSEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2939 BOOL
spoolss_io_q_startdocprinter(char *desc
, SPOOL_Q_STARTDOCPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2940 BOOL
spoolss_io_r_startdocprinter(char *desc
, SPOOL_R_STARTDOCPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2941 BOOL
spoolss_io_q_enddocprinter(char *desc
, SPOOL_Q_ENDDOCPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2942 BOOL
spoolss_io_r_enddocprinter(char *desc
, SPOOL_R_ENDDOCPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2943 BOOL
spoolss_io_q_startpageprinter(char *desc
, SPOOL_Q_STARTPAGEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2944 BOOL
spoolss_io_r_startpageprinter(char *desc
, SPOOL_R_STARTPAGEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2945 BOOL
spoolss_io_q_endpageprinter(char *desc
, SPOOL_Q_ENDPAGEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2946 BOOL
spoolss_io_r_endpageprinter(char *desc
, SPOOL_R_ENDPAGEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2947 BOOL
spoolss_io_q_writeprinter(char *desc
, SPOOL_Q_WRITEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
2948 BOOL
spoolss_io_r_writeprinter(char *desc
, SPOOL_R_WRITEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
2949 BOOL
spoolss_io_q_rffpcnex(char *desc
, SPOOL_Q_RFFPCNEX
*q_u
, prs_struct
*ps
, int depth
);
2950 BOOL
spoolss_io_r_rffpcnex(char *desc
, SPOOL_R_RFFPCNEX
*r_u
, prs_struct
*ps
, int depth
);
2951 BOOL
spoolss_io_q_rfnpcnex(char *desc
, SPOOL_Q_RFNPCNEX
*q_u
, prs_struct
*ps
, int depth
);
2952 BOOL
spoolss_io_r_rfnpcnex(char *desc
, SPOOL_R_RFNPCNEX
*r_u
, prs_struct
*ps
, int depth
);
2953 BOOL
new_smb_io_printer_info_0(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_0
*info
, int depth
);
2954 BOOL
new_smb_io_printer_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_1
*info
, int depth
);
2955 BOOL
new_smb_io_printer_info_2(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_2
*info
, int depth
);
2956 BOOL
new_smb_io_printer_info_3(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_3
*info
, int depth
);
2957 BOOL
new_smb_io_port_info_1(char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_1
*info
, int depth
);
2958 BOOL
new_smb_io_port_info_2(char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_2
*info
, int depth
);
2959 BOOL
new_smb_io_printer_driver_info_1(char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_1
*info
, int depth
) ;
2960 BOOL
new_smb_io_printer_driver_info_2(char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_2
*info
, int depth
) ;
2961 BOOL
new_smb_io_printer_driver_info_3(char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_3
*info
, int depth
);
2962 BOOL
new_smb_io_printer_driver_info_6(char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_6
*info
, int depth
);
2963 BOOL
new_smb_io_job_info_1(char *desc
, NEW_BUFFER
*buffer
, JOB_INFO_1
*info
, int depth
);
2964 BOOL
new_smb_io_job_info_2(char *desc
, NEW_BUFFER
*buffer
, JOB_INFO_2
*info
, int depth
);
2965 BOOL
new_smb_io_form_1(char *desc
, NEW_BUFFER
*buffer
, FORM_1
*info
, int depth
);
2966 void new_spoolss_move_buffer(NEW_BUFFER
*src
, NEW_BUFFER
**dest
);
2967 BOOL
new_spoolss_allocate_buffer(NEW_BUFFER
**buffer
);
2968 void new_spoolss_free_buffer(NEW_BUFFER
*buffer
);
2969 uint32
new_get_buffer_size(NEW_BUFFER
*buffer
);
2970 BOOL
new_smb_io_driverdir_1(char *desc
, NEW_BUFFER
*buffer
, DRIVER_DIRECTORY_1
*info
, int depth
);
2971 BOOL
new_smb_io_port_1(char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_1
*info
, int depth
);
2972 BOOL
new_smb_io_port_2(char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_2
*info
, int depth
);
2973 BOOL
smb_io_printprocessor_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTPROCESSOR_1
*info
, int depth
);
2974 BOOL
smb_io_printprocdatatype_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTPROCDATATYPE_1
*info
, int depth
);
2975 BOOL
smb_io_printmonitor_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTMONITOR_1
*info
, int depth
);
2976 BOOL
smb_io_printmonitor_info_2(char *desc
, NEW_BUFFER
*buffer
, PRINTMONITOR_2
*info
, int depth
);
2977 uint32
spoolss_size_printer_info_0(PRINTER_INFO_0
*info
);
2978 uint32
spoolss_size_printer_info_1(PRINTER_INFO_1
*info
);
2979 uint32
spoolss_size_printer_info_2(PRINTER_INFO_2
*info
);
2980 uint32
spoolss_size_printer_info_3(PRINTER_INFO_3
*info
);
2981 uint32
spoolss_size_printer_driver_info_1(DRIVER_INFO_1
*info
);
2982 uint32
spoolss_size_printer_driver_info_2(DRIVER_INFO_2
*info
);
2983 uint32
spoolss_size_string_array(uint16
*string
);
2984 uint32
spoolss_size_printer_driver_info_3(DRIVER_INFO_3
*info
);
2985 uint32
spoolss_size_printer_driver_info_6(DRIVER_INFO_6
*info
);
2986 uint32
spoolss_size_job_info_1(JOB_INFO_1
*info
);
2987 uint32
spoolss_size_job_info_2(JOB_INFO_2
*info
);
2988 uint32
spoolss_size_form_1(FORM_1
*info
);
2989 uint32
spoolss_size_port_info_1(PORT_INFO_1
*info
);
2990 uint32
spoolss_size_driverdir_info_1(DRIVER_DIRECTORY_1
*info
);
2991 uint32
spoolss_size_port_info_2(PORT_INFO_2
*info
);
2992 uint32
spoolss_size_printprocessor_info_1(PRINTPROCESSOR_1
*info
);
2993 uint32
spoolss_size_printprocdatatype_info_1(PRINTPROCDATATYPE_1
*info
);
2994 uint32
spoolss_size_printmonitor_info_1(PRINTMONITOR_1
*info
);
2995 uint32
spoolss_size_printmonitor_info_2(PRINTMONITOR_2
*info
);
2996 BOOL
make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2
*q_u
,
2997 const POLICY_HND
*hnd
,
2998 const fstring architecture
,
2999 uint32 level
, uint32 clientmajor
, uint32 clientminor
,
3000 NEW_BUFFER
*buffer
, uint32 offered
);
3001 BOOL
spoolss_io_q_getprinterdriver2(char *desc
, SPOOL_Q_GETPRINTERDRIVER2
*q_u
, prs_struct
*ps
, int depth
);
3002 BOOL
spoolss_io_r_getprinterdriver2(char *desc
, SPOOL_R_GETPRINTERDRIVER2
*r_u
, prs_struct
*ps
, int depth
);
3003 BOOL
make_spoolss_q_enumprinters(SPOOL_Q_ENUMPRINTERS
*q_u
, uint32 flags
,
3004 fstring servername
, uint32 level
,
3005 NEW_BUFFER
*buffer
, uint32 offered
);
3006 BOOL
make_spoolss_q_enumports(SPOOL_Q_ENUMPORTS
*q_u
,
3007 fstring servername
, uint32 level
,
3008 NEW_BUFFER
*buffer
, uint32 offered
);
3009 BOOL
spoolss_io_q_enumprinters(char *desc
, SPOOL_Q_ENUMPRINTERS
*q_u
, prs_struct
*ps
, int depth
);
3010 BOOL
new_spoolss_io_r_enumprinters(char *desc
, SPOOL_R_ENUMPRINTERS
*r_u
, prs_struct
*ps
, int depth
);
3011 BOOL
spoolss_io_r_getprinter(char *desc
, SPOOL_R_GETPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3012 BOOL
spoolss_io_q_getprinter(char *desc
, SPOOL_Q_GETPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3013 BOOL
make_spoolss_q_getprinter(SPOOL_Q_GETPRINTER
*q_u
, const POLICY_HND
*hnd
, uint32 level
,
3014 NEW_BUFFER
*buffer
, uint32 offered
);
3015 BOOL
spoolss_io_r_setprinter(char *desc
, SPOOL_R_SETPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3016 void free_spoolss_q_setprinter(SPOOL_Q_SETPRINTER
*q_u
);
3017 BOOL
spoolss_io_q_setprinter(char *desc
, SPOOL_Q_SETPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3018 BOOL
spoolss_io_r_fcpn(char *desc
, SPOOL_R_FCPN
*r_u
, prs_struct
*ps
, int depth
);
3019 BOOL
spoolss_io_q_fcpn(char *desc
, SPOOL_Q_FCPN
*q_u
, prs_struct
*ps
, int depth
);
3020 BOOL
spoolss_io_r_addjob(char *desc
, SPOOL_R_ADDJOB
*r_u
, prs_struct
*ps
, int depth
);
3021 BOOL
spoolss_io_q_addjob(char *desc
, SPOOL_Q_ADDJOB
*q_u
, prs_struct
*ps
, int depth
);
3022 BOOL
spoolss_io_r_enumjobs(char *desc
, SPOOL_R_ENUMJOBS
*r_u
, prs_struct
*ps
, int depth
);
3023 BOOL
make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS
*q_u
, const POLICY_HND
*hnd
,
3029 BOOL
spoolss_io_q_enumjobs(char *desc
, SPOOL_Q_ENUMJOBS
*q_u
, prs_struct
*ps
, int depth
);
3030 BOOL
spoolss_io_r_schedulejob(char *desc
, SPOOL_R_SCHEDULEJOB
*r_u
, prs_struct
*ps
, int depth
);
3031 BOOL
spoolss_io_q_schedulejob(char *desc
, SPOOL_Q_SCHEDULEJOB
*q_u
, prs_struct
*ps
, int depth
);
3032 BOOL
spoolss_io_r_setjob(char *desc
, SPOOL_R_SETJOB
*r_u
, prs_struct
*ps
, int depth
);
3033 BOOL
spoolss_io_q_setjob(char *desc
, SPOOL_Q_SETJOB
*q_u
, prs_struct
*ps
, int depth
);
3034 BOOL
new_spoolss_io_r_enumprinterdrivers(char *desc
, SPOOL_R_ENUMPRINTERDRIVERS
*r_u
, prs_struct
*ps
, int depth
);
3035 BOOL
make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS
*q_u
,
3037 const char *environment
,
3039 NEW_BUFFER
*buffer
, uint32 offered
);
3040 BOOL
spoolss_io_q_enumprinterdrivers(char *desc
, SPOOL_Q_ENUMPRINTERDRIVERS
*q_u
, prs_struct
*ps
, int depth
);
3041 BOOL
spoolss_io_q_enumforms(char *desc
, SPOOL_Q_ENUMFORMS
*q_u
, prs_struct
*ps
, int depth
);
3042 BOOL
new_spoolss_io_r_enumforms(char *desc
, SPOOL_R_ENUMFORMS
*r_u
, prs_struct
*ps
, int depth
);
3043 BOOL
spoolss_io_q_getform(char *desc
, SPOOL_Q_GETFORM
*q_u
, prs_struct
*ps
, int depth
);
3044 BOOL
new_spoolss_io_r_getform(char *desc
, SPOOL_R_GETFORM
*r_u
, prs_struct
*ps
, int depth
);
3045 BOOL
new_spoolss_io_r_enumports(char *desc
, SPOOL_R_ENUMPORTS
*r_u
, prs_struct
*ps
, int depth
);
3046 BOOL
spoolss_io_q_enumports(char *desc
, SPOOL_Q_ENUMPORTS
*q_u
, prs_struct
*ps
, int depth
);
3047 BOOL
spool_io_printer_info_level_1(char *desc
, SPOOL_PRINTER_INFO_LEVEL_1
*il
, prs_struct
*ps
, int depth
);
3048 BOOL
spool_io_printer_info_level_3(char *desc
, SPOOL_PRINTER_INFO_LEVEL_3
*il
, prs_struct
*ps
, int depth
);
3049 BOOL
spool_io_printer_info_level_2(char *desc
, SPOOL_PRINTER_INFO_LEVEL_2
*il
, prs_struct
*ps
, int depth
);
3050 BOOL
spool_io_printer_info_level(char *desc
, SPOOL_PRINTER_INFO_LEVEL
*il
, prs_struct
*ps
, int depth
);
3051 BOOL
spoolss_io_q_addprinterex(char *desc
, SPOOL_Q_ADDPRINTEREX
*q_u
, prs_struct
*ps
, int depth
);
3052 BOOL
spoolss_io_r_addprinterex(char *desc
, SPOOL_R_ADDPRINTEREX
*r_u
,
3053 prs_struct
*ps
, int depth
);
3054 BOOL
spool_io_printer_driver_info_level_3(char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
**q_u
,
3055 prs_struct
*ps
, int depth
);
3056 void free_spool_printer_driver_info_level_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
**q_u
);
3057 BOOL
spool_io_printer_driver_info_level_6(char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6
**q_u
,
3058 prs_struct
*ps
, int depth
);
3059 void free_spool_printer_driver_info_level_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6
**q_u
);
3060 BOOL
smb_io_unibuffer(char *desc
, UNISTR2
*buffer
, prs_struct
*ps
, int depth
);
3061 BOOL
spool_io_printer_driver_info_level(char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL
*il
, prs_struct
*ps
, int depth
);
3062 void free_spool_printer_driver_info_level(SPOOL_PRINTER_DRIVER_INFO_LEVEL
*il
);
3063 BOOL
make_spoolss_q_addprinterdriver(SPOOL_Q_ADDPRINTERDRIVER
*q_u
,
3064 const char* srv_name
, uint32 level
,
3065 PRINTER_DRIVER_CTR
*info
);
3066 BOOL
make_spool_driver_info_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
*spool_drv_info
,
3067 DRIVER_INFO_3
*info3
);
3068 void free_spool_driver_info_3 (SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
*info
);
3069 BOOL
make_spool_buffer5(BUFFER5
*buf5
, uint32 len
, uint16
*src
);
3070 void free_spool_buffer5(BUFFER5
*buf
);
3071 BOOL
spoolss_io_q_addprinterdriver(char *desc
, SPOOL_Q_ADDPRINTERDRIVER
*q_u
, prs_struct
*ps
, int depth
);
3072 void free_spoolss_q_addprinterdriver(SPOOL_Q_ADDPRINTERDRIVER
*q_u
);
3073 BOOL
spoolss_io_r_addprinterdriver(char *desc
, SPOOL_R_ADDPRINTERDRIVER
*q_u
, prs_struct
*ps
, int depth
);
3074 BOOL
uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
*uni
,
3075 NT_PRINTER_DRIVER_INFO_LEVEL_3
**asc
);
3076 BOOL
uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6
*uni
,
3077 NT_PRINTER_DRIVER_INFO_LEVEL_6
**asc
);
3078 BOOL
uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2
*uni
,
3079 NT_PRINTER_INFO_LEVEL_2
**asc
);
3080 BOOL
make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR
*q_u
,
3081 fstring servername
, fstring env_name
, uint32 level
,
3082 NEW_BUFFER
*buffer
, uint32 offered
);
3083 BOOL
spoolss_io_q_getprinterdriverdir(char *desc
, SPOOL_Q_GETPRINTERDRIVERDIR
*q_u
, prs_struct
*ps
, int depth
);
3084 BOOL
spoolss_io_r_getprinterdriverdir(char *desc
, SPOOL_R_GETPRINTERDRIVERDIR
*r_u
, prs_struct
*ps
, int depth
);
3085 BOOL
spoolss_io_r_enumprintprocessors(char *desc
, SPOOL_R_ENUMPRINTPROCESSORS
*r_u
, prs_struct
*ps
, int depth
);
3086 BOOL
spoolss_io_q_enumprintprocessors(char *desc
, SPOOL_Q_ENUMPRINTPROCESSORS
*q_u
, prs_struct
*ps
, int depth
);
3087 BOOL
spoolss_io_r_enumprintprocdatatypes(char *desc
, SPOOL_R_ENUMPRINTPROCDATATYPES
*r_u
, prs_struct
*ps
, int depth
);
3088 BOOL
spoolss_io_q_enumprintprocdatatypes(char *desc
, SPOOL_Q_ENUMPRINTPROCDATATYPES
*q_u
, prs_struct
*ps
, int depth
);
3089 BOOL
spoolss_io_q_enumprintmonitors(char *desc
, SPOOL_Q_ENUMPRINTMONITORS
*q_u
, prs_struct
*ps
, int depth
);
3090 BOOL
spoolss_io_r_enumprintmonitors(char *desc
, SPOOL_R_ENUMPRINTMONITORS
*r_u
, prs_struct
*ps
, int depth
);
3091 BOOL
spoolss_io_r_enumprinterdata(char *desc
, SPOOL_R_ENUMPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
3092 BOOL
spoolss_io_q_enumprinterdata(char *desc
, SPOOL_Q_ENUMPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
3093 BOOL
make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA
*q_u
,
3094 const POLICY_HND
*hnd
,
3095 uint32 idx
, uint32 valuelen
, uint32 datalen
);
3096 BOOL
spoolss_io_q_setprinterdata(char *desc
, SPOOL_Q_SETPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
3097 void free_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA
*q_u
);
3098 BOOL
spoolss_io_r_setprinterdata(char *desc
, SPOOL_R_SETPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
3099 BOOL
convert_specific_param(NT_PRINTER_PARAM
**param
, const UNISTR2
*value
,
3100 uint32 type
, const uint8
*data
, uint32 len
);
3101 BOOL
spoolss_io_q_deleteform(char *desc
, SPOOL_Q_DELETEFORM
*q_u
, prs_struct
*ps
, int depth
);
3102 BOOL
spoolss_io_r_deleteform(char *desc
, SPOOL_R_DELETEFORM
*r_u
, prs_struct
*ps
, int depth
);
3103 BOOL
spoolss_io_q_addform(char *desc
, SPOOL_Q_ADDFORM
*q_u
, prs_struct
*ps
, int depth
);
3104 BOOL
spoolss_io_r_addform(char *desc
, SPOOL_R_ADDFORM
*r_u
, prs_struct
*ps
, int depth
);
3105 BOOL
spoolss_io_q_setform(char *desc
, SPOOL_Q_SETFORM
*q_u
, prs_struct
*ps
, int depth
);
3106 BOOL
spoolss_io_r_setform(char *desc
, SPOOL_R_SETFORM
*r_u
, prs_struct
*ps
, int depth
);
3107 BOOL
spoolss_io_r_getjob(char *desc
, SPOOL_R_GETJOB
*r_u
, prs_struct
*ps
, int depth
);
3108 BOOL
spoolss_io_q_getjob(char *desc
, SPOOL_Q_GETJOB
*q_u
, prs_struct
*ps
, int depth
);
3109 void free_devmode(DEVICEMODE
*devmode
);
3110 void free_printer_info_1(PRINTER_INFO_1
*printer
);
3111 void free_printer_info_2(PRINTER_INFO_2
*printer
);
3112 void free_printer_info_3(PRINTER_INFO_3
*printer
);
3113 void free_spool_printer_info_1(SPOOL_PRINTER_INFO_LEVEL_1
*printer
);
3114 void free_spool_printer_info_2(SPOOL_PRINTER_INFO_LEVEL_2
*printer
);
3115 void free_spool_printer_info_3(SPOOL_PRINTER_INFO_LEVEL_3
*printer
);
3116 void free_spool_printer_info_level(SPOOL_PRINTER_INFO_LEVEL
*pil
);
3117 void free_print2_array(uint32 num_entries
, PRINTER_INFO_2
**entries
);
3118 void free_print1_array(uint32 num_entries
, PRINTER_INFO_1
**entries
);
3119 void free_job1_array(uint32 num_entries
, JOB_INFO_1
**entries
);
3120 void free_job_info_2(JOB_INFO_2
*job
);
3121 void free_job2_array(uint32 num_entries
, JOB_INFO_2
**entries
);
3122 BOOL
make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER
*q_u
,
3123 const fstring string
, uint32 printer
, uint32 type
);
3124 BOOL
spoolss_io_q_replyopenprinter(char *desc
, SPOOL_Q_REPLYOPENPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3125 BOOL
spoolss_io_r_replyopenprinter(char *desc
, SPOOL_R_REPLYOPENPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3126 BOOL
make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER
*q_u
, POLICY_HND
*hnd
);
3127 BOOL
spoolss_io_q_replycloseprinter(char *desc
, SPOOL_Q_REPLYCLOSEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3128 BOOL
spoolss_io_r_replycloseprinter(char *desc
, SPOOL_R_REPLYCLOSEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3129 BOOL
make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN
*q_u
, POLICY_HND
*hnd
,
3130 uint32 change_low
, uint32 change_high
);
3131 BOOL
spoolss_io_q_reply_rrpcn(char *desc
, SPOOL_Q_REPLY_RRPCN
*q_u
, prs_struct
*ps
, int depth
);
3132 BOOL
spoolss_io_r_reply_rrpcn(char *desc
, SPOOL_R_REPLY_RRPCN
*r_u
, prs_struct
*ps
, int depth
);
3134 /*The following definitions come from rpc_parse/parse_srv.c */
3136 void init_srv_share_info1_str(SH_INFO_1_STR
*sh1
, char *net_name
, char *remark
);
3137 void init_srv_share_info1(SH_INFO_1
*sh1
, char *net_name
, uint32 type
, char *remark
);
3138 void init_srv_share_info2_str(SH_INFO_2_STR
*sh2
,
3139 char *net_name
, char *remark
,
3140 char *path
, char *passwd
);
3141 void init_srv_share_info2(SH_INFO_2
*sh2
,
3142 char *net_name
, uint32 type
, char *remark
,
3143 uint32 perms
, uint32 max_uses
, uint32 num_uses
,
3144 char *path
, char *passwd
);
3145 void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM
*q_n
,
3146 char *srv_name
, uint32 info_level
,
3147 uint32 preferred_len
, ENUM_HND
*hnd
);
3148 BOOL
srv_io_q_net_share_enum(char *desc
, SRV_Q_NET_SHARE_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3149 BOOL
srv_io_r_net_share_enum(char *desc
, SRV_R_NET_SHARE_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3150 void free_srv_q_net_share_get_info(SRV_Q_NET_SHARE_GET_INFO
*q_n
);
3151 void free_srv_r_net_share_get_info(SRV_R_NET_SHARE_GET_INFO
*r_n
);
3152 BOOL
srv_io_q_net_share_get_info(char *desc
, SRV_Q_NET_SHARE_GET_INFO
*q_n
, prs_struct
*ps
, int depth
);
3153 BOOL
srv_io_r_net_share_get_info(char *desc
, SRV_R_NET_SHARE_GET_INFO
*r_n
, prs_struct
*ps
, int depth
);
3154 void init_srv_sess_info0_str(SESS_INFO_0_STR
*ss0
, char *name
);
3155 void init_srv_sess_info0(SESS_INFO_0
*ss0
, char *name
);
3156 void init_srv_sess_info1_str(SESS_INFO_1_STR
*ss1
, char *name
, char *user
);
3157 void init_srv_sess_info1(SESS_INFO_1
*ss1
,
3158 char *name
, char *user
,
3159 uint32 num_opens
, uint32 open_time
, uint32 idle_time
,
3161 void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM
*q_n
,
3162 char *srv_name
, char *qual_name
,
3163 uint32 sess_level
, SRV_SESS_INFO_CTR
*ctr
,
3164 uint32 preferred_len
,
3166 BOOL
srv_io_q_net_sess_enum(char *desc
, SRV_Q_NET_SESS_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3167 BOOL
srv_io_r_net_sess_enum(char *desc
, SRV_R_NET_SESS_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3168 void init_srv_conn_info0(CONN_INFO_0
*ss0
, uint32 id
);
3169 void init_srv_conn_info1_str(CONN_INFO_1_STR
*ss1
, char *usr_name
, char *net_name
);
3170 void init_srv_conn_info1(CONN_INFO_1
*ss1
,
3171 uint32 id
, uint32 type
,
3172 uint32 num_opens
, uint32 num_users
, uint32 open_time
,
3173 char *usr_name
, char *net_name
);
3174 void init_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM
*q_n
,
3175 char *srv_name
, char *qual_name
,
3176 uint32 conn_level
, SRV_CONN_INFO_CTR
*ctr
,
3177 uint32 preferred_len
,
3179 BOOL
srv_io_q_net_conn_enum(char *desc
, SRV_Q_NET_CONN_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3180 BOOL
srv_io_r_net_conn_enum(char *desc
, SRV_R_NET_CONN_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3181 void init_srv_file_info3_str(FILE_INFO_3_STR
*fi3
, char *user_name
, char *path_name
);
3182 void init_srv_file_info3(FILE_INFO_3
*fl3
,
3183 uint32 id
, uint32 perms
, uint32 num_locks
,
3184 char *path_name
, char *user_name
);
3185 void init_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM
*q_n
,
3186 char *srv_name
, char *qual_name
,
3187 uint32 file_level
, SRV_FILE_INFO_CTR
*ctr
,
3188 uint32 preferred_len
,
3190 BOOL
srv_io_q_net_file_enum(char *desc
, SRV_Q_NET_FILE_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3191 BOOL
srv_io_r_net_file_enum(char *desc
, SRV_R_NET_FILE_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3192 void init_srv_info_101(SRV_INFO_101
*sv101
, uint32 platform_id
, char *name
,
3193 uint32 ver_major
, uint32 ver_minor
,
3194 uint32 srv_type
, char *comment
);
3195 void init_srv_info_102(SRV_INFO_102
*sv102
, uint32 platform_id
, char *name
,
3196 char *comment
, uint32 ver_major
, uint32 ver_minor
,
3197 uint32 srv_type
, uint32 users
, uint32 disc
, uint32 hidden
,
3198 uint32 announce
, uint32 ann_delta
, uint32 licenses
,
3200 void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO
*srv
,
3201 char *server_name
, uint32 switch_value
);
3202 BOOL
srv_io_q_net_srv_get_info(char *desc
, SRV_Q_NET_SRV_GET_INFO
*q_n
, prs_struct
*ps
, int depth
);
3203 void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO
*srv
,
3204 uint32 switch_value
, SRV_INFO_CTR
*ctr
, uint32 status
);
3205 BOOL
srv_io_r_net_srv_get_info(char *desc
, SRV_R_NET_SRV_GET_INFO
*r_n
, prs_struct
*ps
, int depth
);
3206 BOOL
srv_io_q_net_remote_tod(char *desc
, SRV_Q_NET_REMOTE_TOD
*q_n
, prs_struct
*ps
, int depth
);
3207 void init_time_of_day_info(TIME_OF_DAY_INFO
*tod
, uint32 elapsedt
, uint32 msecs
,
3208 uint32 hours
, uint32 mins
, uint32 secs
, uint32 hunds
,
3209 uint32 zone
, uint32 tintervals
, uint32 day
,
3210 uint32 month
, uint32 year
, uint32 weekday
);
3211 BOOL
srv_io_r_net_remote_tod(char *desc
, SRV_R_NET_REMOTE_TOD
*r_n
, prs_struct
*ps
, int depth
);
3213 /*The following definitions come from rpc_parse/parse_wks.c */
3215 void init_wks_q_query_info(WKS_Q_QUERY_INFO
*q_u
,
3216 char *server
, uint16 switch_value
) ;
3217 BOOL
wks_io_q_query_info(char *desc
, WKS_Q_QUERY_INFO
*q_u
, prs_struct
*ps
, int depth
);
3218 void init_wks_info_100(WKS_INFO_100
*inf
,
3219 uint32 platform_id
, uint32 ver_major
, uint32 ver_minor
,
3220 char *my_name
, char *domain_name
);
3221 void init_wks_r_query_info(WKS_R_QUERY_INFO
*r_u
,
3222 uint32 switch_value
, WKS_INFO_100
*wks100
,
3224 BOOL
wks_io_r_query_info(char *desc
, WKS_R_QUERY_INFO
*r_u
, prs_struct
*ps
, int depth
);
3226 /*The following definitions come from rpc_server/srv_dfs.c */
3228 BOOL
api_netdfs_rpc(pipes_struct
*p
);
3230 /*The following definitions come from rpc_server/srv_lsa.c */
3233 BOOL
api_ntlsa_rpc(pipes_struct
*p
);
3236 /*The following definitions come from rpc_server/srv_lsa_hnd.c */
3239 void init_lsa_policy_hnd(void);
3240 BOOL
open_lsa_policy_hnd(POLICY_HND
*hnd
);
3241 int find_lsa_policy_by_hnd(POLICY_HND
*hnd
);
3242 BOOL
set_lsa_policy_samr_pol_status(POLICY_HND
*hnd
, uint32 pol_status
);
3243 BOOL
set_lsa_policy_samr_sid(POLICY_HND
*hnd
, DOM_SID
*sid
);
3244 BOOL
get_lsa_policy_samr_sid(POLICY_HND
*hnd
, DOM_SID
*sid
);
3245 uint32
get_lsa_policy_samr_rid(POLICY_HND
*hnd
);
3246 BOOL
set_lsa_policy_reg_name(POLICY_HND
*hnd
, fstring name
);
3247 BOOL
close_lsa_policy_hnd(POLICY_HND
*hnd
);
3250 /*The following definitions come from rpc_server/srv_netlog.c */
3253 BOOL
api_netlog_rpc(pipes_struct
*p
);
3256 /*The following definitions come from rpc_server/srv_pipe.c */
3259 BOOL
create_next_pdu(pipes_struct
*p
);
3260 BOOL
api_pipe_bind_auth_resp(pipes_struct
*p
, prs_struct
*rpc_in_p
);
3261 BOOL
setup_fault_pdu(pipes_struct
*p
);
3262 BOOL
check_bind_req(char* pipe_name
, RPC_IFACE
* abstract
,
3263 RPC_IFACE
* transfer
);
3264 BOOL
api_pipe_bind_req(pipes_struct
*p
, prs_struct
*rpc_in_p
);
3265 BOOL
api_pipe_auth_process(pipes_struct
*p
, prs_struct
*rpc_in
);
3266 BOOL
api_pipe_request(pipes_struct
*p
);
3267 BOOL
api_rpcTNP(pipes_struct
*p
, char *rpc_name
,
3268 struct api_struct
*api_rpc_cmds
);
3271 /*The following definitions come from rpc_server/srv_pipe_hnd.c */
3274 void set_pipe_handle_offset(int max_open_files
);
3275 void reset_chain_p(void);
3276 void init_rpc_pipe_hnd(void);
3277 pipes_struct
*open_rpc_pipe_p(char *pipe_name
,
3278 connection_struct
*conn
, uint16 vuid
);
3279 ssize_t
write_to_pipe(pipes_struct
*p
, char *data
, size_t n
);
3280 ssize_t
read_from_pipe(pipes_struct
*p
, char *data
, size_t n
);
3281 BOOL
wait_rpc_pipe_hnd_state(pipes_struct
*p
, uint16 priority
);
3282 BOOL
set_rpc_pipe_hnd_state(pipes_struct
*p
, uint16 device_state
);
3283 BOOL
close_rpc_pipe_hnd(pipes_struct
*p
, connection_struct
*conn
);
3284 pipes_struct
*get_rpc_pipe_p(char *buf
, int where
);
3285 pipes_struct
*get_rpc_pipe(int pnum
);
3288 /*The following definitions come from rpc_server/srv_reg.c */
3291 BOOL
api_reg_rpc(pipes_struct
*p
);
3294 /*The following definitions come from rpc_server/srv_samr.c */
3297 BOOL
api_samr_rpc(pipes_struct
*p
);
3300 /*The following definitions come from rpc_server/srv_spoolss.c */
3303 BOOL
api_spoolss_rpc(pipes_struct
*p
);
3306 /*The following definitions come from rpc_server/srv_spoolss_nt.c */
3309 void init_printer_hnd(void);
3310 void srv_spoolss_receive_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
3311 uint32
_spoolss_open_printer_ex( const UNISTR2
*printername
,
3312 const PRINTER_DEFAULT
*printer_default
,
3313 uint32 user_switch
, SPOOL_USER_CTR user_ctr
,
3314 POLICY_HND
*handle
);
3315 uint32
_spoolss_closeprinter(POLICY_HND
*handle
);
3316 uint32
_spoolss_deleteprinter(POLICY_HND
*handle
);
3317 uint32
_spoolss_getprinterdata(POLICY_HND
*handle
, UNISTR2
*valuename
,
3323 uint32
_spoolss_rffpcnex(POLICY_HND
*handle
, uint32 flags
, uint32 options
,
3324 const UNISTR2
*localmachine
, uint32 printerlocal
,
3325 SPOOL_NOTIFY_OPTION
*option
);
3326 uint32
_spoolss_rfnpcnex( POLICY_HND
*handle
, uint32 change
,
3327 SPOOL_NOTIFY_OPTION
*option
, SPOOL_NOTIFY_INFO
*info
);
3328 uint32
_spoolss_enumprinters( uint32 flags
, const UNISTR2
*servername
, uint32 level
,
3329 NEW_BUFFER
*buffer
, uint32 offered
,
3330 uint32
*needed
, uint32
*returned
);
3331 uint32
_spoolss_getprinter(POLICY_HND
*handle
, uint32 level
,
3332 NEW_BUFFER
*buffer
, uint32 offered
, uint32
*needed
);
3333 uint32
_spoolss_getprinterdriver2(POLICY_HND
*handle
, const UNISTR2
*uni_arch
, uint32 level
,
3334 uint32 clientmajorversion
, uint32 clientminorversion
,
3335 NEW_BUFFER
*buffer
, uint32 offered
,
3336 uint32
*needed
, uint32
*servermajorversion
, uint32
*serverminorversion
);
3337 uint32
_spoolss_startpageprinter(POLICY_HND
*handle
);
3338 uint32
_spoolss_endpageprinter(POLICY_HND
*handle
);
3339 uint32
_spoolss_startdocprinter(POLICY_HND
*handle
, uint32 level
,
3340 pipes_struct
*p
, DOC_INFO
*docinfo
,
3342 uint32
_spoolss_enddocprinter(POLICY_HND
*handle
);
3343 uint32
_spoolss_writeprinter( POLICY_HND
*handle
,
3346 uint32
*buffer_written
);
3347 uint32
_spoolss_abortprinter(POLICY_HND
*handle
, pipes_struct
*p
);
3348 uint32
_spoolss_setprinter(POLICY_HND
*handle
, uint32 level
,
3349 const SPOOL_PRINTER_INFO_LEVEL
*info
,
3350 DEVMODE_CTR devmode_ctr
,
3351 SEC_DESC_BUF
*secdesc_ctr
,
3352 uint32 command
, pipes_struct
*p
);
3353 uint32
_spoolss_fcpn(POLICY_HND
*handle
);
3354 uint32
_spoolss_addjob(POLICY_HND
*handle
, uint32 level
,
3355 NEW_BUFFER
*buffer
, uint32 offered
,
3357 uint32
_spoolss_enumjobs( POLICY_HND
*handle
, uint32 firstjob
, uint32 numofjobs
, uint32 level
,
3358 NEW_BUFFER
*buffer
, uint32 offered
,
3359 uint32
*needed
, uint32
*returned
);
3360 uint32
_spoolss_schedulejob( POLICY_HND
*handle
, uint32 jobid
);
3361 uint32
_spoolss_setjob(POLICY_HND
*handle
, uint32 jobid
, uint32 level
,
3362 pipes_struct
*p
, JOB_INFO
*ctr
, uint32 command
);
3363 uint32
_spoolss_enumprinterdrivers( UNISTR2
*name
, UNISTR2
*environment
, uint32 level
,
3364 NEW_BUFFER
*buffer
, uint32 offered
,
3365 uint32
*needed
, uint32
*returned
);
3366 uint32
_new_spoolss_enumforms( POLICY_HND
*handle
, uint32 level
,
3367 NEW_BUFFER
*buffer
, uint32 offered
,
3368 uint32
*needed
, uint32
*numofforms
);
3369 uint32
_spoolss_getform( POLICY_HND
*handle
, uint32 level
, UNISTR2
*uni_formname
, NEW_BUFFER
*buffer
, uint32 offered
, uint32
*needed
);
3370 uint32
_spoolss_enumports( UNISTR2
*name
, uint32 level
,
3371 NEW_BUFFER
*buffer
, uint32 offered
,
3372 uint32
*needed
, uint32
*returned
);
3373 uint32
_spoolss_addprinterex( const UNISTR2
*uni_srv_name
, uint32 level
,
3374 const SPOOL_PRINTER_INFO_LEVEL
*info
,
3375 uint32 unk0
, uint32 unk1
, uint32 unk2
, uint32 unk3
,
3376 uint32 user_switch
, const SPOOL_USER_CTR
*user
,
3377 POLICY_HND
*handle
);
3378 uint32
_spoolss_addprinterdriver(pipes_struct
*p
, const UNISTR2
*server_name
,
3379 uint32 level
, const SPOOL_PRINTER_DRIVER_INFO_LEVEL
*info
);
3380 uint32
_spoolss_getprinterdriverdirectory(UNISTR2
*name
, UNISTR2
*uni_environment
, uint32 level
,
3381 NEW_BUFFER
*buffer
, uint32 offered
,
3383 uint32
_spoolss_enumprinterdata(POLICY_HND
*handle
, uint32 idx
,
3384 uint32 in_value_len
, uint32 in_data_len
,
3385 uint32
*out_max_value_len
, uint16
**out_value
, uint32
*out_value_len
,
3387 uint32
*out_max_data_len
, uint8
**data_out
, uint32
*out_data_len
);
3388 uint32
_spoolss_setprinterdata( POLICY_HND
*handle
,
3389 const UNISTR2
*value
,
3394 uint32 numeric_data
);
3395 uint32
_spoolss_deleteprinterdata( POLICY_HND
*handle
, const UNISTR2
*value
);
3396 uint32
_spoolss_addform( POLICY_HND
*handle
,
3399 uint32
_spoolss_deleteform( POLICY_HND
*handle
, UNISTR2
*form_name
);
3400 uint32
_spoolss_setform( POLICY_HND
*handle
,
3401 const UNISTR2
*uni_name
,
3404 uint32
_spoolss_enumprintprocessors(UNISTR2
*name
, UNISTR2
*environment
, uint32 level
,
3405 NEW_BUFFER
*buffer
, uint32 offered
,
3406 uint32
*needed
, uint32
*returned
);
3407 uint32
_spoolss_enumprintprocdatatypes(UNISTR2
*name
, UNISTR2
*processor
, uint32 level
,
3408 NEW_BUFFER
*buffer
, uint32 offered
,
3409 uint32
*needed
, uint32
*returned
);
3410 uint32
_spoolss_enumprintmonitors(UNISTR2
*name
,uint32 level
,
3411 NEW_BUFFER
*buffer
, uint32 offered
,
3412 uint32
*needed
, uint32
*returned
);
3413 uint32
_spoolss_getjob( POLICY_HND
*handle
, uint32 jobid
, uint32 level
,
3414 NEW_BUFFER
*buffer
, uint32 offered
,
3418 /*The following definitions come from rpc_server/srv_srvsvc.c */
3421 BOOL
api_srvsvc_rpc(pipes_struct
*p
);
3424 /*The following definitions come from rpc_server/srv_util.c */
3427 int make_dom_gids(char *gids_str
, DOM_GID
**ppgids
);
3428 void get_domain_user_groups(char *domain_groups
, char *user
);
3429 uint32
lookup_group_name(uint32 rid
, char *group_name
, uint32
*type
);
3430 uint32
lookup_alias_name(uint32 rid
, char *alias_name
, uint32
*type
);
3431 uint32
lookup_user_name(uint32 rid
, char *user_name
, uint32
*type
);
3432 uint32
lookup_group_rid(char *group_name
, uint32
*rid
);
3433 uint32
lookup_alias_rid(char *alias_name
, uint32
*rid
);
3434 uint32
lookup_user_rid(char *user_name
, uint32
*rid
);
3437 /*The following definitions come from rpc_server/srv_wkssvc.c */
3440 BOOL
api_wkssvc_rpc(pipes_struct
*p
);
3443 /*The following definitions come from smbd/blocking.c */
3446 BOOL
push_blocking_lock_request( char *inbuf
, int length
, int lock_timeout
, int lock_num
);
3447 void remove_pending_lock_requests_by_fid(files_struct
*fsp
);
3448 void remove_pending_lock_requests_by_mid(int mid
);
3449 BOOL
blocking_locks_pending(void);
3450 void process_blocking_lock_queue(time_t t
);
3453 /*The following definitions come from smbd/chgpasswd.c */
3456 BOOL
chgpasswd(char *name
, char *oldpass
, char *newpass
, BOOL as_root
);
3457 BOOL
chgpasswd(char *name
, char *oldpass
, char *newpass
, BOOL as_root
);
3458 BOOL
check_lanman_password(char *user
, uchar
* pass1
,
3459 uchar
* pass2
, SAM_ACCOUNT
**hnd
);
3460 BOOL
change_lanman_password(SAM_ACCOUNT
*sampass
, uchar
* pass1
,
3462 BOOL
pass_oem_change(char *user
,
3463 uchar
* lmdata
, uchar
* lmhash
,
3464 uchar
* ntdata
, uchar
* nthash
);
3465 BOOL
check_oem_password(char *user
,
3466 uchar
* lmdata
, uchar
* lmhash
,
3467 uchar
* ntdata
, uchar
* nthash
,
3468 SAM_ACCOUNT
**hnd
, char *new_passwd
,
3469 int new_passwd_size
);
3470 BOOL
change_oem_password(SAM_ACCOUNT
*hnd
, char *new_passwd
,
3472 BOOL
check_plaintext_password(char *user
, char *old_passwd
,
3473 int old_passwd_size
, SAM_ACCOUNT
**hnd
);
3476 /*The following definitions come from smbd/close.c */
3479 int close_file(files_struct
*fsp
, BOOL normal_close
);
3482 /*The following definitions come from smbd/conn.c */
3485 void conn_init(void);
3486 int conn_num_open(void);
3487 BOOL
conn_snum_used(int snum
);
3488 connection_struct
*conn_find(int cnum
);
3489 connection_struct
*conn_new(void);
3490 void conn_close_all(void);
3491 BOOL
conn_idle_all(time_t t
, int deadtime
);
3492 void conn_free(connection_struct
*conn
);
3495 /*The following definitions come from smbd/connection.c */
3497 TDB_CONTEXT
*conn_tdb_ctx(void);
3498 BOOL
yield_connection(connection_struct
*conn
,char *name
,int max_connections
);
3499 BOOL
claim_connection(connection_struct
*conn
,char *name
,int max_connections
,BOOL Clear
);
3501 /*The following definitions come from smbd/dfree.c */
3503 SMB_BIG_UINT
sys_disk_free(char *path
, BOOL small_query
,
3504 SMB_BIG_UINT
*bsize
,SMB_BIG_UINT
*dfree
,SMB_BIG_UINT
*dsize
);
3506 /*The following definitions come from smbd/dir.c */
3509 void init_dptrs(void);
3510 char *dptr_path(int key
);
3511 char *dptr_wcard(int key
);
3512 BOOL
dptr_set_wcard(int key
, char *wcard
);
3513 BOOL
dptr_set_attr(int key
, uint16 attr
);
3514 uint16
dptr_attr(int key
);
3515 void dptr_close(int *key
);
3516 void dptr_closecnum(connection_struct
*conn
);
3517 void dptr_idlecnum(connection_struct
*conn
);
3518 void dptr_closepath(char *path
,uint16 spid
);
3519 int dptr_create(connection_struct
*conn
,char *path
, BOOL old_handle
, BOOL expect_close
,uint16 spid
);
3520 BOOL
dptr_fill(char *buf1
,unsigned int key
);
3521 void *dptr_fetch(char *buf
,int *num
);
3522 void *dptr_fetch_lanman2(int dptr_num
);
3523 BOOL
dir_check_ftype(connection_struct
*conn
,int mode
,SMB_STRUCT_STAT
*st
,int dirtype
);
3524 BOOL
get_dir_entry(connection_struct
*conn
,char *mask
,int dirtype
,char *fname
,
3525 SMB_OFF_T
*size
,int *mode
,time_t *date
,BOOL check_descend
);
3526 void *OpenDir(connection_struct
*conn
, char *name
, BOOL use_veto
);
3527 void CloseDir(void *p
);
3528 char *ReadDirName(void *p
);
3529 BOOL
SeekDir(void *p
,int pos
);
3530 int TellDir(void *p
);
3531 void DirCacheAdd( char *path
, char *name
, char *dname
, int snum
);
3532 char *DirCacheCheck( char *path
, char *name
, int snum
);
3533 void DirCacheFlush(int snum
);
3536 /*The following definitions come from smbd/dosmode.c */
3539 mode_t
unix_mode(connection_struct
*conn
,int dosmode
,const char *fname
);
3540 int dos_mode(connection_struct
*conn
,char *path
,SMB_STRUCT_STAT
*sbuf
);
3541 int file_chmod(connection_struct
*conn
,char *fname
,int dosmode
,SMB_STRUCT_STAT
*st
);
3542 int file_utime(connection_struct
*conn
, char *fname
, struct utimbuf
*times
);
3543 BOOL
set_filetime(connection_struct
*conn
, char *fname
, time_t mtime
);
3546 /*The following definitions come from smbd/error.c */
3549 int cached_error_packet(char *inbuf
,char *outbuf
,files_struct
*fsp
,int line
);
3550 int unix_error_packet(char *inbuf
,char *outbuf
,int def_class
,uint32 def_code
,int line
);
3551 int error_packet(char *inbuf
,char *outbuf
,int error_class
,uint32 error_code
,int line
);
3554 /*The following definitions come from smbd/fileio.c */
3557 SMB_OFF_T
seek_file(files_struct
*fsp
,SMB_OFF_T pos
);
3558 BOOL
read_from_write_cache(files_struct
*fsp
,char *data
,SMB_OFF_T pos
,size_t n
);
3559 ssize_t
read_file(files_struct
*fsp
,char *data
,SMB_OFF_T pos
,size_t n
);
3560 ssize_t
write_file(files_struct
*fsp
, char *data
, SMB_OFF_T pos
, size_t n
);
3561 void delete_write_cache(files_struct
*fsp
);
3562 void set_filelen_write_cache(files_struct
*fsp
, SMB_OFF_T file_size
);
3563 ssize_t
flush_write_cache(files_struct
*fsp
, enum flush_reason_enum reason
);
3564 void sync_file(connection_struct
*conn
, files_struct
*fsp
);
3567 /*The following definitions come from smbd/filename.c */
3570 BOOL
unix_convert(char *name
,connection_struct
*conn
,char *saved_last_component
,
3571 BOOL
*bad_path
, SMB_STRUCT_STAT
*pst
);
3572 BOOL
check_name(char *name
,connection_struct
*conn
);
3575 /*The following definitions come from smbd/files.c */
3578 files_struct
*file_new(void );
3579 void file_close_conn(connection_struct
*conn
);
3580 void file_init(void);
3581 void file_close_user(int vuid
);
3582 files_struct
*file_find_dit(SMB_DEV_T dev
, SMB_INO_T inode
, struct timeval
*tval
);
3583 files_struct
*file_find_fsp(files_struct
*orig_fsp
);
3584 files_struct
*file_find_di_first(SMB_DEV_T dev
, SMB_INO_T inode
);
3585 files_struct
*file_find_di_next(files_struct
*start_fsp
);
3586 files_struct
*file_find_print(void);
3587 void file_sync_all(connection_struct
*conn
);
3588 void file_free(files_struct
*fsp
);
3589 files_struct
*file_fsp(char *buf
, int where
);
3590 void file_chain_reset(void);
3591 void file_chain_save(void);
3592 void file_chain_restore(void);
3595 /*The following definitions come from smbd/ipc.c */
3598 void send_trans_reply(char *outbuf
,
3599 char *rparam
, int rparam_len
,
3600 char *rdata
, int rdata_len
,
3601 BOOL buffer_too_large
);
3602 int reply_trans(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int bufsize
);
3605 /*The following definitions come from smbd/lanman.c */
3608 int api_reply(connection_struct
*conn
,uint16 vuid
,char *outbuf
,char *data
,char *params
,
3609 int tdscnt
,int tpscnt
,int mdrcnt
,int mprcnt
);
3612 /*The following definitions come from smbd/mangle.c */
3614 BOOL
is_mangled( char *s
);
3615 BOOL
is_8_3( char *fname
, BOOL check_case
);
3616 void reset_mangled_cache( void );
3617 BOOL
check_mangled_cache( char *s
);
3618 void mangle_name_83( char *s
);
3619 BOOL
name_map_mangle(char *OutName
, BOOL need83
, BOOL cache83
, int snum
);
3621 /*The following definitions come from smbd/message.c */
3624 int reply_sends(connection_struct
*conn
,
3625 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3626 int reply_sendstrt(connection_struct
*conn
,
3627 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3628 int reply_sendtxt(connection_struct
*conn
,
3629 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3630 int reply_sendend(connection_struct
*conn
,
3631 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3634 /*The following definitions come from smbd/negprot.c */
3637 int reply_negprot(connection_struct
*conn
,
3638 char *inbuf
,char *outbuf
, int dum_size
,
3642 /*The following definitions come from smbd/noquotas.c */
3644 BOOL
disk_quotas(char *path
,SMB_BIG_UINT
*bsize
,SMB_BIG_UINT
*dfree
,SMB_BIG_UINT
*dsize
);
3646 /*The following definitions come from smbd/notify.c */
3649 void remove_pending_change_notify_requests_by_fid(files_struct
*fsp
);
3650 void remove_pending_change_notify_requests_by_mid(int mid
);
3651 void remove_pending_change_notify_requests_by_filename(files_struct
*fsp
);
3652 int change_notify_timeout(void);
3653 BOOL
process_pending_change_notify_queue(time_t t
);
3654 BOOL
change_notify_set(char *inbuf
, files_struct
*fsp
, connection_struct
*conn
, uint32 flags
);
3655 BOOL
init_change_notify(void);
3658 /*The following definitions come from smbd/notify_hash.c */
3661 struct cnotify_fns
*hash_notify_init(void) ;
3664 /*The following definitions come from smbd/notify_kernel.c */
3667 struct cnotify_fns
*kernel_notify_init(void) ;
3670 /*The following definitions come from smbd/nttrans.c */
3673 void fail_next_srvsvc_open(void);
3674 BOOL
should_fail_next_srvsvc_open(const char *pipename
);
3675 int reply_ntcreate_and_X(connection_struct
*conn
,
3676 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3677 int reply_ntcancel(connection_struct
*conn
,
3678 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3679 int reply_nttranss(connection_struct
*conn
,
3680 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3681 int reply_nttrans(connection_struct
*conn
,
3682 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3685 /*The following definitions come from smbd/open.c */
3688 int fd_close(struct connection_struct
*conn
, files_struct
*fsp
);
3689 files_struct
*open_file_shared(connection_struct
*conn
,char *fname
, SMB_STRUCT_STAT
*psbuf
,
3690 int share_mode
,int ofun
, mode_t mode
,int oplock_request
, int *Access
,int *action
);
3691 files_struct
*open_file_stat(connection_struct
*conn
, char *fname
,
3692 SMB_STRUCT_STAT
*psbuf
, int smb_ofun
, int *action
);
3693 files_struct
*open_directory(connection_struct
*conn
, char *fname
,
3694 SMB_STRUCT_STAT
*psbuf
, int smb_ofun
, mode_t unixmode
, int *action
);
3695 BOOL
check_file_sharing(connection_struct
*conn
,char *fname
, BOOL rename_op
);
3698 /*The following definitions come from smbd/oplock.c */
3701 int32
get_number_of_exclusive_open_oplocks(void);
3702 BOOL
receive_local_message(fd_set
*fds
, char *buffer
, int buffer_len
, int timeout
);
3703 BOOL
set_file_oplock(files_struct
*fsp
, int oplock_type
);
3704 void release_file_oplock(files_struct
*fsp
);
3705 BOOL
remove_oplock(files_struct
*fsp
, BOOL break_to_none
);
3706 int setup_oplock_select_set( fd_set
*fds
);
3707 BOOL
process_local_message(char *buffer
, int buf_size
);
3708 BOOL
oplock_break_level2(files_struct
*fsp
, BOOL local_request
, int token
);
3709 BOOL
request_oplock_break(share_mode_entry
*share_entry
,
3710 SMB_DEV_T dev
, SMB_INO_T inode
);
3711 BOOL
attempt_close_oplocked_file(files_struct
*fsp
);
3712 void release_level_2_oplocks_on_change(files_struct
*fsp
);
3713 BOOL
init_oplocks(void);
3716 /*The following definitions come from smbd/oplock_irix.c */
3719 struct kernel_oplocks
*irix_init_kernel_oplocks(void) ;
3722 /*The following definitions come from smbd/oplock_linux.c */
3725 struct kernel_oplocks
*linux_init_kernel_oplocks(void) ;
3728 /*The following definitions come from smbd/password.c */
3731 void generate_next_challenge(char *challenge
);
3732 BOOL
set_challenge(unsigned char *challenge
);
3733 user_struct
*get_valid_user_struct(uint16 vuid
);
3734 void invalidate_vuid(uint16 vuid
);
3735 char *validated_username(uint16 vuid
);
3736 char *validated_domain(uint16 vuid
);
3737 NT_USER_TOKEN
*create_nt_token(uid_t uid
, gid_t gid
, int ngroups
, gid_t
*groups
, BOOL is_guest
);
3738 uint16
register_vuid(uid_t uid
,gid_t gid
, char *unix_name
, char *requested_name
,
3739 char *domain
,BOOL guest
);
3740 void add_session_user(char *user
);
3741 BOOL
smb_password_check(char *password
, unsigned char *part_passwd
, unsigned char *c8
);
3742 BOOL
smb_password_ok(SAM_ACCOUNT
*sampass
, uchar chal
[8],
3743 uchar lm_pass
[24], uchar nt_pass
[24]);
3744 BOOL
pass_check_smb(char *user
, char *domain
, uchar
*chal
,
3745 uchar
*lm_pwd
, uchar
*nt_pwd
, struct passwd
*pwd
);
3746 BOOL
password_ok(char *user
, char *password
, int pwlen
, struct passwd
*pwd
);
3747 BOOL
user_ok(char *user
,int snum
);
3748 BOOL
authorise_login(int snum
,char *user
,char *password
, int pwlen
,
3749 BOOL
*guest
,BOOL
*force
,uint16 vuid
);
3750 BOOL
check_hosts_equiv(char *user
);
3751 struct cli_state
*server_client(void);
3752 struct cli_state
*server_cryptkey(void);
3753 BOOL
server_validate(char *user
, char *domain
,
3754 char *pass
, int passlen
,
3755 char *ntpass
, int ntpasslen
);
3756 BOOL
domain_client_validate( char *user
, char *domain
,
3757 char *smb_apasswd
, int smb_apasslen
,
3758 char *smb_ntpasswd
, int smb_ntpasslen
,
3762 /*The following definitions come from smbd/pipes.c */
3765 int reply_open_pipe_and_X(connection_struct
*conn
,
3766 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3767 int reply_pipe_write(char *inbuf
,char *outbuf
,int length
,int dum_bufsize
);
3768 int reply_pipe_write_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
3769 int reply_pipe_read_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
3770 int reply_pipe_close(connection_struct
*conn
, char *inbuf
,char *outbuf
);
3773 /*The following definitions come from smbd/posix_acls.c */
3776 size_t get_nt_acl(files_struct
*fsp
, SEC_DESC
**ppdesc
);
3777 BOOL
set_nt_acl(files_struct
*fsp
, uint32 security_info_sent
, SEC_DESC
*psd
);
3780 /*The following definitions come from smbd/process.c */
3783 BOOL
push_oplock_pending_smb_message(char *buf
, int msg_len
);
3784 BOOL
receive_next_smb(char *inbuf
, int bufsize
, int timeout
);
3785 void respond_to_all_remaining_local_messages(void);
3786 void process_smb(char *inbuf
, char *outbuf
);
3787 char *smb_fn_name(int type
);
3788 void construct_reply_common(char *inbuf
,char *outbuf
);
3789 int chain_reply(char *inbuf
,char *outbuf
,int size
,int bufsize
);
3790 void check_reload(int t
);
3791 void smbd_process(void);
3794 /*The following definitions come from smbd/reply.c */
3797 int reply_special(char *inbuf
,char *outbuf
);
3798 int reply_tcon(connection_struct
*conn
,
3799 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3800 int reply_tcon_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3801 int reply_unknown(char *inbuf
,char *outbuf
);
3802 int reply_ioctl(connection_struct
*conn
,
3803 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3804 int smb_create_user(char *unix_user
);
3805 int reply_sesssetup_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3806 int reply_chkpth(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3807 int reply_getatr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3808 int reply_setatr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3809 int reply_dskattr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3810 int reply_search(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3811 int reply_fclose(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3812 int reply_open(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3813 int reply_open_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3814 int reply_ulogoffX(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3815 int reply_mknew(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3816 int reply_ctemp(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3817 int unlink_internals(connection_struct
*conn
, char *inbuf
,char *outbuf
,
3818 int dirtype
, char *name
);
3819 int reply_unlink(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3820 int reply_readbraw(connection_struct
*conn
, char *inbuf
, char *outbuf
, int dum_size
, int dum_buffsize
);
3821 int reply_lockread(connection_struct
*conn
, char *inbuf
,char *outbuf
, int length
, int dum_buffsiz
);
3822 int reply_read(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3823 int reply_read_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3824 int reply_writebraw(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3825 int reply_writeunlock(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3826 int reply_write(connection_struct
*conn
, char *inbuf
,char *outbuf
,int size
,int dum_buffsize
);
3827 int reply_write_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3828 int reply_lseek(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3829 int reply_flush(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3830 int reply_exit(connection_struct
*conn
,
3831 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3832 int reply_close(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
,
3834 int reply_writeclose(connection_struct
*conn
,
3835 char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3836 int reply_lock(connection_struct
*conn
,
3837 char *inbuf
,char *outbuf
, int length
, int dum_buffsize
);
3838 int reply_unlock(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3839 int reply_tdis(connection_struct
*conn
,
3840 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3841 int reply_echo(connection_struct
*conn
,
3842 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3843 int reply_printopen(connection_struct
*conn
,
3844 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3845 int reply_printclose(connection_struct
*conn
,
3846 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3847 int reply_printqueue(connection_struct
*conn
,
3848 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3849 int reply_printwrite(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3850 int mkdir_internal(connection_struct
*conn
, char *inbuf
, char *outbuf
, pstring directory
);
3851 int reply_mkdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3852 BOOL
rmdir_internals(connection_struct
*conn
, char *directory
);
3853 int reply_rmdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3854 int rename_internals(connection_struct
*conn
,
3855 char *inbuf
, char *outbuf
, char *name
,
3856 char *newname
, BOOL replace_if_exists
);
3857 int reply_mv(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3858 int reply_copy(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3859 int reply_setdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3860 SMB_BIG_UINT
get_lock_count( char *data
, int data_offset
, BOOL large_file_format
);
3861 SMB_BIG_UINT
get_lock_offset( char *data
, int data_offset
, BOOL large_file_format
, BOOL
*err
);
3862 int reply_lockingX(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3863 int reply_readbmpx(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
3864 int reply_writebmpx(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3865 int reply_writebs(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
3866 int reply_setattrE(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3867 int reply_getattrE(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
3870 /*The following definitions come from smbd/sec_ctx.c */
3873 int get_current_groups(int *p_ngroups
, gid_t
**p_groups
);
3874 void delete_nt_token(NT_USER_TOKEN
**pptoken
);
3875 NT_USER_TOKEN
*dup_nt_token(NT_USER_TOKEN
*ptoken
);
3876 BOOL
initialise_groups(char *user
, uid_t uid
, gid_t gid
);
3877 BOOL
push_sec_ctx(void);
3878 void set_sec_ctx(uid_t uid
, gid_t gid
, int ngroups
, gid_t
*groups
, NT_USER_TOKEN
*token
);
3879 void set_root_sec_ctx(void);
3880 BOOL
pop_sec_ctx(void);
3881 void init_sec_ctx(void);
3884 /*The following definitions come from smbd/server.c */
3887 int smbd_server_fd(void);
3888 void smbd_set_server_fd(int fd
);
3889 BOOL
reload_services(BOOL test
);
3890 void exit_server(char *reason
);
3893 /*The following definitions come from smbd/service.c */
3896 BOOL
become_service(connection_struct
*conn
,BOOL do_chdir
);
3897 int find_service(char *service
);
3898 connection_struct
*make_connection(char *service
,char *user
,char *password
, int pwlen
, char *dev
,uint16 vuid
, int *ecode
);
3899 void close_cnum(connection_struct
*conn
, uint16 vuid
);
3902 /*The following definitions come from smbd/ssl.c */
3904 int sslutil_init(int isServer
);
3905 int sslutil_accept(int fd
);
3906 int sslutil_fd_is_ssl(int fd
);
3907 int sslutil_connect(int fd
);
3908 int sslutil_disconnect(int fd
);
3909 int sslutil_negotiate_ssl(int fd
, int msg_type
);
3911 /*The following definitions come from smbd/statcache.c */
3913 void stat_cache_add( char *full_orig_name
, char *orig_translated_path
);
3914 BOOL
stat_cache_lookup(connection_struct
*conn
, char *name
, char *dirpath
,
3915 char **start
, SMB_STRUCT_STAT
*pst
);
3916 BOOL
reset_stat_cache( void );
3918 /*The following definitions come from smbd/trans2.c */
3921 int reply_findclose(connection_struct
*conn
,
3922 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3923 int reply_findnclose(connection_struct
*conn
,
3924 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3925 int reply_transs2(connection_struct
*conn
,
3926 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3927 int reply_trans2(connection_struct
*conn
,
3928 char *inbuf
,char *outbuf
,int length
,int bufsize
);
3931 /*The following definitions come from smbd/uid.c */
3934 BOOL
become_guest(void);
3935 BOOL
become_user(connection_struct
*conn
, uint16 vuid
);
3936 BOOL
unbecome_user(void );
3937 BOOL
become_authenticated_pipe_user(pipes_struct
*p
);
3938 BOOL
unbecome_authenticated_pipe_user(pipes_struct
*p
);
3939 void become_root(void);
3940 void unbecome_root(void);
3941 BOOL
lookup_name(char *name
, DOM_SID
*psid
, enum SID_NAME_USE
*name_type
);
3942 BOOL
lookup_sid(DOM_SID
*sid
, fstring dom_name
, fstring name
, enum SID_NAME_USE
*name_type
);
3943 DOM_SID
*uid_to_sid(DOM_SID
*psid
, uid_t uid
);
3944 DOM_SID
*gid_to_sid(DOM_SID
*psid
, gid_t gid
);
3945 BOOL
sid_to_uid(DOM_SID
*psid
, uid_t
*puid
, enum SID_NAME_USE
*sidtype
);
3946 BOOL
sid_to_gid(DOM_SID
*psid
, gid_t
*pgid
, enum SID_NAME_USE
*sidtype
);
3949 /*The following definitions come from smbd/vfs.c */
3952 int vfs_init_default(connection_struct
*conn
);
3953 BOOL
vfs_init_custom(connection_struct
*conn
);
3954 BOOL
vfs_directory_exist(connection_struct
*conn
, char *dname
, SMB_STRUCT_STAT
*st
);
3955 int vfs_mkdir(connection_struct
*conn
, char *fname
, mode_t mode
);
3956 char *vfs_getwd(connection_struct
*conn
, char *unix_path
);
3957 BOOL
vfs_file_exist(connection_struct
*conn
,char *fname
,SMB_STRUCT_STAT
*sbuf
);
3958 ssize_t
vfs_read_data(files_struct
*fsp
, char *buf
, size_t byte_count
);
3959 ssize_t
vfs_write_data(files_struct
*fsp
,char *buffer
,size_t N
);
3960 int vfs_set_filelen(files_struct
*fsp
, SMB_OFF_T len
);
3961 SMB_OFF_T
vfs_transfer_file(int in_fd
, files_struct
*in_fsp
,
3962 int out_fd
, files_struct
*out_fsp
,
3963 SMB_OFF_T n
, char *header
, int headlen
, int align
);
3964 char *vfs_readdirname(connection_struct
*conn
, void *p
);
3965 int vfs_ChDir(connection_struct
*conn
, char *path
);
3966 char *vfs_GetWd(connection_struct
*conn
, char *path
);
3967 BOOL
reduce_name(connection_struct
*conn
, char *s
,char *dir
,BOOL widelinks
);
3970 /*The following definitions come from smbd/vfs-wrap.c */
3973 int vfswrap_dummy_connect(connection_struct
*conn
, char *service
, char *user
);
3974 void vfswrap_dummy_disconnect(connection_struct
*conn
);
3975 SMB_BIG_UINT
vfswrap_disk_free(connection_struct
*conn
, char *path
, BOOL small_query
, SMB_BIG_UINT
*bsize
,
3976 SMB_BIG_UINT
*dfree
, SMB_BIG_UINT
*dsize
);
3977 DIR *vfswrap_opendir(connection_struct
*conn
, char *fname
);
3978 struct dirent
*vfswrap_readdir(connection_struct
*conn
, DIR *dirp
);
3979 int vfswrap_mkdir(connection_struct
*conn
, char *path
, mode_t mode
);
3980 int vfswrap_rmdir(connection_struct
*conn
, char *path
);
3981 int vfswrap_closedir(connection_struct
*conn
, DIR *dirp
);
3982 int vfswrap_open(connection_struct
*conn
, char *fname
, int flags
, mode_t mode
);
3983 int vfswrap_close(files_struct
*fsp
, int fd
);
3984 ssize_t
vfswrap_read(files_struct
*fsp
, int fd
, char *data
, size_t n
);
3985 ssize_t
vfswrap_write(files_struct
*fsp
, int fd
, char *data
, size_t n
);
3986 SMB_OFF_T
vfswrap_lseek(files_struct
*fsp
, int filedes
, SMB_OFF_T offset
, int whence
);
3987 int vfswrap_rename(connection_struct
*conn
, char *old
, char *new);
3988 int vfswrap_fsync(files_struct
*fsp
, int fd
);
3989 int vfswrap_stat(connection_struct
*conn
, char *fname
, SMB_STRUCT_STAT
*sbuf
);
3990 int vfswrap_fstat(files_struct
*fsp
, int fd
, SMB_STRUCT_STAT
*sbuf
);
3991 int vfswrap_lstat(connection_struct
*conn
, char *path
, SMB_STRUCT_STAT
*sbuf
);
3992 int vfswrap_unlink(connection_struct
*conn
, char *path
);
3993 int vfswrap_chmod(connection_struct
*conn
, char *path
, mode_t mode
);
3994 int vfswrap_chown(connection_struct
*conn
, char *path
, uid_t uid
, gid_t gid
);
3995 int vfswrap_chdir(connection_struct
*conn
, char *path
);
3996 char *vfswrap_getwd(connection_struct
*conn
, char *path
);
3997 int vfswrap_utime(connection_struct
*conn
, char *path
, struct utimbuf
*times
);
3998 int vfswrap_ftruncate(files_struct
*fsp
, int fd
, SMB_OFF_T len
);
3999 BOOL
vfswrap_lock(files_struct
*fsp
, int fd
, int op
, SMB_OFF_T offset
, SMB_OFF_T count
, int type
);
4000 size_t vfswrap_fget_nt_acl(files_struct
*fsp
, int fd
, SEC_DESC
**ppdesc
);
4001 size_t vfswrap_get_nt_acl(files_struct
*fsp
, char *name
, SEC_DESC
**ppdesc
);
4002 BOOL
vfswrap_fset_nt_acl(files_struct
*fsp
, int fd
, uint32 security_info_sent
, SEC_DESC
*psd
);
4003 BOOL
vfswrap_set_nt_acl(files_struct
*fsp
, char *name
, uint32 security_info_sent
, SEC_DESC
*psd
);
4006 /*The following definitions come from smbwrapper/realcalls.c */
4008 int real_utime(const char *name
, struct utimbuf
*buf
);
4009 int real_utimes(const char *name
, struct timeval tv
[2]);
4011 /*The following definitions come from smbwrapper/shared.c */
4013 void smbw_setup_shared(void);
4014 char *smbw_getshared(const char *name
);
4015 void smbw_setshared(const char *name
, const char *val
);
4016 int smbw_setenv(const char *name
, const char *value
);
4017 int smbw_shared_fd(int fd
);
4019 /*The following definitions come from smbwrapper/smbw.c */
4021 void smbw_init(void);
4022 int smbw_fd(int fd
);
4023 int smbw_local_fd(int fd
);
4024 ino_t
smbw_inode(const char *name
);
4025 void clean_fname(char *name
);
4026 char *smbw_parse_path(const char *fname
, char *server
, char *share
, char *path
);
4027 int smbw_path(const char *path
);
4028 int smbw_errno(struct cli_state
*c
);
4029 void get_envvar_auth_data(char *server
, char *share
, char **workgroup
,
4030 char **username
, char **password
);
4031 void smbw_set_auth_data_fn(smbw_get_auth_data_fn fn
);
4032 struct smbw_server
*smbw_server(char *server
, char *share
);
4033 struct smbw_file
*smbw_file(int fd
);
4034 int smbw_open(const char *fname
, int flags
, mode_t mode
);
4035 ssize_t
smbw_pread(int fd
, void *buf
, size_t count
, off_t ofs
);
4036 ssize_t
smbw_read(int fd
, void *buf
, size_t count
);
4037 ssize_t
smbw_write(int fd
, void *buf
, size_t count
);
4038 ssize_t
smbw_pwrite(int fd
, void *buf
, size_t count
, off_t ofs
);
4039 int smbw_close(int fd
);
4040 int smbw_fcntl(int fd
, int cmd
, long arg
);
4041 int smbw_access(const char *name
, int mode
);
4042 int smbw_readlink(const char *path
, char *buf
, size_t bufsize
);
4043 int smbw_unlink(const char *fname
);
4044 int smbw_rename(const char *oldname
, const char *newname
);
4045 int smbw_utime(const char *fname
, void *buf
);
4046 int smbw_utimes(const char *fname
, void *buf
);
4047 int smbw_chown(const char *fname
, uid_t owner
, gid_t group
);
4048 int smbw_chmod(const char *fname
, mode_t newmode
);
4049 off_t
smbw_lseek(int fd
, off_t offset
, int whence
);
4050 int smbw_dup(int fd
);
4051 int smbw_dup2(int fd
, int fd2
);
4052 int smbw_fork(void);
4054 /*The following definitions come from smbwrapper/smbw_dir.c */
4056 struct smbw_dir
*smbw_dir(int fd
);
4057 int smbw_dirp(DIR *dirp
);
4058 int smbw_dir_open(const char *fname
);
4059 int smbw_dir_fstat(int fd
, struct stat
*st
);
4060 int smbw_dir_close(int fd
);
4061 int smbw_getdents(unsigned int fd
, struct dirent
*dirp
, int count
);
4062 int smbw_chdir(const char *name
);
4063 off_t
smbw_dir_lseek(int fd
, off_t offset
, int whence
);
4064 int smbw_mkdir(const char *fname
, mode_t mode
);
4065 int smbw_rmdir(const char *fname
);
4066 char *smbw_getcwd(char *buf
, size_t size
);
4067 int smbw_fchdir(unsigned int fd
);
4068 DIR *smbw_opendir(const char *fname
);
4069 struct dirent
*smbw_readdir(DIR *dirp
);
4070 int smbw_closedir(DIR *dirp
);
4071 void smbw_seekdir(DIR *dirp
, off_t offset
);
4072 off_t
smbw_telldir(DIR *dirp
);
4074 /*The following definitions come from smbwrapper/smbw_stat.c */
4076 void smbw_setup_stat(struct stat
*st
, char *fname
, size_t size
, int mode
);
4077 BOOL
smbw_getatr(struct smbw_server
*srv
, char *path
,
4078 uint16
*mode
, size_t *size
,
4079 time_t *c_time
, time_t *a_time
, time_t *m_time
,
4081 int smbw_stat_printjob(struct smbw_server
*srv
,char *path
,
4082 size_t *size
, time_t *m_time
);
4083 int smbw_fstat(int fd
, struct stat
*st
);
4084 int smbw_stat(const char *fname
, struct stat
*st
);
4086 /*The following definitions come from tdb/spinlock.c */
4088 int tdb_spinlock(TDB_CONTEXT
*tdb
, int list
, int rw_type
);
4089 int tdb_spinunlock(TDB_CONTEXT
*tdb
, int list
, int rw_type
);
4090 int tdb_create_rwlocks(int fd
, unsigned int hash_size
);
4091 int tdb_clear_spinlocks(TDB_CONTEXT
*tdb
);
4092 int tdb_clear_spinlocks(TDB_CONTEXT
*tdb
);
4094 /*The following definitions come from tdb/tdb.c */
4096 void tdb_printfreelist(TDB_CONTEXT
*tdb
);
4097 const char *tdb_errorstr(TDB_CONTEXT
*tdb
);
4098 TDB_DATA
tdb_fetch(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4099 int tdb_exists(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4100 int tdb_traverse(TDB_CONTEXT
*tdb
, tdb_traverse_func fn
, void *state
);
4101 TDB_DATA
tdb_firstkey(TDB_CONTEXT
*tdb
);
4102 TDB_DATA
tdb_nextkey(TDB_CONTEXT
*tdb
, TDB_DATA oldkey
);
4103 int tdb_delete(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4104 int tdb_store(TDB_CONTEXT
*tdb
, TDB_DATA key
, TDB_DATA dbuf
, int flag
);
4105 TDB_CONTEXT
*tdb_open(char *name
, int hash_size
, int tdb_flags
,
4106 int open_flags
, mode_t mode
);
4107 int tdb_close(TDB_CONTEXT
*tdb
);
4108 int tdb_lockall(TDB_CONTEXT
*tdb
);
4109 void tdb_unlockall(TDB_CONTEXT
*tdb
);
4110 int tdb_lockkeys(TDB_CONTEXT
*tdb
, u32 number
, TDB_DATA keys
[]);
4111 void tdb_unlockkeys(TDB_CONTEXT
*tdb
);
4112 int tdb_chainlock(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4113 void tdb_chainunlock(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4115 /*The following definitions come from tdb/tdbutil.c */
4117 int tdb_lock_bystring(TDB_CONTEXT
*tdb
, char *keyval
);
4118 void tdb_unlock_bystring(TDB_CONTEXT
*tdb
, char *keyval
);
4119 int tdb_fetch_int_byblob(TDB_CONTEXT
*tdb
, char *keyval
, size_t len
);
4120 int tdb_fetch_int(TDB_CONTEXT
*tdb
, char *keystr
);
4121 int tdb_store_int_byblob(TDB_CONTEXT
*tdb
, char *keystr
, size_t len
, int v
);
4122 int tdb_store_int(TDB_CONTEXT
*tdb
, char *keystr
, int v
);
4123 int tdb_store_by_string(TDB_CONTEXT
*tdb
, char *keystr
, void *buffer
, int len
);
4124 TDB_DATA
tdb_fetch_by_string(TDB_CONTEXT
*tdb
, char *keystr
);
4125 size_t tdb_pack(char *buf
, int bufsize
, char *fmt
, ...);
4126 int tdb_unpack(char *buf
, int bufsize
, char *fmt
, ...);
4128 /*The following definitions come from utils/nbio.c */
4130 void nb_setup(struct cli_state
*cli
);
4131 void nb_unlink(char *fname
);
4132 void nb_open(char *fname
, int handle
, int size
);
4133 void nb_write(int handle
, int size
, int offset
);
4134 void nb_read(int handle
, int size
, int offset
);
4135 void nb_close(int handle
);
4136 void nb_mkdir(char *fname
);
4137 void nb_rmdir(char *fname
);
4138 void nb_rename(char *old
, char *new);
4139 void nb_stat(char *fname
, int size
);
4140 void nb_create(char *fname
, int size
);
4142 /*The following definitions come from utils/torture.c */
4145 /*The following definitions come from web/cgi.c */
4147 void cgi_load_variables(FILE *f1
);
4148 char *cgi_variable(char *name
);
4150 char *cgi_user_name(void);
4151 void cgi_setup(char *rootdir
, int auth_required
);
4152 char *cgi_baseurl(void);
4153 char *cgi_pathinfo(void);
4154 char *cgi_remote_host(void);
4155 char *cgi_remote_addr(void);
4156 BOOL
cgi_waspost(void);
4158 /*The following definitions come from web/diagnose.c */
4160 BOOL
nmbd_running(void);
4161 BOOL
smbd_running(void);
4163 /*The following definitions come from web/startstop.c */
4165 void start_smbd(void);
4166 void start_nmbd(void);
4167 void stop_smbd(void);
4168 void stop_nmbd(void);
4169 void kill_pid(pid_t pid
);
4171 /*The following definitions come from web/statuspage.c */
4173 void status_page(void);
4175 /*The following definitions come from web/swat.c */
4177 #endif /* _PROTO_H_ */