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 void bitmap_free(struct bitmap
*bm
);
30 BOOL
bitmap_set(struct bitmap
*bm
, unsigned i
);
31 BOOL
bitmap_clear(struct bitmap
*bm
, unsigned i
);
32 BOOL
bitmap_query(struct bitmap
*bm
, unsigned i
);
33 int bitmap_find(struct bitmap
*bm
, unsigned ofs
);
35 /*The following definitions come from lib/charcnv.c */
37 char *unix2dos_format(char *str
,BOOL overwrite
);
38 char *dos2unix_format(char *str
, BOOL overwrite
);
39 void interpret_character_set(char *str
, int codepage
);
41 /*The following definitions come from lib/charset.c */
43 void charset_initialise(void);
44 void codepage_initialise(int client_codepage
);
45 void add_char_string(char *s
);
47 /*The following definitions come from lib/crc32.c */
49 uint32
crc32_calc_buffer( char *buffer
, uint32 count
);
51 /*The following definitions come from lib/debug.c */
53 char* debug_classname_from_index(int ndx
);
54 int debug_lookup_classname(char* classname
);
55 BOOL
debug_parse_params(char **params
, int *debuglevel_class
);
56 BOOL
debug_parse_levels(char *params_str
);
57 void debug_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
58 void debug_message_send(pid_t pid
, int level
);
59 void setup_logging(char *pname
, BOOL interactive
);
60 BOOL
reopen_logs( void );
61 void force_check_log_size( void );
62 BOOL
need_to_check_log_size( void );
63 void check_log_size( void );
64 void dbgflush( void );
65 BOOL
dbghdr( int level
, char *file
, char *func
, int line
);
67 /*The following definitions come from lib/doscalls.c */
69 int dos_unlink(char *fname
);
70 int dos_open(char *fname
,int flags
,mode_t mode
);
71 DIR *dos_opendir(char *dname
);
72 char *dos_readdirname(DIR *p
);
73 int dos_chown(char *fname
, uid_t uid
, gid_t gid
);
74 int dos_stat(char *fname
,SMB_STRUCT_STAT
*sbuf
);
75 int dos_lstat(char *fname
,SMB_STRUCT_STAT
*sbuf
);
76 int dos_mkdir(char *dname
,mode_t mode
);
77 int dos_rmdir(char *dname
);
78 int dos_chdir(char *dname
);
79 int dos_utime(char *fname
,struct utimbuf
*times
);
80 int copy_reg(char *source
, const char *dest
);
81 int dos_rename(char *from
, char *to
);
82 int dos_chmod(char *fname
,mode_t mode
);
83 char *dos_getwd(char *unix_path
);
84 BOOL
dos_file_exist(char *fname
,SMB_STRUCT_STAT
*sbuf
);
85 BOOL
dos_directory_exist(char *dname
,SMB_STRUCT_STAT
*st
);
86 time_t dos_file_modtime(char *fname
);
87 SMB_OFF_T
dos_file_size(char *file_name
);
89 /*The following definitions come from lib/error.c */
91 uint32
map_nt_error_from_unix(int unix_error
);
93 /*The following definitions come from lib/fault.c */
95 void fault_setup(void (*fn
)(void *));
97 /*The following definitions come from lib/fsusage.c */
99 int sys_fsusage(const char *path
, SMB_BIG_UINT
*dfree
, SMB_BIG_UINT
*dsize
);
101 /*The following definitions come from lib/genrand.c */
103 void set_rand_reseed_data(unsigned char *data
, size_t len
);
104 void generate_random_buffer( unsigned char *out
, int len
, BOOL do_reseed_now
);
105 char *generate_random_str(size_t len
);
107 /*The following definitions come from lib/getsmbpass.c */
109 char *getsmbpass(char *prompt
) ;
111 /*The following definitions come from lib/hash.c */
113 BOOL
hash_table_init(hash_table
*table
, int num_buckets
, compare_function compare_func
);
114 hash_element
*hash_lookup(hash_table
*table
, char *key
);
115 hash_element
*hash_insert(hash_table
*table
, char *value
, char *key
);
116 void hash_remove(hash_table
*table
, hash_element
*hash_elem
);
117 void hash_clear(hash_table
*table
);
119 /*The following definitions come from lib/interface.c */
121 void load_interfaces(void);
122 BOOL
interfaces_changed(void);
123 BOOL
ismyip(struct in_addr ip
);
124 BOOL
is_local_net(struct in_addr from
);
125 int iface_count(void);
126 BOOL
we_are_multihomed(void);
127 struct interface
*get_interface(int n
);
128 struct in_addr
*iface_n_ip(int n
);
129 struct in_addr
*iface_n_bcast(int n
);
130 unsigned iface_hash(void);
131 struct in_addr
*iface_bcast(struct in_addr ip
);
132 struct in_addr
*iface_ip(struct in_addr ip
);
134 /*The following definitions come from lib/interfaces.c */
136 int get_interfaces(struct iface_struct
*ifaces
, int max_interfaces
);
138 /*The following definitions come from lib/kanji.c */
140 void interpret_coding_system(char *str
);
141 void initialize_multibyte_vectors( int client_codepage
);
143 /*The following definitions come from lib/md4.c */
145 void mdfour(unsigned char *out
, unsigned char *in
, int n
);
147 /*The following definitions come from lib/messages.c */
149 void ping_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
150 void debuglevel_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
151 BOOL
message_init(void);
152 BOOL
message_send_pid(pid_t pid
, int msg_type
, void *buf
, size_t len
, BOOL duplicates_allowed
);
153 void message_dispatch(void);
154 void message_register(int msg_type
,
155 void (*fn
)(int msg_type
, pid_t pid
, void *buf
, size_t len
));
156 void message_deregister(int msg_type
);
157 BOOL
message_send_all(TDB_CONTEXT
*conn_tdb
, int msg_type
, void *buf
, size_t len
, BOOL duplicates_allowed
);
159 /*The following definitions come from lib/ms_fnmatch.c */
161 int ms_fnmatch(const char *pattern
, const char *string
);
163 /*The following definitions come from lib/pidfile.c */
165 pid_t
pidfile_pid(char *name
);
166 void pidfile_create(char *name
);
168 /*The following definitions come from lib/readline.c */
170 char *smb_readline(char *prompt
, void (*callback
)(void),
171 char **(completion_fn
)(char *text
, int start
, int end
));
172 void cmd_history(void);
174 /*The following definitions come from lib/replace.c */
176 char *rep_inet_ntoa(struct in_addr ip
);
178 /*The following definitions come from lib/select.c */
180 void sys_select_signal(void);
181 int sys_select(int maxfd
, fd_set
*fds
,struct timeval
*tval
);
182 int sys_select_intr(int maxfd
, fd_set
*fds
,struct timeval
*tval
);
184 /*The following definitions come from lib/signal.c */
186 void BlockSignals(BOOL block
,int signum
);
187 void CatchSignal(int signum
,void (*handler
)(int ));
188 void CatchChild(void);
189 void CatchChildLeaveStatus(void);
191 /*The following definitions come from libsmb/cliconnect.c */
193 BOOL
cli_session_setup(struct cli_state
*cli
,
195 char *pass
, int passlen
,
196 char *ntpass
, int ntpasslen
,
198 BOOL
cli_ulogoff(struct cli_state
*cli
);
199 BOOL
cli_send_tconX(struct cli_state
*cli
,
200 char *share
, char *dev
, char *pass
, int passlen
);
201 BOOL
cli_tdis(struct cli_state
*cli
);
202 void cli_negprot_send(struct cli_state
*cli
);
203 BOOL
cli_negprot(struct cli_state
*cli
);
204 BOOL
cli_session_request(struct cli_state
*cli
,
205 struct nmb_name
*calling
, struct nmb_name
*called
);
206 BOOL
cli_connect(struct cli_state
*cli
, const char *host
, struct in_addr
*ip
);
207 BOOL
cli_reestablish_connection(struct cli_state
*cli
);
208 BOOL
cli_establish_connection(struct cli_state
*cli
,
209 char *dest_host
, struct in_addr
*dest_ip
,
210 struct nmb_name
*calling
, struct nmb_name
*called
,
211 char *service
, char *service_type
,
212 BOOL do_shutdown
, BOOL do_tcon
);
213 BOOL
attempt_netbios_session_request(struct cli_state
*cli
, char *srchost
, char *desthost
,
214 struct in_addr
*pdest_ip
);
216 /*The following definitions come from libsmb/clientgen.c */
218 int cli_set_port(struct cli_state
*cli
, int port
);
219 BOOL
cli_receive_smb(struct cli_state
*cli
);
220 BOOL
cli_send_smb(struct cli_state
*cli
);
221 void cli_setup_packet(struct cli_state
*cli
);
222 void cli_setup_bcc(struct cli_state
*cli
, void *p
);
223 void cli_init_creds(struct cli_state
*cli
, const struct ntuser_creds
*usr
);
224 struct cli_state
*cli_initialise(struct cli_state
*cli
);
225 void cli_shutdown(struct cli_state
*cli
);
226 void cli_sockopt(struct cli_state
*cli
, char *options
);
227 uint16
cli_setpid(struct cli_state
*cli
, uint16 pid
);
229 /*The following definitions come from libsmb/clierror.c */
231 char *cli_errstr(struct cli_state
*cli
);
232 int cli_error(struct cli_state
*cli
, uint8
*eclass
, uint32
*num
, uint32
*nt_rpc_error
);
234 /*The following definitions come from libsmb/clifile.c */
236 BOOL
cli_rename(struct cli_state
*cli
, char *fname_src
, char *fname_dst
);
237 BOOL
cli_unlink(struct cli_state
*cli
, char *fname
);
238 BOOL
cli_mkdir(struct cli_state
*cli
, char *dname
);
239 BOOL
cli_rmdir(struct cli_state
*cli
, char *dname
);
240 int cli_nt_delete_on_close(struct cli_state
*cli
, int fnum
, BOOL flag
);
241 int cli_nt_create_full(struct cli_state
*cli
, char *fname
, uint32 DesiredAccess
,
242 uint32 FileAttributes
, uint32 ShareAccess
,
243 uint32 CreateDisposition
, uint32 CreateOptions
);
244 int cli_nt_create(struct cli_state
*cli
, char *fname
, uint32 DesiredAccess
);
245 int cli_open(struct cli_state
*cli
, char *fname
, int flags
, int share_mode
);
246 BOOL
cli_close(struct cli_state
*cli
, int fnum
);
247 BOOL
cli_lock(struct cli_state
*cli
, int fnum
,
248 uint32 offset
, uint32 len
, int timeout
, enum brl_type lock_type
);
249 BOOL
cli_unlock(struct cli_state
*cli
, int fnum
, uint32 offset
, uint32 len
);
250 BOOL
cli_lock64(struct cli_state
*cli
, int fnum
,
251 SMB_BIG_UINT offset
, SMB_BIG_UINT len
, int timeout
, enum brl_type lock_type
);
252 BOOL
cli_unlock64(struct cli_state
*cli
, int fnum
, SMB_BIG_UINT offset
, SMB_BIG_UINT len
);
253 BOOL
cli_getattrE(struct cli_state
*cli
, int fd
,
254 uint16
*attr
, size_t *size
,
255 time_t *c_time
, time_t *a_time
, time_t *m_time
);
256 BOOL
cli_getatr(struct cli_state
*cli
, char *fname
,
257 uint16
*attr
, size_t *size
, time_t *t
);
258 BOOL
cli_setatr(struct cli_state
*cli
, char *fname
, uint16 attr
, time_t t
);
259 BOOL
cli_chkpath(struct cli_state
*cli
, char *path
);
260 BOOL
cli_dskattr(struct cli_state
*cli
, int *bsize
, int *total
, int *avail
);
261 int cli_ctemp(struct cli_state
*cli
, char *path
, char **tmp_path
);
263 /*The following definitions come from libsmb/clilist.c */
265 int cli_list_new(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
266 void (*fn
)(file_info
*, const char *, void *), void *state
);
267 int cli_list_old(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
268 void (*fn
)(file_info
*, const char *, void *), void *state
);
269 int cli_list(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
270 void (*fn
)(file_info
*, const char *, void *), void *state
);
272 /*The following definitions come from libsmb/cli_lsarpc.c */
274 struct cli_state
*cli_lsa_initialise(struct cli_state
*cli
, char *system_name
,
275 struct ntuser_creds
*creds
);
276 void cli_lsa_shutdown(struct cli_state
*cli
);
277 uint32
cli_lsa_open_policy(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
278 BOOL sec_qos
, uint32 des_access
, POLICY_HND
*pol
);
279 uint32
cli_lsa_close(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
281 uint32
cli_lsa_lookup_sids(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
282 POLICY_HND
*pol
, int num_sids
, DOM_SID
*sids
,
283 char ***names
, uint32
**types
, int *num_names
);
284 uint32
cli_lsa_lookup_names(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
285 POLICY_HND
*pol
, int num_names
, char **names
,
286 DOM_SID
**sids
, uint32
**types
, int *num_sids
);
287 uint32
cli_lsa_query_info_policy(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
288 POLICY_HND
*pol
, uint16 info_class
,
289 fstring domain_name
, DOM_SID
*domain_sid
);
290 uint32
cli_lsa_enum_trust_dom(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
291 POLICY_HND
*pol
, uint32
*enum_ctx
,
292 uint32
*num_domains
, char ***domain_names
,
293 DOM_SID
**domain_sids
);
295 /*The following definitions come from libsmb/climessage.c */
297 BOOL
cli_message_start(struct cli_state
*cli
, char *host
, char *username
,
299 BOOL
cli_message_text(struct cli_state
*cli
, char *msg
, int len
, int grp
);
300 BOOL
cli_message_end(struct cli_state
*cli
, int grp
);
302 /*The following definitions come from libsmb/cli_netlogon.c */
304 struct cli_state
*cli_netlogon_initialise(struct cli_state
*cli
,
306 struct ntuser_creds
*creds
);
307 void cli_netlogon_shutdown(struct cli_state
*cli
);
308 uint32
cli_netlogon_logon_ctrl2(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
311 /*The following definitions come from libsmb/cliprint.c */
313 int cli_print_queue(struct cli_state
*cli
,
314 void (*fn
)(struct print_job_info
*));
315 int cli_printjob_del(struct cli_state
*cli
, int job
);
317 /*The following definitions come from libsmb/clirap.c */
319 BOOL
cli_api_pipe(struct cli_state
*cli
, char *pipe_name
,
320 uint16
*setup
, uint32 setup_count
, uint32 max_setup_count
,
321 char *params
, uint32 param_count
, uint32 max_param_count
,
322 char *data
, uint32 data_count
, uint32 max_data_count
,
323 char **rparam
, uint32
*rparam_count
,
324 char **rdata
, uint32
*rdata_count
);
325 BOOL
cli_api(struct cli_state
*cli
,
326 char *param
, int prcnt
, int mprcnt
,
327 char *data
, int drcnt
, int mdrcnt
,
328 char **rparam
, int *rprcnt
,
329 char **rdata
, int *rdrcnt
);
330 BOOL
cli_NetWkstaUserLogon(struct cli_state
*cli
,char *user
, char *workstation
);
331 int cli_RNetShareEnum(struct cli_state
*cli
, void (*fn
)(const char *, uint32
, const char *, void *), void *state
);
332 BOOL
cli_NetServerEnum(struct cli_state
*cli
, char *workgroup
, uint32 stype
,
333 void (*fn
)(const char *, uint32
, const char *, void *),
335 BOOL
cli_oem_change_password(struct cli_state
*cli
, const char *user
, const char *new_password
,
336 const char *old_password
);
337 BOOL
cli_qpathinfo(struct cli_state
*cli
, const char *fname
,
338 time_t *c_time
, time_t *a_time
, time_t *m_time
,
339 size_t *size
, uint16
*mode
);
340 BOOL
cli_qpathinfo2(struct cli_state
*cli
, const char *fname
,
341 time_t *c_time
, time_t *a_time
, time_t *m_time
,
342 time_t *w_time
, size_t *size
, uint16
*mode
,
344 BOOL
cli_qfileinfo(struct cli_state
*cli
, int fnum
,
345 uint16
*mode
, size_t *size
,
346 time_t *c_time
, time_t *a_time
, time_t *m_time
,
347 time_t *w_time
, SMB_INO_T
*ino
);
349 /*The following definitions come from libsmb/clireadwrite.c */
351 size_t cli_read(struct cli_state
*cli
, int fnum
, char *buf
, off_t offset
, size_t size
);
352 ssize_t
cli_write(struct cli_state
*cli
,
353 int fnum
, uint16 write_mode
,
354 char *buf
, off_t offset
, size_t size
);
355 ssize_t
cli_smbwrite(struct cli_state
*cli
,
356 int fnum
, char *buf
, off_t offset
, size_t size1
);
358 /*The following definitions come from libsmb/cli_samr.c */
360 struct cli_state
*cli_samr_initialise(struct cli_state
*cli
, char *system_name
,
361 struct ntuser_creds
*creds
);
362 void cli_samr_shutdown(struct cli_state
*cli
);
363 uint32
cli_samr_connect(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
364 char *srv_name
, uint32 access_mask
,
365 POLICY_HND
*connect_pol
);
366 uint32
cli_samr_close(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
367 POLICY_HND
*connect_pol
);
368 uint32
cli_samr_open_domain(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
369 POLICY_HND
*connect_pol
, uint32 access_mask
,
370 DOM_SID
*domain_sid
, POLICY_HND
*domain_pol
);
371 uint32
cli_samr_open_user(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
372 POLICY_HND
*domain_pol
, uint32 access_mask
,
373 uint32 user_rid
, POLICY_HND
*user_pol
);
374 uint32
cli_samr_open_group(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
375 POLICY_HND
*domain_pol
, uint32 access_mask
,
376 uint32 group_rid
, POLICY_HND
*group_pol
);
377 uint32
cli_samr_query_userinfo(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
378 POLICY_HND
*user_pol
, uint16 switch_value
,
379 SAM_USERINFO_CTR
*ctr
);
380 uint32
cli_samr_query_groupinfo(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
381 POLICY_HND
*group_pol
, uint32 info_level
,
382 GROUP_INFO_CTR
*ctr
);
383 uint32
cli_samr_query_usergroups(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
384 POLICY_HND
*user_pol
, uint32
*num_groups
,
386 uint32
cli_samr_query_groupmem(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
387 POLICY_HND
*group_pol
, uint32
*num_mem
,
388 uint32
**rid
, uint32
**attr
);
389 uint32
cli_samr_enum_dom_groups(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
390 POLICY_HND
*pol
, uint32
*start_idx
,
391 uint32 size
, struct acct_info
**dom_groups
,
392 uint32
*num_dom_groups
);
393 uint32
cli_samr_query_aliasmem(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
394 POLICY_HND
*alias_pol
, uint32
*num_mem
,
396 uint32
cli_samr_open_alias(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
397 POLICY_HND
*domain_pol
, uint32 access_mask
,
398 uint32 alias_rid
, POLICY_HND
*alias_pol
);
399 uint32
cli_samr_query_dom_info(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
400 POLICY_HND
*domain_pol
, uint16 switch_value
,
402 uint32
cli_samr_query_dispinfo(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
403 POLICY_HND
*domain_pol
, uint32
*start_idx
,
404 uint16 switch_value
, uint32
*num_entries
,
405 uint32 max_entries
, SAM_DISPINFO_CTR
*ctr
);
407 /*The following definitions come from libsmb/clisecdesc.c */
409 SEC_DESC
*cli_query_secdesc(struct cli_state
*cli
,int fd
, TALLOC_CTX
*mem_ctx
);
410 BOOL
cli_set_secdesc(struct cli_state
*cli
,int fd
, SEC_DESC
*sd
);
412 /*The following definitions come from libsmb/cli_spoolss.c */
414 struct cli_state
*cli_spoolss_initialise(struct cli_state
*cli
,
416 struct ntuser_creds
*creds
);
417 void cli_spoolss_shutdown(struct cli_state
*cli
);
418 uint32
cli_spoolss_open_printer_ex(
419 struct cli_state
*cli
,
423 uint32 access_required
,
428 uint32
cli_spoolss_close_printer(
429 struct cli_state
*cli
,
433 uint32
cli_spoolss_enum_printers(
434 struct cli_state
*cli
,
439 PRINTER_INFO_CTR
*ctr
441 uint32
cli_spoolss_enum_ports(
442 struct cli_state
*cli
,
448 uint32
cli_spoolss_getprinter(
449 struct cli_state
*cli
,
453 PRINTER_INFO_CTR
*ctr
455 uint32
cli_spoolss_setprinter(
456 struct cli_state
*cli
,
460 PRINTER_INFO_CTR
*ctr
,
463 uint32
cli_spoolss_getprinterdriver (
464 struct cli_state
*cli
,
469 PRINTER_DRIVER_CTR
*ctr
471 uint32
cli_spoolss_enumprinterdrivers (
472 struct cli_state
*cli
,
477 PRINTER_DRIVER_CTR
*ctr
479 uint32
cli_spoolss_getprinterdriverdir (
480 struct cli_state
*cli
,
484 DRIVER_DIRECTORY_CTR
*ctr
486 uint32
cli_spoolss_addprinterdriver (
487 struct cli_state
*cli
,
490 PRINTER_DRIVER_CTR
*ctr
492 uint32
cli_spoolss_addprinterex (
493 struct cli_state
*cli
,
496 PRINTER_INFO_CTR
*ctr
498 uint32
cli_spoolss_deleteprinterdriver (
499 struct cli_state
*cli
,
505 /*The following definitions come from libsmb/cli_srvsvc.c */
507 struct cli_state
*cli_svrsvc_initialise(struct cli_state
*cli
,
509 struct ntuser_creds
*creds
);
510 void cli_srvsvc_shutdown(struct cli_state
*cli
);
511 uint32
cli_srvsvc_net_srv_get_info(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
512 uint32 switch_value
, SRV_INFO_CTR
*ctr
);
514 /*The following definitions come from libsmb/clistr.c */
516 int clistr_push(struct cli_state
*cli
, void *dest
, const char *src
, int dest_len
, int flags
);
517 int clistr_pull(struct cli_state
*cli
, char *dest
, const void *src
, int dest_len
, int src_len
, int flags
);
518 int clistr_align(const void *buf
, const void *p
);
520 /*The following definitions come from libsmb/clitrans.c */
522 BOOL
cli_send_trans(struct cli_state
*cli
, int trans
,
525 uint16
*setup
, int lsetup
, int msetup
,
526 char *param
, int lparam
, int mparam
,
527 char *data
, int ldata
, int mdata
);
528 BOOL
cli_receive_trans(struct cli_state
*cli
,int trans
,
529 char **param
, int *param_len
,
530 char **data
, int *data_len
);
531 BOOL
cli_send_nt_trans(struct cli_state
*cli
,
534 uint16
*setup
, int lsetup
, int msetup
,
535 char *param
, int lparam
, int mparam
,
536 char *data
, int ldata
, int mdata
);
537 BOOL
cli_receive_nt_trans(struct cli_state
*cli
,
538 char **param
, int *param_len
,
539 char **data
, int *data_len
);
541 /*The following definitions come from libsmb/credentials.c */
543 char *credstr(uchar
*cred
);
544 void cred_session_key(DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
, char *pass
,
545 uchar session_key
[8]);
546 void cred_create(uchar session_key
[8], DOM_CHAL
*stor_cred
, UTIME timestamp
,
548 int cred_assert(DOM_CHAL
*cred
, uchar session_key
[8], DOM_CHAL
*stored_cred
,
550 BOOL
clnt_deal_with_creds(uchar sess_key
[8],
551 DOM_CRED
*sto_clnt_cred
, DOM_CRED
*rcv_srv_cred
);
552 BOOL
deal_with_creds(uchar sess_key
[8],
553 DOM_CRED
*sto_clnt_cred
,
554 DOM_CRED
*rcv_clnt_cred
, DOM_CRED
*rtn_srv_cred
);
556 /*The following definitions come from libsmb/namequery.c */
558 struct node_status
*name_status_query(int fd
,struct nmb_name
*name
,
559 struct in_addr to_ip
, int *num_names
);
560 BOOL
name_status_find(int type
, struct in_addr to_ip
, char *name
);
561 BOOL
name_register(int fd
, const char *name
, int name_type
,
562 struct in_addr name_ip
, int opcode
,
564 struct in_addr to_ip
, int *count
);
565 struct in_addr
*name_query(int fd
,const char *name
,int name_type
,
566 BOOL bcast
,BOOL recurse
,
567 struct in_addr to_ip
, int *count
);
568 FILE *startlmhosts(char *fname
);
569 BOOL
getlmhostsent( FILE *fp
, pstring name
, int *name_type
, struct in_addr
*ipaddr
);
570 void endlmhosts(FILE *fp
);
571 BOOL
name_register_wins(const char *name
, int name_type
);
572 BOOL
name_resolve_bcast(const char *name
, int name_type
,
573 struct in_addr
**return_ip_list
, int *return_count
);
574 BOOL
resolve_name(const char *name
, struct in_addr
*return_ip
, int name_type
);
575 BOOL
resolve_srv_name(const char* srv_name
, fstring dest_host
,
577 BOOL
find_master_ip(char *group
, struct in_addr
*master_ip
);
578 BOOL
lookup_pdc_name(const char *srcname
, const char *domain
, struct in_addr
*pdc_ip
, char *ret_name
);
579 BOOL
get_dc_list(BOOL pdc_only
, char *group
, struct in_addr
**ip_list
, int *count
);
581 /*The following definitions come from libsmb/nmblib.c */
583 void debug_nmb_packet(struct packet_struct
*p
);
584 char *nmb_namestr(struct nmb_name
*n
);
585 struct packet_struct
*copy_packet(struct packet_struct
*packet
);
586 void free_packet(struct packet_struct
*packet
);
587 struct packet_struct
*parse_packet(char *buf
,int length
,
588 enum packet_type packet_type
);
589 struct packet_struct
*read_packet(int fd
,enum packet_type packet_type
);
590 void make_nmb_name( struct nmb_name
*n
, const char *name
, int type
);
591 BOOL
nmb_name_equal(struct nmb_name
*n1
, struct nmb_name
*n2
);
592 int build_packet(char *buf
, struct packet_struct
*p
);
593 BOOL
send_packet(struct packet_struct
*p
);
594 struct packet_struct
*receive_packet(int fd
,enum packet_type type
,int t
);
595 struct packet_struct
*receive_nmb_packet(int fd
, int t
, int trn_id
);
596 struct packet_struct
*receive_dgram_packet(int fd
, int t
, char *mailslot_name
);
597 BOOL
match_mailslot_name(struct packet_struct
*p
, char *mailslot_name
);
598 void sort_query_replies(char *data
, int n
, struct in_addr ip
);
599 char *dns_to_netbios_name(char *dns_name
);
600 int name_mangle( char *In
, char *Out
, char name_type
);
601 int name_extract(char *buf
,int ofs
,char *name
);
602 int name_len(char *s1
);
604 /*The following definitions come from libsmb/nterr.c */
606 BOOL
get_safe_nt_error_msg(uint32 nt_code
,char *msg
, size_t len
);
607 char *get_nt_error_msg(uint32 nt_code
);
609 /*The following definitions come from libsmb/passchange.c */
611 BOOL
remote_password_change(const char *remote_machine
, const char *user_name
,
612 const char *old_passwd
, const char *new_passwd
,
613 char *err_str
, size_t err_str_len
);
615 /*The following definitions come from libsmb/pwd_cache.c */
617 void pwd_init(struct pwd_info
*pwd
);
618 BOOL
pwd_is_nullpwd(const struct pwd_info
*pwd
);
619 BOOL
pwd_compare(struct pwd_info
*pwd1
, struct pwd_info
*pwd2
);
620 void pwd_read(struct pwd_info
*pwd
, char *passwd_report
, BOOL do_encrypt
);
621 void pwd_set_nullpwd(struct pwd_info
*pwd
);
622 void pwd_set_cleartext(struct pwd_info
*pwd
, char *clr
);
623 void pwd_get_cleartext(struct pwd_info
*pwd
, char *clr
);
624 void pwd_set_lm_nt_16(struct pwd_info
*pwd
, uchar lm_pwd
[16], uchar nt_pwd
[16]);
625 void pwd_get_lm_nt_16(struct pwd_info
*pwd
, uchar lm_pwd
[16], uchar nt_pwd
[16]);
626 void pwd_make_lm_nt_16(struct pwd_info
*pwd
, char *clr
);
627 void pwd_make_lm_nt_owf(struct pwd_info
*pwd
, uchar cryptkey
[8]);
628 void pwd_get_lm_nt_owf(struct pwd_info
*pwd
, uchar lm_owf
[24], uchar nt_owf
[24]);
630 /*The following definitions come from lib/smbrun.c */
632 int smbrun(char *cmd
, int *outfd
);
634 /*The following definitions come from libsmb/smbdes.c */
636 void E_P16(unsigned char *p14
,unsigned char *p16
);
637 void E_P24(unsigned char *p21
, unsigned char *c8
, unsigned char *p24
);
638 void D_P16(unsigned char *p14
, unsigned char *in
, unsigned char *out
);
639 void E_old_pw_hash( unsigned char *p14
, unsigned char *in
, unsigned char *out
);
640 void cred_hash1(unsigned char *out
,unsigned char *in
,unsigned char *key
);
641 void cred_hash2(unsigned char *out
,unsigned char *in
,unsigned char *key
);
642 void cred_hash3(unsigned char *out
,unsigned char *in
,unsigned char *key
, int forw
);
643 void SamOEMhash( unsigned char *data
, unsigned char *key
, int val
);
645 /*The following definitions come from libsmb/smbencrypt.c */
647 void SMBencrypt(uchar
*passwd
, uchar
*c8
, uchar
*p24
);
648 void E_md4hash(uchar
*passwd
, uchar
*p16
);
649 void nt_lm_owf_gen(char *pwd
, uchar nt_p16
[16], uchar p16
[16]);
650 void SMBOWFencrypt(uchar passwd
[16], uchar
*c8
, uchar p24
[24]);
651 void NTLMSSPOWFencrypt(uchar passwd
[8], uchar
*ntlmchalresp
, uchar p24
[24]);
652 void SMBNTencrypt(uchar
*passwd
, uchar
*c8
, uchar
*p24
);
653 BOOL
make_oem_passwd_hash(char data
[516], const char *passwd
, uchar old_pw_hash
[16], BOOL unicode
);
654 BOOL
decode_pw_buffer(char in_buffer
[516], char *new_pwrd
,
655 int new_pwrd_size
, uint32
*new_pw_len
,
656 uchar nt_p16
[16], uchar p16
[16]);
658 /*The following definitions come from libsmb/smberr.c */
660 char *smb_errstr(char *inbuf
);
662 /*The following definitions come from libsmb/unexpected.c */
664 void unexpected_packet(struct packet_struct
*p
);
665 void clear_unexpected(time_t t
);
666 struct packet_struct
*receive_unexpected(enum packet_type packet_type
, int id
,
667 char *mailslot_name
);
669 /*The following definitions come from lib/snprintf.c */
672 /*The following definitions come from lib/substitute.c */
674 void standard_sub_basic(char *str
);
675 void standard_sub_advanced(int snum
, char *user
, char *connectpath
, gid_t gid
, char *str
);
676 void standard_sub_conn(connection_struct
*conn
, char *str
);
677 void standard_sub_snum(int snum
, char *str
);
678 void standard_sub_vuser(char *str
, user_struct
*vuser
);
679 void standard_sub_vsnum(char *str
, user_struct
*vuser
, int snum
);
681 /*The following definitions come from lib/sysacls.c */
683 int sys_acl_get_entry( SMB_ACL_T the_acl
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
684 int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*tag_type_p
);
685 int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
686 void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d
);
687 SMB_ACL_T
sys_acl_get_file( const char *path_p
, SMB_ACL_TYPE_T type
);
688 SMB_ACL_T
sys_acl_get_fd(int fd
);
689 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset
);
690 int sys_acl_add_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
691 int sys_acl_get_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
692 char *sys_acl_to_text( SMB_ACL_T the_acl
, ssize_t
*plen
);
693 SMB_ACL_T
sys_acl_init( int count
);
694 int sys_acl_create_entry( SMB_ACL_T
*pacl
, SMB_ACL_ENTRY_T
*pentry
);
695 int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry
, SMB_ACL_TAG_T tagtype
);
696 int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry
, void *qual
);
697 int sys_acl_set_permset( SMB_ACL_ENTRY_T entry
, SMB_ACL_PERMSET_T permset
);
698 int sys_acl_valid( SMB_ACL_T theacl
);
699 int sys_acl_set_file( const char *name
, SMB_ACL_TYPE_T acltype
, SMB_ACL_T theacl
);
700 int sys_acl_set_fd( int fd
, SMB_ACL_T theacl
);
701 int sys_acl_delete_def_file(const char *name
);
702 int sys_acl_free_text(char *text
);
703 int sys_acl_free_acl(SMB_ACL_T the_acl
) ;
704 int sys_acl_free_qualifier(void *qual
) ;
705 int sys_acl_get_entry(SMB_ACL_T acl_d
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
706 int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*type_p
);
707 int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
708 void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d
);
709 SMB_ACL_T
sys_acl_get_file(const char *path_p
, SMB_ACL_TYPE_T type
);
710 SMB_ACL_T
sys_acl_get_fd(int fd
);
711 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d
);
712 int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d
, SMB_ACL_PERM_T perm
);
713 int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d
, SMB_ACL_PERM_T perm
);
714 char *sys_acl_to_text(SMB_ACL_T acl_d
, ssize_t
*len_p
);
715 SMB_ACL_T
sys_acl_init(int count
);
716 int sys_acl_create_entry(SMB_ACL_T
*acl_p
, SMB_ACL_ENTRY_T
*entry_p
);
717 int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T tag_type
);
718 int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d
, void *qual_p
);
719 int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T permset_d
);
720 int sys_acl_valid(SMB_ACL_T acl_d
);
721 int sys_acl_set_file(const char *name
, SMB_ACL_TYPE_T type
, SMB_ACL_T acl_d
);
722 int sys_acl_set_fd(int fd
, SMB_ACL_T acl_d
);
723 int sys_acl_delete_def_file(const char *path
);
724 int sys_acl_free_text(char *text
);
725 int sys_acl_free_acl(SMB_ACL_T acl_d
) ;
726 int sys_acl_free_qualifier(void *qual
) ;
727 int sys_acl_get_entry(SMB_ACL_T acl_d
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
728 int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*type_p
);
729 int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
730 void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d
);
731 SMB_ACL_T
sys_acl_get_file(const char *path_p
, SMB_ACL_TYPE_T type
);
732 SMB_ACL_T
sys_acl_get_fd(int fd
);
733 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d
);
734 int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d
, SMB_ACL_PERM_T perm
);
735 int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d
, SMB_ACL_PERM_T perm
);
736 char *sys_acl_to_text(SMB_ACL_T acl_d
, ssize_t
*len_p
);
737 SMB_ACL_T
sys_acl_init(int count
);
738 int sys_acl_create_entry(SMB_ACL_T
*acl_p
, SMB_ACL_ENTRY_T
*entry_p
);
739 int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T tag_type
);
740 int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d
, void *qual_p
);
741 int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T permset_d
);
742 int sys_acl_valid(SMB_ACL_T acl_d
);
743 int sys_acl_set_file(const char *name
, SMB_ACL_TYPE_T type
, SMB_ACL_T acl_d
);
744 int sys_acl_set_fd(int fd
, SMB_ACL_T acl_d
);
745 int sys_acl_delete_def_file(const char *name
);
746 int sys_acl_free_text(char *text
);
747 int sys_acl_free_acl(SMB_ACL_T acl_d
) ;
748 int sys_acl_free_qualifier(void *qual
) ;
749 int sys_acl_get_entry( SMB_ACL_T the_acl
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
750 SMB_ACL_T
sys_acl_get_file( const char *path_p
, SMB_ACL_TYPE_T type
);
751 SMB_ACL_T
sys_acl_get_fd(int fd
);
752 char *sys_acl_to_text( SMB_ACL_T the_acl
, ssize_t
*plen
);
753 int sys_acl_valid( SMB_ACL_T theacl
);
754 int sys_acl_set_file( const char *name
, SMB_ACL_TYPE_T acltype
, SMB_ACL_T theacl
);
755 int sys_acl_set_fd( int fd
, SMB_ACL_T theacl
);
756 int sys_acl_create_entry( SMB_ACL_T
*acl_p
, SMB_ACL_ENTRY_T
*entry_p
);
757 int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*tag_type_p
);
758 int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
759 void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d
);
760 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset
);
761 int sys_acl_get_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
762 int sys_acl_add_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
763 SMB_ACL_T
sys_acl_init( int count
);
764 int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T tag_type
);
765 int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry_d
, void *qual_p
);
766 int sys_acl_set_permset( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T permset_d
);
767 int sys_acl_free_text(char *text
);
768 int sys_acl_free_acl(SMB_ACL_T the_acl
) ;
769 int sys_acl_free_qualifier(void *qual
) ;
770 int sys_acl_get_entry( SMB_ACL_T theacl
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
771 int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*tag_type_p
);
772 int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
773 void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d
);
774 SMB_ACL_T
sys_acl_get_file( const char *path_p
, SMB_ACL_TYPE_T type
);
775 SMB_ACL_T
sys_acl_get_fd(int fd
);
776 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset
);
777 int sys_acl_add_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
778 char *sys_acl_to_text( SMB_ACL_T theacl
, ssize_t
*plen
);
779 SMB_ACL_T
sys_acl_init( int count
);
780 int sys_acl_create_entry( SMB_ACL_T
*pacl
, SMB_ACL_ENTRY_T
*pentry
);
781 int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry
, SMB_ACL_TAG_T tagtype
);
782 int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry
, void *qual
);
783 int sys_acl_set_permset( SMB_ACL_ENTRY_T entry
, SMB_ACL_PERMSET_T permset
);
784 int sys_acl_valid( SMB_ACL_T theacl
);
785 int sys_acl_set_file( const char *name
, SMB_ACL_TYPE_T acltype
, SMB_ACL_T theacl
);
786 int sys_acl_set_fd( int fd
, SMB_ACL_T theacl
);
787 int sys_acl_delete_def_file(const char *name
);
788 int sys_acl_get_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
789 int sys_acl_free_text(char *text
);
790 int sys_acl_free_acl(SMB_ACL_T posix_acl
);
791 int sys_acl_free_qualifier(void *qual
);
792 int sys_acl_get_entry( SMB_ACL_T the_acl
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
793 int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*tag_type_p
);
794 int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
795 void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d
);
796 SMB_ACL_T
sys_acl_get_file( const char *path_p
, SMB_ACL_TYPE_T type
);
797 SMB_ACL_T
sys_acl_get_fd(int fd
);
798 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset
);
799 int sys_acl_add_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
800 int sys_acl_get_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
801 char *sys_acl_to_text( SMB_ACL_T the_acl
, ssize_t
*plen
);
802 int sys_acl_free_text(char *text
);
803 SMB_ACL_T
sys_acl_init( int count
);
804 int sys_acl_create_entry( SMB_ACL_T
*pacl
, SMB_ACL_ENTRY_T
*pentry
);
805 int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry
, SMB_ACL_TAG_T tagtype
);
806 int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry
, void *qual
);
807 int sys_acl_set_permset( SMB_ACL_ENTRY_T entry
, SMB_ACL_PERMSET_T permset
);
808 int sys_acl_valid( SMB_ACL_T theacl
);
809 int sys_acl_set_file( const char *name
, SMB_ACL_TYPE_T acltype
, SMB_ACL_T theacl
);
810 int sys_acl_set_fd( int fd
, SMB_ACL_T theacl
);
811 int sys_acl_delete_def_file(const char *name
);
812 int sys_acl_free_acl(SMB_ACL_T the_acl
) ;
813 int sys_acl_free_qualifier(void *qual
) ;
815 /*The following definitions come from lib/system.c */
817 int sys_usleep(long usecs
);
818 int sys_stat(const char *fname
,SMB_STRUCT_STAT
*sbuf
);
819 int sys_fstat(int fd
,SMB_STRUCT_STAT
*sbuf
);
820 int sys_lstat(const char *fname
,SMB_STRUCT_STAT
*sbuf
);
821 int sys_ftruncate(int fd
, SMB_OFF_T offset
);
822 SMB_OFF_T
sys_lseek(int fd
, SMB_OFF_T offset
, int whence
);
823 int sys_fseek(FILE *fp
, SMB_OFF_T offset
, int whence
);
824 SMB_OFF_T
sys_ftell(FILE *fp
);
825 int sys_creat(const char *path
, mode_t mode
);
826 int sys_open(const char *path
, int oflag
, mode_t mode
);
827 FILE *sys_fopen(const char *path
, const char *type
);
828 SMB_STRUCT_DIRENT
*sys_readdir(DIR *dirp
);
829 int sys_waitpid(pid_t pid
,int *status
,int options
);
830 char *sys_getwd(char *s
);
831 int sys_chown(const char *fname
,uid_t uid
,gid_t gid
);
832 int sys_chroot(const char *dname
);
833 struct hostent
*sys_gethostbyname(const char *name
);
834 void oplock_set_capability(BOOL this_process
, BOOL inherit
);
835 long sys_random(void);
836 void sys_srandom(unsigned int seed
);
837 int groups_max(void);
838 int sys_getgroups(int setlen
, gid_t
*gidset
);
839 int sys_setgroups(int setlen
, gid_t
*gidset
);
840 void sys_setpwent(void);
841 struct passwd
*sys_getpwent(void);
842 void sys_endpwent(void);
843 struct passwd
*sys_getpwnam(const char *name
);
844 struct passwd
*sys_getpwuid(uid_t uid
);
845 int wsys_stat(const smb_ucs2_t
*wfname
,SMB_STRUCT_STAT
*sbuf
);
846 int wsys_lstat(const smb_ucs2_t
*wfname
,SMB_STRUCT_STAT
*sbuf
);
847 int wsys_creat(const smb_ucs2_t
*wfname
, mode_t mode
);
848 int wsys_open(const smb_ucs2_t
*wfname
, int oflag
, mode_t mode
);
849 FILE *wsys_fopen(const smb_ucs2_t
*wfname
, const char *type
);
850 DIR *wsys_opendir(const smb_ucs2_t
*wfname
);
851 smb_ucs2_t
*wsys_getwd(smb_ucs2_t
*s
);
852 int wsys_chown(const smb_ucs2_t
*wfname
, uid_t uid
, gid_t gid
);
853 int wsys_chroot(const smb_ucs2_t
*wfname
);
854 pid_t
sys_fork(void);
855 pid_t
sys_getpid(void);
856 int sys_popen(const char *command
);
857 int sys_pclose(int fd
);
858 void *sys_dlopen(const char *name
, int flags
);
859 void *sys_dlsym(void *handle
, char *symbol
);
860 int sys_dlclose (void *handle
);
862 /*The following definitions come from lib/talloc.c */
864 TALLOC_CTX
*talloc_init(void);
865 void *talloc(TALLOC_CTX
*t
, size_t size
);
866 void *talloc_realloc(TALLOC_CTX
*t
, void *ptr
, size_t size
);
867 void talloc_destroy_pool(TALLOC_CTX
*t
);
868 void talloc_destroy(TALLOC_CTX
*t
);
869 size_t talloc_pool_size(TALLOC_CTX
*t
);
870 void *talloc_zero(TALLOC_CTX
*t
, size_t size
);
871 void *talloc_memdup(TALLOC_CTX
*t
, void *p
, size_t size
);
873 /*The following definitions come from lib/time.c */
875 void GetTimeOfDay(struct timeval
*tval
);
877 int TimeDiff(time_t t
);
878 struct tm
*LocalTime(time_t *t
);
879 time_t nt_time_to_unix(NTTIME
*nt
);
880 time_t interpret_long_date(char *p
);
881 void unix_to_nt_time(NTTIME
*nt
, time_t t
);
882 void put_long_date(char *p
,time_t t
);
883 BOOL
null_mtime(time_t mtime
);
884 void put_dos_date(char *buf
,int offset
,time_t unixdate
);
885 void put_dos_date2(char *buf
,int offset
,time_t unixdate
);
886 void put_dos_date3(char *buf
,int offset
,time_t unixdate
);
887 time_t make_unix_date(void *date_ptr
);
888 time_t make_unix_date2(void *date_ptr
);
889 time_t make_unix_date3(void *date_ptr
);
890 char *http_timestring(time_t t
);
891 char *timestring(BOOL hires
);
892 time_t get_create_time(SMB_STRUCT_STAT
*st
,BOOL fake_dirs
);
894 /*The following definitions come from lib/ufc.c */
896 char *ufc_crypt(char *key
,char *salt
);
898 /*The following definitions come from lib/username.c */
900 char *get_user_home_dir(char *user
);
901 BOOL
map_username(char *user
);
902 struct passwd
*Get_Pwnam(char *user
,BOOL allow_change
);
903 BOOL
user_in_group_list(char *user
,char *gname
);
904 BOOL
user_in_list(char *user
,char *list
);
905 struct passwd
*smb_getpwnam(char *user
, BOOL allow_change
);
907 /*The following definitions come from lib/util_array.c */
909 void free_void_array(uint32 num_entries
, void **entries
,
910 void(free_item
)(void*));
911 void* add_copy_to_array(uint32
*len
, void ***array
, const void *item
,
912 void*(item_dup
)(const void*), BOOL alloc_anyway
);
913 void* add_item_to_array(uint32
*len
, void ***array
, void *item
);
914 void free_use_info_array(uint32 num_entries
, struct use_info
**entries
);
915 struct use_info
* add_use_info_to_array(uint32
*len
, struct use_info
***array
,
916 const struct use_info
*name
);
917 void free_char_array(uint32 num_entries
, char **entries
);
918 char* add_chars_to_array(uint32
*len
, char ***array
, const char *name
);
919 void free_uint32_array(uint32 num_entries
, uint32
**entries
);
920 uint32
* add_uint32s_to_array(uint32
*len
, uint32
***array
, const uint32
*name
);
921 void free_sid_array(uint32 num_entries
, DOM_SID
**entries
);
922 DOM_SID
* add_sid_to_array(uint32
*len
, DOM_SID
***array
, const DOM_SID
*sid
);
924 /*The following definitions come from lib/util.c */
927 BOOL
in_group(gid_t group
, gid_t current_gid
, int ngroups
, gid_t
*groups
);
928 char *Atoic(char *p
, int *n
, char *c
);
929 char *get_numlist(char *p
, uint32
**num
, int *count
);
930 BOOL
file_exist(char *fname
,SMB_STRUCT_STAT
*sbuf
);
931 int file_rename(char *from
, char *to
);
932 time_t file_modtime(char *fname
);
933 BOOL
directory_exist(char *dname
,SMB_STRUCT_STAT
*st
);
934 SMB_OFF_T
get_file_size(char *file_name
);
935 char *attrib_string(uint16 mode
);
936 void show_msg(char *buf
);
937 void smb_setlen(char *buf
,int len
);
938 int set_message(char *buf
,int num_words
,int num_bytes
,BOOL zero
);
939 void set_message_bcc(char *buf
,int num_bytes
);
940 void set_message_end(void *outbuf
,void *end_ptr
);
941 void dos_clean_name(char *s
);
942 void unix_clean_name(char *s
);
943 void make_dir_struct(char *buf
,char *mask
,char *fname
,SMB_OFF_T size
,int mode
,time_t date
);
944 void close_low_fds(void);
945 int set_blocking(int fd
, BOOL set
);
946 SMB_OFF_T
transfer_file(int infd
,int outfd
,SMB_OFF_T n
,char *header
,int headlen
,int align
);
948 void become_daemon(void);
950 void *Realloc(void *p
,size_t size
);
951 void safe_free(void *p
);
952 BOOL
get_myname(char *my_name
);
953 int interpret_protocol(char *str
,int def
);
954 BOOL
is_ipaddress(const char *str
);
955 uint32
interpret_addr(char *str
);
956 struct in_addr
*interpret_addr2(char *str
);
957 BOOL
zero_ip(struct in_addr ip
);
958 char *automount_lookup(char *user_name
);
959 char *automount_lookup(char *user_name
);
960 BOOL
same_net(struct in_addr ip1
,struct in_addr ip2
,struct in_addr mask
);
961 BOOL
process_exists(pid_t pid
);
962 char *uidtoname(uid_t uid
);
963 char *gidtoname(gid_t gid
);
964 uid_t
nametouid(char *name
);
965 gid_t
nametogid(char *name
);
966 void smb_panic(char *why
);
967 char *readdirname(DIR *p
);
968 BOOL
is_in_path(char *name
, name_compare_entry
*namelist
);
969 void set_namearray(name_compare_entry
**ppname_array
, char *namelist
);
970 void free_namearray(name_compare_entry
*name_array
);
971 BOOL
fcntl_lock(int fd
, int op
, SMB_OFF_T offset
, SMB_OFF_T count
, int type
);
972 BOOL
is_myname(char *s
);
973 void set_remote_arch(enum remote_arch_types type
);
974 enum remote_arch_types
get_remote_arch(void);
975 void out_ascii(FILE *f
, unsigned char *buf
,int len
);
976 void out_data(FILE *f
,char *buf1
,int len
, int per_line
);
977 void print_asc(int level
, unsigned char *buf
,int len
);
978 void dump_data(int level
,char *buf1
,int len
);
979 char *tab_depth(int depth
);
980 int str_checksum(const char *s
);
981 void zero_free(void *p
, size_t size
);
982 int set_maxfiles(int requested_max
);
983 BOOL
reg_split_key(char *full_keyname
, uint32
*reg_type
, char *key_name
);
984 int smb_mkstemp(char *template);
985 void *memdup(void *p
, size_t size
);
986 char *myhostname(void);
987 char *lock_path(char *name
);
988 char *parent_dirname(const char *path
);
989 BOOL
ms_has_wild(char *s
);
990 BOOL
mask_match(char *string
, char *pattern
, BOOL is_case_sensitive
);
991 int _Insure_trap_error(int a1
, int a2
, int a3
, int a4
, int a5
, int a6
);
993 /*The following definitions come from lib/util_file.c */
995 BOOL
do_file_lock(int fd
, int waitsecs
, int type
);
996 BOOL
file_lock(int fd
, int type
, int secs
, int *plock_depth
);
997 BOOL
file_unlock(int fd
, int *plock_depth
);
998 void *startfilepwent(char *pfile
, char *s_readbuf
, int bufsize
,
999 int *file_lock_depth
, BOOL update
);
1000 void endfilepwent(void *vp
, int *file_lock_depth
);
1001 SMB_BIG_UINT
getfilepwpos(void *vp
);
1002 BOOL
setfilepwpos(void *vp
, SMB_BIG_UINT tok
);
1003 int getfileline(void *vp
, char *linebuf
, int linebuf_size
);
1004 char *fgets_slash(char *s2
,int maxlen
,FILE *f
);
1005 char *file_pload(char *syscmd
, size_t *size
);
1006 char *fd_load(int fd
, size_t *size
);
1007 char *file_load(char *fname
, size_t *size
);
1008 char **file_lines_load(char *fname
, int *numlines
, BOOL convert
);
1009 char **fd_lines_load(int fd
, int *numlines
, BOOL convert
);
1010 char **file_lines_pload(char *syscmd
, int *numlines
, BOOL convert
);
1011 void file_lines_free(char **lines
);
1012 void file_lines_slashcont(char **lines
);
1014 /*The following definitions come from lib/util_getent.c */
1016 struct sys_grent
* getgrent_list(void);
1017 void grent_free (struct sys_grent
*glist
);
1018 struct sys_pwent
* getpwent_list(void);
1019 void pwent_free (struct sys_pwent
*plist
);
1021 /*The following definitions come from lib/util_list.c */
1023 BOOL
copy_policy_hnd (POLICY_HND
*dest
, const POLICY_HND
*src
);
1024 BOOL
compare_rpc_hnd_node(const RPC_HND_NODE
*x
,
1025 const RPC_HND_NODE
*y
);
1026 BOOL
RpcHndList_set_connection(const POLICY_HND
*hnd
,
1027 struct cli_connection
*con
);
1028 BOOL
RpcHndList_del_connection(const POLICY_HND
*hnd
);
1029 struct cli_connection
* RpcHndList_get_connection(const POLICY_HND
*hnd
);
1031 /*The following definitions come from lib/util_seaccess.c */
1033 void se_map_generic(uint32
*access_mask
, struct generic_mapping
*mapping
);
1034 BOOL
se_access_check(SEC_DESC
*sd
, struct current_user
*user
,
1035 uint32 acc_desired
, uint32
*acc_granted
, uint32
*status
);
1036 SEC_DESC_BUF
*se_create_child_secdesc(TALLOC_CTX
*ctx
, SEC_DESC
*parent_ctr
,
1037 BOOL child_container
);
1039 /*The following definitions come from lib/util_sec.c */
1041 void gain_root_privilege(void);
1042 void gain_root_group_privilege(void);
1043 void set_effective_uid(uid_t uid
);
1044 void set_effective_gid(gid_t gid
);
1045 void save_re_uid(void);
1046 void restore_re_uid(void);
1047 int set_re_uid(void);
1048 void become_user_permanently(uid_t uid
, gid_t gid
);
1050 /*The following definitions come from lib/util_sid.c */
1052 void generate_wellknown_sids(void);
1053 BOOL
map_domain_sid_to_name(DOM_SID
*sid
, char *nt_domain
);
1054 BOOL
lookup_known_rid(DOM_SID
*sid
, uint32 rid
, char *name
, enum SID_NAME_USE
*psid_name_use
);
1055 BOOL
map_domain_name_to_sid(DOM_SID
*sid
, char *nt_domain
);
1056 void split_domain_name(const char *fullname
, char *domain
, char *name
);
1057 char *sid_to_string(fstring sidstr_out
, DOM_SID
*sid
);
1058 BOOL
string_to_sid(DOM_SID
*sidout
, char *sidstr
);
1059 BOOL
sid_append_rid(DOM_SID
*sid
, uint32 rid
);
1060 BOOL
sid_split_rid(DOM_SID
*sid
, uint32
*rid
);
1061 BOOL
sid_peek_rid(DOM_SID
*sid
, uint32
*rid
);
1062 void sid_copy(DOM_SID
*dst
, const DOM_SID
*src
);
1063 DOM_SID
*sid_dup(DOM_SID
*src
);
1064 BOOL
sid_linearize(char *outbuf
, size_t len
, DOM_SID
*sid
);
1065 int sid_compare(const DOM_SID
*sid1
, const DOM_SID
*sid2
);
1066 BOOL
sid_equal(const DOM_SID
*sid1
, const DOM_SID
*sid2
);
1067 size_t sid_size(DOM_SID
*sid
);
1069 /*The following definitions come from lib/util_sock.c */
1071 BOOL
is_a_socket(int fd
);
1072 void set_socket_options(int fd
, char *options
);
1073 ssize_t
read_udp_socket(int fd
,char *buf
,size_t len
);
1074 ssize_t
read_with_timeout(int fd
,char *buf
,size_t mincnt
,size_t maxcnt
,unsigned int time_out
);
1075 BOOL
send_keepalive(int client
);
1076 ssize_t
read_data(int fd
,char *buffer
,size_t N
);
1077 ssize_t
write_data(int fd
,char *buffer
,size_t N
);
1078 ssize_t
write_socket_data(int fd
,char *buffer
,size_t N
);
1079 ssize_t
write_socket(int fd
,char *buf
,size_t len
);
1080 ssize_t
read_smb_length(int fd
,char *inbuf
,unsigned int timeout
);
1081 BOOL
receive_smb(int fd
,char *buffer
, unsigned int timeout
);
1082 BOOL
client_receive_smb(int fd
,char *buffer
, unsigned int timeout
);
1083 BOOL
send_smb(int fd
,char *buffer
);
1084 BOOL
send_one_packet(char *buf
,int len
,struct in_addr ip
,int port
,int type
);
1085 int open_socket_in(int type
, int port
, int dlevel
,uint32 socket_addr
, BOOL rebind
);
1086 int open_socket_out(int type
, struct in_addr
*addr
, int port
,int timeout
);
1087 void client_setfd(int fd
);
1088 char *client_name(void);
1089 char *client_addr(void);
1090 char *get_socket_name(int fd
);
1091 char *get_socket_addr(int fd
);
1092 int open_pipe_sock(char *path
);
1093 int create_pipe_socket(char *dir
, int dir_perms
,
1094 char *path
, int path_perms
);
1096 /*The following definitions come from lib/util_str.c */
1098 void set_first_token(char *ptr
);
1099 BOOL
next_token(char **ptr
,char *buff
,char *sep
, size_t bufsize
);
1100 char **toktocliplist(int *ctok
, char *sep
);
1101 int StrCaseCmp(const char *s
, const char *t
);
1102 int StrnCaseCmp(const char *s
, const char *t
, size_t n
);
1103 BOOL
strequal(const char *s1
, const char *s2
);
1104 BOOL
strnequal(const char *s1
,const char *s2
,size_t n
);
1105 BOOL
strcsequal(const char *s1
,const char *s2
);
1106 int strwicmp(char *psz1
, char *psz2
);
1107 void strlower(char *s
);
1108 void strupper(char *s
);
1109 void strnorm(char *s
);
1110 BOOL
strisnormal(char *s
);
1111 void string_replace(char *s
,char oldc
,char newc
);
1112 char *skip_string(char *buf
,size_t n
);
1113 size_t str_charnum(const char *s
);
1114 BOOL
trim_string(char *s
,const char *front
,const char *back
);
1115 BOOL
strhasupper(const char *s
);
1116 BOOL
strhaslower(const char *s
);
1117 size_t count_chars(const char *s
,char c
);
1118 BOOL
str_is_all(const char *s
,char c
);
1119 char *safe_strcpy(char *dest
,const char *src
, size_t maxlength
);
1120 char *safe_strcat(char *dest
, const char *src
, size_t maxlength
);
1121 char *alpha_strcpy(char *dest
, const char *src
, size_t maxlength
);
1122 char *StrnCpy(char *dest
,const char *src
,size_t n
);
1123 char *strncpyn(char *dest
, const char *src
,size_t n
, char c
);
1124 size_t strhex_to_str(char *p
, size_t len
, const char *strhex
);
1125 BOOL
in_list(char *s
,char *list
,BOOL casesensitive
);
1126 void string_free(char **s
);
1127 BOOL
string_set(char **dest
,const char *src
);
1128 void string_sub(char *s
,const char *pattern
,const char *insert
, size_t len
);
1129 void fstring_sub(char *s
,const char *pattern
,const char *insert
);
1130 void pstring_sub(char *s
,const char *pattern
,const char *insert
);
1131 void all_string_sub(char *s
,const char *pattern
,const char *insert
, size_t len
);
1132 void split_at_last_component(char *path
, char *front
, char sep
, char *back
);
1133 char *octal_string(int i
);
1134 char *string_truncate(char *s
, int length
);
1135 void parse_domain_user(char *domuser
, fstring domain
, fstring user
);
1137 /*The following definitions come from lib/util_unistr.c */
1139 size_t dos_PutUniCode(char *dst
,const char *src
, ssize_t len
, BOOL null_terminate
);
1140 void unistr_to_dos(char *dest
, const char *src
, size_t len
);
1141 char *skip_unibuf(char *src
, size_t len
);
1142 char *dos_unistrn2(uint16
*src
, int len
);
1143 char *dos_unistr2(uint16
*src
);
1144 char *dos_unistr2_to_str(UNISTR2
*str
);
1145 void ascii_to_unistr(uint16
*dest
, const char *src
, int maxlen
);
1146 void unistr_to_ascii(char *dest
, const uint16
*src
, int len
);
1147 void unistr2_to_ascii(char *dest
, const UNISTR2
*str
, size_t maxlen
);
1148 uint32
buffer2_to_uint32(BUFFER2
*str
);
1149 char *dos_buffer2_to_str(BUFFER2
*str
);
1150 char *dos_buffer2_to_multistr(BUFFER2
*str
);
1151 size_t dos_struni2(char *dst
, const char *src
, size_t max_len
);
1152 char *dos_unistr(char *buf
);
1153 int unistrcpy(char *dst
, char *src
);
1154 void default_unicode_map(smb_ucs2_t
**pp_cp_to_ucs2
, uint16
**pp_ucs2_to_cp
);
1155 BOOL
load_unicode_map(const char *codepage
, smb_ucs2_t
**pp_cp_to_ucs2
, uint16
**pp_ucs2_to_cp
);
1156 BOOL
load_dos_unicode_map(int codepage
);
1157 BOOL
load_unix_unicode_map(const char *unix_char_set
);
1158 smb_ucs2_t
*multibyte_to_unicode(smb_ucs2_t
*dst
, const char *src
,
1159 size_t dst_len
, smb_ucs2_t
*cp_to_ucs2
);
1160 char *unicode_to_unix(char *dst
, const smb_ucs2_t
*src
, size_t dst_len
);
1161 smb_ucs2_t
*unix_to_unicode(smb_ucs2_t
*dst
, const char *src
, size_t dst_len
);
1162 char *unicode_to_dos(char *dst
, const smb_ucs2_t
*src
, size_t dst_len
);
1163 size_t unicode_to_dos_char(char *dst
, const smb_ucs2_t src
);
1164 smb_ucs2_t
*dos_to_unicode(smb_ucs2_t
*dst
, const char *src
, size_t dst_len
);
1165 size_t strlen_w(const smb_ucs2_t
*src
);
1166 smb_ucs2_t
*safe_strcpy_w(smb_ucs2_t
*dest
,const smb_ucs2_t
*src
, size_t maxlength
);
1167 smb_ucs2_t
*safe_strcat_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
, size_t maxlength
);
1168 int strcmp_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
1169 int strncmp_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
, size_t len
);
1170 smb_ucs2_t
*strstr_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
1171 smb_ucs2_t
*strchr_w(const smb_ucs2_t
*s
, smb_ucs2_t c
);
1172 smb_ucs2_t
*strrchr_w(const smb_ucs2_t
*s
, smb_ucs2_t c
);
1173 smb_ucs2_t
*strtok_w(smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
1174 smb_ucs2_t
*strdup_w(const smb_ucs2_t
*s
);
1175 int isupper_w( smb_ucs2_t val
);
1176 int islower_w( smb_ucs2_t val
);
1177 int isdigit_w( smb_ucs2_t val
);
1178 int isxdigit_w( smb_ucs2_t val
);
1179 int isspace_w( smb_ucs2_t val
);
1180 smb_ucs2_t
toupper_w( smb_ucs2_t val
);
1181 smb_ucs2_t
tolower_w( smb_ucs2_t val
);
1182 void set_first_token_w(smb_ucs2_t
*ptr
);
1183 BOOL
next_token_w(smb_ucs2_t
**ptr
, smb_ucs2_t
*buff
, smb_ucs2_t
*sep
, size_t bufsize
);
1184 smb_ucs2_t
**toktocliplist_w(int *ctok
, smb_ucs2_t
*sep
);
1185 int StrCaseCmp_w(const smb_ucs2_t
*s
, const smb_ucs2_t
*t
);
1186 int StrnCaseCmp_w(const smb_ucs2_t
*s
, const smb_ucs2_t
*t
, size_t n
);
1187 BOOL
strequal_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
1188 BOOL
strnequal_w(const smb_ucs2_t
*s1
,const smb_ucs2_t
*s2
,size_t n
);
1189 BOOL
strcsequal_w(const smb_ucs2_t
*s1
,const smb_ucs2_t
*s2
);
1190 void strlower_w(smb_ucs2_t
*s
);
1191 void strupper_w(smb_ucs2_t
*s
);
1192 void strnorm_w(smb_ucs2_t
*s
);
1193 BOOL
strisnormal_w(smb_ucs2_t
*s
);
1194 void string_replace_w(smb_ucs2_t
*s
, smb_ucs2_t oldc
, smb_ucs2_t newc
);
1195 smb_ucs2_t
*skip_string_w(smb_ucs2_t
*buf
,size_t n
);
1196 size_t str_charnum_w(const smb_ucs2_t
*s
);
1197 BOOL
trim_string_w(smb_ucs2_t
*s
,const smb_ucs2_t
*front
,const smb_ucs2_t
*back
);
1198 BOOL
strhasupper_w(const smb_ucs2_t
*s
);
1199 BOOL
strhaslower_w(const smb_ucs2_t
*s
);
1200 size_t count_chars_w(const smb_ucs2_t
*s
,smb_ucs2_t c
);
1201 BOOL
str_is_all_w(const smb_ucs2_t
*s
,smb_ucs2_t c
);
1202 smb_ucs2_t
*alpha_strcpy_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
, size_t maxlength
);
1203 smb_ucs2_t
*StrnCpy_w(smb_ucs2_t
*dest
,const smb_ucs2_t
*src
,size_t n
);
1204 smb_ucs2_t
*strncpyn_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
,size_t n
, smb_ucs2_t c
);
1205 size_t strhex_to_str_w(char *p
, size_t len
, const smb_ucs2_t
*strhex
);
1206 BOOL
in_list_w(smb_ucs2_t
*s
,smb_ucs2_t
*list
,BOOL casesensitive
);
1207 BOOL
string_init_w(smb_ucs2_t
**dest
,const smb_ucs2_t
*src
);
1208 void string_free_w(smb_ucs2_t
**s
);
1209 BOOL
string_set_w(smb_ucs2_t
**dest
,const smb_ucs2_t
*src
);
1210 void string_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
, size_t len
);
1211 void fstring_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
);
1212 void pstring_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,smb_ucs2_t
*insert
);
1213 void all_string_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
, size_t len
);
1214 void split_at_last_component_w(smb_ucs2_t
*path
, smb_ucs2_t
*front
, smb_ucs2_t sep
, smb_ucs2_t
*back
);
1215 smb_ucs2_t
*octal_string_w(int i
);
1216 smb_ucs2_t
*string_truncate_w(smb_ucs2_t
*s
, size_t length
);
1217 smb_ucs2_t
doscp2ucs2(int w
);
1218 int ucs2doscp(smb_ucs2_t w
);
1220 /*The following definitions come from lib/wins_srv.c */
1222 BOOL
wins_srv_load_list( char *src
);
1223 struct in_addr
wins_srv_ip( void );
1224 void wins_srv_died( struct in_addr boothill_ip
);
1225 unsigned long wins_srv_count( void );
1227 /*The following definitions come from locking/brlock.c */
1229 void brl_init(int read_only
);
1230 void brl_shutdown(int read_only
);
1231 BOOL
brl_lock(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
1232 uint16 smbpid
, pid_t pid
, uint16 tid
,
1233 br_off start
, br_off size
,
1234 enum brl_type lock_type
);
1235 BOOL
brl_unlock(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
1236 uint16 smbpid
, pid_t pid
, uint16 tid
,
1237 br_off start
, br_off size
);
1238 BOOL
brl_locktest(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
1239 uint16 smbpid
, pid_t pid
, uint16 tid
,
1240 br_off start
, br_off size
,
1241 enum brl_type lock_type
);
1242 void brl_close(SMB_DEV_T dev
, SMB_INO_T ino
, pid_t pid
, int tid
, int fnum
);
1243 int brl_forall(BRLOCK_FN(fn
));
1245 /*The following definitions come from locking/locking.c */
1247 BOOL
is_locked(files_struct
*fsp
,connection_struct
*conn
,
1248 SMB_BIG_UINT count
,SMB_BIG_UINT offset
,
1249 enum brl_type lock_type
);
1250 BOOL
do_lock(files_struct
*fsp
,connection_struct
*conn
,
1251 SMB_BIG_UINT count
,SMB_BIG_UINT offset
,enum brl_type lock_type
,
1252 int *eclass
,uint32
*ecode
);
1253 BOOL
do_unlock(files_struct
*fsp
,connection_struct
*conn
,
1254 SMB_BIG_UINT count
,SMB_BIG_UINT offset
,
1255 int *eclass
,uint32
*ecode
);
1256 void locking_close_file(files_struct
*fsp
);
1257 BOOL
locking_init(int read_only
);
1258 BOOL
locking_end(void);
1259 BOOL
lock_share_entry(connection_struct
*conn
,
1260 SMB_DEV_T dev
, SMB_INO_T inode
);
1261 void unlock_share_entry(connection_struct
*conn
,
1262 SMB_DEV_T dev
, SMB_INO_T inode
);
1263 BOOL
lock_share_entry_fsp(files_struct
*fsp
);
1264 void unlock_share_entry_fsp(files_struct
*fsp
);
1265 int get_share_modes(connection_struct
*conn
,
1266 SMB_DEV_T dev
, SMB_INO_T inode
,
1267 share_mode_entry
**shares
);
1268 size_t del_share_mode(files_struct
*fsp
, share_mode_entry
**ppse
);
1269 BOOL
set_share_mode(files_struct
*fsp
, uint16 port
, uint16 op_type
);
1270 BOOL
remove_share_oplock(files_struct
*fsp
);
1271 BOOL
downgrade_share_oplock(files_struct
*fsp
);
1272 BOOL
modify_delete_flag( SMB_DEV_T dev
, SMB_INO_T inode
, BOOL delete_on_close
);
1273 int share_mode_forall(SHAREMODE_FN(fn
));
1275 /*The following definitions come from locking/posix.c */
1277 int fd_close_posix(struct connection_struct
*conn
, files_struct
*fsp
);
1278 uint32
map_lock_offset(uint32 high
, uint32 low
);
1279 BOOL
is_posix_locked(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
, enum brl_type lock_type
);
1280 BOOL
set_posix_lock(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
, enum brl_type lock_type
);
1281 BOOL
release_posix_lock(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
);
1282 void posix_locking_close_file(files_struct
*fsp
);
1283 BOOL
posix_locking_init(int read_only
);
1284 BOOL
posix_locking_end(void);
1286 /*The following definitions come from msdfs/msdfs.c */
1288 BOOL
create_junction(char* pathname
, struct junction_map
* jn
);
1289 BOOL
is_msdfs_link(connection_struct
* conn
, char* path
);
1290 BOOL
get_referred_path(struct junction_map
* junction
);
1291 BOOL
dfs_redirect(char* pathname
, connection_struct
* conn
);
1292 BOOL
dfs_findfirst_redirect(char* pathname
, connection_struct
* conn
);
1293 int setup_dfs_referral(char* pathname
, int max_referral_level
,
1295 int dfs_path_error(char* inbuf
, char* outbuf
);
1296 BOOL
create_msdfs_link(struct junction_map
* jn
, BOOL exists
);
1297 BOOL
remove_msdfs_link(struct junction_map
* jn
);
1298 int enum_msdfs_links(struct junction_map
* jn
);
1299 int setup_dfs_referral(char* pathname
, int max_referral_level
,
1301 BOOL
is_msdfs_link(connection_struct
* conn
, char* path
);
1303 /*The following definitions come from nmbd/asyncdns.c */
1305 int asyncdns_fd(void);
1306 void kill_async_dns_child(void);
1307 void start_async_dns(void);
1308 void run_dns_queue(void);
1309 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
1310 struct name_record
**n
);
1311 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
1312 struct name_record
**n
);
1313 void kill_async_dns_child(void);
1315 /*The following definitions come from nmbd/nmbd_become_dmb.c */
1317 void add_domain_names(time_t t
);
1319 /*The following definitions come from nmbd/nmbd_become_lmb.c */
1321 void insert_permanent_name_into_unicast( struct subnet_record
*subrec
,
1322 struct nmb_name
*nmbname
, uint16 nb_type
);
1323 void unbecome_local_master_browser(struct subnet_record
*subrec
, struct work_record
*work
,
1324 BOOL force_new_election
);
1325 void become_local_master_browser(struct subnet_record
*subrec
, struct work_record
*work
);
1326 void set_workgroup_local_master_browser_name( struct work_record
*work
, char *newname
);
1328 /*The following definitions come from nmbd/nmbd_browserdb.c */
1330 void update_browser_death_time( struct browse_cache_record
*browc
);
1331 struct browse_cache_record
*create_browser_in_lmb_cache( char *work_name
,
1333 struct in_addr ip
);
1334 struct browse_cache_record
*find_browser_in_lmb_cache( char *browser_name
);
1335 void expire_lmb_browsers( time_t t
);
1337 /*The following definitions come from nmbd/nmbd_browsesync.c */
1339 void dmb_expire_and_sync_browser_lists(time_t t
);
1340 void announce_and_sync_with_domain_master_browser( struct subnet_record
*subrec
,
1341 struct work_record
*work
);
1342 void collect_all_workgroup_names_from_wins_server(time_t t
);
1343 void sync_all_dmbs(time_t t
);
1345 /*The following definitions come from nmbd/nmbd.c */
1348 /*The following definitions come from nmbd/nmbd_elections.c */
1350 void check_master_browser_exists(time_t t
);
1351 void run_elections(time_t t
);
1352 void process_election(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1353 BOOL
check_elections(void);
1354 void nmbd_message_election(int msg_type
, pid_t src
, void *buf
, size_t len
);
1356 /*The following definitions come from nmbd/nmbd_incomingdgrams.c */
1358 void tell_become_backup(void);
1359 void process_host_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1360 void process_workgroup_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1361 void process_local_master_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1362 void process_master_browser_announce(struct subnet_record
*subrec
,
1363 struct packet_struct
*p
,char *buf
);
1364 void process_lm_host_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1365 void process_get_backup_list_request(struct subnet_record
*subrec
,
1366 struct packet_struct
*p
,char *buf
);
1367 void process_reset_browser(struct subnet_record
*subrec
,
1368 struct packet_struct
*p
,char *buf
);
1369 void process_announce_request(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1370 void process_lm_announce_request(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1372 /*The following definitions come from nmbd/nmbd_incomingrequests.c */
1374 void process_name_release_request(struct subnet_record
*subrec
,
1375 struct packet_struct
*p
);
1376 void process_name_refresh_request(struct subnet_record
*subrec
,
1377 struct packet_struct
*p
);
1378 void process_name_registration_request(struct subnet_record
*subrec
,
1379 struct packet_struct
*p
);
1380 void process_node_status_request(struct subnet_record
*subrec
, struct packet_struct
*p
);
1381 void process_name_query_request(struct subnet_record
*subrec
, struct packet_struct
*p
);
1383 /*The following definitions come from nmbd/nmbd_lmhosts.c */
1385 void load_lmhosts_file(char *fname
);
1386 BOOL
find_name_in_lmhosts(struct nmb_name
*nmbname
, struct name_record
**namerecp
);
1388 /*The following definitions come from nmbd/nmbd_logonnames.c */
1390 void add_logon_names(void);
1392 /*The following definitions come from nmbd/nmbd_mynames.c */
1394 void register_my_workgroup_one_subnet(struct subnet_record
*subrec
);
1395 BOOL
register_my_workgroup_and_names(void);
1396 void release_my_names(void);
1397 void refresh_my_names(time_t t
);
1399 /*The following definitions come from nmbd/nmbd_namelistdb.c */
1401 void set_samba_nb_type(void);
1402 void remove_name_from_namelist( struct subnet_record
*subrec
,
1403 struct name_record
*namerec
);
1404 struct name_record
*find_name_on_subnet( struct subnet_record
*subrec
,
1405 struct nmb_name
*nmbname
,
1407 struct name_record
*find_name_for_remote_broadcast_subnet(
1408 struct nmb_name
*nmbname
,
1410 void update_name_ttl( struct name_record
*namerec
, int ttl
);
1411 struct name_record
*add_name_to_subnet( struct subnet_record
*subrec
,
1416 enum name_source source
,
1418 struct in_addr
*iplist
);
1419 void standard_success_register(struct subnet_record
*subrec
,
1420 struct userdata_struct
*userdata
,
1421 struct nmb_name
*nmbname
, uint16 nb_flags
, int ttl
,
1422 struct in_addr registered_ip
);
1423 void standard_fail_register( struct subnet_record
*subrec
,
1424 struct response_record
*rrec
,
1425 struct nmb_name
*nmbname
);
1426 BOOL
find_ip_in_name_record( struct name_record
*namerec
, struct in_addr ip
);
1427 void add_ip_to_name_record( struct name_record
*namerec
, struct in_addr new_ip
);
1428 void remove_ip_from_name_record( struct name_record
*namerec
,
1429 struct in_addr remove_ip
);
1430 void standard_success_release( struct subnet_record
*subrec
,
1431 struct userdata_struct
*userdata
,
1432 struct nmb_name
*nmbname
,
1433 struct in_addr released_ip
);
1434 void expire_names_on_subnet(struct subnet_record
*subrec
, time_t t
);
1435 void expire_names(time_t t
);
1436 void add_samba_names_to_subnet( struct subnet_record
*subrec
);
1437 void dump_all_namelists(void);
1439 /*The following definitions come from nmbd/nmbd_namequery.c */
1441 BOOL
query_name(struct subnet_record
*subrec
, char *name
, int type
,
1442 query_name_success_function success_fn
,
1443 query_name_fail_function fail_fn
,
1444 struct userdata_struct
*userdata
);
1445 BOOL
query_name_from_wins_server(struct in_addr ip_to
,
1446 char *name
, int type
,
1447 query_name_success_function success_fn
,
1448 query_name_fail_function fail_fn
,
1449 struct userdata_struct
*userdata
);
1451 /*The following definitions come from nmbd/nmbd_nameregister.c */
1453 BOOL
register_name(struct subnet_record
*subrec
,
1454 char *name
, int type
, uint16 nb_flags
,
1455 register_name_success_function success_fn
,
1456 register_name_fail_function fail_fn
,
1457 struct userdata_struct
*userdata
);
1458 BOOL
refresh_name(struct subnet_record
*subrec
, struct name_record
*namerec
,
1459 refresh_name_success_function success_fn
,
1460 refresh_name_fail_function fail_fn
,
1461 struct userdata_struct
*userdata
);
1463 /*The following definitions come from nmbd/nmbd_namerelease.c */
1465 BOOL
release_name(struct subnet_record
*subrec
, struct name_record
*namerec
,
1466 release_name_success_function success_fn
,
1467 release_name_fail_function fail_fn
,
1468 struct userdata_struct
*userdata
);
1470 /*The following definitions come from nmbd/nmbd_nodestatus.c */
1472 BOOL
node_status(struct subnet_record
*subrec
, struct nmb_name
*nmbname
,
1473 struct in_addr send_ip
, node_status_success_function success_fn
,
1474 node_status_fail_function fail_fn
, struct userdata_struct
*userdata
);
1476 /*The following definitions come from nmbd/nmbd_packets.c */
1478 uint16
get_nb_flags(char *buf
);
1479 void set_nb_flags(char *buf
, uint16 nb_flags
);
1480 struct response_record
*queue_register_name( struct subnet_record
*subrec
,
1481 response_function resp_fn
,
1482 timeout_response_function timeout_fn
,
1483 register_name_success_function success_fn
,
1484 register_name_fail_function fail_fn
,
1485 struct userdata_struct
*userdata
,
1486 struct nmb_name
*nmbname
,
1488 struct response_record
*queue_register_multihomed_name( struct subnet_record
*subrec
,
1489 response_function resp_fn
,
1490 timeout_response_function timeout_fn
,
1491 register_name_success_function success_fn
,
1492 register_name_fail_function fail_fn
,
1493 struct userdata_struct
*userdata
,
1494 struct nmb_name
*nmbname
,
1496 struct in_addr register_ip
);
1497 struct response_record
*queue_release_name( struct subnet_record
*subrec
,
1498 response_function resp_fn
,
1499 timeout_response_function timeout_fn
,
1500 release_name_success_function success_fn
,
1501 release_name_fail_function fail_fn
,
1502 struct userdata_struct
*userdata
,
1503 struct nmb_name
*nmbname
,
1505 struct in_addr release_ip
);
1506 struct response_record
*queue_refresh_name( struct subnet_record
*subrec
,
1507 response_function resp_fn
,
1508 timeout_response_function timeout_fn
,
1509 refresh_name_success_function success_fn
,
1510 refresh_name_fail_function fail_fn
,
1511 struct userdata_struct
*userdata
,
1512 struct name_record
*namerec
,
1513 struct in_addr refresh_ip
);
1514 struct response_record
*queue_query_name( struct subnet_record
*subrec
,
1515 response_function resp_fn
,
1516 timeout_response_function timeout_fn
,
1517 query_name_success_function success_fn
,
1518 query_name_fail_function fail_fn
,
1519 struct userdata_struct
*userdata
,
1520 struct nmb_name
*nmbname
);
1521 struct response_record
*queue_query_name_from_wins_server( struct in_addr to_ip
,
1522 response_function resp_fn
,
1523 timeout_response_function timeout_fn
,
1524 query_name_success_function success_fn
,
1525 query_name_fail_function fail_fn
,
1526 struct userdata_struct
*userdata
,
1527 struct nmb_name
*nmbname
);
1528 struct response_record
*queue_node_status( struct subnet_record
*subrec
,
1529 response_function resp_fn
,
1530 timeout_response_function timeout_fn
,
1531 node_status_success_function success_fn
,
1532 node_status_fail_function fail_fn
,
1533 struct userdata_struct
*userdata
,
1534 struct nmb_name
*nmbname
,
1535 struct in_addr send_ip
);
1536 void reply_netbios_packet(struct packet_struct
*orig_packet
,
1537 int rcode
, enum netbios_reply_type_code rcv_code
, int opcode
,
1538 int ttl
, char *data
,int len
);
1539 void run_packet_queue(void);
1540 void retransmit_or_expire_response_records(time_t t
);
1541 BOOL
listen_for_packets(BOOL run_election
);
1542 BOOL
send_mailslot(BOOL unique
, char *mailslot
,char *buf
,int len
,
1543 char *srcname
, int src_type
,
1544 char *dstname
, int dest_type
,
1545 struct in_addr dest_ip
,struct in_addr src_ip
,
1548 /*The following definitions come from nmbd/nmbd_processlogon.c */
1550 void process_logon_packet(struct packet_struct
*p
,char *buf
,int len
,
1553 /*The following definitions come from nmbd/nmbd_responserecordsdb.c */
1555 void remove_response_record(struct subnet_record
*subrec
,
1556 struct response_record
*rrec
);
1557 struct response_record
*make_response_record( struct subnet_record
*subrec
,
1558 struct packet_struct
*p
,
1559 response_function resp_fn
,
1560 timeout_response_function timeout_fn
,
1561 success_function success_fn
,
1562 fail_function fail_fn
,
1563 struct userdata_struct
*userdata
);
1564 struct response_record
*find_response_record(struct subnet_record
**ppsubrec
,
1566 BOOL
is_refresh_already_queued(struct subnet_record
*subrec
, struct name_record
*namerec
);
1568 /*The following definitions come from nmbd/nmbd_sendannounce.c */
1570 void send_browser_reset(int reset_type
, char *to_name
, int to_type
, struct in_addr to_ip
);
1571 void broadcast_announce_request(struct subnet_record
*subrec
, struct work_record
*work
);
1572 void announce_my_server_names(time_t t
);
1573 void announce_my_lm_server_names(time_t t
);
1574 void reset_announce_timer(void);
1575 void announce_myself_to_domain_master_browser(time_t t
);
1576 void announce_my_servers_removed(void);
1577 void announce_remote(time_t t
);
1578 void browse_sync_remote(time_t t
);
1580 /*The following definitions come from nmbd/nmbd_serverlistdb.c */
1582 void remove_all_servers(struct work_record
*work
);
1583 struct server_record
*find_server_in_workgroup(struct work_record
*work
, char *name
);
1584 void remove_server_from_workgroup(struct work_record
*work
, struct server_record
*servrec
);
1585 struct server_record
*create_server_on_workgroup(struct work_record
*work
,
1586 char *name
,int servertype
,
1587 int ttl
,char *comment
);
1588 void update_server_ttl(struct server_record
*servrec
, int ttl
);
1589 void expire_servers(struct work_record
*work
, time_t t
);
1590 void write_browse_list(time_t t
, BOOL force_write
);
1592 /*The following definitions come from nmbd/nmbd_subnetdb.c */
1594 void close_subnet(struct subnet_record
*subrec
);
1595 struct subnet_record
*make_normal_subnet(struct interface
*iface
);
1596 BOOL
create_subnets(void);
1597 BOOL
we_are_a_wins_client(void);
1598 struct subnet_record
*get_next_subnet_maybe_unicast(struct subnet_record
*subrec
);
1599 struct subnet_record
*get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record
*subrec
);
1601 /*The following definitions come from nmbd/nmbd_synclists.c */
1603 void sync_browse_lists(struct work_record
*work
,
1604 char *name
, int nm_type
,
1605 struct in_addr ip
, BOOL local
, BOOL servers
);
1606 void sync_check_completion(void);
1608 /*The following definitions come from nmbd/nmbd_winsproxy.c */
1610 void make_wins_proxy_name_query_request( struct subnet_record
*subrec
,
1611 struct packet_struct
*incoming_packet
,
1612 struct nmb_name
*question_name
);
1614 /*The following definitions come from nmbd/nmbd_winsserver.c */
1616 BOOL
packet_is_for_wins_server(struct packet_struct
*packet
);
1617 BOOL
initialise_wins(void);
1618 void wins_process_name_refresh_request(struct subnet_record
*subrec
,
1619 struct packet_struct
*p
);
1620 void wins_process_name_registration_request(struct subnet_record
*subrec
,
1621 struct packet_struct
*p
);
1622 void wins_process_multihomed_name_registration_request( struct subnet_record
*subrec
,
1623 struct packet_struct
*p
);
1624 void send_wins_name_query_response(int rcode
, struct packet_struct
*p
,
1625 struct name_record
*namerec
);
1626 void wins_process_name_query_request(struct subnet_record
*subrec
,
1627 struct packet_struct
*p
);
1628 void wins_process_name_release_request(struct subnet_record
*subrec
,
1629 struct packet_struct
*p
);
1630 void initiate_wins_processing(time_t t
);
1631 void wins_write_database(BOOL background
);
1633 /*The following definitions come from nmbd/nmbd_workgroupdb.c */
1635 struct work_record
*find_workgroup_on_subnet(struct subnet_record
*subrec
,
1637 struct work_record
*create_workgroup_on_subnet(struct subnet_record
*subrec
,
1638 const char *name
, int ttl
);
1639 void update_workgroup_ttl(struct work_record
*work
, int ttl
);
1640 void initiate_myworkgroup_startup(struct subnet_record
*subrec
, struct work_record
*work
);
1641 void dump_workgroups(BOOL force_write
);
1642 void expire_workgroups_and_servers(time_t t
);
1644 /*The following definitions come from nsswitch/wb_client.c */
1646 BOOL
winbind_lookup_name(const char *name
, DOM_SID
*sid
, enum SID_NAME_USE
*name_type
);
1647 BOOL
winbind_lookup_sid(DOM_SID
*sid
, fstring dom_name
, fstring name
, enum SID_NAME_USE
*name_type
);
1648 BOOL
winbind_sid_to_uid(uid_t
*puid
, DOM_SID
*sid
);
1649 BOOL
winbind_uid_to_sid(DOM_SID
*sid
, uid_t uid
);
1650 BOOL
winbind_sid_to_gid(gid_t
*pgid
, DOM_SID
*sid
);
1651 BOOL
winbind_gid_to_sid(DOM_SID
*sid
, gid_t gid
);
1652 int winbind_initgroups(char *user
, gid_t gid
);
1653 int winbind_getgroups(char *user
, int size
, gid_t
*list
);
1654 BOOL
winbind_uidtoname(fstring name
, uid_t uid
);
1655 BOOL
winbind_gidtoname(fstring name
, gid_t gid
);
1656 BOOL
winbind_nametouid(uid_t
*puid
, char *name
);
1657 BOOL
winbind_nametogid(gid_t
*pgid
, char *gname
);
1659 /*The following definitions come from nsswitch/wb_common.c */
1661 void init_request(struct winbindd_request
*request
, int request_type
);
1662 void init_response(struct winbindd_response
*response
);
1663 void close_sock(void);
1664 int write_sock(void *buffer
, int count
);
1665 int read_reply(struct winbindd_response
*response
);
1666 void free_response(struct winbindd_response
*response
);
1668 /*The following definitions come from param/loadparm.c */
1670 void lp_talloc_free(void);
1671 char *lp_logfile(void);
1672 char *lp_configfile(void);
1673 char *lp_tdb_passwd_file(void);
1674 char *lp_smb_passwd_file(void);
1675 char *lp_serverstring(void);
1676 char *lp_printcapname(void);
1677 char *lp_enumports_cmd(void);
1678 char *lp_addprinter_cmd(void);
1679 char *lp_deleteprinter_cmd(void);
1680 char *lp_os2_driver_map(void);
1681 char *lp_lockdir(void);
1682 char *lp_utmpdir(void);
1683 char *lp_wtmpdir(void);
1685 char *lp_rootdir(void);
1686 char *lp_source_environment(void);
1687 char *lp_defaultservice(void);
1688 char *lp_msg_command(void);
1689 char *lp_dfree_command(void);
1690 char *lp_hosts_equiv(void);
1691 char *lp_auto_services(void);
1692 char *lp_passwd_program(void);
1693 char *lp_passwd_chat(void);
1694 char *lp_passwordserver(void);
1695 char *lp_name_resolve_order(void);
1696 char *lp_workgroup(void);
1697 char *lp_username_map(void);
1698 char *lp_groupname_map(void);
1699 char *lp_logon_script(void);
1700 char *lp_logon_path(void);
1701 char *lp_logon_drive(void);
1702 char *lp_logon_home(void);
1703 char *lp_remote_announce(void);
1704 char *lp_remote_browse_sync(void);
1705 char *lp_wins_server(void);
1706 char *lp_interfaces(void);
1707 char *lp_socket_address(void);
1708 char *lp_nis_home_map_name(void);
1709 char *lp_netbios_aliases(void);
1710 char *lp_panic_action(void);
1711 char *lp_adduser_script(void);
1712 char *lp_deluser_script(void);
1713 char *lp_wins_hook(void);
1714 char *lp_domain_admin_group(void);
1715 char *lp_domain_guest_group(void);
1716 char *lp_winbind_uid(void);
1717 char *lp_winbind_gid(void);
1718 char *lp_template_homedir(void);
1719 char *lp_template_shell(void);
1720 char *lp_winbind_separator(void);
1721 char *lp_codepagedir(void);
1722 char *lp_ldap_server(void);
1723 char *lp_ldap_suffix(void);
1724 char *lp_ldap_filter(void);
1725 char *lp_ldap_root(void);
1726 char *lp_ldap_rootpasswd(void);
1727 char *lp_add_share_cmd(void);
1728 char *lp_change_share_cmd(void);
1729 char *lp_delete_share_cmd(void);
1730 int lp_ssl_version(void);
1731 char *lp_ssl_hosts(void);
1732 char *lp_ssl_hosts_resign(void);
1733 char *lp_ssl_cacertdir(void);
1734 char *lp_ssl_cacertfile(void);
1735 char *lp_ssl_cert(void);
1736 char *lp_ssl_privkey(void);
1737 char *lp_ssl_client_cert(void);
1738 char *lp_ssl_client_privkey(void);
1739 char *lp_ssl_ciphers(void);
1740 BOOL
lp_ssl_enabled(void);
1741 BOOL
lp_ssl_reqClientCert(void);
1742 BOOL
lp_ssl_reqServerCert(void);
1743 BOOL
lp_ssl_compatibility(void);
1744 BOOL
lp_ms_add_printer_wizard(void);
1745 BOOL
lp_dns_proxy(void);
1746 BOOL
lp_wins_support(void);
1747 BOOL
lp_we_are_a_wins_server(void);
1748 BOOL
lp_wins_proxy(void);
1749 BOOL
lp_local_master(void);
1750 BOOL
lp_domain_logons(void);
1751 BOOL
lp_load_printers(void);
1752 BOOL
lp_use_rhosts(void);
1753 BOOL
lp_readprediction(void);
1754 BOOL
lp_readbmpx(void);
1755 BOOL
lp_readraw(void);
1756 BOOL
lp_large_readwrite(void);
1757 BOOL
lp_writeraw(void);
1758 BOOL
lp_null_passwords(void);
1759 BOOL
lp_obey_pam_restrictions(void);
1760 BOOL
lp_strip_dot(void);
1761 BOOL
lp_encrypted_passwords(void);
1762 BOOL
lp_update_encrypted(void);
1763 BOOL
lp_syslog_only(void);
1764 BOOL
lp_timestamp_logs(void);
1765 BOOL
lp_debug_hires_timestamp(void);
1766 BOOL
lp_debug_pid(void);
1767 BOOL
lp_debug_uid(void);
1768 BOOL
lp_browse_list(void);
1769 BOOL
lp_nis_home_map(void);
1770 BOOL
lp_bind_interfaces_only(void);
1771 BOOL
lp_pam_password_change(void);
1772 BOOL
lp_unix_password_sync(void);
1773 BOOL
lp_passwd_chat_debug(void);
1774 BOOL
lp_nt_smb_support(void);
1775 BOOL
lp_nt_pipe_support(void);
1776 BOOL
lp_nt_acl_support(void);
1777 BOOL
lp_stat_cache(void);
1778 BOOL
lp_allow_trusted_domains(void);
1779 BOOL
lp_restrict_anonymous(void);
1780 BOOL
lp_lanman_auth(void);
1781 BOOL
lp_host_msdfs(void);
1782 BOOL
lp_kernel_oplocks(void);
1783 BOOL
lp_enhanced_browsing(void);
1784 int lp_os_level(void);
1785 int lp_max_ttl(void);
1786 int lp_max_wins_ttl(void);
1787 int lp_min_wins_ttl(void);
1788 int lp_max_log_size(void);
1789 int lp_max_open_files(void);
1790 int lp_maxxmit(void);
1791 int lp_maxmux(void);
1792 int lp_passwordlevel(void);
1793 int lp_usernamelevel(void);
1794 int lp_readsize(void);
1795 int lp_deadtime(void);
1796 int lp_maxprotocol(void);
1797 int lp_minprotocol(void);
1798 int lp_security(void);
1799 int lp_maxdisksize(void);
1800 int lp_lpqcachetime(void);
1801 int lp_max_smbd_processes(void);
1802 int lp_totalprintjobs(void);
1803 int lp_syslog(void);
1804 int lp_client_code_page(void);
1805 int lp_lm_announce(void);
1806 int lp_lm_interval(void);
1807 int lp_machine_password_timeout(void);
1808 int lp_change_notify_timeout(void);
1809 int lp_stat_cache_size(void);
1810 int lp_map_to_guest(void);
1811 int lp_min_passwd_length(void);
1812 int lp_oplock_break_wait_time(void);
1813 int lp_ldap_port(void);
1814 char *lp_preexec(int );
1815 char *lp_postexec(int );
1816 char *lp_rootpreexec(int );
1817 char *lp_rootpostexec(int );
1818 char *lp_servicename(int );
1819 char *lp_pathname(int );
1820 char *lp_dontdescend(int );
1821 char *lp_username(int );
1822 char *lp_guestaccount(int );
1823 char *lp_invalid_users(int );
1824 char *lp_valid_users(int );
1825 char *lp_admin_users(int );
1826 char *lp_printcommand(int );
1827 char *lp_lpqcommand(int );
1828 char *lp_lprmcommand(int );
1829 char *lp_lppausecommand(int );
1830 char *lp_lpresumecommand(int );
1831 char *lp_queuepausecommand(int );
1832 char *lp_queueresumecommand(int );
1833 char *lp_driverfile(int );
1834 char *lp_printerdriver(int );
1835 char *lp_hostsallow(int );
1836 char *lp_hostsdeny(int );
1837 char *lp_magicscript(int );
1838 char *lp_magicoutput(int );
1839 char *lp_comment(int );
1840 char *lp_force_user(int );
1841 char *lp_force_group(int );
1842 char *lp_readlist(int );
1843 char *lp_writelist(int );
1844 char *lp_printer_admin(int );
1845 char *lp_fstype(int );
1846 char *lp_vfsobj(int );
1847 char *lp_mangled_map(int );
1848 char *lp_veto_files(int );
1849 char *lp_hide_files(int );
1850 char *lp_veto_oplocks(int );
1851 char *lp_driverlocation(int );
1852 BOOL
lp_msdfs_root(int );
1853 BOOL
lp_autoloaded(int );
1854 BOOL
lp_preexec_close(int );
1855 BOOL
lp_rootpreexec_close(int );
1856 BOOL
lp_casesensitive(int );
1857 BOOL
lp_preservecase(int );
1858 BOOL
lp_shortpreservecase(int );
1859 BOOL
lp_casemangle(int );
1860 BOOL
lp_status(int );
1861 BOOL
lp_hide_dot_files(int );
1862 BOOL
lp_hideunreadable(int );
1863 BOOL
lp_browseable(int );
1864 BOOL
lp_readonly(int );
1865 BOOL
lp_no_set_dir(int );
1866 BOOL
lp_guest_ok(int );
1867 BOOL
lp_guest_only(int );
1868 BOOL
lp_print_ok(int );
1869 BOOL
lp_postscript(int );
1870 BOOL
lp_map_hidden(int );
1871 BOOL
lp_map_archive(int );
1872 BOOL
lp_locking(int );
1873 BOOL
lp_strict_locking(int );
1874 BOOL
lp_posix_locking(int );
1875 BOOL
lp_share_modes(int );
1876 BOOL
lp_oplocks(int );
1877 BOOL
lp_level2_oplocks(int );
1878 BOOL
lp_onlyuser(int );
1879 BOOL
lp_manglednames(int );
1880 BOOL
lp_widelinks(int );
1881 BOOL
lp_symlinks(int );
1882 BOOL
lp_syncalways(int );
1883 BOOL
lp_strict_sync(int );
1884 BOOL
lp_map_system(int );
1885 BOOL
lp_delete_readonly(int );
1886 BOOL
lp_fake_oplocks(int );
1887 BOOL
lp_recursive_veto_delete(int );
1888 BOOL
lp_dos_filemode(int );
1889 BOOL
lp_dos_filetimes(int );
1890 BOOL
lp_dos_filetime_resolution(int );
1891 BOOL
lp_fake_dir_create_times(int );
1892 BOOL
lp_blocking_locks(int );
1893 BOOL
lp_inherit_perms(int );
1894 int lp_create_mask(int );
1895 int lp_force_create_mode(int );
1896 int lp_security_mask(int );
1897 int lp_force_security_mode(int );
1898 int lp_dir_mask(int );
1899 int lp_force_dir_mode(int );
1900 int lp_dir_security_mask(int );
1901 int lp_force_dir_security_mode(int );
1902 int lp_max_connections(int );
1903 int lp_defaultcase(int );
1904 int lp_minprintspace(int );
1905 int lp_maxprintjobs(int );
1906 int lp_printing(int );
1907 int lp_oplock_contention_limit(int );
1908 int lp_write_cache_size(int );
1909 char lp_magicchar(int );
1910 int lp_winbind_cache_time(void);
1911 BOOL
lp_hide_local_users(void);
1912 BOOL
lp_add_home(char *pszHomename
, int iDefaultService
, char *pszHomedir
);
1913 int lp_add_service(char *pszService
, int iDefaultService
);
1914 BOOL
lp_add_printer(char *pszPrintername
, int iDefaultService
);
1915 BOOL
lp_file_list_changed(void);
1916 void *lp_local_ptr(int snum
, void *ptr
);
1917 BOOL
lp_do_parameter(int snum
, char *pszParmName
, char *pszParmValue
);
1918 void init_locals(void);
1919 BOOL
lp_is_default(int snum
, struct parm_struct
*parm
);
1920 struct parm_struct
*lp_next_parameter(int snum
, int *i
, int allparameters
);
1921 BOOL
lp_snum_ok(int iService
);
1922 void lp_add_one_printer(char *name
, char *comment
);
1923 BOOL
lp_loaded(void);
1924 void lp_killunused(BOOL (*snumused
) (int));
1925 void lp_killservice(int iServiceIn
);
1926 BOOL
lp_load(char *pszFname
, BOOL global_only
, BOOL save_defaults
,
1928 void lp_resetnumservices(void);
1929 int lp_numservices(void);
1930 void lp_dump(FILE *f
, BOOL show_defaults
, int maxtoprint
, char *(*dos_to_ext
)(char *, BOOL
));
1931 void lp_dump_one(FILE * f
, BOOL show_defaults
, int snum
, char *(*dos_to_ext
)(char *, BOOL
));
1932 int lp_servicenumber(char *pszServiceName
);
1933 char *volume_label(int snum
);
1934 int lp_server_role(void);
1935 BOOL
lp_domain_master(void);
1936 BOOL
lp_preferred_master(void);
1937 void lp_remove_service(int snum
);
1938 void lp_copy_service(int snum
, char *new_name
);
1939 int lp_default_server_announce(void);
1940 int lp_major_announce_version(void);
1941 int lp_minor_announce_version(void);
1942 void lp_set_name_resolve_order(char *new_order
);
1943 char *lp_printername(int snum
);
1945 /*The following definitions come from param/params.c */
1947 BOOL
pm_process( char *FileName
,
1948 BOOL (*sfunc
)(char *),
1949 BOOL (*pfunc
)(char *, char *) );
1951 /*The following definitions come from passdb/ldap.c */
1953 struct passdb_ops
*ldap_initialize_password_db(void);
1955 /*The following definitions come from passdb/nispass.c */
1957 struct passdb_ops
*nisplus_initialize_password_db(void);
1959 /*The following definitions come from passdb/pampass.c */
1961 BOOL
smb_pam_claim_session(char *user
, char *tty
, char *rhost
);
1962 BOOL
smb_pam_close_session(char *user
, char *tty
, char *rhost
);
1963 uint32
smb_pam_accountcheck(char * user
);
1964 uint32
smb_pam_passcheck(char * user
, char * password
);
1965 BOOL
smb_pam_passchange(char * user
, char * oldpassword
, char * newpassword
);
1967 /*The following definitions come from passdb/pass_check.c */
1969 void dfs_unlogin(void);
1970 BOOL
pass_check(char *user
, char *password
, int pwlen
, struct passwd
*pwd
,
1971 BOOL (*fn
) (char *, char *));
1973 /*The following definitions come from passdb/passdb.c */
1975 BOOL
initialize_password_db(void);
1976 void *startsmbpwent(BOOL update
);
1977 void endsmbpwent(void *vp
);
1978 struct smb_passwd
*getsmbpwent(void *vp
);
1979 BOOL
add_smbpwd_entry(struct smb_passwd
*newpwd
);
1980 BOOL
mod_smbpwd_entry(struct smb_passwd
* pwd
, BOOL override
);
1981 BOOL
del_smbpwd_entry(const char *name
);
1982 struct smb_passwd
*getsmbpwnam(char *name
);
1983 struct smb_passwd
*getsmbpwrid(uint32 user_rid
);
1984 struct smb_passwd
*getsmbpwuid(uid_t smb_userid
);
1985 struct sam_passwd
*iterate_getsam21pwnam(char *name
);
1986 struct sam_passwd
*iterate_getsam21pwrid(uint32 rid
);
1987 struct sam_passwd
*iterate_getsam21pwuid(uid_t uid
);
1988 struct sam_disp_info
*getsamdisprid(uint32 rid
);
1989 struct sam_passwd
*getsam21pwent(void *vp
);
1990 struct sam_passwd
*getsam21pwnam(char *name
);
1991 struct sam_passwd
*getsam21pwrid(uint32 rid
);
1992 BOOL
add_sam21pwd_entry(struct sam_passwd
*pwd
);
1993 BOOL
mod_sam21pwd_entry(struct sam_passwd
*pwd
, BOOL override
);
1994 void pdb_init_smb(struct smb_passwd
*user
);
1995 void pdb_init_sam(struct sam_passwd
*user
);
1996 struct sam_disp_info
*pdb_sam_to_dispinfo(struct sam_passwd
*user
);
1997 struct smb_passwd
*pdb_sam_to_smb(struct sam_passwd
*user
);
1998 struct sam_passwd
*pdb_smb_to_sam(struct smb_passwd
*user
);
1999 void copy_id23_to_sam_passwd(struct sam_passwd
*to
, SAM_USER_INFO_23
*from
);
2000 void copy_id21_to_sam_passwd(struct sam_passwd
*to
, SAM_USER_INFO_21
*from
);
2001 void copy_sam_passwd(struct sam_passwd
*to
, const struct sam_passwd
*from
);
2002 char *pdb_encode_acct_ctrl(uint16 acct_ctrl
, size_t length
);
2003 uint16
pdb_decode_acct_ctrl(const char *p
);
2004 time_t pdb_get_last_set_time(const char *p
);
2005 void pdb_set_logon_time(char *p
, int max_len
, time_t t
);
2006 void pdb_set_logoff_time(char *p
, int max_len
, time_t t
);
2007 void pdb_set_kickoff_time(char *p
, int max_len
, time_t t
);
2008 void pdb_set_can_change_time(char *p
, int max_len
, time_t t
);
2009 void pdb_set_must_change_time(char *p
, int max_len
, time_t t
);
2010 void pdb_set_last_set_time(char *p
, int max_len
, time_t t
);
2011 void pdb_sethexpwd(char *p
, unsigned char *pwd
, uint16 acct_ctrl
);
2012 BOOL
pdb_gethexpwd(char *p
, unsigned char *pwd
);
2013 BOOL
pdb_name_to_rid(char *user_name
, uint32
*u_rid
, uint32
*g_rid
);
2014 BOOL
pdb_generate_sam_sid(void);
2015 uid_t
pdb_user_rid_to_uid(uint32 user_rid
);
2016 gid_t
pdb_user_rid_to_gid(uint32 user_rid
);
2017 uint32
pdb_uid_to_user_rid(uid_t uid
);
2018 uint32
pdb_gid_to_group_rid(gid_t gid
);
2019 BOOL
pdb_rid_is_user(uint32 rid
);
2020 BOOL
local_lookup_rid(uint32 rid
, char *name
, enum SID_NAME_USE
*psid_name_use
);
2021 BOOL
local_lookup_name(const char *c_domain
, const char *c_user
, DOM_SID
*psid
, enum SID_NAME_USE
*psid_name_use
);
2022 DOM_SID
*local_uid_to_sid(DOM_SID
*psid
, uid_t uid
);
2023 BOOL
local_sid_to_uid(uid_t
*puid
, DOM_SID
*psid
, enum SID_NAME_USE
*name_type
);
2024 DOM_SID
*local_gid_to_sid(DOM_SID
*psid
, gid_t gid
);
2025 BOOL
local_sid_to_gid(gid_t
*pgid
, DOM_SID
*psid
, enum SID_NAME_USE
*name_type
);
2027 /*The following definitions come from passdb/secrets.c */
2029 BOOL
secrets_init(void);
2030 void *secrets_fetch(char *key
, size_t *size
);
2031 BOOL
secrets_store(char *key
, void *data
, size_t size
);
2032 BOOL
secrets_delete(char *key
);
2033 BOOL
secrets_store_domain_sid(char *domain
, DOM_SID
*sid
);
2034 BOOL
secrets_fetch_domain_sid(char *domain
, DOM_SID
*sid
);
2035 char *trust_keystr(char *domain
);
2036 BOOL
secrets_fetch_trust_account_password(char *domain
, uint8 ret_pwd
[16],
2037 time_t *pass_last_set_time
);
2038 BOOL
secrets_store_trust_account_password(char *domain
, uint8 new_pwd
[16]);
2039 BOOL
trust_password_delete(char *domain
);
2040 void reset_globals_after_fork(void);
2042 /*The following definitions come from passdb/smbpass.c */
2044 char *format_new_smbpasswd_entry(struct smb_passwd
*newpwd
);
2045 struct sam_passwd
*smbiterate_getsam21pwrid(uint32 rid
);
2046 struct sam_passwd
*smbiterate_getsam21pwuid(uid_t uid
);
2047 struct passdb_ops
*file_initialize_password_db(void);
2049 /*The following definitions come from passdb/smbpasschange.c */
2051 BOOL
local_password_change(char *user_name
, int local_flags
,
2053 char *err_str
, size_t err_str_len
,
2054 char *msg_str
, size_t msg_str_len
);
2056 /*The following definitions come from passdb/smbpassfile.c */
2058 BOOL
pw_file_lock(int fd
, int type
, int secs
, int *plock_depth
);
2059 BOOL
pw_file_unlock(int fd
, int *plock_depth
);
2060 BOOL
migrate_from_old_password_file(char *domain
);
2062 /*The following definitions come from passdb/tdbpass.c */
2064 struct passdb_ops
*tdb_initialize_password_db(void);
2066 /*The following definitions come from printing/load.c */
2068 void add_all_printers(void);
2069 void load_printers(void);
2071 /*The following definitions come from printing/lpq_parse.c */
2073 BOOL
parse_lpq_entry(int snum
,char *line
,
2074 print_queue_struct
*buf
,
2075 print_status_struct
*status
,BOOL first
);
2077 /*The following definitions come from printing/nt_printing.c */
2079 BOOL
nt_printing_init(void);
2080 int get_builtin_ntforms(nt_forms_struct
**list
);
2081 BOOL
get_a_builtin_ntform(UNISTR2
*uni_formname
,nt_forms_struct
*form
);
2082 int get_ntforms(nt_forms_struct
**list
);
2083 int write_ntforms(nt_forms_struct
**list
, int number
);
2084 BOOL
add_a_form(nt_forms_struct
**list
, const FORM
*form
, int *count
);
2085 BOOL
delete_a_form(nt_forms_struct
**list
, UNISTR2
*del_name
, int *count
, uint32
*ret
);
2086 void update_a_form(nt_forms_struct
**list
, const FORM
*form
, int count
);
2087 int get_ntdrivers(fstring
**list
, char *architecture
, uint32 version
);
2088 BOOL
get_short_archi(char *short_archi
, char *long_archi
);
2089 uint32
clean_up_driver_struct(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
,
2090 uint32 level
, struct current_user
*user
);
2091 BOOL
move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
, uint32 level
, struct current_user
*user
, uint32
*perr
);
2092 uint32
get_a_printer_driver_9x_compatible(pstring line
, fstring model
);
2093 uint32
del_a_printer(char *sharename
);
2094 void add_a_specific_param(NT_PRINTER_INFO_LEVEL_2
*info_2
, NT_PRINTER_PARAM
**param
);
2095 BOOL
unlink_specific_param_if_exist(NT_PRINTER_INFO_LEVEL_2
*info_2
, NT_PRINTER_PARAM
*param
);
2096 void free_nt_printer_param(NT_PRINTER_PARAM
**param_ptr
);
2097 NT_DEVICEMODE
*construct_nt_devicemode(const fstring default_devicename
);
2098 NT_DEVICEMODE
*dup_nt_devicemode(NT_DEVICEMODE
*nt_devicemode
);
2099 void free_nt_devicemode(NT_DEVICEMODE
**devmode_ptr
);
2100 void get_printer_subst_params(int snum
, fstring
*printername
, fstring
*sharename
, fstring
*portname
);
2101 uint32
mod_a_printer(NT_PRINTER_INFO_LEVEL printer
, uint32 level
);
2102 uint32
add_a_printer(NT_PRINTER_INFO_LEVEL printer
, uint32 level
);
2103 uint32
get_a_printer(NT_PRINTER_INFO_LEVEL
**pp_printer
, uint32 level
, fstring sharename
);
2104 uint32
free_a_printer(NT_PRINTER_INFO_LEVEL
**pp_printer
, uint32 level
);
2105 uint32
add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver
, uint32 level
);
2106 uint32
get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL
*driver
, uint32 level
,
2107 fstring printername
, fstring architecture
, uint32 version
);
2108 uint32
free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver
, uint32 level
);
2109 BOOL
printer_driver_in_use (char *arch
, char *driver
);
2110 uint32
delete_printer_driver (NT_PRINTER_DRIVER_INFO_LEVEL_3
*i
);
2111 BOOL
get_specific_param_by_index(NT_PRINTER_INFO_LEVEL printer
, uint32 level
, uint32 param_index
,
2112 fstring value
, uint8
**data
, uint32
*type
, uint32
*len
);
2113 BOOL
get_specific_param(NT_PRINTER_INFO_LEVEL printer
, uint32 level
,
2114 fstring value
, uint8
**data
, uint32
*type
, uint32
*len
);
2115 uint32
nt_printing_setsec(char *printername
, SEC_DESC_BUF
*secdesc_ctr
);
2116 BOOL
nt_printing_getsec(TALLOC_CTX
*ctx
, char *printername
, SEC_DESC_BUF
**secdesc_ctr
);
2117 void map_printer_permissions(SEC_DESC
*sd
);
2118 BOOL
print_access_check(struct current_user
*user
, int snum
, int access_type
);
2119 BOOL
print_time_access_check(int snum
);
2120 uint32
printer_write_default_dev(int snum
, const PRINTER_DEFAULT
*printer_default
);
2122 /*The following definitions come from printing/pcap.c */
2124 BOOL
pcap_printername_ok(char *pszPrintername
, char *pszPrintcapname
);
2125 void pcap_printer_fn(void (*fn
)(char *, char *));
2127 /*The following definitions come from printing/print_cups.c */
2130 /*The following definitions come from printing/printfsp.c */
2132 files_struct
*print_fsp_open(connection_struct
*conn
);
2133 void print_fsp_end(files_struct
*fsp
, BOOL normal_close
);
2135 /*The following definitions come from printing/print_generic.c */
2138 /*The following definitions come from printing/printing.c */
2140 BOOL
print_backend_init(void);
2141 BOOL
print_job_exists(int jobid
);
2142 int print_job_snum(int jobid
);
2143 int print_job_fd(int jobid
);
2144 char *print_job_fname(int jobid
);
2145 BOOL
print_job_set_place(int jobid
, int place
);
2146 BOOL
print_job_set_name(int jobid
, char *name
);
2147 BOOL
print_job_delete(struct current_user
*user
, int jobid
, int *errcode
);
2148 BOOL
print_job_pause(struct current_user
*user
, int jobid
, int *errcode
);
2149 BOOL
print_job_resume(struct current_user
*user
, int jobid
, int *errcode
);
2150 int print_job_write(int jobid
, const char *buf
, int size
);
2151 int print_job_start(struct current_user
*user
, int snum
, char *jobname
);
2152 BOOL
print_job_end(int jobid
, BOOL normal_close
);
2153 int print_queue_status(int snum
,
2154 print_queue_struct
**queue
,
2155 print_status_struct
*status
);
2156 int print_queue_snum(char *qname
);
2157 BOOL
print_queue_pause(struct current_user
*user
, int snum
, int *errcode
);
2158 BOOL
print_queue_resume(struct current_user
*user
, int snum
, int *errcode
);
2159 BOOL
print_queue_purge(struct current_user
*user
, int snum
, int *errcode
);
2161 /*The following definitions come from printing/print_svid.c */
2163 void sysv_printer_fn(void (*fn
)(char *, char *));
2164 int sysv_printername_ok(char *name
);
2166 /*The following definitions come from profile/profile.c */
2168 void profile_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
2169 void reqprofile_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
2170 BOOL
profile_setup(BOOL rdonly
);
2172 /*The following definitions come from rpc_client/cli_connect.c */
2174 void init_connections(void);
2175 void free_connections(void);
2176 void cli_connection_free(struct cli_connection
*con
);
2177 void cli_connection_unlink(struct cli_connection
*con
);
2178 BOOL
cli_connection_init(const char *srv_name
, char *pipe_name
,
2179 struct cli_connection
**con
);
2180 BOOL
cli_connection_init_auth(const char *srv_name
, char *pipe_name
,
2181 struct cli_connection
**con
,
2182 cli_auth_fns
* auth
, void *auth_creds
);
2183 struct _cli_auth_fns
*cli_conn_get_authfns(struct cli_connection
*con
);
2184 void *cli_conn_get_auth_creds(struct cli_connection
*con
);
2185 BOOL
rpc_hnd_pipe_req(const POLICY_HND
* hnd
, uint8 op_num
,
2186 prs_struct
* data
, prs_struct
* rdata
);
2187 BOOL
rpc_con_pipe_req(struct cli_connection
*con
, uint8 op_num
,
2188 prs_struct
* data
, prs_struct
* rdata
);
2189 BOOL
rpc_con_ok(struct cli_connection
*con
);
2191 /*The following definitions come from rpc_client/cli_login.c */
2193 BOOL
cli_nt_setup_creds(struct cli_state
*cli
, unsigned char mach_pwd
[16]);
2194 BOOL
cli_nt_srv_pwset(struct cli_state
*cli
, unsigned char *new_hashof_mach_pwd
);
2195 BOOL
cli_nt_login_interactive(struct cli_state
*cli
, char *domain
, char *username
,
2196 uint32 smb_userid_low
, char *password
,
2197 NET_ID_INFO_CTR
*ctr
, NET_USER_INFO_3
*user_info3
);
2198 BOOL
cli_nt_login_network(struct cli_state
*cli
, char *domain
, char *username
,
2199 uint32 smb_userid_low
, char lm_chal
[8],
2200 char *lm_chal_resp
, char *nt_chal_resp
,
2201 NET_ID_INFO_CTR
*ctr
, NET_USER_INFO_3
*user_info3
);
2202 BOOL
cli_nt_logoff(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
);
2204 /*The following definitions come from rpc_client/cli_lsarpc.c */
2206 BOOL
do_lsa_open_policy(struct cli_state
*cli
,
2207 char *system_name
, POLICY_HND
*hnd
,
2209 BOOL
do_lsa_query_info_pol(struct cli_state
*cli
,
2210 POLICY_HND
*hnd
, uint16 info_class
,
2211 fstring domain_name
, DOM_SID
*domain_sid
);
2212 BOOL
do_lsa_close(struct cli_state
*cli
, POLICY_HND
*hnd
);
2213 BOOL
cli_lsa_get_domain_sid(struct cli_state
*cli
, char *server
);
2214 uint32
lsa_open_policy(const char *system_name
, POLICY_HND
*hnd
,
2215 BOOL sec_qos
, uint32 des_access
);
2216 uint32
lsa_close(POLICY_HND
*hnd
);
2217 uint32
lsa_lookup_sids(POLICY_HND
*hnd
, int num_sids
, DOM_SID
*sids
,
2218 char ***names
, uint32
**types
, int *num_names
);
2219 uint32
lsa_lookup_names(POLICY_HND
*hnd
, int num_names
, char **names
,
2220 DOM_SID
**sids
, uint32
**types
, int *num_sids
);
2222 /*The following definitions come from rpc_client/cli_netlogon.c */
2224 BOOL
cli_net_logon_ctrl2(struct cli_state
*cli
, uint32 status_level
);
2225 BOOL
cli_net_auth2(struct cli_state
*cli
, uint16 sec_chan
,
2226 uint32 neg_flags
, DOM_CHAL
*srv_chal
);
2227 BOOL
cli_net_req_chal(struct cli_state
*cli
, DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
);
2228 BOOL
cli_net_srv_pwset(struct cli_state
*cli
, uint8 hashed_mach_pwd
[16]);
2229 BOOL
cli_net_sam_logon(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
, NET_USER_INFO_3
*user_info3
);
2230 BOOL
cli_net_sam_logoff(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
);
2231 BOOL
change_trust_account_password( char *domain
, char *remote_machine_list
);
2233 /*The following definitions come from rpc_client/cli_pipe.c */
2235 BOOL
rpc_api_pipe_req(struct cli_state
*cli
, uint8 op_num
,
2236 prs_struct
*data
, prs_struct
*rdata
);
2237 BOOL
rpc_pipe_bind(struct cli_state
*cli
, char *pipe_name
, char *my_name
);
2238 void cli_nt_set_ntlmssp_flgs(struct cli_state
*cli
, uint32 ntlmssp_flgs
);
2239 BOOL
cli_nt_session_open(struct cli_state
*cli
, char *pipe_name
);
2240 void cli_nt_session_close(struct cli_state
*cli
);
2242 /*The following definitions come from rpc_client/cli_spoolss_notify.c */
2244 BOOL
spoolss_disconnect_from_client( struct cli_state
*cli
);
2245 BOOL
spoolss_connect_to_client( struct cli_state
*cli
, char *remote_machine
);
2246 BOOL
cli_spoolss_reply_open_printer(struct cli_state
*cli
, char *printer
, uint32 localprinter
, uint32 type
, uint32
*status
, POLICY_HND
*handle
);
2247 BOOL
cli_spoolss_reply_rrpcn(struct cli_state
*cli
, POLICY_HND
*handle
,
2248 uint32 change_low
, uint32 change_high
, uint32
*status
);
2249 BOOL
cli_spoolss_reply_close_printer(struct cli_state
*cli
, POLICY_HND
*handle
, uint32
*status
);
2251 /*The following definitions come from rpc_client/cli_use.c */
2253 void init_cli_use(void);
2254 void free_cli_use(void);
2255 struct cli_state
*cli_net_use_add(const char *srv_name
,
2256 const struct ntuser_creds
*usr_creds
,
2257 BOOL reuse
, BOOL
*is_new
);
2258 BOOL
cli_net_use_del(const char *srv_name
,
2259 const struct ntuser_creds
*usr_creds
,
2260 BOOL force_close
, BOOL
*connection_closed
);
2261 void cli_net_use_enum(uint32
*num_cons
, struct use_info
***use
);
2262 void cli_use_wait_keyboard(void);
2264 /*The following definitions come from rpcclient/cmd_lsarpc.c */
2267 /*The following definitions come from rpcclient/cmd_netlogon.c */
2270 /*The following definitions come from rpcclient/cmd_samr.c */
2273 /*The following definitions come from rpcclient/cmd_spoolss.c */
2275 BOOL
get_short_archi(char *short_archi
, char *long_archi
);
2276 void set_drv_info_3_env (DRIVER_INFO_3
*info
, const char *arch
);
2278 /*The following definitions come from rpcclient/cmd_srvsvc.c */
2281 /*The following definitions come from rpc_client/ncacn_np_use.c */
2283 BOOL
ncacn_np_use_del(const char *srv_name
, const char *pipe_name
,
2284 const vuser_key
* key
,
2285 BOOL force_close
, BOOL
*connection_closed
);
2286 struct ncacn_np
*ncacn_np_initialise(struct ncacn_np
*msrpc
,
2287 const vuser_key
* key
);
2288 struct ncacn_np
*ncacn_np_use_add(const char *pipe_name
,
2289 const vuser_key
* key
,
2290 const char *srv_name
,
2291 const struct ntuser_creds
*ntc
,
2292 BOOL reuse
, BOOL
*is_new_connection
);
2294 /*The following definitions come from rpcclient/rpcclient.c */
2296 void fetch_domain_sid(struct cli_state
*cli
);
2297 void init_rpcclient_creds(struct ntuser_creds
*creds
, char* username
,
2298 char* domain
, char* password
);
2299 void add_command_set(struct cmd_set
*cmd_set
);
2300 struct cli_state
*setup_connection(struct cli_state
*cli
, char *system_name
,
2301 struct ntuser_creds
*creds
);
2303 /*The following definitions come from rpc_parse/parse_creds.c */
2305 BOOL
make_creds_unix(CREDS_UNIX
*r_u
, const char* user_name
,
2306 const char* requested_name
,
2307 const char* real_name
,
2309 BOOL
creds_io_unix(char *desc
, CREDS_UNIX
*r_u
, prs_struct
*ps
, int depth
);
2310 void creds_free_unix(CREDS_UNIX
*r_u
);
2311 BOOL
make_creds_unix_sec(CREDS_UNIX_SEC
*r_u
,
2312 uint32 uid
, uint32 gid
, uint32 num_grps
, gid_t
*grps
);
2313 BOOL
creds_io_unix_sec(char *desc
, CREDS_UNIX_SEC
*r_u
, prs_struct
*ps
, int depth
);
2314 void creds_free_unix_sec(CREDS_UNIX_SEC
*r_u
);
2315 BOOL
make_creds_nt_sec(CREDS_NT_SEC
*r_u
,
2316 DOM_SID
*sid
, uint32 num_grps
, uint32
*grps
);
2317 BOOL
creds_io_nt_sec(char *desc
, CREDS_NT_SEC
*r_u
, prs_struct
*ps
, int depth
);
2318 void creds_free_nt_sec(CREDS_NT_SEC
*r_u
);
2319 BOOL
creds_io_pwd_info(char *desc
, struct pwd_info
*pwd
, prs_struct
*ps
, int depth
);
2320 BOOL
creds_io_nt(char *desc
, CREDS_NT
*r_u
, prs_struct
*ps
, int depth
);
2321 void creds_free_nt(CREDS_NT
*r_u
);
2322 BOOL
creds_io_hybrid(char *desc
, CREDS_HYBRID
*r_u
, prs_struct
*ps
, int depth
);
2323 void copy_unix_creds(CREDS_UNIX
*to
, const CREDS_UNIX
*from
);
2324 void copy_nt_sec_creds(CREDS_NT_SEC
*to
, const CREDS_NT_SEC
*from
);
2325 void copy_unix_sec_creds(CREDS_UNIX_SEC
*to
, const CREDS_UNIX_SEC
*from
);
2326 void create_ntc_from_cli_state (CREDS_NT
*to
, const struct cli_state
*cli_from
);
2327 void copy_nt_creds(struct ntuser_creds
*to
,
2328 const struct ntuser_creds
*from
);
2329 void copy_user_creds(struct user_creds
*to
,
2330 const struct user_creds
*from
);
2331 void free_user_creds(struct user_creds
*creds
);
2332 BOOL
creds_io_cmd(char *desc
, CREDS_CMD
*r_u
, prs_struct
*ps
, int depth
);
2333 BOOL
create_ntuser_creds( prs_struct
*ps
,
2335 uint16 version
, uint16 command
,
2337 const struct ntuser_creds
*ntu
,
2339 BOOL
create_user_creds( prs_struct
*ps
,
2341 uint16 version
, uint16 command
,
2343 struct user_creds
*usr
);
2345 /*The following definitions come from rpc_parse/parse_dfs.c */
2347 BOOL
dfs_io_q_dfs_exist(char *desc
, DFS_Q_DFS_EXIST
*q_d
, prs_struct
*ps
, int depth
);
2348 BOOL
dfs_io_r_dfs_exist(char *desc
, DFS_R_DFS_EXIST
*q_d
, prs_struct
*ps
, int depth
);
2349 BOOL
make_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE
*q_d
, char *entrypath
,
2350 char *servername
, char *sharename
);
2351 BOOL
dfs_io_q_dfs_remove(char *desc
, DFS_Q_DFS_REMOVE
*q_d
, prs_struct
*ps
, int depth
);
2352 BOOL
dfs_io_r_dfs_remove(char *desc
, DFS_R_DFS_REMOVE
*r_d
, prs_struct
*ps
, int depth
);
2353 BOOL
make_dfs_q_dfs_add(DFS_Q_DFS_ADD
*q_d
, char *entrypath
, char *servername
,
2354 char *sharename
, char *comment
, uint32 flags
);
2355 BOOL
dfs_io_q_dfs_add(char *desc
, DFS_Q_DFS_ADD
*q_d
, prs_struct
*ps
, int depth
);
2356 BOOL
dfs_io_r_dfs_add(char *desc
, DFS_R_DFS_ADD
*r_d
, prs_struct
*ps
, int depth
);
2357 BOOL
dfs_io_q_dfs_get_info(char* desc
, DFS_Q_DFS_GET_INFO
* q_i
, prs_struct
* ps
, int depth
);
2358 BOOL
dfs_io_r_dfs_get_info(char* desc
, DFS_R_DFS_GET_INFO
* r_i
, prs_struct
* ps
, int depth
);
2359 BOOL
make_dfs_q_dfs_enum(DFS_Q_DFS_ENUM
*q_d
, uint32 level
, DFS_INFO_CTR
*ctr
);
2360 BOOL
dfs_io_q_dfs_enum(char *desc
, DFS_Q_DFS_ENUM
*q_d
, prs_struct
*ps
, int depth
);
2361 BOOL
dfs_io_dfs_info_ctr(char* desc
, DFS_INFO_CTR
* ctr
, uint32 num_entries
, uint32 level
, prs_struct
* ps
, int depth
);
2362 BOOL
dfs_io_r_dfs_enum(char *desc
, DFS_R_DFS_ENUM
*q_d
, prs_struct
*ps
, int depth
);
2363 BOOL
dfs_io_dfs_storage_info(char *desc
, DFS_INFO_3
* info3
, prs_struct
*ps
, int depth
);
2365 /*The following definitions come from rpc_parse/parse_lsa.c */
2367 void init_lsa_trans_name(LSA_TRANS_NAME
*trn
, UNISTR2
*uni_name
,
2368 uint16 sid_name_use
, char *name
, uint32 idx
);
2369 void init_lsa_sec_qos(LSA_SEC_QOS
*qos
, uint16 imp_lev
, uint8 ctxt
, uint8 eff
,
2371 void init_lsa_obj_attr(LSA_OBJ_ATTR
*attr
, uint32 attributes
, LSA_SEC_QOS
*qos
);
2372 void init_q_open_pol(LSA_Q_OPEN_POL
*r_q
, uint16 system_name
,
2373 uint32 attributes
, uint32 desired_access
,
2375 BOOL
lsa_io_q_open_pol(char *desc
, LSA_Q_OPEN_POL
*r_q
, prs_struct
*ps
,
2377 BOOL
lsa_io_r_open_pol(char *desc
, LSA_R_OPEN_POL
*r_p
, prs_struct
*ps
,
2379 void init_q_open_pol2(LSA_Q_OPEN_POL2
*r_q
, char *server_name
,
2380 uint32 attributes
, uint32 desired_access
,
2382 BOOL
lsa_io_q_open_pol2(char *desc
, LSA_Q_OPEN_POL2
*r_q
, prs_struct
*ps
,
2384 BOOL
lsa_io_r_open_pol2(char *desc
, LSA_R_OPEN_POL2
*r_p
, prs_struct
*ps
,
2386 void init_q_query_sec_obj(LSA_Q_QUERY_SEC_OBJ
*q_q
, const POLICY_HND
*hnd
,
2388 BOOL
lsa_io_q_query_sec_obj(char *desc
, LSA_Q_QUERY_SEC_OBJ
*q_q
,
2389 prs_struct
*ps
, int depth
);
2390 BOOL
lsa_io_r_query_sec_obj(char *desc
, LSA_R_QUERY_SEC_OBJ
*r_u
,
2391 prs_struct
*ps
, int depth
);
2392 void init_q_query(LSA_Q_QUERY_INFO
*q_q
, POLICY_HND
*hnd
, uint16 info_class
);
2393 BOOL
lsa_io_q_query(char *desc
, LSA_Q_QUERY_INFO
*q_q
, prs_struct
*ps
,
2395 BOOL
init_q_enum_trust_dom(LSA_Q_ENUM_TRUST_DOM
* q_e
, POLICY_HND
*pol
,
2396 uint32 enum_context
, uint32 preferred_len
);
2397 BOOL
lsa_io_q_enum_trust_dom(char *desc
, LSA_Q_ENUM_TRUST_DOM
*q_e
,
2398 prs_struct
*ps
, int depth
);
2399 void init_r_enum_trust_dom(LSA_R_ENUM_TRUST_DOM
*r_e
, uint32 enum_context
,
2400 char *domain_name
, DOM_SID
*domain_sid
,
2402 BOOL
lsa_io_r_enum_trust_dom(char *desc
, LSA_R_ENUM_TRUST_DOM
*r_e
,
2403 prs_struct
*ps
, int depth
);
2404 void lsa_free_r_enum_trust_dom(LSA_R_ENUM_TRUST_DOM
* r_e
);
2405 BOOL
lsa_io_dom_query_5(char *desc
, DOM_QUERY_5
*d_q
, prs_struct
*ps
, int depth
);
2406 BOOL
lsa_io_r_query(char *desc
, LSA_R_QUERY_INFO
*r_q
, prs_struct
*ps
,
2408 void init_lsa_sid_enum(TALLOC_CTX
*mem_ctx
, LSA_SID_ENUM
*sen
,
2409 int num_entries
, DOM_SID
*sids
);
2410 void init_q_lookup_sids(TALLOC_CTX
*mem_ctx
, LSA_Q_LOOKUP_SIDS
*q_l
,
2411 POLICY_HND
*hnd
, int num_sids
, DOM_SID
*sids
,
2413 BOOL
lsa_io_q_lookup_sids(char *desc
, LSA_Q_LOOKUP_SIDS
*q_s
, prs_struct
*ps
,
2415 BOOL
lsa_io_r_lookup_sids(char *desc
, LSA_R_LOOKUP_SIDS
*r_s
,
2416 prs_struct
*ps
, int depth
);
2417 void init_q_lookup_names(TALLOC_CTX
*mem_ctx
, LSA_Q_LOOKUP_NAMES
*q_l
,
2418 POLICY_HND
*hnd
, int num_names
, char **names
);
2419 BOOL
lsa_io_q_lookup_names(char *desc
, LSA_Q_LOOKUP_NAMES
*q_r
,
2420 prs_struct
*ps
, int depth
);
2421 BOOL
lsa_io_r_lookup_names(char *desc
, LSA_R_LOOKUP_NAMES
*r_r
,
2422 prs_struct
*ps
, int depth
);
2423 void init_lsa_q_close(LSA_Q_CLOSE
*q_c
, POLICY_HND
*hnd
);
2424 BOOL
lsa_io_q_close(char *desc
, LSA_Q_CLOSE
*q_c
, prs_struct
*ps
, int depth
);
2425 BOOL
lsa_io_r_close(char *desc
, LSA_R_CLOSE
*r_c
, prs_struct
*ps
, int depth
);
2426 BOOL
lsa_io_q_open_secret(char *desc
, LSA_Q_OPEN_SECRET
*q_c
, prs_struct
*ps
, int depth
);
2427 BOOL
lsa_io_r_open_secret(char *desc
, LSA_R_OPEN_SECRET
*r_c
, prs_struct
*ps
, int depth
);
2429 /*The following definitions come from rpc_parse/parse_misc.c */
2431 TALLOC_CTX
*get_current_rpc_talloc(void);
2432 void set_current_rpc_talloc( TALLOC_CTX
*ctx
);
2433 void main_loop_talloc_free(void);
2434 TALLOC_CTX
*main_loop_talloc_get(void);
2435 TALLOC_CTX
*get_talloc_ctx(void);
2436 BOOL
smb_io_time(char *desc
, NTTIME
*nttime
, prs_struct
*ps
, int depth
);
2437 BOOL
smb_io_lookup_level(char *desc
, LOOKUP_LEVEL
*level
, prs_struct
*ps
, int depth
);
2438 uint32
get_enum_hnd(ENUM_HND
*enh
);
2439 void init_enum_hnd(ENUM_HND
*enh
, uint32 hnd
);
2440 BOOL
smb_io_enum_hnd(char *desc
, ENUM_HND
*hnd
, prs_struct
*ps
, int depth
);
2441 BOOL
smb_io_dom_sid(char *desc
, DOM_SID
*sid
, prs_struct
*ps
, int depth
);
2442 void init_dom_sid(DOM_SID
*sid
, char *str_sid
);
2443 void init_dom_sid2(DOM_SID2
*sid2
, DOM_SID
*sid
);
2444 BOOL
smb_io_dom_sid2(char *desc
, DOM_SID2
*sid
, prs_struct
*ps
, int depth
);
2445 void init_str_hdr(STRHDR
*hdr
, int max_len
, int len
, uint32 buffer
);
2446 BOOL
smb_io_strhdr(char *desc
, STRHDR
*hdr
, prs_struct
*ps
, int depth
);
2447 void init_uni_hdr(UNIHDR
*hdr
, int len
);
2448 BOOL
smb_io_unihdr(char *desc
, UNIHDR
*hdr
, prs_struct
*ps
, int depth
);
2449 void init_buf_hdr(BUFHDR
*hdr
, int max_len
, int len
);
2450 BOOL
smb_io_hdrbuf_pre(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
, uint32
*offset
);
2451 BOOL
smb_io_hdrbuf_post(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
,
2452 uint32 ptr_hdrbuf
, uint32 max_len
, uint32 len
);
2453 BOOL
smb_io_hdrbuf(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
);
2454 void init_uni_hdr2(UNIHDR2
*hdr
, int len
);
2455 BOOL
smb_io_unihdr2(char *desc
, UNIHDR2
*hdr2
, prs_struct
*ps
, int depth
);
2456 void init_unistr(UNISTR
*str
, const char *buf
);
2457 BOOL
smb_io_unistr(char *desc
, UNISTR
*uni
, prs_struct
*ps
, int depth
);
2458 void init_buffer3_uint32(BUFFER3
*str
, uint32 val
);
2459 void init_buffer3_str(BUFFER3
*str
, char *buf
, int len
);
2460 void init_buffer3_hex(BUFFER3
*str
, char *buf
);
2461 void init_buffer3_bytes(BUFFER3
*str
, uint8
*buf
, int len
);
2462 BOOL
smb_io_buffer3(char *desc
, BUFFER3
*buf3
, prs_struct
*ps
, int depth
);
2463 BOOL
smb_io_buffer5(char *desc
, BUFFER5
*buf5
, prs_struct
*ps
, int depth
);
2464 void init_buffer2(BUFFER2
*str
, uint8
*buf
, int len
);
2465 BOOL
smb_io_buffer2(char *desc
, BUFFER2
*buf2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2466 void init_buf_unistr2(UNISTR2
*str
, uint32
*ptr
, const char *buf
);
2467 void copy_unistr2(UNISTR2
*str
, UNISTR2
*from
);
2468 void init_string2(STRING2
*str
, char *buf
, int len
);
2469 BOOL
smb_io_string2(char *desc
, STRING2
*str2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2470 void init_unistr2(UNISTR2
*str
, const char *buf
, size_t len
);
2471 void init_unistr2_from_unistr (UNISTR2
*to
, UNISTR
*from
);
2472 BOOL
smb_io_unistr2(char *desc
, UNISTR2
*uni2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2473 void init_dom_rid2(DOM_RID2
*rid2
, uint32 rid
, uint8 type
, uint32 idx
);
2474 BOOL
smb_io_dom_rid2(char *desc
, DOM_RID2
*rid2
, prs_struct
*ps
, int depth
);
2475 void init_dom_rid3(DOM_RID3
*rid3
, uint32 rid
, uint8 type
);
2476 BOOL
smb_io_dom_rid3(char *desc
, DOM_RID3
*rid3
, prs_struct
*ps
, int depth
);
2477 void init_dom_rid4(DOM_RID4
*rid4
, uint16 unknown
, uint16 attr
, uint32 rid
);
2478 void init_log_info(DOM_LOG_INFO
*log
, char *logon_srv
, char *acct_name
,
2479 uint16 sec_chan
, char *comp_name
);
2480 BOOL
smb_io_log_info(char *desc
, DOM_LOG_INFO
*log
, prs_struct
*ps
, int depth
);
2481 BOOL
smb_io_chal(char *desc
, DOM_CHAL
*chal
, prs_struct
*ps
, int depth
);
2482 BOOL
smb_io_cred(char *desc
, DOM_CRED
*cred
, prs_struct
*ps
, int depth
);
2483 void init_clnt_info2(DOM_CLNT_INFO2
*clnt
,
2484 char *logon_srv
, char *comp_name
,
2485 DOM_CRED
*clnt_cred
);
2486 BOOL
smb_io_clnt_info2(char *desc
, DOM_CLNT_INFO2
*clnt
, prs_struct
*ps
, int depth
);
2487 void init_clnt_info(DOM_CLNT_INFO
*clnt
,
2488 char *logon_srv
, char *acct_name
,
2489 uint16 sec_chan
, char *comp_name
,
2491 BOOL
smb_io_clnt_info(char *desc
, DOM_CLNT_INFO
*clnt
, prs_struct
*ps
, int depth
);
2492 void init_logon_id(DOM_LOGON_ID
*log
, uint32 log_id_low
, uint32 log_id_high
);
2493 BOOL
smb_io_logon_id(char *desc
, DOM_LOGON_ID
*log
, prs_struct
*ps
, int depth
);
2494 void init_owf_info(OWF_INFO
*hash
, uint8 data
[16]);
2495 BOOL
smb_io_owf_info(char *desc
, OWF_INFO
*hash
, prs_struct
*ps
, int depth
);
2496 BOOL
smb_io_gid(char *desc
, DOM_GID
*gid
, prs_struct
*ps
, int depth
);
2497 BOOL
smb_io_pol_hnd(char *desc
, POLICY_HND
*pol
, prs_struct
*ps
, int depth
);
2498 void init_unistr3(UNISTR3
*str
, const char *buf
);
2499 BOOL
smb_io_unistr3(char *desc
, UNISTR3
*name
, prs_struct
*ps
, int depth
);
2500 BOOL
prs_uint64(char *name
, prs_struct
*ps
, int depth
, UINT64_S
*data64
);
2502 /*The following definitions come from rpc_parse/parse_net.c */
2504 BOOL
net_io_q_logon_ctrl2(char *desc
, NET_Q_LOGON_CTRL2
*q_l
, prs_struct
*ps
, int depth
);
2505 void init_net_q_logon_ctrl2(NET_Q_LOGON_CTRL2
*q_l
, char *srv_name
,
2506 uint32 query_level
);
2507 void init_net_r_logon_ctrl2(NET_R_LOGON_CTRL2
*r_l
, uint32 query_level
,
2508 uint32 flags
, uint32 pdc_status
,
2509 uint32 logon_attempts
, uint32 tc_status
,
2510 char *trusted_domain_name
);
2511 BOOL
net_io_r_logon_ctrl2(char *desc
, NET_R_LOGON_CTRL2
*r_l
, prs_struct
*ps
, int depth
);
2512 BOOL
net_io_q_logon_ctrl(char *desc
, NET_Q_LOGON_CTRL
*q_l
, prs_struct
*ps
,
2514 void init_net_q_logon_ctrl(NET_Q_LOGON_CTRL
*q_l
, char *srv_name
,
2515 uint32 query_level
);
2516 void init_net_r_logon_ctrl(NET_R_LOGON_CTRL
*r_l
, uint32 query_level
,
2517 uint32 flags
, uint32 pdc_status
);
2518 BOOL
net_io_r_logon_ctrl(char *desc
, NET_R_LOGON_CTRL
*r_l
, prs_struct
*ps
,
2520 void init_r_trust_dom(NET_R_TRUST_DOM_LIST
*r_t
,
2521 uint32 num_doms
, char *dom_name
);
2522 BOOL
net_io_r_trust_dom(char *desc
, NET_R_TRUST_DOM_LIST
*r_t
, prs_struct
*ps
, int depth
);
2523 BOOL
net_io_q_trust_dom(char *desc
, NET_Q_TRUST_DOM_LIST
*q_l
, prs_struct
*ps
, int depth
);
2524 void init_q_req_chal(NET_Q_REQ_CHAL
*q_c
,
2525 char *logon_srv
, char *logon_clnt
,
2526 DOM_CHAL
*clnt_chal
);
2527 BOOL
net_io_q_req_chal(char *desc
, NET_Q_REQ_CHAL
*q_c
, prs_struct
*ps
, int depth
);
2528 BOOL
net_io_r_req_chal(char *desc
, NET_R_REQ_CHAL
*r_c
, prs_struct
*ps
, int depth
);
2529 BOOL
net_io_q_auth(char *desc
, NET_Q_AUTH
*q_a
, prs_struct
*ps
, int depth
);
2530 BOOL
net_io_r_auth(char *desc
, NET_R_AUTH
*r_a
, prs_struct
*ps
, int depth
);
2531 void init_q_auth_2(NET_Q_AUTH_2
*q_a
,
2532 char *logon_srv
, char *acct_name
, uint16 sec_chan
, char *comp_name
,
2533 DOM_CHAL
*clnt_chal
, uint32 clnt_flgs
);
2534 BOOL
net_io_q_auth_2(char *desc
, NET_Q_AUTH_2
*q_a
, prs_struct
*ps
, int depth
);
2535 BOOL
net_io_r_auth_2(char *desc
, NET_R_AUTH_2
*r_a
, prs_struct
*ps
, int depth
);
2536 void init_q_srv_pwset(NET_Q_SRV_PWSET
*q_s
, char *logon_srv
, char *acct_name
,
2537 uint16 sec_chan
, char *comp_name
, DOM_CRED
*cred
, char nt_cypher
[16]);
2538 BOOL
net_io_q_srv_pwset(char *desc
, NET_Q_SRV_PWSET
*q_s
, prs_struct
*ps
, int depth
);
2539 BOOL
net_io_r_srv_pwset(char *desc
, NET_R_SRV_PWSET
*r_s
, prs_struct
*ps
, int depth
);
2540 void init_id_info1(NET_ID_INFO_1
*id
, char *domain_name
,
2541 uint32 param_ctrl
, uint32 log_id_low
, uint32 log_id_high
,
2542 char *user_name
, char *wksta_name
,
2544 unsigned char lm_cypher
[16], unsigned char nt_cypher
[16]);
2545 void init_id_info2(NET_ID_INFO_2
*id
, char *domain_name
,
2546 uint32 param_ctrl
, uint32 log_id_low
, uint32 log_id_high
,
2547 char *user_name
, char *wksta_name
,
2548 unsigned char lm_challenge
[8],
2549 unsigned char *lm_chal_resp
,
2550 unsigned char *nt_chal_resp
);
2551 void init_sam_info(DOM_SAM_INFO
*sam
,
2552 char *logon_srv
, char *comp_name
, DOM_CRED
*clnt_cred
,
2553 DOM_CRED
*rtn_cred
, uint16 logon_level
,
2554 NET_ID_INFO_CTR
*ctr
);
2555 void init_net_user_info3(TALLOC_CTX
*ctx
,
2556 NET_USER_INFO_3
*usr
,
2558 NTTIME
*logoff_time
,
2559 NTTIME
*kickoff_time
,
2560 NTTIME
*pass_last_set_time
,
2561 NTTIME
*pass_can_change_time
,
2562 NTTIME
*pass_must_change_time
,
2572 uint16 bad_pw_count
,
2587 BOOL
net_io_q_sam_logon(char *desc
, NET_Q_SAM_LOGON
*q_l
, prs_struct
*ps
, int depth
);
2588 BOOL
net_io_r_sam_logon(char *desc
, NET_R_SAM_LOGON
*r_l
, prs_struct
*ps
, int depth
);
2589 BOOL
net_io_q_sam_logoff(char *desc
, NET_Q_SAM_LOGOFF
*q_l
, prs_struct
*ps
, int depth
);
2590 BOOL
net_io_r_sam_logoff(char *desc
, NET_R_SAM_LOGOFF
*r_l
, prs_struct
*ps
, int depth
);
2592 /*The following definitions come from rpc_parse/parse_prs.c */
2594 void prs_dump(char *name
, int v
, prs_struct
*ps
);
2595 void prs_debug(prs_struct
*ps
, int depth
, char *desc
, char *fn_name
);
2596 BOOL
prs_init(prs_struct
*ps
, uint32 size
, TALLOC_CTX
*ctx
, BOOL io
);
2597 BOOL
prs_read(prs_struct
*ps
, int fd
, size_t len
, int timeout
);
2598 void prs_mem_free(prs_struct
*ps
);
2599 char *prs_alloc_mem(prs_struct
*ps
, size_t size
);
2600 TALLOC_CTX
*prs_get_mem_context(prs_struct
*ps
);
2601 void prs_give_memory(prs_struct
*ps
, char *buf
, uint32 size
, BOOL is_dynamic
);
2602 char *prs_take_memory(prs_struct
*ps
, uint32
*psize
);
2603 BOOL
prs_set_buffer_size(prs_struct
*ps
, uint32 newsize
);
2604 BOOL
prs_grow(prs_struct
*ps
, uint32 extra_space
);
2605 BOOL
prs_force_grow(prs_struct
*ps
, uint32 extra_space
);
2606 char *prs_data_p(prs_struct
*ps
);
2607 uint32
prs_data_size(prs_struct
*ps
);
2608 uint32
prs_offset(prs_struct
*ps
);
2609 BOOL
prs_set_offset(prs_struct
*ps
, uint32 offset
);
2610 BOOL
prs_append_prs_data(prs_struct
*dst
, prs_struct
*src
);
2611 BOOL
prs_append_some_prs_data(prs_struct
*dst
, prs_struct
*src
, int32 start
, uint32 len
);
2612 BOOL
prs_append_data(prs_struct
*dst
, char *src
, uint32 len
);
2613 void prs_set_endian_data(prs_struct
*ps
, BOOL endian
);
2614 BOOL
prs_align(prs_struct
*ps
);
2615 BOOL
prs_align_needed(prs_struct
*ps
, uint32 needed
);
2616 char *prs_mem_get(prs_struct
*ps
, uint32 extra_size
);
2617 void prs_switch_type(prs_struct
*ps
, BOOL io
);
2618 void prs_force_dynamic(prs_struct
*ps
);
2619 BOOL
prs_uint8(char *name
, prs_struct
*ps
, int depth
, uint8
*data8
);
2620 BOOL
prs_uint16(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
);
2621 BOOL
prs_uint32(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
);
2622 BOOL
prs_uint8s(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint8
*data8s
, int len
);
2623 BOOL
prs_uint16s(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint16
*data16s
, int len
);
2624 BOOL
prs_uint16uni(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint16
*data16s
, int len
);
2625 BOOL
prs_uint32s(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint32
*data32s
, int len
);
2626 BOOL
prs_buffer5(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, BUFFER5
*str
);
2627 BOOL
prs_buffer2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, BUFFER2
*str
);
2628 BOOL
prs_string2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, STRING2
*str
);
2629 BOOL
prs_unistr2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, UNISTR2
*str
);
2630 BOOL
prs_unistr3(BOOL charmode
, char *name
, UNISTR3
*str
, prs_struct
*ps
, int depth
);
2631 BOOL
prs_unistr(char *name
, prs_struct
*ps
, int depth
, UNISTR
*str
);
2632 BOOL
prs_string(char *name
, prs_struct
*ps
, int depth
, char *str
, int len
, int max_buf_size
);
2633 BOOL
prs_uint16_pre(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
, uint32
*offset
);
2634 BOOL
prs_uint16_post(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
,
2635 uint32 ptr_uint16
, uint32 start_offset
);
2636 BOOL
prs_uint32_pre(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
, uint32
*offset
);
2637 BOOL
prs_uint32_post(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
,
2638 uint32 ptr_uint32
, uint32 data_size
);
2639 int tdb_prs_store(TDB_CONTEXT
*tdb
, char *keystr
, prs_struct
*ps
);
2640 int tdb_prs_fetch(TDB_CONTEXT
*tdb
, char *keystr
, prs_struct
*ps
, TALLOC_CTX
*mem_ctx
);
2642 /*The following definitions come from rpc_parse/parse_reg.c */
2644 void init_reg_q_open_hklm(REG_Q_OPEN_HKLM
*q_o
,
2645 uint16 unknown_0
, uint32 level
);
2646 BOOL
reg_io_q_open_hklm(char *desc
, REG_Q_OPEN_HKLM
*r_q
, prs_struct
*ps
, int depth
);
2647 BOOL
reg_io_r_open_hklm(char *desc
, REG_R_OPEN_HKLM
*r_r
, prs_struct
*ps
, int depth
);
2648 void init_reg_q_flush_key(REG_Q_FLUSH_KEY
*q_u
, POLICY_HND
*pol
);
2649 BOOL
reg_io_q_flush_key(char *desc
, REG_Q_FLUSH_KEY
*r_q
, prs_struct
*ps
, int depth
);
2650 BOOL
reg_io_r_flush_key(char *desc
, REG_R_FLUSH_KEY
*r_r
, prs_struct
*ps
, int depth
);
2651 void init_reg_q_create_key(REG_Q_CREATE_KEY
*q_c
, POLICY_HND
*hnd
,
2652 char *name
, char *class, SEC_ACCESS
*sam_access
,
2653 SEC_DESC_BUF
*sec_buf
);
2654 BOOL
reg_io_q_create_key(char *desc
, REG_Q_CREATE_KEY
*r_q
, prs_struct
*ps
, int depth
);
2655 BOOL
reg_io_r_create_key(char *desc
, REG_R_CREATE_KEY
*r_r
, prs_struct
*ps
, int depth
);
2656 void init_reg_q_delete_val(REG_Q_DELETE_VALUE
*q_c
, POLICY_HND
*hnd
,
2658 BOOL
reg_io_q_delete_val(char *desc
, REG_Q_DELETE_VALUE
*r_q
, prs_struct
*ps
, int depth
);
2659 BOOL
reg_io_r_delete_val(char *desc
, REG_R_DELETE_VALUE
*r_r
, prs_struct
*ps
, int depth
);
2660 void init_reg_q_delete_key(REG_Q_DELETE_KEY
*q_c
, POLICY_HND
*hnd
,
2662 BOOL
reg_io_q_delete_key(char *desc
, REG_Q_DELETE_KEY
*r_q
, prs_struct
*ps
, int depth
);
2663 BOOL
reg_io_r_delete_key(char *desc
, REG_R_DELETE_KEY
*r_r
, prs_struct
*ps
, int depth
);
2664 void init_reg_q_query_key(REG_Q_QUERY_KEY
*q_o
, POLICY_HND
*hnd
,
2665 uint32 max_class_len
);
2666 BOOL
reg_io_q_query_key(char *desc
, REG_Q_QUERY_KEY
*r_q
, prs_struct
*ps
, int depth
);
2667 BOOL
reg_io_r_query_key(char *desc
, REG_R_QUERY_KEY
*r_r
, prs_struct
*ps
, int depth
);
2668 void init_reg_q_unk_1a(REG_Q_UNK_1A
*q_o
, POLICY_HND
*hnd
);
2669 BOOL
reg_io_q_unk_1a(char *desc
, REG_Q_UNK_1A
*r_q
, prs_struct
*ps
, int depth
);
2670 BOOL
reg_io_r_unk_1a(char *desc
, REG_R_UNK_1A
*r_r
, prs_struct
*ps
, int depth
);
2671 void init_reg_q_open_hku(REG_Q_OPEN_HKU
*q_o
,
2672 uint16 unknown_0
, uint32 level
);
2673 BOOL
reg_io_q_open_hku(char *desc
, REG_Q_OPEN_HKU
*r_q
, prs_struct
*ps
, int depth
);
2674 BOOL
reg_io_r_open_hku(char *desc
, REG_R_OPEN_HKU
*r_r
, prs_struct
*ps
, int depth
);
2675 void init_reg_q_close(REG_Q_CLOSE
*q_c
, POLICY_HND
*hnd
);
2676 BOOL
reg_io_q_close(char *desc
, REG_Q_CLOSE
*q_u
, prs_struct
*ps
, int depth
);
2677 BOOL
reg_io_r_close(char *desc
, REG_R_CLOSE
*r_u
, prs_struct
*ps
, int depth
);
2678 void init_reg_q_set_key_sec(REG_Q_SET_KEY_SEC
*q_i
, POLICY_HND
*pol
, SEC_DESC_BUF
*sec_desc_buf
);
2679 BOOL
reg_io_q_set_key_sec(char *desc
, REG_Q_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2680 BOOL
reg_io_r_set_key_sec(char *desc
, REG_R_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2681 void init_reg_q_get_key_sec(REG_Q_GET_KEY_SEC
*q_i
, POLICY_HND
*pol
,
2682 uint32 sec_buf_size
, SEC_DESC_BUF
*psdb
);
2683 BOOL
reg_io_q_get_key_sec(char *desc
, REG_Q_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2684 BOOL
reg_io_r_get_key_sec(char *desc
, REG_R_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
2685 BOOL
init_reg_q_info(REG_Q_INFO
*q_i
, POLICY_HND
*pol
, char* val_name
);
2686 BOOL
reg_io_q_info(char *desc
, REG_Q_INFO
*r_q
, prs_struct
*ps
, int depth
);
2687 BOOL
init_reg_r_info(uint32 include_keyval
, REG_R_INFO
*r_r
,
2688 BUFFER2
* buf
, uint32 type
, uint32 status
);
2689 BOOL
reg_io_r_info(char *desc
, REG_R_INFO
*r_r
, prs_struct
*ps
, int depth
);
2690 void init_reg_q_enum_val(REG_Q_ENUM_VALUE
*q_i
, POLICY_HND
*pol
,
2691 uint32 val_idx
, uint32 max_val_len
,
2692 uint32 max_buf_len
);
2693 BOOL
reg_io_q_enum_val(char *desc
, REG_Q_ENUM_VALUE
*q_q
, prs_struct
*ps
, int depth
);
2694 BOOL
reg_io_r_enum_val(char *desc
, REG_R_ENUM_VALUE
*r_q
, prs_struct
*ps
, int depth
);
2695 void init_reg_q_create_val(REG_Q_CREATE_VALUE
*q_i
, POLICY_HND
*pol
,
2696 char *val_name
, uint32 type
,
2698 BOOL
reg_io_q_create_val(char *desc
, REG_Q_CREATE_VALUE
*q_q
, prs_struct
*ps
, int depth
);
2699 BOOL
reg_io_r_create_val(char *desc
, REG_R_CREATE_VALUE
*r_q
, prs_struct
*ps
, int depth
);
2700 void init_reg_q_enum_key(REG_Q_ENUM_KEY
*q_i
, POLICY_HND
*pol
, uint32 key_idx
);
2701 BOOL
reg_io_q_enum_key(char *desc
, REG_Q_ENUM_KEY
*q_q
, prs_struct
*ps
, int depth
);
2702 BOOL
reg_io_r_enum_key(char *desc
, REG_R_ENUM_KEY
*r_q
, prs_struct
*ps
, int depth
);
2703 void init_reg_q_open_entry(REG_Q_OPEN_ENTRY
*r_q
, POLICY_HND
*pol
,
2704 char *key_name
, uint32 unk
);
2705 BOOL
reg_io_q_open_entry(char *desc
, REG_Q_OPEN_ENTRY
*r_q
, prs_struct
*ps
, int depth
);
2706 void init_reg_r_open_entry(REG_R_OPEN_ENTRY
*r_r
,
2707 POLICY_HND
*pol
, uint32 status
);
2708 BOOL
reg_io_r_open_entry(char *desc
, REG_R_OPEN_ENTRY
*r_r
, prs_struct
*ps
, int depth
);
2710 /*The following definitions come from rpc_parse/parse_rpc.c */
2712 void init_rpc_hdr(RPC_HDR
*hdr
, enum RPC_PKT_TYPE pkt_type
, uint8 flags
,
2713 uint32 call_id
, int data_len
, int auth_len
);
2714 BOOL
smb_io_rpc_hdr(char *desc
, RPC_HDR
*rpc
, prs_struct
*ps
, int depth
);
2715 void init_rpc_hdr_rb(RPC_HDR_RB
*rpc
,
2716 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
2717 uint32 num_elements
, uint16 context_id
, uint8 num_syntaxes
,
2718 RPC_IFACE
*abstract
, RPC_IFACE
*transfer
);
2719 BOOL
smb_io_rpc_hdr_rb(char *desc
, RPC_HDR_RB
*rpc
, prs_struct
*ps
, int depth
);
2720 void init_rpc_hdr_ba(RPC_HDR_BA
*rpc
,
2721 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
2723 uint8 num_results
, uint16 result
, uint16 reason
,
2724 RPC_IFACE
*transfer
);
2725 BOOL
smb_io_rpc_hdr_ba(char *desc
, RPC_HDR_BA
*rpc
, prs_struct
*ps
, int depth
);
2726 void init_rpc_hdr_req(RPC_HDR_REQ
*hdr
, uint32 alloc_hint
, uint16 opnum
);
2727 BOOL
smb_io_rpc_hdr_req(char *desc
, RPC_HDR_REQ
*rpc
, prs_struct
*ps
, int depth
);
2728 BOOL
smb_io_rpc_hdr_resp(char *desc
, RPC_HDR_RESP
*rpc
, prs_struct
*ps
, int depth
);
2729 BOOL
smb_io_rpc_hdr_fault(char *desc
, RPC_HDR_FAULT
*rpc
, prs_struct
*ps
, int depth
);
2730 void init_rpc_hdr_autha(RPC_HDR_AUTHA
*rai
,
2731 uint16 max_tsize
, uint16 max_rsize
,
2732 uint8 auth_type
, uint8 auth_level
,
2733 uint8 stub_type_len
);
2734 BOOL
smb_io_rpc_hdr_autha(char *desc
, RPC_HDR_AUTHA
*rai
, prs_struct
*ps
, int depth
);
2735 BOOL
rpc_hdr_auth_chk(RPC_HDR_AUTH
*rai
);
2736 void init_rpc_hdr_auth(RPC_HDR_AUTH
*rai
,
2737 uint8 auth_type
, uint8 auth_level
,
2738 uint8 stub_type_len
,
2740 BOOL
smb_io_rpc_hdr_auth(char *desc
, RPC_HDR_AUTH
*rai
, prs_struct
*ps
, int depth
);
2741 BOOL
rpc_auth_verifier_chk(RPC_AUTH_VERIFIER
*rav
,
2742 char *signature
, uint32 msg_type
);
2743 void init_rpc_auth_verifier(RPC_AUTH_VERIFIER
*rav
,
2744 char *signature
, uint32 msg_type
);
2745 BOOL
smb_io_rpc_auth_verifier(char *desc
, RPC_AUTH_VERIFIER
*rav
, prs_struct
*ps
, int depth
);
2746 void init_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG
*neg
,
2748 fstring myname
, fstring domain
);
2749 BOOL
smb_io_rpc_auth_ntlmssp_neg(char *desc
, RPC_AUTH_NTLMSSP_NEG
*neg
, prs_struct
*ps
, int depth
);
2750 void init_rpc_auth_ntlmssp_chal(RPC_AUTH_NTLMSSP_CHAL
*chl
,
2752 uint8 challenge
[8]);
2753 BOOL
smb_io_rpc_auth_ntlmssp_chal(char *desc
, RPC_AUTH_NTLMSSP_CHAL
*chl
, prs_struct
*ps
, int depth
);
2754 void init_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP
*rsp
,
2755 uchar lm_resp
[24], uchar nt_resp
[24],
2756 char *domain
, char *user
, char *wks
,
2758 BOOL
smb_io_rpc_auth_ntlmssp_resp(char *desc
, RPC_AUTH_NTLMSSP_RESP
*rsp
, prs_struct
*ps
, int depth
);
2759 BOOL
rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
, uint32 crc32
, uint32 seq_num
);
2760 void init_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
,
2761 uint32 ver
, uint32 crc32
, uint32 seq_num
);
2762 BOOL
smb_io_rpc_auth_ntlmssp_chk(char *desc
, RPC_AUTH_NTLMSSP_CHK
*chk
, prs_struct
*ps
, int depth
);
2764 /*The following definitions come from rpc_parse/parse_samr.c */
2766 void init_samr_q_close_hnd(SAMR_Q_CLOSE_HND
* q_c
, POLICY_HND
*hnd
);
2767 BOOL
samr_io_q_close_hnd(char *desc
, SAMR_Q_CLOSE_HND
* q_u
,
2768 prs_struct
*ps
, int depth
);
2769 BOOL
samr_io_r_close_hnd(char *desc
, SAMR_R_CLOSE_HND
* r_u
,
2770 prs_struct
*ps
, int depth
);
2771 void init_samr_q_lookup_domain(SAMR_Q_LOOKUP_DOMAIN
* q_u
,
2772 POLICY_HND
*pol
, char *dom_name
);
2773 BOOL
samr_io_q_lookup_domain(char *desc
, SAMR_Q_LOOKUP_DOMAIN
* q_u
,
2774 prs_struct
*ps
, int depth
);
2775 void init_samr_r_lookup_domain(SAMR_R_LOOKUP_DOMAIN
* r_u
,
2776 DOM_SID
*dom_sid
, uint32 status
);
2777 BOOL
samr_io_r_lookup_domain(char *desc
, SAMR_R_LOOKUP_DOMAIN
* r_u
,
2778 prs_struct
*ps
, int depth
);
2779 void init_samr_q_unknown_2d(SAMR_Q_UNKNOWN_2D
* q_u
, POLICY_HND
*dom_pol
, DOM_SID
*sid
);
2780 BOOL
samr_io_q_unknown_2d(char *desc
, SAMR_Q_UNKNOWN_2D
* q_u
,
2781 prs_struct
*ps
, int depth
);
2782 BOOL
samr_io_r_unknown_2d(char *desc
, SAMR_R_UNKNOWN_2D
* r_u
,
2783 prs_struct
*ps
, int depth
);
2784 void init_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN
* q_u
,
2785 POLICY_HND
*pol
, uint32 flags
,
2787 BOOL
samr_io_q_open_domain(char *desc
, SAMR_Q_OPEN_DOMAIN
* q_u
,
2788 prs_struct
*ps
, int depth
);
2789 BOOL
samr_io_r_open_domain(char *desc
, SAMR_R_OPEN_DOMAIN
* r_u
,
2790 prs_struct
*ps
, int depth
);
2791 void init_samr_q_get_usrdom_pwinfo(SAMR_Q_GET_USRDOM_PWINFO
* q_u
,
2792 POLICY_HND
*user_pol
);
2793 BOOL
samr_io_q_get_usrdom_pwinfo(char *desc
, SAMR_Q_GET_USRDOM_PWINFO
* q_u
,
2794 prs_struct
*ps
, int depth
);
2795 void init_samr_r_get_usrdom_pwinfo(SAMR_R_GET_USRDOM_PWINFO
*r_u
, uint32 status
);
2796 BOOL
samr_io_r_get_usrdom_pwinfo(char *desc
, SAMR_R_GET_USRDOM_PWINFO
* r_u
,
2797 prs_struct
*ps
, int depth
);
2798 void init_samr_q_query_sec_obj(SAMR_Q_QUERY_SEC_OBJ
* q_u
,
2799 POLICY_HND
*user_pol
, uint32 sec_info
);
2800 BOOL
samr_io_q_query_sec_obj(char *desc
, SAMR_Q_QUERY_SEC_OBJ
* q_u
,
2801 prs_struct
*ps
, int depth
);
2802 void init_samr_q_query_dom_info(SAMR_Q_QUERY_DOMAIN_INFO
* q_u
,
2803 POLICY_HND
*domain_pol
, uint16 switch_value
);
2804 BOOL
samr_io_q_query_dom_info(char *desc
, SAMR_Q_QUERY_DOMAIN_INFO
* q_u
,
2805 prs_struct
*ps
, int depth
);
2806 void init_unk_info3(SAM_UNK_INFO_3
* u_3
);
2807 void init_unk_info6(SAM_UNK_INFO_6
* u_6
);
2808 void init_unk_info7(SAM_UNK_INFO_7
* u_7
);
2809 void init_unk_info12(SAM_UNK_INFO_12
* u_12
);
2810 void init_unk_info2(SAM_UNK_INFO_2
* u_2
,
2811 char *domain
, char *server
,
2813 void init_unk_info1(SAM_UNK_INFO_1
* u_1
);
2814 void init_samr_r_query_dom_info(SAMR_R_QUERY_DOMAIN_INFO
* r_u
,
2815 uint16 switch_value
, SAM_UNK_CTR
* ctr
,
2817 BOOL
samr_io_r_query_dom_info(char *desc
, SAMR_R_QUERY_DOMAIN_INFO
* r_u
,
2818 prs_struct
*ps
, int depth
);
2819 BOOL
samr_io_r_query_sec_obj(char *desc
, SAMR_R_QUERY_SEC_OBJ
* r_u
,
2820 prs_struct
*ps
, int depth
);
2821 void init_sam_entry(SAM_ENTRY
* sam
, uint32 len_sam_name
, uint32 rid
);
2822 void init_samr_q_enum_dom_users(SAMR_Q_ENUM_DOM_USERS
* q_e
, POLICY_HND
*pol
,
2824 uint16 acb_mask
, uint16 unk_1
, uint32 size
);
2825 BOOL
samr_io_q_enum_dom_users(char *desc
, SAMR_Q_ENUM_DOM_USERS
* q_e
,
2826 prs_struct
*ps
, int depth
);
2827 void init_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS
* r_u
,
2828 uint32 next_idx
, uint32 num_sam_entries
);
2829 BOOL
samr_io_r_enum_dom_users(char *desc
, SAMR_R_ENUM_DOM_USERS
* r_u
,
2830 prs_struct
*ps
, int depth
);
2831 void init_samr_q_query_dispinfo(SAMR_Q_QUERY_DISPINFO
* q_e
, POLICY_HND
*pol
,
2832 uint16 switch_level
, uint32 start_idx
,
2833 uint32 max_entries
);
2834 BOOL
samr_io_q_query_dispinfo(char *desc
, SAMR_Q_QUERY_DISPINFO
* q_e
,
2835 prs_struct
*ps
, int depth
);
2836 void init_sam_dispinfo_1(SAM_DISPINFO_1
* sam
, uint32
*num_entries
,
2837 uint32
*data_size
, uint32 start_idx
,
2838 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
2839 void init_sam_dispinfo_2(SAM_DISPINFO_2
* sam
, uint32
*num_entries
,
2840 uint32
*data_size
, uint32 start_idx
,
2841 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
2842 void init_sam_dispinfo_3(SAM_DISPINFO_3
* sam
, uint32
*num_entries
,
2843 uint32
*data_size
, uint32 start_idx
,
2845 void init_sam_dispinfo_4(SAM_DISPINFO_4
* sam
, uint32
*num_entries
,
2846 uint32
*data_size
, uint32 start_idx
,
2847 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
2848 void init_sam_dispinfo_5(SAM_DISPINFO_5
* sam
, uint32
*num_entries
,
2849 uint32
*data_size
, uint32 start_idx
,
2851 void init_samr_r_query_dispinfo(SAMR_R_QUERY_DISPINFO
* r_u
,
2852 uint32 num_entries
, uint32 data_size
,
2853 uint16 switch_level
, SAM_DISPINFO_CTR
* ctr
,
2855 BOOL
samr_io_r_query_dispinfo(char *desc
, SAMR_R_QUERY_DISPINFO
* r_u
,
2856 prs_struct
*ps
, int depth
);
2857 void init_samr_q_open_group(SAMR_Q_OPEN_GROUP
* q_c
,
2859 uint32 access_mask
, uint32 rid
);
2860 BOOL
samr_io_q_open_group(char *desc
, SAMR_Q_OPEN_GROUP
* q_u
,
2861 prs_struct
*ps
, int depth
);
2862 BOOL
samr_io_r_open_group(char *desc
, SAMR_R_OPEN_GROUP
* r_u
,
2863 prs_struct
*ps
, int depth
);
2864 void init_samr_group_info1(GROUP_INFO1
* gr1
,
2865 char *acct_name
, char *acct_desc
,
2866 uint32 num_members
);
2867 BOOL
samr_io_group_info1(char *desc
, GROUP_INFO1
* gr1
,
2868 prs_struct
*ps
, int depth
);
2869 void init_samr_group_info4(GROUP_INFO4
* gr4
, char *acct_desc
);
2870 BOOL
samr_io_group_info4(char *desc
, GROUP_INFO4
* gr4
,
2871 prs_struct
*ps
, int depth
);
2872 void init_samr_q_create_dom_group(SAMR_Q_CREATE_DOM_GROUP
* q_e
,
2873 POLICY_HND
*pol
, char *acct_desc
,
2874 uint32 access_mask
);
2875 BOOL
samr_io_q_create_dom_group(char *desc
, SAMR_Q_CREATE_DOM_GROUP
* q_e
,
2876 prs_struct
*ps
, int depth
);
2877 BOOL
samr_io_r_create_dom_group(char *desc
, SAMR_R_CREATE_DOM_GROUP
* r_u
,
2878 prs_struct
*ps
, int depth
);
2879 void init_samr_q_delete_dom_group(SAMR_Q_DELETE_DOM_GROUP
* q_c
,
2881 BOOL
samr_io_q_delete_dom_group(char *desc
, SAMR_Q_DELETE_DOM_GROUP
* q_u
,
2882 prs_struct
*ps
, int depth
);
2883 BOOL
samr_io_r_delete_dom_group(char *desc
, SAMR_R_DELETE_DOM_GROUP
* r_u
,
2884 prs_struct
*ps
, int depth
);
2885 void init_samr_q_del_groupmem(SAMR_Q_DEL_GROUPMEM
* q_e
,
2886 POLICY_HND
*pol
, uint32 rid
);
2887 BOOL
samr_io_q_del_groupmem(char *desc
, SAMR_Q_DEL_GROUPMEM
* q_e
,
2888 prs_struct
*ps
, int depth
);
2889 void init_samr_r_del_groupmem(SAMR_R_DEL_GROUPMEM
* r_u
, POLICY_HND
*pol
,
2891 BOOL
samr_io_r_del_groupmem(char *desc
, SAMR_R_DEL_GROUPMEM
* r_u
,
2892 prs_struct
*ps
, int depth
);
2893 void init_samr_q_add_groupmem(SAMR_Q_ADD_GROUPMEM
* q_e
,
2894 POLICY_HND
*pol
, uint32 rid
);
2895 BOOL
samr_io_q_add_groupmem(char *desc
, SAMR_Q_ADD_GROUPMEM
* q_e
,
2896 prs_struct
*ps
, int depth
);
2897 void init_samr_r_add_groupmem(SAMR_R_ADD_GROUPMEM
* r_u
, POLICY_HND
*pol
,
2899 BOOL
samr_io_r_add_groupmem(char *desc
, SAMR_R_ADD_GROUPMEM
* r_u
,
2900 prs_struct
*ps
, int depth
);
2901 void init_samr_q_set_groupinfo(SAMR_Q_SET_GROUPINFO
* q_e
,
2902 POLICY_HND
*pol
, GROUP_INFO_CTR
* ctr
);
2903 BOOL
samr_io_q_set_groupinfo(char *desc
, SAMR_Q_SET_GROUPINFO
* q_e
,
2904 prs_struct
*ps
, int depth
);
2905 void init_samr_r_set_groupinfo(SAMR_R_SET_GROUPINFO
* r_u
, uint32 status
);
2906 BOOL
samr_io_r_set_groupinfo(char *desc
, SAMR_R_SET_GROUPINFO
* r_u
,
2907 prs_struct
*ps
, int depth
);
2908 void init_samr_q_query_groupinfo(SAMR_Q_QUERY_GROUPINFO
* q_e
,
2909 POLICY_HND
*pol
, uint16 switch_level
);
2910 BOOL
samr_io_q_query_groupinfo(char *desc
, SAMR_Q_QUERY_GROUPINFO
* q_e
,
2911 prs_struct
*ps
, int depth
);
2912 void init_samr_r_query_groupinfo(SAMR_R_QUERY_GROUPINFO
* r_u
,
2913 GROUP_INFO_CTR
* ctr
, uint32 status
);
2914 BOOL
samr_io_r_query_groupinfo(char *desc
, SAMR_R_QUERY_GROUPINFO
* r_u
,
2915 prs_struct
*ps
, int depth
);
2916 void init_samr_q_query_groupmem(SAMR_Q_QUERY_GROUPMEM
* q_c
, POLICY_HND
*hnd
);
2917 BOOL
samr_io_q_query_groupmem(char *desc
, SAMR_Q_QUERY_GROUPMEM
* q_u
,
2918 prs_struct
*ps
, int depth
);
2919 void init_samr_r_query_groupmem(SAMR_R_QUERY_GROUPMEM
* r_u
,
2920 uint32 num_entries
, uint32
*rid
,
2921 uint32
*attr
, uint32 status
);
2922 BOOL
samr_io_r_query_groupmem(char *desc
, SAMR_R_QUERY_GROUPMEM
* r_u
,
2923 prs_struct
*ps
, int depth
);
2924 void init_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS
* q_u
,
2926 BOOL
samr_io_q_query_usergroups(char *desc
, SAMR_Q_QUERY_USERGROUPS
* q_u
,
2927 prs_struct
*ps
, int depth
);
2928 void init_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS
* r_u
,
2929 uint32 num_gids
, DOM_GID
* gid
,
2931 BOOL
samr_io_gids(char *desc
, uint32
*num_gids
, DOM_GID
** gid
,
2932 prs_struct
*ps
, int depth
);
2933 BOOL
samr_io_r_query_usergroups(char *desc
, SAMR_R_QUERY_USERGROUPS
* r_u
,
2934 prs_struct
*ps
, int depth
);
2935 void init_samr_q_enum_domains(SAMR_Q_ENUM_DOMAINS
* q_e
,
2937 uint32 start_idx
, uint32 size
);
2938 BOOL
samr_io_q_enum_domains(char *desc
, SAMR_Q_ENUM_DOMAINS
* q_e
,
2939 prs_struct
*ps
, int depth
);
2940 void init_samr_r_enum_domains(SAMR_R_ENUM_DOMAINS
* r_u
,
2941 uint32 next_idx
, uint32 num_sam_entries
);
2942 BOOL
samr_io_r_enum_domains(char *desc
, SAMR_R_ENUM_DOMAINS
* r_u
,
2943 prs_struct
*ps
, int depth
);
2944 void init_samr_q_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS
* q_e
,
2946 uint32 start_idx
, uint32 size
);
2947 BOOL
samr_io_q_enum_dom_groups(char *desc
, SAMR_Q_ENUM_DOM_GROUPS
* q_e
,
2948 prs_struct
*ps
, int depth
);
2949 void init_samr_r_enum_dom_groups(SAMR_R_ENUM_DOM_GROUPS
* r_u
,
2950 uint32 next_idx
, uint32 num_sam_entries
);
2951 BOOL
samr_io_r_enum_dom_groups(char *desc
, SAMR_R_ENUM_DOM_GROUPS
* r_u
,
2952 prs_struct
*ps
, int depth
);
2953 void init_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES
* q_e
,
2954 POLICY_HND
*pol
, uint32 start_idx
,
2956 BOOL
samr_io_q_enum_dom_aliases(char *desc
, SAMR_Q_ENUM_DOM_ALIASES
* q_e
,
2957 prs_struct
*ps
, int depth
);
2958 void init_samr_r_enum_dom_aliases(SAMR_R_ENUM_DOM_ALIASES
*r_u
, uint32 next_idx
, uint32 num_sam_entries
);
2959 BOOL
samr_io_r_enum_dom_aliases(char *desc
, SAMR_R_ENUM_DOM_ALIASES
* r_u
,
2960 prs_struct
*ps
, int depth
);
2961 void init_samr_alias_info3(ALIAS_INFO3
* al3
, char *acct_desc
);
2962 BOOL
samr_io_alias_info3(char *desc
, ALIAS_INFO3
* al3
,
2963 prs_struct
*ps
, int depth
);
2964 BOOL
samr_alias_info_ctr(char *desc
, ALIAS_INFO_CTR
* ctr
,
2965 prs_struct
*ps
, int depth
);
2966 void init_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO
* q_e
,
2967 POLICY_HND
*pol
, uint16 switch_level
);
2968 BOOL
samr_io_q_query_aliasinfo(char *desc
, SAMR_Q_QUERY_ALIASINFO
* q_e
,
2969 prs_struct
*ps
, int depth
);
2970 void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO
* r_u
,
2971 ALIAS_INFO_CTR
* ctr
, uint32 status
);
2972 BOOL
samr_io_r_query_aliasinfo(char *desc
, SAMR_R_QUERY_ALIASINFO
* r_u
,
2973 prs_struct
*ps
, int depth
);
2974 void init_samr_q_set_aliasinfo(SAMR_Q_SET_ALIASINFO
* q_u
,
2975 POLICY_HND
*hnd
, ALIAS_INFO_CTR
* ctr
);
2976 BOOL
samr_io_q_set_aliasinfo(char *desc
, SAMR_Q_SET_ALIASINFO
* q_u
,
2977 prs_struct
*ps
, int depth
);
2978 BOOL
samr_io_r_set_aliasinfo(char *desc
, SAMR_R_SET_ALIASINFO
* r_u
,
2979 prs_struct
*ps
, int depth
);
2980 void init_samr_q_query_useraliases(SAMR_Q_QUERY_USERALIASES
* q_u
,
2983 uint32
*ptr_sid
, DOM_SID2
* sid
);
2984 BOOL
samr_io_q_query_useraliases(char *desc
, SAMR_Q_QUERY_USERALIASES
* q_u
,
2985 prs_struct
*ps
, int depth
);
2986 void init_samr_r_query_useraliases(SAMR_R_QUERY_USERALIASES
* r_u
,
2987 uint32 num_rids
, uint32
*rid
,
2989 BOOL
samr_io_rids(char *desc
, uint32
*num_rids
, uint32
**rid
,
2990 prs_struct
*ps
, int depth
);
2991 BOOL
samr_io_r_query_useraliases(char *desc
, SAMR_R_QUERY_USERALIASES
* r_u
,
2992 prs_struct
*ps
, int depth
);
2993 void init_samr_q_open_alias(SAMR_Q_OPEN_ALIAS
* q_u
, POLICY_HND
*pol
,
2994 uint32 access_mask
, uint32 rid
);
2995 BOOL
samr_io_q_open_alias(char *desc
, SAMR_Q_OPEN_ALIAS
* q_u
,
2996 prs_struct
*ps
, int depth
);
2997 BOOL
samr_io_r_open_alias(char *desc
, SAMR_R_OPEN_ALIAS
* r_u
,
2998 prs_struct
*ps
, int depth
);
2999 void init_samr_q_lookup_rids(TALLOC_CTX
*ctx
, SAMR_Q_LOOKUP_RIDS
* q_u
,
3000 POLICY_HND
*pol
, uint32 flags
,
3001 uint32 num_rids
, uint32
*rid
);
3002 BOOL
samr_io_q_lookup_rids(char *desc
, SAMR_Q_LOOKUP_RIDS
* q_u
,
3003 prs_struct
*ps
, int depth
);
3004 void init_samr_r_lookup_rids(SAMR_R_LOOKUP_RIDS
* r_u
,
3005 uint32 num_names
, UNIHDR
* hdr_name
,
3006 UNISTR2
*uni_name
, uint32
*type
);
3007 BOOL
samr_io_r_lookup_rids(char *desc
, SAMR_R_LOOKUP_RIDS
* r_u
,
3008 prs_struct
*ps
, int depth
);
3009 void init_samr_q_delete_alias(SAMR_Q_DELETE_DOM_ALIAS
* q_u
, POLICY_HND
*hnd
);
3010 BOOL
samr_io_q_delete_alias(char *desc
, SAMR_Q_DELETE_DOM_ALIAS
* q_u
,
3011 prs_struct
*ps
, int depth
);
3012 BOOL
samr_io_r_delete_alias(char *desc
, SAMR_R_DELETE_DOM_ALIAS
* r_u
,
3013 prs_struct
*ps
, int depth
);
3014 void init_samr_q_create_dom_alias(SAMR_Q_CREATE_DOM_ALIAS
* q_u
,
3015 POLICY_HND
*hnd
, char *acct_desc
);
3016 BOOL
samr_io_q_create_dom_alias(char *desc
, SAMR_Q_CREATE_DOM_ALIAS
* q_u
,
3017 prs_struct
*ps
, int depth
);
3018 BOOL
samr_io_r_create_dom_alias(char *desc
, SAMR_R_CREATE_DOM_ALIAS
* r_u
,
3019 prs_struct
*ps
, int depth
);
3020 void init_samr_q_add_aliasmem(SAMR_Q_ADD_ALIASMEM
* q_u
, POLICY_HND
*hnd
,
3022 BOOL
samr_io_q_add_aliasmem(char *desc
, SAMR_Q_ADD_ALIASMEM
* q_u
,
3023 prs_struct
*ps
, int depth
);
3024 BOOL
samr_io_r_add_aliasmem(char *desc
, SAMR_R_ADD_ALIASMEM
* r_u
,
3025 prs_struct
*ps
, int depth
);
3026 void init_samr_q_del_aliasmem(SAMR_Q_DEL_ALIASMEM
* q_u
, POLICY_HND
*hnd
,
3028 BOOL
samr_io_q_del_aliasmem(char *desc
, SAMR_Q_DEL_ALIASMEM
* q_u
,
3029 prs_struct
*ps
, int depth
);
3030 BOOL
samr_io_r_del_aliasmem(char *desc
, SAMR_R_DEL_ALIASMEM
* r_u
,
3031 prs_struct
*ps
, int depth
);
3032 void init_samr_q_delete_dom_alias(SAMR_Q_DELETE_DOM_ALIAS
* q_c
,
3034 BOOL
samr_io_q_delete_dom_alias(char *desc
, SAMR_Q_DELETE_DOM_ALIAS
* q_u
,
3035 prs_struct
*ps
, int depth
);
3036 void init_samr_r_delete_dom_alias(SAMR_R_DELETE_DOM_ALIAS
* r_u
,
3038 BOOL
samr_io_r_delete_dom_alias(char *desc
, SAMR_R_DELETE_DOM_ALIAS
* r_u
,
3039 prs_struct
*ps
, int depth
);
3040 void init_samr_q_query_aliasmem(SAMR_Q_QUERY_ALIASMEM
* q_c
,
3042 BOOL
samr_io_q_query_aliasmem(char *desc
, SAMR_Q_QUERY_ALIASMEM
* q_u
,
3043 prs_struct
*ps
, int depth
);
3044 void init_samr_r_query_aliasmem(SAMR_R_QUERY_ALIASMEM
* r_u
,
3045 uint32 num_sids
, DOM_SID2
* sid
,
3047 BOOL
samr_io_r_query_aliasmem(char *desc
, SAMR_R_QUERY_ALIASMEM
* r_u
,
3048 prs_struct
*ps
, int depth
);
3049 void init_samr_q_lookup_names(TALLOC_CTX
*ctx
, SAMR_Q_LOOKUP_NAMES
* q_u
,
3050 POLICY_HND
*pol
, uint32 flags
,
3051 uint32 num_names
, char **name
);
3052 BOOL
samr_io_q_lookup_names(char *desc
, SAMR_Q_LOOKUP_NAMES
* q_u
,
3053 prs_struct
*ps
, int depth
);
3054 void init_samr_r_lookup_names(TALLOC_CTX
*ctx
, SAMR_R_LOOKUP_NAMES
* r_u
,
3056 uint32
*rid
, uint32
*type
,
3058 BOOL
samr_io_r_lookup_names(char *desc
, SAMR_R_LOOKUP_NAMES
* r_u
,
3059 prs_struct
*ps
, int depth
);
3060 void init_samr_q_delete_dom_user(SAMR_Q_DELETE_DOM_USER
* q_c
,
3062 BOOL
samr_io_q_delete_dom_user(char *desc
, SAMR_Q_DELETE_DOM_USER
* q_u
,
3063 prs_struct
*ps
, int depth
);
3064 BOOL
samr_io_r_delete_dom_user(char *desc
, SAMR_R_DELETE_DOM_USER
* r_u
,
3065 prs_struct
*ps
, int depth
);
3066 void init_samr_q_open_user(SAMR_Q_OPEN_USER
* q_u
,
3068 uint32 access_mask
, uint32 rid
);
3069 BOOL
samr_io_q_open_user(char *desc
, SAMR_Q_OPEN_USER
* q_u
,
3070 prs_struct
*ps
, int depth
);
3071 BOOL
samr_io_r_open_user(char *desc
, SAMR_R_OPEN_USER
* r_u
,
3072 prs_struct
*ps
, int depth
);
3073 void init_samr_q_create_user(SAMR_Q_CREATE_USER
* q_u
,
3076 uint32 acb_info
, uint32 access_mask
);
3077 BOOL
samr_io_q_create_user(char *desc
, SAMR_Q_CREATE_USER
* q_u
,
3078 prs_struct
*ps
, int depth
);
3079 BOOL
samr_io_r_create_user(char *desc
, SAMR_R_CREATE_USER
* r_u
,
3080 prs_struct
*ps
, int depth
);
3081 void init_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO
* q_u
,
3082 POLICY_HND
*hnd
, uint16 switch_value
);
3083 BOOL
samr_io_q_query_userinfo(char *desc
, SAMR_Q_QUERY_USERINFO
* q_u
,
3084 prs_struct
*ps
, int depth
);
3085 void init_sam_user_info12(SAM_USER_INFO_12
* usr
,
3086 uint8 lm_pwd
[16], uint8 nt_pwd
[16]);
3087 void init_sam_user_info10(SAM_USER_INFO_10
* usr
, uint32 acb_info
);
3088 void init_sam_user_info11(SAM_USER_INFO_11
* usr
,
3091 uint32 rid_user
, uint32 rid_group
, uint16 acct_ctrl
);
3092 void init_sam_user_info24(SAM_USER_INFO_24
* usr
,
3093 char newpass
[516], uint16 passlen
);
3094 void init_sam_user_info23W(SAM_USER_INFO_23
* usr
, NTTIME
* logon_time
, /* all zeros */
3095 NTTIME
* logoff_time
, /* all zeros */
3096 NTTIME
* kickoff_time
, /* all zeros */
3097 NTTIME
* pass_last_set_time
, /* all zeros */
3098 NTTIME
* pass_can_change_time
, /* all zeros */
3099 NTTIME
* pass_must_change_time
, /* all zeros */
3110 uint32 user_rid
, /* 0x0000 0000 */
3117 char newpass
[516], uint32 unknown_6
);
3118 void init_sam_user_info23A(SAM_USER_INFO_23
* usr
, NTTIME
* logon_time
, /* all zeros */
3119 NTTIME
* logoff_time
, /* all zeros */
3120 NTTIME
* kickoff_time
, /* all zeros */
3121 NTTIME
* pass_last_set_time
, /* all zeros */
3122 NTTIME
* pass_can_change_time
, /* all zeros */
3123 NTTIME
* pass_must_change_time
, /* all zeros */
3124 char *user_name
, /* NULL */
3126 char *home_dir
, char *dir_drive
, char *log_scr
,
3127 char *prof_path
, char *desc
, char *wkstas
,
3128 char *unk_str
, char *mung_dial
, uint32 user_rid
, /* 0x0000 0000 */
3129 uint32 group_rid
, uint32 acb_info
,
3130 uint32 unknown_3
, uint16 logon_divs
,
3131 LOGON_HRS
* hrs
, uint32 unknown_5
,
3132 char newpass
[516], uint32 unknown_6
);
3133 void init_sam_user_info21W(SAM_USER_INFO_21
* usr
,
3134 NTTIME
* logon_time
,
3135 NTTIME
* logoff_time
,
3136 NTTIME
* kickoff_time
,
3137 NTTIME
* pass_last_set_time
,
3138 NTTIME
* pass_can_change_time
,
3139 NTTIME
* pass_must_change_time
,
3158 uint32 unknown_5
, uint32 unknown_6
);
3159 void init_sam_user_info21A(SAM_USER_INFO_21
* usr
,
3160 NTTIME
* logon_time
,
3161 NTTIME
* logoff_time
,
3162 NTTIME
* kickoff_time
,
3163 NTTIME
* pass_last_set_time
,
3164 NTTIME
* pass_can_change_time
,
3165 NTTIME
* pass_must_change_time
,
3182 uint32 unknown_5
, uint32 unknown_6
);
3183 uint32
make_samr_userinfo_ctr_usr21(TALLOC_CTX
*ctx
, SAM_USERINFO_CTR
* ctr
,
3184 uint16 switch_value
,
3185 SAM_USER_INFO_21
* usr
);
3186 void init_samr_userinfo_ctr(SAM_USERINFO_CTR
* ctr
, uchar
* sess_key
,
3187 uint16 switch_value
, void *info
);
3188 void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO
* r_u
,
3189 SAM_USERINFO_CTR
* ctr
, uint32 status
);
3190 BOOL
samr_io_r_query_userinfo(char *desc
, SAMR_R_QUERY_USERINFO
* r_u
,
3191 prs_struct
*ps
, int depth
);
3192 void init_samr_q_set_userinfo(SAMR_Q_SET_USERINFO
* q_u
,
3193 POLICY_HND
*hnd
, unsigned char sess_key
[16],
3194 uint16 switch_value
, void *info
);
3195 BOOL
samr_io_q_set_userinfo(char *desc
, SAMR_Q_SET_USERINFO
* q_u
,
3196 prs_struct
*ps
, int depth
);
3197 void init_samr_r_set_userinfo(SAMR_R_SET_USERINFO
* r_u
, uint32 status
);
3198 BOOL
samr_io_r_set_userinfo(char *desc
, SAMR_R_SET_USERINFO
* r_u
,
3199 prs_struct
*ps
, int depth
);
3200 void init_samr_q_set_userinfo2(SAMR_Q_SET_USERINFO2
* q_u
,
3201 POLICY_HND
*hnd
, unsigned char sess_key
[16],
3202 uint16 switch_value
, SAM_USERINFO_CTR
* ctr
);
3203 BOOL
samr_io_q_set_userinfo2(char *desc
, SAMR_Q_SET_USERINFO2
* q_u
,
3204 prs_struct
*ps
, int depth
);
3205 void init_samr_r_set_userinfo2(SAMR_R_SET_USERINFO2
* r_u
, uint32 status
);
3206 BOOL
samr_io_r_set_userinfo2(char *desc
, SAMR_R_SET_USERINFO2
* r_u
,
3207 prs_struct
*ps
, int depth
);
3208 void init_samr_q_connect(SAMR_Q_CONNECT
* q_u
,
3209 char *srv_name
, uint32 access_mask
);
3210 BOOL
samr_io_q_connect(char *desc
, SAMR_Q_CONNECT
* q_u
,
3211 prs_struct
*ps
, int depth
);
3212 BOOL
samr_io_r_connect(char *desc
, SAMR_R_CONNECT
* r_u
,
3213 prs_struct
*ps
, int depth
);
3214 void init_samr_q_connect_anon(SAMR_Q_CONNECT_ANON
* q_u
);
3215 BOOL
samr_io_q_connect_anon(char *desc
, SAMR_Q_CONNECT_ANON
* q_u
,
3216 prs_struct
*ps
, int depth
);
3217 BOOL
samr_io_r_connect_anon(char *desc
, SAMR_R_CONNECT_ANON
* r_u
,
3218 prs_struct
*ps
, int depth
);
3219 void init_samr_q_get_dom_pwinfo(SAMR_Q_GET_DOM_PWINFO
* q_u
,
3221 BOOL
samr_io_q_get_dom_pwinfo(char *desc
, SAMR_Q_GET_DOM_PWINFO
* q_u
,
3222 prs_struct
*ps
, int depth
);
3223 BOOL
samr_io_r_get_dom_pwinfo(char *desc
, SAMR_R_GET_DOM_PWINFO
* r_u
,
3224 prs_struct
*ps
, int depth
);
3225 void init_enc_passwd(SAMR_ENC_PASSWD
* pwd
, char pass
[512]);
3226 BOOL
samr_io_enc_passwd(char *desc
, SAMR_ENC_PASSWD
* pwd
,
3227 prs_struct
*ps
, int depth
);
3228 void init_enc_hash(SAMR_ENC_HASH
* hsh
, uchar hash
[16]);
3229 BOOL
samr_io_enc_hash(char *desc
, SAMR_ENC_HASH
* hsh
,
3230 prs_struct
*ps
, int depth
);
3231 void init_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER
* q_u
,
3232 char *dest_host
, char *user_name
,
3233 char nt_newpass
[516],
3234 uchar nt_oldhash
[16],
3235 char lm_newpass
[516],
3236 uchar lm_oldhash
[16]);
3237 BOOL
samr_io_q_chgpasswd_user(char *desc
, SAMR_Q_CHGPASSWD_USER
* q_u
,
3238 prs_struct
*ps
, int depth
);
3239 void init_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER
* r_u
, uint32 status
);
3240 BOOL
samr_io_r_chgpasswd_user(char *desc
, SAMR_R_CHGPASSWD_USER
* r_u
,
3241 prs_struct
*ps
, int depth
);
3243 /*The following definitions come from rpc_parse/parse_sec.c */
3245 void init_sec_access(SEC_ACCESS
*t
, uint32 mask
);
3246 BOOL
sec_io_access(char *desc
, SEC_ACCESS
*t
, prs_struct
*ps
, int depth
);
3247 void init_sec_ace(SEC_ACE
*t
, DOM_SID
*sid
, uint8 type
, SEC_ACCESS mask
, uint8 flag
);
3248 BOOL
sec_io_ace(char *desc
, SEC_ACE
*psa
, prs_struct
*ps
, int depth
);
3249 SEC_ACL
*make_sec_acl(TALLOC_CTX
*ctx
, uint16 revision
, int num_aces
, SEC_ACE
*ace_list
);
3250 SEC_ACL
*dup_sec_acl(TALLOC_CTX
*ctx
, SEC_ACL
*src
);
3251 BOOL
sec_io_acl(char *desc
, SEC_ACL
**ppsa
, prs_struct
*ps
, int depth
);
3252 size_t sec_desc_size(SEC_DESC
*psd
);
3253 BOOL
sec_ace_equal(SEC_ACE
*s1
, SEC_ACE
*s2
);
3254 BOOL
sec_acl_equal(SEC_ACL
*s1
, SEC_ACL
*s2
);
3255 BOOL
sec_desc_equal(SEC_DESC
*s1
, SEC_DESC
*s2
);
3256 SEC_DESC_BUF
*sec_desc_merge(TALLOC_CTX
*ctx
, SEC_DESC_BUF
*new_sdb
, SEC_DESC_BUF
*old_sdb
);
3257 SEC_DESC
*make_sec_desc(TALLOC_CTX
*ctx
, uint16 revision
,
3258 DOM_SID
*owner_sid
, DOM_SID
*grp_sid
,
3259 SEC_ACL
*sacl
, SEC_ACL
*dacl
, size_t *sd_size
);
3260 SEC_DESC
*dup_sec_desc( TALLOC_CTX
*ctx
, SEC_DESC
*src
);
3261 SEC_DESC
*make_standard_sec_desc(TALLOC_CTX
*ctx
, DOM_SID
*owner_sid
, DOM_SID
*grp_sid
,
3262 SEC_ACL
*dacl
, size_t *sd_size
);
3263 BOOL
sec_io_desc(char *desc
, SEC_DESC
**ppsd
, prs_struct
*ps
, int depth
);
3264 SEC_DESC_BUF
*make_sec_desc_buf(TALLOC_CTX
*ctx
, size_t len
, SEC_DESC
*sec_desc
);
3265 SEC_DESC_BUF
*dup_sec_desc_buf(TALLOC_CTX
*ctx
, SEC_DESC_BUF
*src
);
3266 BOOL
sec_io_desc_buf(char *desc
, SEC_DESC_BUF
**ppsdb
, prs_struct
*ps
, int depth
);
3268 /*The following definitions come from rpc_parse/parse_spoolss.c */
3270 BOOL
make_systemtime(SYSTEMTIME
*systime
, struct tm
*unixtime
);
3271 BOOL
smb_io_notify_info_data_strings(char *desc
,SPOOL_NOTIFY_INFO_DATA
*data
,
3272 prs_struct
*ps
, int depth
);
3273 BOOL
make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX
*q_u
,
3274 const fstring printername
,
3275 const fstring datatype
,
3276 uint32 access_required
,
3277 const fstring clientname
,
3278 const fstring user_name
);
3279 BOOL
make_spoolss_q_addprinterex(
3280 TALLOC_CTX
*mem_ctx
,
3281 SPOOL_Q_ADDPRINTEREX
*q_u
,
3282 const char *srv_name
,
3283 const char* clientname
,
3284 const char* user_name
,
3286 PRINTER_INFO_CTR
*ctr
);
3287 BOOL
make_spoolss_printer_info_2(
3288 TALLOC_CTX
*mem_ctx
,
3289 SPOOL_PRINTER_INFO_LEVEL_2
**spool_info2
,
3290 PRINTER_INFO_2
*info
3292 BOOL
spoolss_io_q_open_printer_ex(char *desc
, SPOOL_Q_OPEN_PRINTER_EX
*q_u
, prs_struct
*ps
, int depth
);
3293 BOOL
make_spoolss_q_deleteprinterdriver(
3294 TALLOC_CTX
*mem_ctx
,
3295 SPOOL_Q_DELETEPRINTERDRIVER
*q_u
,
3300 BOOL
spoolss_io_r_open_printer_ex(char *desc
, SPOOL_R_OPEN_PRINTER_EX
*r_u
, prs_struct
*ps
, int depth
);
3301 BOOL
make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA
*q_u
,
3302 const POLICY_HND
*handle
,
3303 UNISTR2
*valuename
, uint32 size
);
3304 BOOL
spoolss_io_q_getprinterdata(char *desc
, SPOOL_Q_GETPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
3305 BOOL
spoolss_io_q_deleteprinterdata(char *desc
, SPOOL_Q_DELETEPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
3306 BOOL
spoolss_io_r_deleteprinterdata(char *desc
, SPOOL_R_DELETEPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
3307 BOOL
spoolss_io_r_getprinterdata(char *desc
, SPOOL_R_GETPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
3308 BOOL
make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER
*q_u
, POLICY_HND
*hnd
);
3309 BOOL
spoolss_io_q_abortprinter(char *desc
, SPOOL_Q_ABORTPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3310 BOOL
spoolss_io_r_abortprinter(char *desc
, SPOOL_R_ABORTPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3311 BOOL
spoolss_io_q_deleteprinter(char *desc
, SPOOL_Q_DELETEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3312 BOOL
spoolss_io_r_deleteprinter(char *desc
, SPOOL_R_DELETEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3313 BOOL
spoolss_io_q_deleteprinterdriver(char *desc
, SPOOL_Q_DELETEPRINTERDRIVER
*q_u
, prs_struct
*ps
, int depth
);
3314 BOOL
spoolss_io_r_deleteprinterdriver(char *desc
, SPOOL_R_DELETEPRINTERDRIVER
*r_u
, prs_struct
*ps
, int depth
);
3315 BOOL
spoolss_io_q_closeprinter(char *desc
, SPOOL_Q_CLOSEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3316 BOOL
spoolss_io_r_closeprinter(char *desc
, SPOOL_R_CLOSEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3317 BOOL
spoolss_io_q_startdocprinter(char *desc
, SPOOL_Q_STARTDOCPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3318 BOOL
spoolss_io_r_startdocprinter(char *desc
, SPOOL_R_STARTDOCPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3319 BOOL
spoolss_io_q_enddocprinter(char *desc
, SPOOL_Q_ENDDOCPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3320 BOOL
spoolss_io_r_enddocprinter(char *desc
, SPOOL_R_ENDDOCPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3321 BOOL
spoolss_io_q_startpageprinter(char *desc
, SPOOL_Q_STARTPAGEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3322 BOOL
spoolss_io_r_startpageprinter(char *desc
, SPOOL_R_STARTPAGEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3323 BOOL
spoolss_io_q_endpageprinter(char *desc
, SPOOL_Q_ENDPAGEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3324 BOOL
spoolss_io_r_endpageprinter(char *desc
, SPOOL_R_ENDPAGEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3325 BOOL
spoolss_io_q_writeprinter(char *desc
, SPOOL_Q_WRITEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3326 BOOL
spoolss_io_r_writeprinter(char *desc
, SPOOL_R_WRITEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3327 BOOL
spoolss_io_q_rffpcnex(char *desc
, SPOOL_Q_RFFPCNEX
*q_u
, prs_struct
*ps
, int depth
);
3328 BOOL
spoolss_io_r_rffpcnex(char *desc
, SPOOL_R_RFFPCNEX
*r_u
, prs_struct
*ps
, int depth
);
3329 BOOL
spoolss_io_q_rfnpcnex(char *desc
, SPOOL_Q_RFNPCNEX
*q_u
, prs_struct
*ps
, int depth
);
3330 BOOL
spoolss_io_r_rfnpcnex(char *desc
, SPOOL_R_RFNPCNEX
*r_u
, prs_struct
*ps
, int depth
);
3331 BOOL
smb_io_printer_info_0(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_0
*info
, int depth
);
3332 BOOL
smb_io_printer_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_1
*info
, int depth
);
3333 BOOL
smb_io_printer_info_2(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_2
*info
, int depth
);
3334 BOOL
smb_io_printer_info_3(char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_3
*info
, int depth
);
3335 BOOL
smb_io_port_info_1(char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_1
*info
, int depth
);
3336 BOOL
smb_io_port_info_2(char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_2
*info
, int depth
);
3337 BOOL
smb_io_printer_driver_info_1(char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_1
*info
, int depth
) ;
3338 BOOL
smb_io_printer_driver_info_2(char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_2
*info
, int depth
) ;
3339 BOOL
smb_io_printer_driver_info_3(char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_3
*info
, int depth
);
3340 BOOL
smb_io_printer_driver_info_6(char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_6
*info
, int depth
);
3341 BOOL
smb_io_job_info_1(char *desc
, NEW_BUFFER
*buffer
, JOB_INFO_1
*info
, int depth
);
3342 BOOL
smb_io_job_info_2(char *desc
, NEW_BUFFER
*buffer
, JOB_INFO_2
*info
, int depth
);
3343 BOOL
smb_io_form_1(char *desc
, NEW_BUFFER
*buffer
, FORM_1
*info
, int depth
);
3344 void spoolss_move_buffer(NEW_BUFFER
*src
, NEW_BUFFER
**dest
);
3345 uint32
new_get_buffer_size(NEW_BUFFER
*buffer
);
3346 BOOL
smb_io_driverdir_1(char *desc
, NEW_BUFFER
*buffer
, DRIVER_DIRECTORY_1
*info
, int depth
);
3347 BOOL
smb_io_port_1(char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_1
*info
, int depth
);
3348 BOOL
smb_io_port_2(char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_2
*info
, int depth
);
3349 BOOL
smb_io_printprocessor_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTPROCESSOR_1
*info
, int depth
);
3350 BOOL
smb_io_printprocdatatype_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTPROCDATATYPE_1
*info
, int depth
);
3351 BOOL
smb_io_printmonitor_info_1(char *desc
, NEW_BUFFER
*buffer
, PRINTMONITOR_1
*info
, int depth
);
3352 BOOL
smb_io_printmonitor_info_2(char *desc
, NEW_BUFFER
*buffer
, PRINTMONITOR_2
*info
, int depth
);
3353 uint32
spoolss_size_printer_info_0(PRINTER_INFO_0
*info
);
3354 uint32
spoolss_size_printer_info_1(PRINTER_INFO_1
*info
);
3355 uint32
spoolss_size_printer_info_2(PRINTER_INFO_2
*info
);
3356 uint32
spoolss_size_printer_info_3(PRINTER_INFO_3
*info
);
3357 uint32
spoolss_size_printer_driver_info_1(DRIVER_INFO_1
*info
);
3358 uint32
spoolss_size_printer_driver_info_2(DRIVER_INFO_2
*info
);
3359 uint32
spoolss_size_string_array(uint16
*string
);
3360 uint32
spoolss_size_printer_driver_info_3(DRIVER_INFO_3
*info
);
3361 uint32
spoolss_size_printer_driver_info_6(DRIVER_INFO_6
*info
);
3362 uint32
spoolss_size_job_info_1(JOB_INFO_1
*info
);
3363 uint32
spoolss_size_job_info_2(JOB_INFO_2
*info
);
3364 uint32
spoolss_size_form_1(FORM_1
*info
);
3365 uint32
spoolss_size_port_info_1(PORT_INFO_1
*info
);
3366 uint32
spoolss_size_driverdir_info_1(DRIVER_DIRECTORY_1
*info
);
3367 uint32
spoolss_size_port_info_2(PORT_INFO_2
*info
);
3368 uint32
spoolss_size_printprocessor_info_1(PRINTPROCESSOR_1
*info
);
3369 uint32
spoolss_size_printprocdatatype_info_1(PRINTPROCDATATYPE_1
*info
);
3370 uint32
spoolss_size_printmonitor_info_1(PRINTMONITOR_1
*info
);
3371 uint32
spoolss_size_printmonitor_info_2(PRINTMONITOR_2
*info
);
3372 BOOL
make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2
*q_u
,
3373 const POLICY_HND
*hnd
,
3374 const fstring architecture
,
3375 uint32 level
, uint32 clientmajor
, uint32 clientminor
,
3376 NEW_BUFFER
*buffer
, uint32 offered
);
3377 BOOL
spoolss_io_q_getprinterdriver2(char *desc
, SPOOL_Q_GETPRINTERDRIVER2
*q_u
, prs_struct
*ps
, int depth
);
3378 BOOL
spoolss_io_r_getprinterdriver2(char *desc
, SPOOL_R_GETPRINTERDRIVER2
*r_u
, prs_struct
*ps
, int depth
);
3379 BOOL
make_spoolss_q_enumprinters(
3380 SPOOL_Q_ENUMPRINTERS
*q_u
,
3387 BOOL
make_spoolss_q_enumports(SPOOL_Q_ENUMPORTS
*q_u
,
3388 fstring servername
, uint32 level
,
3389 NEW_BUFFER
*buffer
, uint32 offered
);
3390 BOOL
spoolss_io_q_enumprinters(char *desc
, SPOOL_Q_ENUMPRINTERS
*q_u
, prs_struct
*ps
, int depth
);
3391 BOOL
spoolss_io_r_enumprinters(char *desc
, SPOOL_R_ENUMPRINTERS
*r_u
, prs_struct
*ps
, int depth
);
3392 BOOL
spoolss_io_r_getprinter(char *desc
, SPOOL_R_GETPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3393 BOOL
spoolss_io_q_getprinter(char *desc
, SPOOL_Q_GETPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3394 BOOL
make_spoolss_q_getprinter(
3395 TALLOC_CTX
*mem_ctx
,
3396 SPOOL_Q_GETPRINTER
*q_u
,
3397 const POLICY_HND
*hnd
,
3402 BOOL
make_spoolss_q_setprinter(
3403 TALLOC_CTX
*mem_ctx
,
3404 SPOOL_Q_SETPRINTER
*q_u
,
3405 const POLICY_HND
*hnd
,
3407 PRINTER_INFO_CTR
*info
,
3410 BOOL
spoolss_io_r_setprinter(char *desc
, SPOOL_R_SETPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3411 BOOL
spoolss_io_q_setprinter(char *desc
, SPOOL_Q_SETPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3412 BOOL
spoolss_io_r_fcpn(char *desc
, SPOOL_R_FCPN
*r_u
, prs_struct
*ps
, int depth
);
3413 BOOL
spoolss_io_q_fcpn(char *desc
, SPOOL_Q_FCPN
*q_u
, prs_struct
*ps
, int depth
);
3414 BOOL
spoolss_io_r_addjob(char *desc
, SPOOL_R_ADDJOB
*r_u
, prs_struct
*ps
, int depth
);
3415 BOOL
spoolss_io_q_addjob(char *desc
, SPOOL_Q_ADDJOB
*q_u
, prs_struct
*ps
, int depth
);
3416 BOOL
spoolss_io_r_enumjobs(char *desc
, SPOOL_R_ENUMJOBS
*r_u
, prs_struct
*ps
, int depth
);
3417 BOOL
make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS
*q_u
, const POLICY_HND
*hnd
,
3423 BOOL
spoolss_io_q_enumjobs(char *desc
, SPOOL_Q_ENUMJOBS
*q_u
, prs_struct
*ps
, int depth
);
3424 BOOL
spoolss_io_r_schedulejob(char *desc
, SPOOL_R_SCHEDULEJOB
*r_u
, prs_struct
*ps
, int depth
);
3425 BOOL
spoolss_io_q_schedulejob(char *desc
, SPOOL_Q_SCHEDULEJOB
*q_u
, prs_struct
*ps
, int depth
);
3426 BOOL
spoolss_io_r_setjob(char *desc
, SPOOL_R_SETJOB
*r_u
, prs_struct
*ps
, int depth
);
3427 BOOL
spoolss_io_q_setjob(char *desc
, SPOOL_Q_SETJOB
*q_u
, prs_struct
*ps
, int depth
);
3428 BOOL
spoolss_io_r_enumprinterdrivers(char *desc
, SPOOL_R_ENUMPRINTERDRIVERS
*r_u
, prs_struct
*ps
, int depth
);
3429 BOOL
make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS
*q_u
,
3431 const char *environment
,
3433 NEW_BUFFER
*buffer
, uint32 offered
);
3434 BOOL
spoolss_io_q_enumprinterdrivers(char *desc
, SPOOL_Q_ENUMPRINTERDRIVERS
*q_u
, prs_struct
*ps
, int depth
);
3435 BOOL
spoolss_io_q_enumforms(char *desc
, SPOOL_Q_ENUMFORMS
*q_u
, prs_struct
*ps
, int depth
);
3436 BOOL
spoolss_io_r_enumforms(char *desc
, SPOOL_R_ENUMFORMS
*r_u
, prs_struct
*ps
, int depth
);
3437 BOOL
spoolss_io_q_getform(char *desc
, SPOOL_Q_GETFORM
*q_u
, prs_struct
*ps
, int depth
);
3438 BOOL
spoolss_io_r_getform(char *desc
, SPOOL_R_GETFORM
*r_u
, prs_struct
*ps
, int depth
);
3439 BOOL
spoolss_io_r_enumports(char *desc
, SPOOL_R_ENUMPORTS
*r_u
, prs_struct
*ps
, int depth
);
3440 BOOL
spoolss_io_q_enumports(char *desc
, SPOOL_Q_ENUMPORTS
*q_u
, prs_struct
*ps
, int depth
);
3441 BOOL
spool_io_printer_info_level_1(char *desc
, SPOOL_PRINTER_INFO_LEVEL_1
*il
, prs_struct
*ps
, int depth
);
3442 BOOL
spool_io_printer_info_level_3(char *desc
, SPOOL_PRINTER_INFO_LEVEL_3
*il
, prs_struct
*ps
, int depth
);
3443 BOOL
spool_io_printer_info_level_2(char *desc
, SPOOL_PRINTER_INFO_LEVEL_2
*il
, prs_struct
*ps
, int depth
);
3444 BOOL
spool_io_printer_info_level(char *desc
, SPOOL_PRINTER_INFO_LEVEL
*il
, prs_struct
*ps
, int depth
);
3445 BOOL
spoolss_io_q_addprinterex(char *desc
, SPOOL_Q_ADDPRINTEREX
*q_u
, prs_struct
*ps
, int depth
);
3446 BOOL
spoolss_io_r_addprinterex(char *desc
, SPOOL_R_ADDPRINTEREX
*r_u
,
3447 prs_struct
*ps
, int depth
);
3448 BOOL
spool_io_printer_driver_info_level_3(char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
**q_u
,
3449 prs_struct
*ps
, int depth
);
3450 BOOL
spool_io_printer_driver_info_level_6(char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6
**q_u
,
3451 prs_struct
*ps
, int depth
);
3452 BOOL
smb_io_unibuffer(char *desc
, UNISTR2
*buffer
, prs_struct
*ps
, int depth
);
3453 BOOL
spool_io_printer_driver_info_level(char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL
*il
, prs_struct
*ps
, int depth
);
3454 BOOL
make_spoolss_q_addprinterdriver(
3455 TALLOC_CTX
*mem_ctx
,
3456 SPOOL_Q_ADDPRINTERDRIVER
*q_u
,
3457 const char* srv_name
,
3459 PRINTER_DRIVER_CTR
*info
);
3460 BOOL
make_spoolss_driver_info_3(
3461 TALLOC_CTX
*mem_ctx
,
3462 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
**spool_drv_info
,
3463 DRIVER_INFO_3
*info3
3465 BOOL
make_spoolss_buffer5(
3466 TALLOC_CTX
*mem_ctx
,
3471 BOOL
spoolss_io_q_addprinterdriver(char *desc
, SPOOL_Q_ADDPRINTERDRIVER
*q_u
, prs_struct
*ps
, int depth
);
3472 BOOL
spoolss_io_r_addprinterdriver(char *desc
, SPOOL_R_ADDPRINTERDRIVER
*q_u
, prs_struct
*ps
, int depth
);
3473 BOOL
uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
*uni
,
3474 NT_PRINTER_DRIVER_INFO_LEVEL_3
**asc
);
3475 BOOL
uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6
*uni
,
3476 NT_PRINTER_DRIVER_INFO_LEVEL_6
**asc
);
3477 BOOL
uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2
*uni
,
3478 NT_PRINTER_INFO_LEVEL_2
**asc
);
3479 BOOL
make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR
*q_u
,
3480 fstring servername
, fstring env_name
, uint32 level
,
3481 NEW_BUFFER
*buffer
, uint32 offered
);
3482 BOOL
spoolss_io_q_getprinterdriverdir(char *desc
, SPOOL_Q_GETPRINTERDRIVERDIR
*q_u
, prs_struct
*ps
, int depth
);
3483 BOOL
spoolss_io_r_getprinterdriverdir(char *desc
, SPOOL_R_GETPRINTERDRIVERDIR
*r_u
, prs_struct
*ps
, int depth
);
3484 BOOL
spoolss_io_r_enumprintprocessors(char *desc
, SPOOL_R_ENUMPRINTPROCESSORS
*r_u
, prs_struct
*ps
, int depth
);
3485 BOOL
spoolss_io_q_enumprintprocessors(char *desc
, SPOOL_Q_ENUMPRINTPROCESSORS
*q_u
, prs_struct
*ps
, int depth
);
3486 BOOL
spoolss_io_r_enumprintprocdatatypes(char *desc
, SPOOL_R_ENUMPRINTPROCDATATYPES
*r_u
, prs_struct
*ps
, int depth
);
3487 BOOL
spoolss_io_q_enumprintprocdatatypes(char *desc
, SPOOL_Q_ENUMPRINTPROCDATATYPES
*q_u
, prs_struct
*ps
, int depth
);
3488 BOOL
spoolss_io_q_enumprintmonitors(char *desc
, SPOOL_Q_ENUMPRINTMONITORS
*q_u
, prs_struct
*ps
, int depth
);
3489 BOOL
spoolss_io_r_enumprintmonitors(char *desc
, SPOOL_R_ENUMPRINTMONITORS
*r_u
, prs_struct
*ps
, int depth
);
3490 BOOL
spoolss_io_r_enumprinterdata(char *desc
, SPOOL_R_ENUMPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
3491 BOOL
spoolss_io_q_enumprinterdata(char *desc
, SPOOL_Q_ENUMPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
3492 BOOL
make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA
*q_u
,
3493 const POLICY_HND
*hnd
,
3494 uint32 idx
, uint32 valuelen
, uint32 datalen
);
3495 BOOL
spoolss_io_q_setprinterdata(char *desc
, SPOOL_Q_SETPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
3496 BOOL
spoolss_io_r_setprinterdata(char *desc
, SPOOL_R_SETPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
3497 BOOL
convert_specific_param(NT_PRINTER_PARAM
**param
, const UNISTR2
*value
,
3498 uint32 type
, const uint8
*data
, uint32 len
);
3499 BOOL
spoolss_io_q_deleteform(char *desc
, SPOOL_Q_DELETEFORM
*q_u
, prs_struct
*ps
, int depth
);
3500 BOOL
spoolss_io_r_deleteform(char *desc
, SPOOL_R_DELETEFORM
*r_u
, prs_struct
*ps
, int depth
);
3501 BOOL
spoolss_io_q_addform(char *desc
, SPOOL_Q_ADDFORM
*q_u
, prs_struct
*ps
, int depth
);
3502 BOOL
spoolss_io_r_addform(char *desc
, SPOOL_R_ADDFORM
*r_u
, prs_struct
*ps
, int depth
);
3503 BOOL
spoolss_io_q_setform(char *desc
, SPOOL_Q_SETFORM
*q_u
, prs_struct
*ps
, int depth
);
3504 BOOL
spoolss_io_r_setform(char *desc
, SPOOL_R_SETFORM
*r_u
, prs_struct
*ps
, int depth
);
3505 BOOL
spoolss_io_r_getjob(char *desc
, SPOOL_R_GETJOB
*r_u
, prs_struct
*ps
, int depth
);
3506 BOOL
spoolss_io_q_getjob(char *desc
, SPOOL_Q_GETJOB
*q_u
, prs_struct
*ps
, int depth
);
3507 void free_devmode(DEVICEMODE
*devmode
);
3508 void free_printer_info_1(PRINTER_INFO_1
*printer
);
3509 void free_printer_info_2(PRINTER_INFO_2
*printer
);
3510 void free_printer_info_3(PRINTER_INFO_3
*printer
);
3511 void free_job_info_2(JOB_INFO_2
*job
);
3512 BOOL
make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER
*q_u
,
3513 const fstring string
, uint32 printer
, uint32 type
);
3514 BOOL
spoolss_io_q_replyopenprinter(char *desc
, SPOOL_Q_REPLYOPENPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3515 BOOL
spoolss_io_r_replyopenprinter(char *desc
, SPOOL_R_REPLYOPENPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3516 BOOL
make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER
*q_u
, POLICY_HND
*hnd
);
3517 BOOL
spoolss_io_q_replycloseprinter(char *desc
, SPOOL_Q_REPLYCLOSEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3518 BOOL
spoolss_io_r_replycloseprinter(char *desc
, SPOOL_R_REPLYCLOSEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3519 BOOL
make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN
*q_u
, POLICY_HND
*hnd
,
3520 uint32 change_low
, uint32 change_high
);
3521 BOOL
spoolss_io_q_reply_rrpcn(char *desc
, SPOOL_Q_REPLY_RRPCN
*q_u
, prs_struct
*ps
, int depth
);
3522 BOOL
spoolss_io_r_reply_rrpcn(char *desc
, SPOOL_R_REPLY_RRPCN
*r_u
, prs_struct
*ps
, int depth
);
3524 /*The following definitions come from rpc_parse/parse_srv.c */
3526 void init_srv_share_info1_str(SH_INFO_1_STR
*sh1
, char *net_name
, char *remark
);
3527 void init_srv_share_info1(SH_INFO_1
*sh1
, char *net_name
, uint32 type
, char *remark
);
3528 void init_srv_share_info2_str(SH_INFO_2_STR
*sh2
,
3529 char *net_name
, char *remark
,
3530 char *path
, char *passwd
);
3531 void init_srv_share_info2(SH_INFO_2
*sh2
,
3532 char *net_name
, uint32 type
, char *remark
,
3533 uint32 perms
, uint32 max_uses
, uint32 num_uses
,
3534 char *path
, char *passwd
);
3535 void init_srv_share_info502(SH_INFO_502
*sh502
,
3536 char *net_name
, uint32 type
, char *remark
,
3537 uint32 perms
, uint32 max_uses
, uint32 num_uses
,
3538 char *path
, char *passwd
, SEC_DESC
*psd
, size_t sd_size
);
3539 void init_srv_share_info502_str(SH_INFO_502_STR
*sh502str
,
3541 char *net_name
, char *remark
,
3542 char *path
, char *passwd
, SEC_DESC
*psd
, size_t sd_size
);
3543 void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM
*q_n
,
3544 char *srv_name
, uint32 info_level
,
3545 uint32 preferred_len
, ENUM_HND
*hnd
);
3546 BOOL
srv_io_q_net_share_enum(char *desc
, SRV_Q_NET_SHARE_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3547 BOOL
srv_io_r_net_share_enum(char *desc
, SRV_R_NET_SHARE_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3548 BOOL
srv_io_q_net_share_get_info(char *desc
, SRV_Q_NET_SHARE_GET_INFO
*q_n
, prs_struct
*ps
, int depth
);
3549 BOOL
srv_io_r_net_share_get_info(char *desc
, SRV_R_NET_SHARE_GET_INFO
*r_n
, prs_struct
*ps
, int depth
);
3550 BOOL
srv_io_q_net_share_set_info(char *desc
, SRV_Q_NET_SHARE_SET_INFO
*q_n
, prs_struct
*ps
, int depth
);
3551 BOOL
srv_io_r_net_share_set_info(char *desc
, SRV_R_NET_SHARE_SET_INFO
*q_n
, prs_struct
*ps
, int depth
);
3552 BOOL
srv_io_q_net_share_add(char *desc
, SRV_Q_NET_SHARE_ADD
*q_n
, prs_struct
*ps
, int depth
);
3553 BOOL
srv_io_r_net_share_add(char *desc
, SRV_R_NET_SHARE_ADD
*q_n
, prs_struct
*ps
, int depth
);
3554 BOOL
srv_io_q_net_share_del(char *desc
, SRV_Q_NET_SHARE_DEL
*q_n
, prs_struct
*ps
, int depth
);
3555 BOOL
srv_io_r_net_share_del(char *desc
, SRV_R_NET_SHARE_DEL
*q_n
, prs_struct
*ps
, int depth
);
3556 void init_srv_sess_info0_str(SESS_INFO_0_STR
*ss0
, char *name
);
3557 void init_srv_sess_info0(SESS_INFO_0
*ss0
, char *name
);
3558 void init_srv_sess_info1_str(SESS_INFO_1_STR
*ss1
, char *name
, char *user
);
3559 void init_srv_sess_info1(SESS_INFO_1
*ss1
,
3560 char *name
, char *user
,
3561 uint32 num_opens
, uint32 open_time
, uint32 idle_time
,
3563 void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM
*q_n
,
3564 char *srv_name
, char *qual_name
,
3565 uint32 sess_level
, SRV_SESS_INFO_CTR
*ctr
,
3566 uint32 preferred_len
,
3568 BOOL
srv_io_q_net_sess_enum(char *desc
, SRV_Q_NET_SESS_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3569 BOOL
srv_io_r_net_sess_enum(char *desc
, SRV_R_NET_SESS_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3570 void init_srv_conn_info0(CONN_INFO_0
*ss0
, uint32 id
);
3571 void init_srv_conn_info1_str(CONN_INFO_1_STR
*ss1
, char *usr_name
, char *net_name
);
3572 void init_srv_conn_info1(CONN_INFO_1
*ss1
,
3573 uint32 id
, uint32 type
,
3574 uint32 num_opens
, uint32 num_users
, uint32 open_time
,
3575 char *usr_name
, char *net_name
);
3576 void init_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM
*q_n
,
3577 char *srv_name
, char *qual_name
,
3578 uint32 conn_level
, SRV_CONN_INFO_CTR
*ctr
,
3579 uint32 preferred_len
,
3581 BOOL
srv_io_q_net_conn_enum(char *desc
, SRV_Q_NET_CONN_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3582 BOOL
srv_io_r_net_conn_enum(char *desc
, SRV_R_NET_CONN_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3583 void init_srv_file_info3_str(FILE_INFO_3_STR
*fi3
, char *user_name
, char *path_name
);
3584 void init_srv_file_info3(FILE_INFO_3
*fl3
,
3585 uint32 id
, uint32 perms
, uint32 num_locks
,
3586 char *path_name
, char *user_name
);
3587 void init_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM
*q_n
,
3588 char *srv_name
, char *qual_name
,
3589 uint32 file_level
, SRV_FILE_INFO_CTR
*ctr
,
3590 uint32 preferred_len
,
3592 BOOL
srv_io_q_net_file_enum(char *desc
, SRV_Q_NET_FILE_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3593 BOOL
srv_io_r_net_file_enum(char *desc
, SRV_R_NET_FILE_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3594 void init_srv_info_100(SRV_INFO_100
*sv100
, uint32 platform_id
, char *name
);
3595 void init_srv_info_101(SRV_INFO_101
*sv101
, uint32 platform_id
, char *name
,
3596 uint32 ver_major
, uint32 ver_minor
,
3597 uint32 srv_type
, char *comment
);
3598 void init_srv_info_102(SRV_INFO_102
*sv102
, uint32 platform_id
, char *name
,
3599 char *comment
, uint32 ver_major
, uint32 ver_minor
,
3600 uint32 srv_type
, uint32 users
, uint32 disc
, uint32 hidden
,
3601 uint32 announce
, uint32 ann_delta
, uint32 licenses
,
3603 void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO
*srv
,
3604 char *server_name
, uint32 switch_value
);
3605 BOOL
srv_io_q_net_srv_get_info(char *desc
, SRV_Q_NET_SRV_GET_INFO
*q_n
, prs_struct
*ps
, int depth
);
3606 void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO
*srv
,
3607 uint32 switch_value
, SRV_INFO_CTR
*ctr
, uint32 status
);
3608 BOOL
srv_io_r_net_srv_get_info(char *desc
, SRV_R_NET_SRV_GET_INFO
*r_n
, prs_struct
*ps
, int depth
);
3609 BOOL
srv_io_q_net_remote_tod(char *desc
, SRV_Q_NET_REMOTE_TOD
*q_n
, prs_struct
*ps
, int depth
);
3610 void init_time_of_day_info(TIME_OF_DAY_INFO
*tod
, uint32 elapsedt
, uint32 msecs
,
3611 uint32 hours
, uint32 mins
, uint32 secs
, uint32 hunds
,
3612 uint32 zone
, uint32 tintervals
, uint32 day
,
3613 uint32 month
, uint32 year
, uint32 weekday
);
3614 BOOL
srv_io_r_net_remote_tod(char *desc
, SRV_R_NET_REMOTE_TOD
*r_n
, prs_struct
*ps
, int depth
);
3615 BOOL
srv_io_q_net_disk_enum(char *desc
, SRV_Q_NET_DISK_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3616 BOOL
srv_io_r_net_disk_enum(char *desc
, SRV_R_NET_DISK_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3617 BOOL
srv_io_q_net_name_validate(char *desc
, SRV_Q_NET_NAME_VALIDATE
*q_n
, prs_struct
*ps
, int depth
);
3618 BOOL
srv_io_r_net_name_validate(char *desc
, SRV_R_NET_NAME_VALIDATE
*r_n
, prs_struct
*ps
, int depth
);
3619 BOOL
srv_io_q_net_file_query_secdesc(char *desc
, SRV_Q_NET_FILE_QUERY_SECDESC
*q_n
, prs_struct
*ps
, int depth
);
3620 BOOL
srv_io_r_net_file_query_secdesc(char *desc
, SRV_R_NET_FILE_QUERY_SECDESC
*r_n
, prs_struct
*ps
, int depth
);
3621 BOOL
srv_io_q_net_file_set_secdesc(char *desc
, SRV_Q_NET_FILE_SET_SECDESC
*q_n
, prs_struct
*ps
, int depth
);
3622 BOOL
srv_io_r_net_file_set_secdesc(char *desc
, SRV_R_NET_FILE_SET_SECDESC
*r_n
, prs_struct
*ps
, int depth
);
3624 /*The following definitions come from rpc_parse/parse_wks.c */
3626 void init_wks_q_query_info(WKS_Q_QUERY_INFO
*q_u
,
3627 char *server
, uint16 switch_value
) ;
3628 BOOL
wks_io_q_query_info(char *desc
, WKS_Q_QUERY_INFO
*q_u
, prs_struct
*ps
, int depth
);
3629 void init_wks_info_100(WKS_INFO_100
*inf
,
3630 uint32 platform_id
, uint32 ver_major
, uint32 ver_minor
,
3631 char *my_name
, char *domain_name
);
3632 void init_wks_r_query_info(WKS_R_QUERY_INFO
*r_u
,
3633 uint32 switch_value
, WKS_INFO_100
*wks100
,
3635 BOOL
wks_io_r_query_info(char *desc
, WKS_R_QUERY_INFO
*r_u
, prs_struct
*ps
, int depth
);
3637 /*The following definitions come from rpc_server/srv_dfs.c */
3639 BOOL
api_netdfs_rpc(pipes_struct
*p
);
3641 /*The following definitions come from rpc_server/srv_dfs_nt.c */
3643 uint32
_dfs_exist(pipes_struct
*p
, DFS_Q_DFS_EXIST
*q_u
, DFS_R_DFS_EXIST
*r_u
);
3644 uint32
_dfs_add(pipes_struct
*p
, DFS_Q_DFS_ADD
* q_u
, DFS_R_DFS_ADD
*r_u
);
3645 uint32
_dfs_remove(pipes_struct
*p
, DFS_Q_DFS_REMOVE
*q_u
, DFS_R_DFS_REMOVE
*r_u
);
3646 uint32
_dfs_enum(pipes_struct
*p
, DFS_Q_DFS_ENUM
*q_u
, DFS_R_DFS_ENUM
*r_u
);
3647 uint32
_dfs_get_info(pipes_struct
*p
, DFS_Q_DFS_GET_INFO
*q_u
, DFS_R_DFS_GET_INFO
*r_u
);
3649 /*The following definitions come from rpc_server/srv_lsa.c */
3651 BOOL
api_ntlsa_rpc(pipes_struct
*p
);
3653 /*The following definitions come from rpc_server/srv_lsa_hnd.c */
3655 BOOL
init_pipe_handle_list(pipes_struct
*p
, char *pipe_name
);
3656 BOOL
create_policy_hnd(pipes_struct
*p
, POLICY_HND
*hnd
, void (*free_fn
)(void *), void *data_ptr
);
3657 BOOL
find_policy_by_hnd(pipes_struct
*p
, POLICY_HND
*hnd
, void **data_p
);
3658 BOOL
close_policy_hnd(pipes_struct
*p
, POLICY_HND
*hnd
);
3659 void close_policy_by_pipe(pipes_struct
*p
);
3661 /*The following definitions come from rpc_server/srv_lsa_nt.c */
3663 uint32
_lsa_open_policy2(pipes_struct
*p
, LSA_Q_OPEN_POL2
*q_u
, LSA_R_OPEN_POL2
*r_u
);
3664 uint32
_lsa_open_policy(pipes_struct
*p
, LSA_Q_OPEN_POL
*q_u
, LSA_R_OPEN_POL
*r_u
);
3665 uint32
_lsa_enum_trust_dom(pipes_struct
*p
, LSA_Q_ENUM_TRUST_DOM
*q_u
, LSA_R_ENUM_TRUST_DOM
*r_u
);
3666 uint32
_lsa_query_info(pipes_struct
*p
, LSA_Q_QUERY_INFO
*q_u
, LSA_R_QUERY_INFO
*r_u
);
3667 uint32
_lsa_lookup_sids(pipes_struct
*p
, LSA_Q_LOOKUP_SIDS
*q_u
, LSA_R_LOOKUP_SIDS
*r_u
);
3668 uint32
_lsa_lookup_names(pipes_struct
*p
,LSA_Q_LOOKUP_NAMES
*q_u
, LSA_R_LOOKUP_NAMES
*r_u
);
3669 uint32
_lsa_close(pipes_struct
*p
, LSA_Q_CLOSE
*q_u
, LSA_R_CLOSE
*r_u
);
3670 uint32
_lsa_open_secret(pipes_struct
*p
, LSA_Q_OPEN_SECRET
*q_u
, LSA_R_OPEN_SECRET
*r_u
);
3672 /*The following definitions come from rpc_server/srv_netlog.c */
3674 BOOL
api_netlog_rpc(pipes_struct
*p
);
3676 /*The following definitions come from rpc_server/srv_netlog_nt.c */
3678 uint32
_net_logon_ctrl2(pipes_struct
*p
, NET_Q_LOGON_CTRL2
*q_u
, NET_R_LOGON_CTRL2
*r_u
);
3679 uint32
_net_trust_dom_list(pipes_struct
*p
, NET_Q_TRUST_DOM_LIST
*q_u
, NET_R_TRUST_DOM_LIST
*r_u
);
3680 uint32
_net_req_chal(pipes_struct
*p
, NET_Q_REQ_CHAL
*q_u
, NET_R_REQ_CHAL
*r_u
);
3681 uint32
_net_auth(pipes_struct
*p
, NET_Q_AUTH
*q_u
, NET_R_AUTH
*r_u
);
3682 uint32
_net_auth_2(pipes_struct
*p
, NET_Q_AUTH_2
*q_u
, NET_R_AUTH_2
*r_u
);
3683 uint32
_net_srv_pwset(pipes_struct
*p
, NET_Q_SRV_PWSET
*q_u
, NET_R_SRV_PWSET
*r_u
);
3684 uint32
_net_sam_logoff(pipes_struct
*p
, NET_Q_SAM_LOGOFF
*q_u
, NET_R_SAM_LOGOFF
*r_u
);
3685 uint32
_net_sam_logon(pipes_struct
*p
, NET_Q_SAM_LOGON
*q_u
, NET_R_SAM_LOGON
*r_u
);
3687 /*The following definitions come from rpc_server/srv_pipe.c */
3689 BOOL
create_next_pdu(pipes_struct
*p
);
3690 BOOL
api_pipe_bind_auth_resp(pipes_struct
*p
, prs_struct
*rpc_in_p
);
3691 BOOL
setup_fault_pdu(pipes_struct
*p
, uint32 status
);
3692 BOOL
check_bind_req(char* pipe_name
, RPC_IFACE
* abstract
,
3693 RPC_IFACE
* transfer
);
3694 BOOL
api_pipe_bind_req(pipes_struct
*p
, prs_struct
*rpc_in_p
);
3695 BOOL
api_pipe_auth_process(pipes_struct
*p
, prs_struct
*rpc_in
);
3696 struct current_user
*get_current_user(struct current_user
*user
, pipes_struct
*p
);
3697 BOOL
api_pipe_request(pipes_struct
*p
);
3698 BOOL
api_rpcTNP(pipes_struct
*p
, char *rpc_name
,
3699 struct api_struct
*api_rpc_cmds
);
3701 /*The following definitions come from rpc_server/srv_pipe_hnd.c */
3703 pipes_struct
*get_first_pipe(void);
3704 pipes_struct
*get_next_pipe(pipes_struct
*p
);
3705 void set_pipe_handle_offset(int max_open_files
);
3706 void reset_chain_p(void);
3707 void init_rpc_pipe_hnd(void);
3708 pipes_struct
*open_rpc_pipe_p(char *pipe_name
,
3709 connection_struct
*conn
, uint16 vuid
);
3710 void free_pipe_context(pipes_struct
*p
);
3711 ssize_t
write_to_pipe(pipes_struct
*p
, char *data
, size_t n
);
3712 ssize_t
read_from_pipe(pipes_struct
*p
, char *data
, size_t n
);
3713 BOOL
wait_rpc_pipe_hnd_state(pipes_struct
*p
, uint16 priority
);
3714 BOOL
set_rpc_pipe_hnd_state(pipes_struct
*p
, uint16 device_state
);
3715 BOOL
close_rpc_pipe_hnd(pipes_struct
*p
, connection_struct
*conn
);
3716 pipes_struct
*get_rpc_pipe_p(char *buf
, int where
);
3717 pipes_struct
*get_rpc_pipe(int pnum
);
3719 /*The following definitions come from rpc_server/srv_reg.c */
3721 BOOL
api_reg_rpc(pipes_struct
*p
);
3723 /*The following definitions come from rpc_server/srv_reg_nt.c */
3725 uint32
_reg_close(pipes_struct
*p
, REG_Q_CLOSE
*q_u
, REG_R_CLOSE
*r_u
);
3726 uint32
_reg_open(pipes_struct
*p
, REG_Q_OPEN_HKLM
*q_u
, REG_R_OPEN_HKLM
*r_u
);
3727 uint32
_reg_open_entry(pipes_struct
*p
, REG_Q_OPEN_ENTRY
*q_u
, REG_R_OPEN_ENTRY
*r_u
);
3728 uint32
_reg_info(pipes_struct
*p
, REG_Q_INFO
*q_u
, REG_R_INFO
*r_u
);
3730 /*The following definitions come from rpc_server/srv_samr.c */
3732 BOOL
api_samr_rpc(pipes_struct
*p
);
3734 /*The following definitions come from rpc_server/srv_samr_nt.c */
3736 uint32
_samr_close_hnd(pipes_struct
*p
, SAMR_Q_CLOSE_HND
*q_u
, SAMR_R_CLOSE_HND
*r_u
);
3737 uint32
_samr_open_domain(pipes_struct
*p
, SAMR_Q_OPEN_DOMAIN
*q_u
, SAMR_R_OPEN_DOMAIN
*r_u
);
3738 uint32
_samr_get_usrdom_pwinfo(pipes_struct
*p
, SAMR_Q_GET_USRDOM_PWINFO
*q_u
, SAMR_R_GET_USRDOM_PWINFO
*r_u
);
3739 uint32
_samr_query_sec_obj(pipes_struct
*p
, SAMR_Q_QUERY_SEC_OBJ
*q_u
, SAMR_R_QUERY_SEC_OBJ
*r_u
);
3740 uint32
_samr_enum_dom_users(pipes_struct
*p
, SAMR_Q_ENUM_DOM_USERS
*q_u
, SAMR_R_ENUM_DOM_USERS
*r_u
);
3741 uint32
_samr_enum_dom_groups(pipes_struct
*p
, SAMR_Q_ENUM_DOM_GROUPS
*q_u
, SAMR_R_ENUM_DOM_GROUPS
*r_u
);
3742 uint32
_samr_enum_dom_aliases(pipes_struct
*p
, SAMR_Q_ENUM_DOM_ALIASES
*q_u
, SAMR_R_ENUM_DOM_ALIASES
*r_u
);
3743 uint32
_samr_query_dispinfo(pipes_struct
*p
, SAMR_Q_QUERY_DISPINFO
*q_u
, SAMR_R_QUERY_DISPINFO
*r_u
);
3744 uint32
_samr_query_aliasinfo(pipes_struct
*p
, SAMR_Q_QUERY_ALIASINFO
*q_u
, SAMR_R_QUERY_ALIASINFO
*r_u
);
3745 uint32
_samr_lookup_names(pipes_struct
*p
, SAMR_Q_LOOKUP_NAMES
*q_u
, SAMR_R_LOOKUP_NAMES
*r_u
);
3746 uint32
_samr_chgpasswd_user(pipes_struct
*p
, SAMR_Q_CHGPASSWD_USER
*q_u
, SAMR_R_CHGPASSWD_USER
*r_u
);
3747 uint32
_samr_lookup_rids(pipes_struct
*p
, SAMR_Q_LOOKUP_RIDS
*q_u
, SAMR_R_LOOKUP_RIDS
*r_u
);
3748 uint32
_api_samr_open_user(pipes_struct
*p
, SAMR_Q_OPEN_USER
*q_u
, SAMR_R_OPEN_USER
*r_u
);
3749 uint32
_samr_query_userinfo(pipes_struct
*p
, SAMR_Q_QUERY_USERINFO
*q_u
, SAMR_R_QUERY_USERINFO
*r_u
);
3750 uint32
_samr_query_usergroups(pipes_struct
*p
, SAMR_Q_QUERY_USERGROUPS
*q_u
, SAMR_R_QUERY_USERGROUPS
*r_u
);
3751 uint32
_samr_query_dom_info(pipes_struct
*p
, SAMR_Q_QUERY_DOMAIN_INFO
*q_u
, SAMR_R_QUERY_DOMAIN_INFO
*r_u
);
3752 uint32
_api_samr_create_user(pipes_struct
*p
, SAMR_Q_CREATE_USER
*q_u
, SAMR_R_CREATE_USER
*r_u
);
3753 uint32
_samr_connect_anon(pipes_struct
*p
, SAMR_Q_CONNECT_ANON
*q_u
, SAMR_R_CONNECT_ANON
*r_u
);
3754 uint32
_samr_connect(pipes_struct
*p
, SAMR_Q_CONNECT
*q_u
, SAMR_R_CONNECT
*r_u
);
3755 uint32
_samr_lookup_domain(pipes_struct
*p
, SAMR_Q_LOOKUP_DOMAIN
*q_u
, SAMR_R_LOOKUP_DOMAIN
*r_u
);
3756 uint32
_samr_enum_domains(pipes_struct
*p
, SAMR_Q_ENUM_DOMAINS
*q_u
, SAMR_R_ENUM_DOMAINS
*r_u
);
3757 uint32
_api_samr_open_alias(pipes_struct
*p
, SAMR_Q_OPEN_ALIAS
*q_u
, SAMR_R_OPEN_ALIAS
*r_u
);
3758 uint32
_samr_set_userinfo(pipes_struct
*p
, SAMR_Q_SET_USERINFO
*q_u
, SAMR_R_SET_USERINFO
*r_u
);
3759 uint32
_samr_set_userinfo2(pipes_struct
*p
, SAMR_Q_SET_USERINFO2
*q_u
, SAMR_R_SET_USERINFO2
*r_u
);
3760 uint32
_samr_query_useraliases(pipes_struct
*p
, SAMR_Q_QUERY_USERALIASES
*q_u
, SAMR_R_QUERY_USERALIASES
*r_u
);
3761 uint32
_samr_query_aliasmem(pipes_struct
*p
, SAMR_Q_QUERY_ALIASMEM
*q_u
, SAMR_R_QUERY_ALIASMEM
*r_u
);
3762 uint32
_samr_query_groupmem(pipes_struct
*p
, SAMR_Q_QUERY_GROUPMEM
*q_u
, SAMR_R_QUERY_GROUPMEM
*r_u
);
3763 uint32
_samr_add_aliasmem(pipes_struct
*p
, SAMR_Q_ADD_ALIASMEM
*q_u
, SAMR_R_ADD_ALIASMEM
*r_u
);
3764 uint32
_samr_del_aliasmem(pipes_struct
*p
, SAMR_Q_DEL_ALIASMEM
*q_u
, SAMR_R_DEL_ALIASMEM
*r_u
);
3765 uint32
_samr_add_groupmem(pipes_struct
*p
, SAMR_Q_ADD_GROUPMEM
*q_u
, SAMR_R_ADD_GROUPMEM
*r_u
);
3766 uint32
_samr_del_groupmem(pipes_struct
*p
, SAMR_Q_DEL_GROUPMEM
*q_u
, SAMR_R_DEL_GROUPMEM
*r_u
);
3767 uint32
_samr_delete_dom_user(pipes_struct
*p
, SAMR_Q_DELETE_DOM_USER
*q_u
, SAMR_R_DELETE_DOM_USER
*r_u
);
3768 uint32
_samr_delete_dom_group(pipes_struct
*p
, SAMR_Q_DELETE_DOM_GROUP
*q_u
, SAMR_R_DELETE_DOM_GROUP
*r_u
);
3769 uint32
_samr_delete_dom_alias(pipes_struct
*p
, SAMR_Q_DELETE_DOM_ALIAS
*q_u
, SAMR_R_DELETE_DOM_ALIAS
*r_u
);
3770 uint32
_samr_create_dom_group(pipes_struct
*p
, SAMR_Q_CREATE_DOM_GROUP
*q_u
, SAMR_R_CREATE_DOM_GROUP
*r_u
);
3771 uint32
_samr_create_dom_alias(pipes_struct
*p
, SAMR_Q_CREATE_DOM_ALIAS
*q_u
, SAMR_R_CREATE_DOM_ALIAS
*r_u
);
3772 uint32
_samr_query_groupinfo(pipes_struct
*p
, SAMR_Q_QUERY_GROUPINFO
*q_u
, SAMR_R_QUERY_GROUPINFO
*r_u
);
3773 uint32
_samr_set_groupinfo(pipes_struct
*p
, SAMR_Q_SET_GROUPINFO
*q_u
, SAMR_R_SET_GROUPINFO
*r_u
);
3774 uint32
_samr_get_dom_pwinfo(pipes_struct
*p
, SAMR_Q_GET_DOM_PWINFO
*q_u
, SAMR_R_GET_DOM_PWINFO
*r_u
);
3775 uint32
_samr_open_group(pipes_struct
*p
, SAMR_Q_OPEN_GROUP
*q_u
, SAMR_R_OPEN_GROUP
*r_u
);
3776 uint32
_samr_unknown_2d(pipes_struct
*p
, SAMR_Q_UNKNOWN_2D
*q_u
, SAMR_R_UNKNOWN_2D
*r_u
);
3778 /*The following definitions come from rpc_server/srv_spoolss.c */
3780 BOOL
api_spoolss_rpc(pipes_struct
*p
);
3782 /*The following definitions come from rpc_server/srv_spoolss_nt.c */
3784 uint32
_spoolss_open_printer_ex( pipes_struct
*p
, SPOOL_Q_OPEN_PRINTER_EX
*q_u
, SPOOL_R_OPEN_PRINTER_EX
*r_u
);
3785 BOOL
convert_devicemode(char *printername
, const DEVICEMODE
*devmode
,
3786 NT_DEVICEMODE
**pp_nt_devmode
);
3787 uint32
_spoolss_closeprinter(pipes_struct
*p
, SPOOL_Q_CLOSEPRINTER
*q_u
, SPOOL_R_CLOSEPRINTER
*r_u
);
3788 uint32
_spoolss_deleteprinter(pipes_struct
*p
, SPOOL_Q_DELETEPRINTER
*q_u
, SPOOL_R_DELETEPRINTER
*r_u
);
3789 uint32
_spoolss_deleteprinterdriver(pipes_struct
*p
, SPOOL_Q_DELETEPRINTERDRIVER
*q_u
,
3790 SPOOL_R_DELETEPRINTERDRIVER
*r_u
);
3791 uint32
_spoolss_getprinterdata(pipes_struct
*p
, SPOOL_Q_GETPRINTERDATA
*q_u
, SPOOL_R_GETPRINTERDATA
*r_u
);
3792 uint32
_spoolss_rffpcnex(pipes_struct
*p
, SPOOL_Q_RFFPCNEX
*q_u
, SPOOL_R_RFFPCNEX
*r_u
);
3793 uint32
_spoolss_rfnpcnex( pipes_struct
*p
, SPOOL_Q_RFNPCNEX
*q_u
, SPOOL_R_RFNPCNEX
*r_u
);
3794 uint32
_spoolss_enumprinters( pipes_struct
*p
, SPOOL_Q_ENUMPRINTERS
*q_u
, SPOOL_R_ENUMPRINTERS
*r_u
);
3795 uint32
_spoolss_getprinter(pipes_struct
*p
, SPOOL_Q_GETPRINTER
*q_u
, SPOOL_R_GETPRINTER
*r_u
);
3796 uint32
_spoolss_getprinterdriver2(pipes_struct
*p
, SPOOL_Q_GETPRINTERDRIVER2
*q_u
, SPOOL_R_GETPRINTERDRIVER2
*r_u
);
3797 uint32
_spoolss_startpageprinter(pipes_struct
*p
, SPOOL_Q_STARTPAGEPRINTER
*q_u
, SPOOL_R_STARTPAGEPRINTER
*r_u
);
3798 uint32
_spoolss_endpageprinter(pipes_struct
*p
, SPOOL_Q_ENDPAGEPRINTER
*q_u
, SPOOL_R_ENDPAGEPRINTER
*r_u
);
3799 uint32
_spoolss_startdocprinter(pipes_struct
*p
, SPOOL_Q_STARTDOCPRINTER
*q_u
, SPOOL_R_STARTDOCPRINTER
*r_u
);
3800 uint32
_spoolss_enddocprinter(pipes_struct
*p
, SPOOL_Q_ENDDOCPRINTER
*q_u
, SPOOL_R_ENDDOCPRINTER
*r_u
);
3801 uint32
_spoolss_writeprinter(pipes_struct
*p
, SPOOL_Q_WRITEPRINTER
*q_u
, SPOOL_R_WRITEPRINTER
*r_u
);
3802 uint32
_spoolss_abortprinter(pipes_struct
*p
, SPOOL_Q_ABORTPRINTER
*q_u
, SPOOL_R_ABORTPRINTER
*r_u
);
3803 uint32
_spoolss_setprinter(pipes_struct
*p
, SPOOL_Q_SETPRINTER
*q_u
, SPOOL_R_SETPRINTER
*r_u
);
3804 uint32
_spoolss_fcpn(pipes_struct
*p
, SPOOL_Q_FCPN
*q_u
, SPOOL_R_FCPN
*r_u
);
3805 uint32
_spoolss_addjob(pipes_struct
*p
, SPOOL_Q_ADDJOB
*q_u
, SPOOL_R_ADDJOB
*r_u
);
3806 uint32
_spoolss_enumjobs( pipes_struct
*p
, SPOOL_Q_ENUMJOBS
*q_u
, SPOOL_R_ENUMJOBS
*r_u
);
3807 uint32
_spoolss_schedulejob( pipes_struct
*p
, SPOOL_Q_SCHEDULEJOB
*q_u
, SPOOL_R_SCHEDULEJOB
*r_u
);
3808 uint32
_spoolss_setjob(pipes_struct
*p
, SPOOL_Q_SETJOB
*q_u
, SPOOL_R_SETJOB
*r_u
);
3809 uint32
_spoolss_enumprinterdrivers( pipes_struct
*p
, SPOOL_Q_ENUMPRINTERDRIVERS
*q_u
, SPOOL_R_ENUMPRINTERDRIVERS
*r_u
);
3810 uint32
_spoolss_enumforms(pipes_struct
*p
, SPOOL_Q_ENUMFORMS
*q_u
, SPOOL_R_ENUMFORMS
*r_u
);
3811 uint32
_spoolss_getform(pipes_struct
*p
, SPOOL_Q_GETFORM
*q_u
, SPOOL_R_GETFORM
*r_u
);
3812 uint32
_spoolss_enumports( pipes_struct
*p
, SPOOL_Q_ENUMPORTS
*q_u
, SPOOL_R_ENUMPORTS
*r_u
);
3813 uint32
_spoolss_addprinterex( pipes_struct
*p
, SPOOL_Q_ADDPRINTEREX
*q_u
, SPOOL_R_ADDPRINTEREX
*r_u
);
3814 uint32
_spoolss_addprinterdriver(pipes_struct
*p
, SPOOL_Q_ADDPRINTERDRIVER
*q_u
, SPOOL_R_ADDPRINTERDRIVER
*r_u
);
3815 uint32
_spoolss_getprinterdriverdirectory(pipes_struct
*p
, SPOOL_Q_GETPRINTERDRIVERDIR
*q_u
, SPOOL_R_GETPRINTERDRIVERDIR
*r_u
);
3816 uint32
_spoolss_enumprinterdata(pipes_struct
*p
, SPOOL_Q_ENUMPRINTERDATA
*q_u
, SPOOL_R_ENUMPRINTERDATA
*r_u
);
3817 uint32
_spoolss_setprinterdata( pipes_struct
*p
, SPOOL_Q_SETPRINTERDATA
*q_u
, SPOOL_R_SETPRINTERDATA
*r_u
);
3818 uint32
_spoolss_deleteprinterdata(pipes_struct
*p
, SPOOL_Q_DELETEPRINTERDATA
*q_u
, SPOOL_R_DELETEPRINTERDATA
*r_u
);
3819 uint32
_spoolss_addform( pipes_struct
*p
, SPOOL_Q_ADDFORM
*q_u
, SPOOL_R_ADDFORM
*r_u
);
3820 uint32
_spoolss_deleteform( pipes_struct
*p
, SPOOL_Q_DELETEFORM
*q_u
, SPOOL_R_DELETEFORM
*r_u
);
3821 uint32
_spoolss_setform(pipes_struct
*p
, SPOOL_Q_SETFORM
*q_u
, SPOOL_R_SETFORM
*r_u
);
3822 uint32
_spoolss_enumprintprocessors(pipes_struct
*p
, SPOOL_Q_ENUMPRINTPROCESSORS
*q_u
, SPOOL_R_ENUMPRINTPROCESSORS
*r_u
);
3823 uint32
_spoolss_enumprintprocdatatypes(pipes_struct
*p
, SPOOL_Q_ENUMPRINTPROCDATATYPES
*q_u
, SPOOL_R_ENUMPRINTPROCDATATYPES
*r_u
);
3824 uint32
_spoolss_enumprintmonitors(pipes_struct
*p
, SPOOL_Q_ENUMPRINTMONITORS
*q_u
, SPOOL_R_ENUMPRINTMONITORS
*r_u
);
3825 uint32
_spoolss_getjob( pipes_struct
*p
, SPOOL_Q_GETJOB
*q_u
, SPOOL_R_GETJOB
*r_u
);
3827 /*The following definitions come from rpc_server/srv_srvsvc.c */
3829 BOOL
api_srvsvc_rpc(pipes_struct
*p
);
3831 /*The following definitions come from rpc_server/srv_srvsvc_nt.c */
3833 BOOL
share_info_db_init(void);
3834 void map_generic_share_sd_bits(SEC_DESC
*psd
);
3835 BOOL
share_access_check(connection_struct
*conn
, int snum
, uint16 vuid
, uint32 desired_access
);
3836 uint32
_srv_net_srv_get_info(pipes_struct
*p
, SRV_Q_NET_SRV_GET_INFO
*q_u
, SRV_R_NET_SRV_GET_INFO
*r_u
);
3837 uint32
_srv_net_file_enum(pipes_struct
*p
, SRV_Q_NET_FILE_ENUM
*q_u
, SRV_R_NET_FILE_ENUM
*r_u
);
3838 uint32
_srv_net_conn_enum(pipes_struct
*p
, SRV_Q_NET_CONN_ENUM
*q_u
, SRV_R_NET_CONN_ENUM
*r_u
);
3839 uint32
_srv_net_sess_enum(pipes_struct
*p
, SRV_Q_NET_SESS_ENUM
*q_u
, SRV_R_NET_SESS_ENUM
*r_u
);
3840 uint32
_srv_net_share_enum_all(pipes_struct
*p
, SRV_Q_NET_SHARE_ENUM
*q_u
, SRV_R_NET_SHARE_ENUM
*r_u
);
3841 uint32
_srv_net_share_enum(pipes_struct
*p
, SRV_Q_NET_SHARE_ENUM
*q_u
, SRV_R_NET_SHARE_ENUM
*r_u
);
3842 uint32
_srv_net_share_get_info(pipes_struct
*p
, SRV_Q_NET_SHARE_GET_INFO
*q_u
, SRV_R_NET_SHARE_GET_INFO
*r_u
);
3843 uint32
_srv_net_share_set_info(pipes_struct
*p
, SRV_Q_NET_SHARE_SET_INFO
*q_u
, SRV_R_NET_SHARE_SET_INFO
*r_u
);
3844 uint32
_srv_net_share_add(pipes_struct
*p
, SRV_Q_NET_SHARE_ADD
*q_u
, SRV_R_NET_SHARE_ADD
*r_u
);
3845 uint32
_srv_net_share_del(pipes_struct
*p
, SRV_Q_NET_SHARE_DEL
*q_u
, SRV_R_NET_SHARE_DEL
*r_u
);
3846 uint32
_srv_net_remote_tod(pipes_struct
*p
, SRV_Q_NET_REMOTE_TOD
*q_u
, SRV_R_NET_REMOTE_TOD
*r_u
);
3847 uint32
_srv_net_file_query_secdesc(pipes_struct
*p
, SRV_Q_NET_FILE_QUERY_SECDESC
*q_u
,
3848 SRV_R_NET_FILE_QUERY_SECDESC
*r_u
);
3849 uint32
_srv_net_file_set_secdesc(pipes_struct
*p
, SRV_Q_NET_FILE_SET_SECDESC
*q_u
,
3850 SRV_R_NET_FILE_SET_SECDESC
*r_u
);
3851 uint32
_srv_net_disk_enum(pipes_struct
*p
, SRV_Q_NET_DISK_ENUM
*q_u
, SRV_R_NET_DISK_ENUM
*r_u
);
3852 uint32
_srv_net_name_validate(pipes_struct
*p
, SRV_Q_NET_NAME_VALIDATE
*q_u
, SRV_R_NET_NAME_VALIDATE
*r_u
);
3854 /*The following definitions come from rpc_server/srv_util.c */
3856 int make_dom_gids(TALLOC_CTX
*ctx
, char *gids_str
, DOM_GID
**ppgids
);
3857 void get_domain_user_groups(char *domain_groups
, char *user
);
3858 uint32
local_lookup_group_name(uint32 rid
, char *group_name
, uint32
*type
);
3859 uint32
local_lookup_alias_name(uint32 rid
, char *alias_name
, uint32
*type
);
3860 uint32
local_lookup_user_name(uint32 rid
, char *user_name
, uint32
*type
);
3861 uint32
local_lookup_group_rid(char *group_name
, uint32
*rid
);
3862 uint32
local_lookup_alias_rid(char *alias_name
, uint32
*rid
);
3863 uint32
local_lookup_user_rid(char *user_name
, uint32
*rid
);
3865 /*The following definitions come from rpc_server/srv_wkssvc.c */
3867 BOOL
api_wkssvc_rpc(pipes_struct
*p
);
3869 /*The following definitions come from rpc_server/srv_wkssvc_nt.c */
3871 uint32
_wks_query_info(pipes_struct
*p
, WKS_Q_QUERY_INFO
*q_u
, WKS_R_QUERY_INFO
*r_u
);
3873 /*The following definitions come from smbd/blocking.c */
3875 BOOL
push_blocking_lock_request( char *inbuf
, int length
, int lock_timeout
, int lock_num
);
3876 void remove_pending_lock_requests_by_fid(files_struct
*fsp
);
3877 void remove_pending_lock_requests_by_mid(int mid
);
3878 BOOL
blocking_locks_pending(void);
3879 void process_blocking_lock_queue(time_t t
);
3881 /*The following definitions come from smbd/chgpasswd.c */
3883 BOOL
chgpasswd(char *name
, char *oldpass
, char *newpass
, BOOL as_root
);
3884 BOOL
chgpasswd(char *name
, char *oldpass
, char *newpass
, BOOL as_root
);
3885 BOOL
check_lanman_password(char *user
, uchar
* pass1
,
3886 uchar
* pass2
, struct smb_passwd
**psmbpw
);
3887 BOOL
change_lanman_password(struct smb_passwd
*smbpw
, uchar
* pass1
,
3889 BOOL
pass_oem_change(char *user
,
3890 uchar
* lmdata
, uchar
* lmhash
,
3891 uchar
* ntdata
, uchar
* nthash
);
3892 BOOL
check_oem_password(char *user
,
3893 uchar
* lmdata
, uchar
* lmhash
,
3894 uchar
* ntdata
, uchar
* nthash
,
3895 struct smb_passwd
**psmbpw
, char *new_passwd
,
3896 int new_passwd_size
);
3897 BOOL
change_oem_password(struct smb_passwd
*smbpw
, char *new_passwd
,
3899 BOOL
check_plaintext_password(char *user
, char *old_passwd
,
3900 int old_passwd_size
, struct smb_passwd
**psmbpw
);
3902 /*The following definitions come from smbd/close.c */
3904 int close_file(files_struct
*fsp
, BOOL normal_close
);
3906 /*The following definitions come from smbd/conn.c */
3908 void conn_init(void);
3909 int conn_num_open(void);
3910 BOOL
conn_snum_used(int snum
);
3911 connection_struct
*conn_find(int cnum
);
3912 connection_struct
*conn_new(void);
3913 void conn_close_all(void);
3914 BOOL
conn_idle_all(time_t t
, int deadtime
);
3915 void conn_free(connection_struct
*conn
);
3917 /*The following definitions come from smbd/connection.c */
3919 TDB_CONTEXT
*conn_tdb_ctx(void);
3920 BOOL
yield_connection(connection_struct
*conn
,char *name
,int max_connections
);
3921 BOOL
claim_connection(connection_struct
*conn
,char *name
,int max_connections
,BOOL Clear
);
3923 /*The following definitions come from smbd/dfree.c */
3925 SMB_BIG_UINT
sys_disk_free(char *path
, BOOL small_query
,
3926 SMB_BIG_UINT
*bsize
,SMB_BIG_UINT
*dfree
,SMB_BIG_UINT
*dsize
);
3928 /*The following definitions come from smbd/dir.c */
3930 void init_dptrs(void);
3931 char *dptr_path(int key
);
3932 char *dptr_wcard(int key
);
3933 BOOL
dptr_set_wcard(int key
, char *wcard
);
3934 BOOL
dptr_set_attr(int key
, uint16 attr
);
3935 uint16
dptr_attr(int key
);
3936 void dptr_close(int *key
);
3937 void dptr_closecnum(connection_struct
*conn
);
3938 void dptr_idlecnum(connection_struct
*conn
);
3939 void dptr_closepath(char *path
,uint16 spid
);
3940 int dptr_create(connection_struct
*conn
,char *path
, BOOL old_handle
, BOOL expect_close
,uint16 spid
);
3941 BOOL
dptr_fill(char *buf1
,unsigned int key
);
3942 void *dptr_fetch(char *buf
,int *num
);
3943 void *dptr_fetch_lanman2(int dptr_num
);
3944 BOOL
dir_check_ftype(connection_struct
*conn
,int mode
,SMB_STRUCT_STAT
*st
,int dirtype
);
3945 BOOL
get_dir_entry(connection_struct
*conn
,char *mask
,int dirtype
,char *fname
,
3946 SMB_OFF_T
*size
,int *mode
,time_t *date
,BOOL check_descend
);
3947 void *OpenDir(connection_struct
*conn
, char *name
, BOOL use_veto
);
3948 void CloseDir(void *p
);
3949 char *ReadDirName(void *p
);
3950 BOOL
SeekDir(void *p
,int pos
);
3951 int TellDir(void *p
);
3952 void DirCacheAdd( char *path
, char *name
, char *dname
, int snum
);
3953 char *DirCacheCheck( char *path
, char *name
, int snum
);
3954 void DirCacheFlush(int snum
);
3956 /*The following definitions come from smbd/dosmode.c */
3958 mode_t
unix_mode(connection_struct
*conn
,int dosmode
,const char *fname
);
3959 int dos_mode(connection_struct
*conn
,char *path
,SMB_STRUCT_STAT
*sbuf
);
3960 int file_chmod(connection_struct
*conn
,char *fname
,int dosmode
,SMB_STRUCT_STAT
*st
);
3961 int file_utime(connection_struct
*conn
, char *fname
, struct utimbuf
*times
);
3962 BOOL
set_filetime(connection_struct
*conn
, char *fname
, time_t mtime
);
3964 /*The following definitions come from smbd/error.c */
3966 int cached_error_packet(char *inbuf
,char *outbuf
,files_struct
*fsp
,int line
);
3967 int unix_error_packet(char *inbuf
,char *outbuf
,int def_class
,uint32 def_code
,int line
);
3968 int error_packet(char *inbuf
,char *outbuf
,int error_class
,uint32 error_code
,int line
);
3970 /*The following definitions come from smbd/fileio.c */
3972 SMB_OFF_T
seek_file(files_struct
*fsp
,SMB_OFF_T pos
);
3973 BOOL
read_from_write_cache(files_struct
*fsp
,char *data
,SMB_OFF_T pos
,size_t n
);
3974 ssize_t
read_file(files_struct
*fsp
,char *data
,SMB_OFF_T pos
,size_t n
);
3975 ssize_t
write_file(files_struct
*fsp
, char *data
, SMB_OFF_T pos
, size_t n
);
3976 void delete_write_cache(files_struct
*fsp
);
3977 void set_filelen_write_cache(files_struct
*fsp
, SMB_OFF_T file_size
);
3978 ssize_t
flush_write_cache(files_struct
*fsp
, enum flush_reason_enum reason
);
3979 void sync_file(connection_struct
*conn
, files_struct
*fsp
);
3981 /*The following definitions come from smbd/filename.c */
3983 BOOL
unix_convert(char *name
,connection_struct
*conn
,char *saved_last_component
,
3984 BOOL
*bad_path
, SMB_STRUCT_STAT
*pst
);
3985 BOOL
check_name(char *name
,connection_struct
*conn
);
3987 /*The following definitions come from smbd/files.c */
3989 files_struct
*file_new(connection_struct
*conn
);
3990 void file_close_conn(connection_struct
*conn
);
3991 void file_init(void);
3992 void file_close_user(int vuid
);
3993 files_struct
*file_find_dit(SMB_DEV_T dev
, SMB_INO_T inode
, struct timeval
*tval
);
3994 files_struct
*file_find_fsp(files_struct
*orig_fsp
);
3995 files_struct
*file_find_di_first(SMB_DEV_T dev
, SMB_INO_T inode
);
3996 files_struct
*file_find_di_next(files_struct
*start_fsp
);
3997 files_struct
*file_find_print(void);
3998 void file_sync_all(connection_struct
*conn
);
3999 void file_free(files_struct
*fsp
);
4000 files_struct
*file_fsp(char *buf
, int where
);
4001 void file_chain_reset(void);
4002 void file_chain_save(void);
4003 void file_chain_restore(void);
4005 /*The following definitions come from smbd/ipc.c */
4007 void send_trans_reply(char *outbuf
,
4008 char *rparam
, int rparam_len
,
4009 char *rdata
, int rdata_len
,
4010 BOOL buffer_too_large
);
4011 int reply_trans(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int bufsize
);
4013 /*The following definitions come from smbd/lanman.c */
4015 int api_reply(connection_struct
*conn
,uint16 vuid
,char *outbuf
,char *data
,char *params
,
4016 int tdscnt
,int tpscnt
,int mdrcnt
,int mprcnt
);
4018 /*The following definitions come from smbd/mangle.c */
4020 BOOL
is_mangled( char *s
);
4021 BOOL
is_8_3( char *fname
, BOOL check_case
);
4022 void reset_mangled_cache( void );
4023 BOOL
check_mangled_cache( char *s
);
4024 void mangle_name_83( char *s
);
4025 BOOL
name_map_mangle(char *OutName
, BOOL need83
, BOOL cache83
, int snum
);
4027 /*The following definitions come from smbd/message.c */
4029 int reply_sends(connection_struct
*conn
,
4030 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4031 int reply_sendstrt(connection_struct
*conn
,
4032 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4033 int reply_sendtxt(connection_struct
*conn
,
4034 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4035 int reply_sendend(connection_struct
*conn
,
4036 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4038 /*The following definitions come from smbd/negprot.c */
4040 int reply_negprot(connection_struct
*conn
,
4041 char *inbuf
,char *outbuf
, int dum_size
,
4044 /*The following definitions come from smbd/noquotas.c */
4046 BOOL
disk_quotas(char *path
,SMB_BIG_UINT
*bsize
,SMB_BIG_UINT
*dfree
,SMB_BIG_UINT
*dsize
);
4048 /*The following definitions come from smbd/notify.c */
4050 void remove_pending_change_notify_requests_by_fid(files_struct
*fsp
);
4051 void remove_pending_change_notify_requests_by_mid(int mid
);
4052 void remove_pending_change_notify_requests_by_filename(files_struct
*fsp
);
4053 int change_notify_timeout(void);
4054 BOOL
process_pending_change_notify_queue(time_t t
);
4055 BOOL
change_notify_set(char *inbuf
, files_struct
*fsp
, connection_struct
*conn
, uint32 flags
);
4056 BOOL
init_change_notify(void);
4058 /*The following definitions come from smbd/notify_hash.c */
4060 struct cnotify_fns
*hash_notify_init(void) ;
4062 /*The following definitions come from smbd/notify_kernel.c */
4064 struct cnotify_fns
*kernel_notify_init(void) ;
4066 /*The following definitions come from smbd/nttrans.c */
4068 void fail_next_srvsvc_open(void);
4069 BOOL
should_fail_next_srvsvc_open(const char *pipename
);
4070 int reply_ntcreate_and_X(connection_struct
*conn
,
4071 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4072 int reply_ntcancel(connection_struct
*conn
,
4073 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4074 int reply_nttranss(connection_struct
*conn
,
4075 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4076 int reply_nttrans(connection_struct
*conn
,
4077 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4079 /*The following definitions come from smbd/open.c */
4081 int fd_close(struct connection_struct
*conn
, files_struct
*fsp
);
4082 files_struct
*open_file_shared(connection_struct
*conn
,char *fname
, SMB_STRUCT_STAT
*psbuf
,
4083 int share_mode
,int ofun
, mode_t mode
,int oplock_request
, int *Access
,int *action
);
4084 files_struct
*open_file_stat(connection_struct
*conn
, char *fname
,
4085 SMB_STRUCT_STAT
*psbuf
, int smb_ofun
, int *action
);
4086 files_struct
*open_file_fchmod(connection_struct
*conn
, char *fname
, SMB_STRUCT_STAT
*psbuf
);
4087 int close_file_fchmod(files_struct
*fsp
);
4088 files_struct
*open_directory(connection_struct
*conn
, char *fname
,
4089 SMB_STRUCT_STAT
*psbuf
, int smb_ofun
, mode_t unixmode
, int *action
);
4090 BOOL
check_file_sharing(connection_struct
*conn
,char *fname
, BOOL rename_op
);
4092 /*The following definitions come from smbd/oplock.c */
4094 int32
get_number_of_exclusive_open_oplocks(void);
4095 BOOL
receive_local_message(fd_set
*fds
, char *buffer
, int buffer_len
, int timeout
);
4096 BOOL
set_file_oplock(files_struct
*fsp
, int oplock_type
);
4097 void release_file_oplock(files_struct
*fsp
);
4098 BOOL
remove_oplock(files_struct
*fsp
, BOOL break_to_none
);
4099 int setup_oplock_select_set( fd_set
*fds
);
4100 BOOL
process_local_message(char *buffer
, int buf_size
);
4101 BOOL
oplock_break_level2(files_struct
*fsp
, BOOL local_request
, int token
);
4102 BOOL
request_oplock_break(share_mode_entry
*share_entry
,
4103 SMB_DEV_T dev
, SMB_INO_T inode
);
4104 BOOL
attempt_close_oplocked_file(files_struct
*fsp
);
4105 void release_level_2_oplocks_on_change(files_struct
*fsp
);
4106 BOOL
init_oplocks(void);
4108 /*The following definitions come from smbd/oplock_irix.c */
4110 struct kernel_oplocks
*irix_init_kernel_oplocks(void) ;
4112 /*The following definitions come from smbd/oplock_linux.c */
4114 struct kernel_oplocks
*linux_init_kernel_oplocks(void) ;
4116 /*The following definitions come from smbd/password.c */
4118 void generate_next_challenge(char *challenge
);
4119 BOOL
set_challenge(unsigned char *challenge
);
4120 user_struct
*get_valid_user_struct(uint16 vuid
);
4121 void invalidate_vuid(uint16 vuid
);
4122 void invalidate_all_vuids(void);
4123 char *validated_username(uint16 vuid
);
4124 char *validated_domain(uint16 vuid
);
4125 NT_USER_TOKEN
*create_nt_token(uid_t uid
, gid_t gid
, int ngroups
, gid_t
*groups
, BOOL is_guest
);
4126 int register_vuid(uid_t uid
,gid_t gid
, char *unix_name
, char *requested_name
,
4127 char *domain
,BOOL guest
);
4128 void add_session_user(char *user
);
4129 BOOL
smb_password_check(char *password
, unsigned char *part_passwd
, unsigned char *c8
);
4130 BOOL
smb_password_ok(struct smb_passwd
*smb_pass
, uchar chal
[8],
4131 uchar lm_pass
[24], uchar nt_pass
[24]);
4132 BOOL
pass_check_smb(char *user
, char *domain
,
4133 uchar
*chal
, uchar
*lm_pwd
, uchar
*nt_pwd
,
4134 struct passwd
*pwd
);
4135 BOOL
password_ok(char *user
, char *password
, int pwlen
, struct passwd
*pwd
);
4136 BOOL
user_ok(char *user
,int snum
);
4137 BOOL
authorise_login(int snum
,char *user
,char *password
, int pwlen
,
4138 BOOL
*guest
,BOOL
*force
,uint16 vuid
);
4139 BOOL
check_hosts_equiv(char *user
);
4140 struct cli_state
*server_client(void);
4141 struct cli_state
*server_cryptkey(void);
4142 BOOL
server_validate(char *user
, char *domain
,
4143 char *pass
, int passlen
,
4144 char *ntpass
, int ntpasslen
);
4145 BOOL
domain_client_validate( char *user
, char *domain
,
4146 char *smb_apasswd
, int smb_apasslen
,
4147 char *smb_ntpasswd
, int smb_ntpasslen
,
4150 /*The following definitions come from smbd/pipes.c */
4152 int reply_open_pipe_and_X(connection_struct
*conn
,
4153 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4154 int reply_pipe_write(char *inbuf
,char *outbuf
,int length
,int dum_bufsize
);
4155 int reply_pipe_write_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
4156 int reply_pipe_read_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
4157 int reply_pipe_close(connection_struct
*conn
, char *inbuf
,char *outbuf
);
4159 /*The following definitions come from smbd/posix_acls.c */
4161 size_t get_nt_acl(files_struct
*fsp
, SEC_DESC
**ppdesc
);
4162 BOOL
set_nt_acl(files_struct
*fsp
, uint32 security_info_sent
, SEC_DESC
*psd
);
4163 int chmod_acl(char *name
, mode_t mode
);
4164 int fchmod_acl(int fd
, mode_t mode
);
4166 /*The following definitions come from smbd/process.c */
4168 BOOL
push_oplock_pending_smb_message(char *buf
, int msg_len
);
4169 BOOL
receive_next_smb(char *inbuf
, int bufsize
, int timeout
);
4170 void respond_to_all_remaining_local_messages(void);
4171 void process_smb(char *inbuf
, char *outbuf
);
4172 char *smb_fn_name(int type
);
4173 void construct_reply_common(char *inbuf
,char *outbuf
);
4174 int chain_reply(char *inbuf
,char *outbuf
,int size
,int bufsize
);
4175 void check_reload(int t
);
4176 void smbd_process(void);
4178 /*The following definitions come from smbd/reply.c */
4180 int reply_special(char *inbuf
,char *outbuf
);
4181 int reply_tcon(connection_struct
*conn
,
4182 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4183 int reply_tcon_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4184 int reply_unknown(char *inbuf
,char *outbuf
);
4185 int reply_ioctl(connection_struct
*conn
,
4186 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4187 int smb_create_user(char *unix_user
, char *homedir
);
4188 int reply_sesssetup_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4189 int reply_chkpth(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4190 int reply_getatr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4191 int reply_setatr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4192 int reply_dskattr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4193 int reply_search(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4194 int reply_fclose(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4195 int reply_open(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4196 int reply_open_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4197 int reply_ulogoffX(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4198 int reply_mknew(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4199 int reply_ctemp(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4200 int unlink_internals(connection_struct
*conn
, char *inbuf
,char *outbuf
,
4201 int dirtype
, char *name
);
4202 int reply_unlink(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4203 int reply_readbraw(connection_struct
*conn
, char *inbuf
, char *outbuf
, int dum_size
, int dum_buffsize
);
4204 int reply_lockread(connection_struct
*conn
, char *inbuf
,char *outbuf
, int length
, int dum_buffsiz
);
4205 int reply_read(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4206 int reply_read_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4207 int reply_writebraw(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4208 int reply_writeunlock(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4209 int reply_write(connection_struct
*conn
, char *inbuf
,char *outbuf
,int size
,int dum_buffsize
);
4210 int reply_write_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4211 int reply_lseek(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4212 int reply_flush(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4213 int reply_exit(connection_struct
*conn
,
4214 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4215 int reply_close(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
,
4217 int reply_writeclose(connection_struct
*conn
,
4218 char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4219 int reply_lock(connection_struct
*conn
,
4220 char *inbuf
,char *outbuf
, int length
, int dum_buffsize
);
4221 int reply_unlock(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4222 int reply_tdis(connection_struct
*conn
,
4223 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4224 int reply_echo(connection_struct
*conn
,
4225 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4226 int reply_printopen(connection_struct
*conn
,
4227 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4228 int reply_printclose(connection_struct
*conn
,
4229 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4230 int reply_printqueue(connection_struct
*conn
,
4231 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4232 int reply_printwrite(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4233 int mkdir_internal(connection_struct
*conn
, char *inbuf
, char *outbuf
, pstring directory
);
4234 int reply_mkdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4235 BOOL
rmdir_internals(connection_struct
*conn
, char *directory
);
4236 int reply_rmdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4237 int rename_internals(connection_struct
*conn
,
4238 char *inbuf
, char *outbuf
, char *name
,
4239 char *newname
, BOOL replace_if_exists
);
4240 int reply_mv(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4241 int reply_copy(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4242 int reply_setdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4243 SMB_BIG_UINT
get_lock_count( char *data
, int data_offset
, BOOL large_file_format
);
4244 SMB_BIG_UINT
get_lock_offset( char *data
, int data_offset
, BOOL large_file_format
, BOOL
*err
);
4245 int reply_lockingX(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4246 int reply_readbmpx(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4247 int reply_writebmpx(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4248 int reply_writebs(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4249 int reply_setattrE(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4250 int reply_getattrE(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4252 /*The following definitions come from smbd/sec_ctx.c */
4254 int get_current_groups(int *p_ngroups
, gid_t
**p_groups
);
4255 void delete_nt_token(NT_USER_TOKEN
**pptoken
);
4256 NT_USER_TOKEN
*dup_nt_token(NT_USER_TOKEN
*ptoken
);
4257 BOOL
initialise_groups(char *user
, uid_t uid
, gid_t gid
);
4258 BOOL
push_sec_ctx(void);
4259 void set_sec_ctx(uid_t uid
, gid_t gid
, int ngroups
, gid_t
*groups
, NT_USER_TOKEN
*token
);
4260 void set_root_sec_ctx(void);
4261 BOOL
pop_sec_ctx(void);
4262 void init_sec_ctx(void);
4264 /*The following definitions come from smbd/server.c */
4266 int smbd_server_fd(void);
4267 void smbd_set_server_fd(int fd
);
4268 BOOL
reload_services(BOOL test
);
4269 void exit_server(char *reason
);
4271 /*The following definitions come from smbd/service.c */
4273 BOOL
become_service(connection_struct
*conn
,BOOL do_chdir
);
4274 int add_home_service(char *service
, char *homedir
);
4275 int find_service(char *service
);
4276 connection_struct
*make_connection(char *service
,char *user
,char *password
, int pwlen
, char *dev
,uint16 vuid
, int *ecode
);
4277 void close_cnum(connection_struct
*conn
, uint16 vuid
);
4279 /*The following definitions come from smbd/session.c */
4281 BOOL
session_claim(uint16 vuid
);
4282 void session_yield(uint16 vuid
);
4284 /*The following definitions come from smbd/ssl.c */
4286 int sslutil_init(int isServer
);
4287 int sslutil_accept(int fd
);
4288 int sslutil_fd_is_ssl(int fd
);
4289 int sslutil_connect(int fd
);
4290 int sslutil_disconnect(int fd
);
4291 int sslutil_negotiate_ssl(int fd
, int msg_type
);
4293 /*The following definitions come from smbd/statcache.c */
4295 void stat_cache_add( char *full_orig_name
, char *orig_translated_path
);
4296 BOOL
stat_cache_lookup(connection_struct
*conn
, char *name
, char *dirpath
,
4297 char **start
, SMB_STRUCT_STAT
*pst
);
4298 BOOL
reset_stat_cache( void );
4300 /*The following definitions come from smbd/trans2.c */
4302 int reply_findclose(connection_struct
*conn
,
4303 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4304 int reply_findnclose(connection_struct
*conn
,
4305 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4306 int reply_transs2(connection_struct
*conn
,
4307 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4308 int reply_trans2(connection_struct
*conn
,
4309 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4311 /*The following definitions come from smbd/uid.c */
4313 BOOL
become_guest(void);
4314 BOOL
become_user(connection_struct
*conn
, uint16 vuid
);
4315 BOOL
unbecome_user(void );
4316 BOOL
become_authenticated_pipe_user(pipes_struct
*p
);
4317 BOOL
unbecome_authenticated_pipe_user(pipes_struct
*p
);
4318 void become_root(void);
4319 void unbecome_root(void);
4320 BOOL
lookup_name(const char *name
, DOM_SID
*psid
, enum SID_NAME_USE
*name_type
);
4321 BOOL
lookup_sid(DOM_SID
*sid
, fstring dom_name
, fstring name
, enum SID_NAME_USE
*name_type
);
4322 DOM_SID
*uid_to_sid(DOM_SID
*psid
, uid_t uid
);
4323 DOM_SID
*gid_to_sid(DOM_SID
*psid
, gid_t gid
);
4324 BOOL
sid_to_uid(DOM_SID
*psid
, uid_t
*puid
, enum SID_NAME_USE
*sidtype
);
4325 BOOL
sid_to_gid(DOM_SID
*psid
, gid_t
*pgid
, enum SID_NAME_USE
*sidtype
);
4327 /*The following definitions come from smbd/utmp.c */
4329 void sys_utmp_yield(const char *username
, const char *hostname
,
4330 const char *id_str
, int id_num
);
4331 void sys_utmp_claim(const char *username
, const char *hostname
,
4332 const char *id_str
, int id_num
);
4334 /*The following definitions come from smbd/vfs.c */
4336 int vfs_init_default(connection_struct
*conn
);
4337 BOOL
vfs_init_custom(connection_struct
*conn
);
4338 BOOL
vfs_directory_exist(connection_struct
*conn
, char *dname
, SMB_STRUCT_STAT
*st
);
4339 int vfs_mkdir(connection_struct
*conn
, char *fname
, mode_t mode
);
4340 char *vfs_getwd(connection_struct
*conn
, char *unix_path
);
4341 BOOL
vfs_file_exist(connection_struct
*conn
,char *fname
,SMB_STRUCT_STAT
*sbuf
);
4342 ssize_t
vfs_read_data(files_struct
*fsp
, char *buf
, size_t byte_count
);
4343 ssize_t
vfs_write_data(files_struct
*fsp
,char *buffer
,size_t N
);
4344 int vfs_set_filelen(files_struct
*fsp
, SMB_OFF_T len
);
4345 SMB_OFF_T
vfs_transfer_file(int in_fd
, files_struct
*in_fsp
,
4346 int out_fd
, files_struct
*out_fsp
,
4347 SMB_OFF_T n
, char *header
, int headlen
, int align
);
4348 char *vfs_readdirname(connection_struct
*conn
, void *p
);
4349 int vfs_ChDir(connection_struct
*conn
, char *path
);
4350 char *vfs_GetWd(connection_struct
*conn
, char *path
);
4351 BOOL
reduce_name(connection_struct
*conn
, char *s
,char *dir
,BOOL widelinks
);
4353 /*The following definitions come from smbd/vfs-wrap.c */
4355 int vfswrap_dummy_connect(connection_struct
*conn
, char *service
, char *user
);
4356 void vfswrap_dummy_disconnect(connection_struct
*conn
);
4357 SMB_BIG_UINT
vfswrap_disk_free(connection_struct
*conn
, char *path
, BOOL small_query
, SMB_BIG_UINT
*bsize
,
4358 SMB_BIG_UINT
*dfree
, SMB_BIG_UINT
*dsize
);
4359 DIR *vfswrap_opendir(connection_struct
*conn
, char *fname
);
4360 struct dirent
*vfswrap_readdir(connection_struct
*conn
, DIR *dirp
);
4361 int vfswrap_mkdir(connection_struct
*conn
, char *path
, mode_t mode
);
4362 int vfswrap_rmdir(connection_struct
*conn
, char *path
);
4363 int vfswrap_closedir(connection_struct
*conn
, DIR *dirp
);
4364 int vfswrap_open(connection_struct
*conn
, char *fname
, int flags
, mode_t mode
);
4365 int vfswrap_close(files_struct
*fsp
, int fd
);
4366 ssize_t
vfswrap_read(files_struct
*fsp
, int fd
, char *data
, size_t n
);
4367 ssize_t
vfswrap_write(files_struct
*fsp
, int fd
, char *data
, size_t n
);
4368 SMB_OFF_T
vfswrap_lseek(files_struct
*fsp
, int filedes
, SMB_OFF_T offset
, int whence
);
4369 int vfswrap_rename(connection_struct
*conn
, char *old
, char *new);
4370 int vfswrap_fsync(files_struct
*fsp
, int fd
);
4371 int vfswrap_stat(connection_struct
*conn
, char *fname
, SMB_STRUCT_STAT
*sbuf
);
4372 int vfswrap_fstat(files_struct
*fsp
, int fd
, SMB_STRUCT_STAT
*sbuf
);
4373 int vfswrap_lstat(connection_struct
*conn
, char *path
, SMB_STRUCT_STAT
*sbuf
);
4374 int vfswrap_unlink(connection_struct
*conn
, char *path
);
4375 int vfswrap_chmod(connection_struct
*conn
, char *path
, mode_t mode
);
4376 int vfswrap_fchmod(files_struct
*fsp
, int fd
, mode_t mode
);
4377 int vfswrap_chown(connection_struct
*conn
, char *path
, uid_t uid
, gid_t gid
);
4378 int vfswrap_fchown(files_struct
*fsp
, int fd
, uid_t uid
, gid_t gid
);
4379 int vfswrap_chdir(connection_struct
*conn
, char *path
);
4380 char *vfswrap_getwd(connection_struct
*conn
, char *path
);
4381 int vfswrap_utime(connection_struct
*conn
, char *path
, struct utimbuf
*times
);
4382 int vfswrap_ftruncate(files_struct
*fsp
, int fd
, SMB_OFF_T len
);
4383 BOOL
vfswrap_lock(files_struct
*fsp
, int fd
, int op
, SMB_OFF_T offset
, SMB_OFF_T count
, int type
);
4384 size_t vfswrap_fget_nt_acl(files_struct
*fsp
, int fd
, SEC_DESC
**ppdesc
);
4385 size_t vfswrap_get_nt_acl(files_struct
*fsp
, char *name
, SEC_DESC
**ppdesc
);
4386 BOOL
vfswrap_fset_nt_acl(files_struct
*fsp
, int fd
, uint32 security_info_sent
, SEC_DESC
*psd
);
4387 BOOL
vfswrap_set_nt_acl(files_struct
*fsp
, char *name
, uint32 security_info_sent
, SEC_DESC
*psd
);
4388 int vfswrap_chmod_acl(connection_struct
*conn
, char *name
, mode_t mode
);
4389 int vfswrap_fchmod_acl(files_struct
*fsp
, int fd
, mode_t mode
);
4391 /*The following definitions come from smbwrapper/realcalls.c */
4393 int real_utime(const char *name
, struct utimbuf
*buf
);
4394 int real_utimes(const char *name
, struct timeval tv
[2]);
4396 /*The following definitions come from smbwrapper/shared.c */
4398 void smbw_setup_shared(void);
4399 char *smbw_getshared(const char *name
);
4400 void smbw_setshared(const char *name
, const char *val
);
4401 int smbw_setenv(const char *name
, const char *value
);
4402 int smbw_shared_fd(int fd
);
4404 /*The following definitions come from smbwrapper/smbw.c */
4406 void smbw_init(void);
4407 int smbw_fd(int fd
);
4408 int smbw_local_fd(int fd
);
4409 ino_t
smbw_inode(const char *name
);
4410 void clean_fname(char *name
);
4411 char *smbw_parse_path(const char *fname
, char *server
, char *share
, char *path
);
4412 int smbw_path(const char *path
);
4413 int smbw_errno(struct cli_state
*c
);
4414 void get_envvar_auth_data(char *server
, char *share
, char **workgroup
,
4415 char **username
, char **password
);
4416 void smbw_set_auth_data_fn(smbw_get_auth_data_fn fn
);
4417 struct smbw_server
*smbw_server(char *server
, char *share
);
4418 struct smbw_file
*smbw_file(int fd
);
4419 int smbw_open(const char *fname
, int flags
, mode_t mode
);
4420 ssize_t
smbw_pread(int fd
, void *buf
, size_t count
, off_t ofs
);
4421 ssize_t
smbw_read(int fd
, void *buf
, size_t count
);
4422 ssize_t
smbw_write(int fd
, void *buf
, size_t count
);
4423 ssize_t
smbw_pwrite(int fd
, void *buf
, size_t count
, off_t ofs
);
4424 int smbw_close(int fd
);
4425 int smbw_fcntl(int fd
, int cmd
, long arg
);
4426 int smbw_access(const char *name
, int mode
);
4427 int smbw_readlink(const char *path
, char *buf
, size_t bufsize
);
4428 int smbw_unlink(const char *fname
);
4429 int smbw_rename(const char *oldname
, const char *newname
);
4430 int smbw_utime(const char *fname
, void *buf
);
4431 int smbw_utimes(const char *fname
, void *buf
);
4432 int smbw_chown(const char *fname
, uid_t owner
, gid_t group
);
4433 int smbw_chmod(const char *fname
, mode_t newmode
);
4434 off_t
smbw_lseek(int fd
, off_t offset
, int whence
);
4435 int smbw_dup(int fd
);
4436 int smbw_dup2(int fd
, int fd2
);
4437 int smbw_fork(void);
4439 /*The following definitions come from smbwrapper/smbw_dir.c */
4441 struct smbw_dir
*smbw_dir(int fd
);
4442 int smbw_dirp(DIR *dirp
);
4443 int smbw_dir_open(const char *fname
);
4444 int smbw_dir_fstat(int fd
, struct stat
*st
);
4445 int smbw_dir_close(int fd
);
4446 int smbw_getdents(unsigned int fd
, struct dirent
*dirp
, int count
);
4447 int smbw_chdir(const char *name
);
4448 off_t
smbw_dir_lseek(int fd
, off_t offset
, int whence
);
4449 int smbw_mkdir(const char *fname
, mode_t mode
);
4450 int smbw_rmdir(const char *fname
);
4451 char *smbw_getcwd(char *buf
, size_t size
);
4452 int smbw_fchdir(unsigned int fd
);
4453 DIR *smbw_opendir(const char *fname
);
4454 struct dirent
*smbw_readdir(DIR *dirp
);
4455 int smbw_closedir(DIR *dirp
);
4456 void smbw_seekdir(DIR *dirp
, off_t offset
);
4457 off_t
smbw_telldir(DIR *dirp
);
4459 /*The following definitions come from smbwrapper/smbw_stat.c */
4461 void smbw_setup_stat(struct stat
*st
, char *fname
, size_t size
, int mode
);
4462 BOOL
smbw_getatr(struct smbw_server
*srv
, char *path
,
4463 uint16
*mode
, size_t *size
,
4464 time_t *c_time
, time_t *a_time
, time_t *m_time
,
4466 int smbw_stat_printjob(struct smbw_server
*srv
,char *path
,
4467 size_t *size
, time_t *m_time
);
4468 int smbw_fstat(int fd
, struct stat
*st
);
4469 int smbw_stat(const char *fname
, struct stat
*st
);
4471 /*The following definitions come from tdb/spinlock.c */
4473 int tdb_spinlock(TDB_CONTEXT
*tdb
, int list
, int rw_type
);
4474 int tdb_spinunlock(TDB_CONTEXT
*tdb
, int list
, int rw_type
);
4475 int tdb_create_rwlocks(int fd
, unsigned int hash_size
);
4476 int tdb_clear_spinlocks(TDB_CONTEXT
*tdb
);
4477 int tdb_clear_spinlocks(TDB_CONTEXT
*tdb
);
4479 /*The following definitions come from tdb/tdb.c */
4481 void tdb_dump_all(TDB_CONTEXT
*tdb
);
4482 void tdb_printfreelist(TDB_CONTEXT
*tdb
);
4483 enum TDB_ERROR
tdb_error(TDB_CONTEXT
*tdb
);
4484 const char *tdb_errorstr(TDB_CONTEXT
*tdb
);
4485 TDB_DATA
tdb_fetch(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4486 int tdb_exists(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4487 int tdb_traverse(TDB_CONTEXT
*tdb
, tdb_traverse_func fn
, void *state
);
4488 TDB_DATA
tdb_firstkey(TDB_CONTEXT
*tdb
);
4489 TDB_DATA
tdb_nextkey(TDB_CONTEXT
*tdb
, TDB_DATA oldkey
);
4490 int tdb_delete(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4491 int tdb_store(TDB_CONTEXT
*tdb
, TDB_DATA key
, TDB_DATA dbuf
, int flag
);
4492 TDB_CONTEXT
*tdb_open(char *name
, int hash_size
, int tdb_flags
,
4493 int open_flags
, mode_t mode
);
4494 int tdb_close(TDB_CONTEXT
*tdb
);
4495 int tdb_lockall(TDB_CONTEXT
*tdb
);
4496 void tdb_unlockall(TDB_CONTEXT
*tdb
);
4497 int tdb_lockkeys(TDB_CONTEXT
*tdb
, u32 number
, TDB_DATA keys
[]);
4498 void tdb_unlockkeys(TDB_CONTEXT
*tdb
);
4499 int tdb_chainlock(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4500 void tdb_chainunlock(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4501 void tdb_logging_function(TDB_CONTEXT
*tdb
, void (*fn
)(TDB_CONTEXT
*, int , const char *, ...));
4503 /*The following definitions come from tdb/tdbutil.c */
4505 int tdb_lock_bystring(TDB_CONTEXT
*tdb
, char *keyval
);
4506 void tdb_unlock_bystring(TDB_CONTEXT
*tdb
, char *keyval
);
4507 int tdb_fetch_int_byblob(TDB_CONTEXT
*tdb
, char *keyval
, size_t len
);
4508 int tdb_fetch_int(TDB_CONTEXT
*tdb
, char *keystr
);
4509 int tdb_store_int_byblob(TDB_CONTEXT
*tdb
, char *keystr
, size_t len
, int v
);
4510 int tdb_store_int(TDB_CONTEXT
*tdb
, char *keystr
, int v
);
4511 int tdb_store_by_string(TDB_CONTEXT
*tdb
, char *keystr
, void *buffer
, int len
);
4512 TDB_DATA
tdb_fetch_by_string(TDB_CONTEXT
*tdb
, char *keystr
);
4513 int tdb_change_int_atomic(TDB_CONTEXT
*tdb
, char *keystr
, int *oldval
, int change_val
);
4514 size_t tdb_pack(char *buf
, int bufsize
, char *fmt
, ...);
4515 int tdb_unpack(char *buf
, int bufsize
, char *fmt
, ...);
4516 TDB_CONTEXT
*tdb_open_log(char *name
, int hash_size
, int tdb_flags
,
4517 int open_flags
, mode_t mode
);
4519 /*The following definitions come from utils/nbio.c */
4521 void nb_setup(struct cli_state
*cli
);
4522 void nb_unlink(char *fname
);
4523 void nb_open(char *fname
, int handle
, int size
);
4524 void nb_write(int handle
, int size
, int offset
);
4525 void nb_read(int handle
, int size
, int offset
);
4526 void nb_close(int handle
);
4527 void nb_mkdir(char *fname
);
4528 void nb_rmdir(char *fname
);
4529 void nb_rename(char *old
, char *new);
4530 void nb_stat(char *fname
, int size
);
4531 void nb_create(char *fname
, int size
);
4533 /*The following definitions come from utils/torture.c */
4536 /*The following definitions come from web/cgi.c */
4538 void cgi_load_variables(FILE *f1
);
4539 char *cgi_variable(char *name
);
4541 char *cgi_user_name(void);
4542 void cgi_setup(char *rootdir
, int auth_required
);
4543 char *cgi_baseurl(void);
4544 char *cgi_pathinfo(void);
4545 char *cgi_remote_host(void);
4546 char *cgi_remote_addr(void);
4547 BOOL
cgi_waspost(void);
4549 /*The following definitions come from web/diagnose.c */
4551 BOOL
nmbd_running(void);
4552 BOOL
smbd_running(void);
4554 /*The following definitions come from web/startstop.c */
4556 void start_smbd(void);
4557 void start_nmbd(void);
4558 void stop_smbd(void);
4559 void stop_nmbd(void);
4560 void kill_pid(pid_t pid
);
4562 /*The following definitions come from web/statuspage.c */
4564 void status_page(void);
4566 /*The following definitions come from web/swat.c */
4568 #endif /* _PROTO_H_ */