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(const char *server
, const 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_static(const char *str
);
38 char *unix2dos_format(char *str
);
39 char *dos2unix_format_static(const char *str
);
40 char *dos2unix_format(char *str
);
41 void interpret_character_set(char *str
, int codepage
);
43 /* The following definitions come from lib/charset.c */
45 void charset_initialise(void);
46 void codepage_initialise(int client_codepage
);
47 void add_char_string(const char *s
);
49 /* The following definitions come from lib/crc32.c */
51 uint32
crc32_calc_buffer( char *buffer
, uint32 count
);
53 /* The following definitions come from lib/debug.c */
55 const char* debug_classname_from_index(int ndx
);
56 int debug_lookup_classname(char* classname
);
57 BOOL
debug_parse_params(char **params
, int *debuglevel_class
);
58 BOOL
debug_parse_levels(char *params_str
);
59 void debug_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
60 void debug_message_send(pid_t pid
, int level
);
61 void setup_logging(const char *pname
, BOOL interactive
);
62 BOOL
reopen_logs( void );
63 void force_check_log_size( void );
64 BOOL
need_to_check_log_size( void );
65 void check_log_size( void );
66 void dbgflush( void );
67 BOOL
dbghdr( int level
, const char *file
, const char *func
, int line
);
69 /* The following definitions come from lib/error.c */
71 NTSTATUS
map_nt_error_from_unix(int unix_error
);
73 /* The following definitions come from lib/fault.c */
75 void fault_setup(void (*fn
)(void *));
77 /* The following definitions come from lib/fsusage.c */
79 int sys_fsusage(const char *path
, SMB_BIG_UINT
*dfree
, SMB_BIG_UINT
*dsize
);
81 /* The following definitions come from lib/genrand.c */
83 void set_rand_reseed_data(unsigned char *data
, size_t len
);
84 void generate_random_buffer( unsigned char *out
, int len
, BOOL do_reseed_now
);
85 char *generate_random_str(size_t len
);
87 /* The following definitions come from lib/getsmbpass.c */
89 char *getsmbpass(const char *prompt
) ;
91 /* The following definitions come from lib/hash.c */
93 BOOL
hash_table_init(hash_table
*table
, int num_buckets
, compare_function compare_func
);
94 hash_element
*hash_lookup(hash_table
*table
, char *key
);
95 hash_element
*hash_insert(hash_table
*table
, char *value
, char *key
);
96 void hash_remove(hash_table
*table
, hash_element
*hash_elem
);
97 void hash_clear(hash_table
*table
);
99 /* The following definitions come from lib/interface.c */
101 void load_interfaces(void);
102 BOOL
interfaces_changed(void);
103 BOOL
ismyip(struct in_addr ip
);
104 BOOL
is_local_net(struct in_addr from
);
105 int iface_count(void);
106 BOOL
we_are_multihomed(void);
107 struct interface
*get_interface(int n
);
108 struct in_addr
*iface_n_ip(int n
);
109 struct in_addr
*iface_n_bcast(int n
);
110 unsigned iface_hash(void);
111 struct in_addr
*iface_bcast(struct in_addr ip
);
112 struct in_addr
*iface_ip(struct in_addr ip
);
114 /* The following definitions come from lib/interfaces.c */
116 int get_interfaces(struct iface_struct
*ifaces
, int max_interfaces
);
118 /* The following definitions come from lib/kanji.c */
120 void interpret_coding_system(const char *str
);
121 void initialize_multibyte_vectors( int client_codepage
);
123 /* The following definitions come from lib/md4.c */
125 void mdfour(unsigned char *out
, unsigned char *in
, int n
);
127 /* The following definitions come from lib/messages.c */
129 void ping_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
130 void debuglevel_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
131 BOOL
message_init(void);
132 BOOL
message_send_pid(pid_t pid
, int msg_type
, const void *buf
, size_t len
,
133 BOOL duplicates_allowed
);
134 void message_dispatch(void);
135 void message_register(int msg_type
,
136 void (*fn
)(int msg_type
, pid_t pid
, void *buf
, size_t len
));
137 void message_deregister(int msg_type
);
138 BOOL
message_send_all(TDB_CONTEXT
*conn_tdb
, int msg_type
,
139 const void *buf
, size_t len
,
140 BOOL duplicates_allowed
,
143 /* The following definitions come from lib/ms_fnmatch.c */
145 int ms_fnmatch(const char *pattern
, const char *string
);
147 /* The following definitions come from lib/pam_errors.c */
149 NTSTATUS
pam_to_nt_status(int pam_error
);
150 int nt_status_to_pam(NTSTATUS nt_status
);
151 NTSTATUS
pam_to_nt_status(int pam_error
);
152 int nt_status_to_pam(NTSTATUS nt_status
);
154 /* The following definitions come from lib/pidfile.c */
156 pid_t
pidfile_pid(const char *name
);
157 void pidfile_create(const char *name
);
159 /* The following definitions come from lib/readline.c */
161 char *smb_readline(char *prompt
, void (*callback
)(void),
162 char **(completion_fn
)(const char *text
, int start
, int end
));
163 void cmd_history(void);
165 /* The following definitions come from lib/replace.c */
167 char *rep_inet_ntoa(struct in_addr ip
);
169 /* The following definitions come from lib/select.c */
171 void sys_select_signal(void);
172 int sys_select(int maxfd
, fd_set
*readfds
, fd_set
*writefds
, fd_set
*errorfds
, struct timeval
*tval
);
173 int sys_select_intr(int maxfd
, fd_set
*readfds
, fd_set
*writefds
, fd_set
*errorfds
, struct timeval
*tval
);
175 /* The following definitions come from lib/sendfile.c */
177 ssize_t
sys_sendfile(int tofd
, int fromfd
, const DATA_BLOB
*header
, SMB_OFF_T offset
, size_t count
);
178 ssize_t
sys_sendfile(int tofd
, int fromfd
, const DATA_BLOB
*header
, SMB_OFF_T offset
, size_t count
);
179 ssize_t
sys_sendfile(int tofd
, int fromfd
, const DATA_BLOB
*header
, SMB_OFF_T offset
, size_t count
);
180 ssize_t
sys_sendfile(int tofd
, int fromfd
, const DATA_BLOB
*header
, SMB_OFF_T offset
, size_t count
);
181 ssize_t
sys_sendfile(int tofd
, int fromfd
, const DATA_BLOB
*header
, SMB_OFF_T offset
, size_t count
);
182 ssize_t
sys_sendfile(int tofd
, int fromfd
, const DATA_BLOB
*header
, SMB_OFF_T offset
, size_t count
);
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 const char *pass
, int passlen
,
196 const char *ntpass
, int ntpasslen
,
197 const char *workgroup
);
198 BOOL
cli_ulogoff(struct cli_state
*cli
);
199 BOOL
cli_send_tconX(struct cli_state
*cli
,
200 const char *share
, const char *dev
, const 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_establish_connection(struct cli_state
*cli
,
208 const char *dest_host
, struct in_addr
*dest_ip
,
209 struct nmb_name
*calling
, struct nmb_name
*called
,
210 const char *service
, const char *service_type
,
211 BOOL do_shutdown
, BOOL do_tcon
);
212 NTSTATUS
cli_full_connection(struct cli_state
**output_cli
,
213 const char *my_name
, const char *dest_host
,
214 struct in_addr
*dest_ip
, int port
,
215 const char *service
, const char *service_type
,
216 const char *user
, const char *domain
,
217 const char *password
, int pass_len
) ;
218 BOOL
attempt_netbios_session_request(struct cli_state
*cli
, const char *srchost
, const char *desthost
,
219 struct in_addr
*pdest_ip
);
221 /* The following definitions come from libsmb/cli_dfs.c */
223 struct cli_state
*cli_dfs_initialise(struct cli_state
*cli
, char *system_name
,
224 struct ntuser_creds
*creds
);
225 NTSTATUS
cli_dfs_exist(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
227 NTSTATUS
cli_dfs_add(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
228 char *entrypath
, char *servername
, char *sharename
,
229 char *comment
, uint32 flags
);
230 NTSTATUS
cli_dfs_remove(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
231 char *entrypath
, char *servername
, char *sharename
);
232 NTSTATUS
cli_dfs_get_info(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
233 char *entrypath
, char *servername
, char *sharename
,
234 uint32 info_level
, DFS_INFO_CTR
*ctr
);
235 NTSTATUS
cli_dfs_enum(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
236 uint32 info_level
, DFS_INFO_CTR
*ctr
);
238 /* The following definitions come from libsmb/clidgram.c */
240 int cli_send_mailslot(int dgram_sock
, BOOL unique
, const char *mailslot
,
242 const char *srcname
, int src_type
,
243 const char *dstname
, int dest_type
,
244 struct in_addr dest_ip
, struct in_addr src_ip
,
245 int dest_port
, int src_port
);
246 int cli_get_response(int dgram_sock
, BOOL unique
, const char *mailslot
, char *buf
, int bufsiz
);
247 int cli_get_backup_list(const char *myname
, const char *send_to_name
);
248 int cli_get_backup_server(char *my_name
, char *target
, char *servername
, int namesize
);
250 /* The following definitions come from libsmb/clientgen.c */
252 int cli_set_port(struct cli_state
*cli
, int port
);
253 BOOL
cli_receive_smb(struct cli_state
*cli
);
254 BOOL
cli_send_smb(struct cli_state
*cli
);
255 void cli_setup_packet(struct cli_state
*cli
);
256 void cli_setup_bcc(struct cli_state
*cli
, void *p
);
257 void cli_init_creds(struct cli_state
*cli
, const struct ntuser_creds
*usr
);
258 struct cli_state
*cli_initialise(struct cli_state
*cli
);
259 void cli_close_connection(struct cli_state
*cli
);
260 void cli_shutdown(struct cli_state
*cli
);
261 void cli_sockopt(struct cli_state
*cli
, char *options
);
262 uint16
cli_setpid(struct cli_state
*cli
, uint16 pid
);
263 BOOL
cli_send_keepalive(struct cli_state
*cli
);
265 /* The following definitions come from libsmb/clierror.c */
267 const char *cli_errstr(struct cli_state
*cli
);
268 NTSTATUS
cli_nt_error(struct cli_state
*cli
);
269 void cli_dos_error(struct cli_state
*cli
, uint8
*eclass
, uint32
*ecode
);
270 int cli_errno_from_dos(uint8 eclass
, uint32 num
);
271 int cli_errno_from_nt(NTSTATUS status
);
272 int cli_errno(struct cli_state
*cli
);
273 BOOL
cli_is_error(struct cli_state
*cli
);
274 BOOL
cli_is_nt_error(struct cli_state
*cli
);
275 BOOL
cli_is_dos_error(struct cli_state
*cli
);
277 /* The following definitions come from libsmb/clifile.c */
279 uint32
unix_perms_to_wire(mode_t perms
);
280 BOOL
cli_unix_symlink(struct cli_state
*cli
, const char *fname_src
, const char *fname_dst
);
281 BOOL
cli_unix_hardlink(struct cli_state
*cli
, const char *fname_src
, const char *fname_dst
);
282 BOOL
cli_unix_chmod(struct cli_state
*cli
, const char *fname
, mode_t mode
);
283 BOOL
cli_unix_chown(struct cli_state
*cli
, const char *fname
, uid_t uid
, gid_t gid
);
284 BOOL
cli_rename(struct cli_state
*cli
, const char *fname_src
, const char *fname_dst
);
285 BOOL
cli_unlink(struct cli_state
*cli
, const char *fname
);
286 BOOL
cli_mkdir(struct cli_state
*cli
, const char *dname
);
287 BOOL
cli_rmdir(struct cli_state
*cli
, const char *dname
);
288 int cli_nt_delete_on_close(struct cli_state
*cli
, int fnum
, BOOL flag
);
289 int cli_nt_create_full(struct cli_state
*cli
, const char *fname
, uint32 DesiredAccess
,
290 uint32 FileAttributes
, uint32 ShareAccess
,
291 uint32 CreateDisposition
, uint32 CreateOptions
);
292 int cli_nt_create(struct cli_state
*cli
, const char *fname
, uint32 DesiredAccess
);
293 int cli_open(struct cli_state
*cli
, const char *fname
, int flags
, int share_mode
);
294 BOOL
cli_close(struct cli_state
*cli
, int fnum
);
295 NTSTATUS
cli_locktype(struct cli_state
*cli
, int fnum
,
296 uint32 offset
, uint32 len
, int timeout
, unsigned char locktype
);
297 BOOL
cli_lock(struct cli_state
*cli
, int fnum
,
298 uint32 offset
, uint32 len
, int timeout
, enum brl_type lock_type
);
299 BOOL
cli_unlock(struct cli_state
*cli
, int fnum
, uint32 offset
, uint32 len
);
300 BOOL
cli_lock64(struct cli_state
*cli
, int fnum
,
301 SMB_BIG_UINT offset
, SMB_BIG_UINT len
, int timeout
, enum brl_type lock_type
);
302 BOOL
cli_unlock64(struct cli_state
*cli
, int fnum
, SMB_BIG_UINT offset
, SMB_BIG_UINT len
);
303 BOOL
cli_getattrE(struct cli_state
*cli
, int fd
,
304 uint16
*attr
, SMB_BIG_UINT
*size
,
305 time_t *c_time
, time_t *a_time
, time_t *m_time
);
306 BOOL
cli_getatr(struct cli_state
*cli
, const char *fname
,
307 uint16
*attr
, size_t *size
, time_t *t
);
308 BOOL
cli_setatr(struct cli_state
*cli
, const char *fname
, uint16 attr
, time_t t
);
309 BOOL
cli_chkpath(struct cli_state
*cli
, const char *path
);
310 BOOL
cli_dskattr(struct cli_state
*cli
, int *bsize
, int *total
, int *avail
);
311 int cli_ctemp(struct cli_state
*cli
, const char *path
, char **tmp_path
);
313 /* The following definitions come from libsmb/clilist.c */
315 int cli_list_new(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
316 void (*fn
)(file_info
*, const char *, void *), void *state
);
317 int cli_list_old(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
318 void (*fn
)(file_info
*, const char *, void *), void *state
);
319 int cli_list(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
320 void (*fn
)(file_info
*, const char *, void *), void *state
);
322 /* The following definitions come from libsmb/cli_lsarpc.c */
324 struct cli_state
*cli_lsa_initialise(struct cli_state
*cli
, char *system_name
,
325 struct ntuser_creds
*creds
);
326 NTSTATUS
cli_lsa_open_policy(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
327 BOOL sec_qos
, uint32 des_access
, POLICY_HND
*pol
);
328 NTSTATUS
cli_lsa_open_policy2(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
329 BOOL sec_qos
, uint32 des_access
, POLICY_HND
*pol
);
330 NTSTATUS
cli_lsa_close(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
332 NTSTATUS
cli_lsa_lookup_sids(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
333 POLICY_HND
*pol
, int num_sids
, DOM_SID
*sids
,
334 char ***domains
, char ***names
, uint32
**types
);
335 NTSTATUS
cli_lsa_lookup_names(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
336 POLICY_HND
*pol
, int num_names
,
337 const char **names
, DOM_SID
**sids
,
339 NTSTATUS
cli_lsa_query_info_policy(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
340 POLICY_HND
*pol
, uint16 info_class
,
341 fstring domain_name
, DOM_SID
*domain_sid
);
342 NTSTATUS
cli_lsa_enum_trust_dom(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
343 POLICY_HND
*pol
, uint32
*enum_ctx
,
344 uint32
*num_domains
, char ***domain_names
,
345 DOM_SID
**domain_sids
);
346 NTSTATUS
cli_lsa_enum_privilege(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
347 POLICY_HND
*pol
, uint32
*enum_context
, uint32 pref_max_length
,
348 uint32
*count
, char ***privs_name
, uint32
**privs_high
, uint32
**privs_low
);
349 NTSTATUS
cli_lsa_get_dispname(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
350 POLICY_HND
*pol
, char *name
, uint16 lang_id
, uint16 lang_id_sys
,
351 fstring description
, uint16
*lang_id_desc
);
352 NTSTATUS
cli_lsa_enum_sids(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
353 POLICY_HND
*pol
, uint32
*enum_ctx
, uint32 pref_max_length
,
354 uint32
*num_sids
, DOM_SID
**sids
);
355 NTSTATUS
cli_lsa_open_account(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
356 POLICY_HND
*dom_pol
, DOM_SID
*sid
, uint32 des_access
,
357 POLICY_HND
*user_pol
);
358 NTSTATUS
cli_lsa_enum_privsaccount(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
359 POLICY_HND
*pol
, uint32
*count
, LUID_ATTR
**set
);
360 NTSTATUS
cli_lsa_lookupprivvalue(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
361 POLICY_HND
*pol
, char *name
, LUID
*luid
);
362 NTSTATUS
cli_lsa_query_secobj(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
363 POLICY_HND
*pol
, uint32 sec_info
,
364 SEC_DESC_BUF
**psdb
);
365 BOOL
fetch_domain_sid( char *domain
, char *remote_machine
, DOM_SID
*psid
);
367 /* The following definitions come from libsmb/climessage.c */
369 BOOL
cli_message_start(struct cli_state
*cli
, char *host
, char *username
,
371 BOOL
cli_message_text(struct cli_state
*cli
, char *msg
, int len
, int grp
);
372 BOOL
cli_message_end(struct cli_state
*cli
, int grp
);
374 /* The following definitions come from libsmb/cli_netlogon.c */
376 struct cli_state
*cli_netlogon_initialise(struct cli_state
*cli
,
378 struct ntuser_creds
*creds
);
379 NTSTATUS
new_cli_net_req_chal(struct cli_state
*cli
, DOM_CHAL
*clnt_chal
,
381 NTSTATUS
new_cli_net_auth2(struct cli_state
*cli
,
383 uint32 neg_flags
, DOM_CHAL
*srv_chal
);
384 NTSTATUS
new_cli_nt_setup_creds(struct cli_state
*cli
,
386 const unsigned char mach_pwd
[16]);
387 NTSTATUS
cli_netlogon_logon_ctrl2(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
389 NTSTATUS
cli_netlogon_sam_sync(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
, DOM_CRED
*ret_creds
,
390 uint32 database_id
, uint32
*num_deltas
,
391 SAM_DELTA_HDR
**hdr_deltas
,
392 SAM_DELTA_CTR
**deltas
);
393 NTSTATUS
cli_netlogon_sam_deltas(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
394 uint32 database_id
, UINT64_S seqnum
,
396 SAM_DELTA_HDR
**hdr_deltas
,
397 SAM_DELTA_CTR
**deltas
);
398 NTSTATUS
cli_netlogon_sam_logon(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
399 const char *unix_username
, const char *unix_password
,
401 NTSTATUS
cli_netlogon_sam_network_logon(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
402 const char *unix_username
, const char *unix_domain
, const char *workstation
,
404 DATA_BLOB lm_response
, DATA_BLOB nt_response
,
405 NET_USER_INFO_3
*info3
);
407 /* The following definitions come from libsmb/clioplock.c */
409 BOOL
cli_oplock_ack(struct cli_state
*cli
, int fnum
, unsigned char level
);
410 void cli_oplock_handler(struct cli_state
*cli
,
411 BOOL (*handler
)(struct cli_state
*, int, unsigned char));
413 /* The following definitions come from libsmb/cli_pipe_util.c */
415 struct cli_state
*cli_pipe_initialise(struct cli_state
*cli
, char *system_name
,
416 const char *pipe_name
,
417 struct ntuser_creds
*creds
);
418 void cli_pipe_shutdown(struct cli_state
*cli
);
420 /* The following definitions come from libsmb/cliprint.c */
422 int cli_print_queue(struct cli_state
*cli
,
423 void (*fn
)(struct print_job_info
*));
424 int cli_printjob_del(struct cli_state
*cli
, int job
);
426 /* The following definitions come from libsmb/clirap.c */
428 BOOL
cli_api_pipe(struct cli_state
*cli
, const char *pipe_name
,
429 uint16
*setup
, uint32 setup_count
, uint32 max_setup_count
,
430 char *params
, uint32 param_count
, uint32 max_param_count
,
431 char *data
, uint32 data_count
, uint32 max_data_count
,
432 char **rparam
, uint32
*rparam_count
,
433 char **rdata
, uint32
*rdata_count
);
434 BOOL
cli_api(struct cli_state
*cli
,
435 char *param
, int prcnt
, int mprcnt
,
436 char *data
, int drcnt
, int mdrcnt
,
437 char **rparam
, unsigned int *rprcnt
,
438 char **rdata
, unsigned int *rdrcnt
);
439 BOOL
cli_NetWkstaUserLogon(struct cli_state
*cli
,char *user
, char *workstation
);
440 int cli_RNetShareEnum(struct cli_state
*cli
, void (*fn
)(const char *, uint32
, const char *, void *), void *state
);
441 BOOL
cli_NetServerEnum(struct cli_state
*cli
, char *workgroup
, uint32 stype
,
442 void (*fn
)(const char *, uint32
, const char *, void *),
444 BOOL
cli_oem_change_password(struct cli_state
*cli
, const char *user
, const char *new_password
,
445 const char *old_password
);
446 BOOL
cli_qpathinfo(struct cli_state
*cli
, const char *fname
,
447 time_t *c_time
, time_t *a_time
, time_t *m_time
,
448 size_t *size
, uint16
*mode
);
449 BOOL
cli_qpathinfo2(struct cli_state
*cli
, const char *fname
,
450 time_t *c_time
, time_t *a_time
, time_t *m_time
,
451 time_t *w_time
, size_t *size
, uint16
*mode
,
453 BOOL
cli_qfileinfo(struct cli_state
*cli
, int fnum
,
454 uint16
*mode
, size_t *size
,
455 time_t *c_time
, time_t *a_time
, time_t *m_time
,
456 time_t *w_time
, SMB_INO_T
*ino
);
457 BOOL
cli_qfileinfo_test(struct cli_state
*cli
, int fnum
, int level
, char *outdata
);
458 NTSTATUS
cli_qpathinfo_alt_name(struct cli_state
*cli
, const char *fname
, fstring alt_name
);
460 /* The following definitions come from libsmb/clireadwrite.c */
462 ssize_t
cli_read(struct cli_state
*cli
, int fnum
, char *buf
, off_t offset
, size_t size
);
463 ssize_t
cli_readraw(struct cli_state
*cli
, int fnum
, char *buf
, off_t offset
, size_t size
);
464 ssize_t
cli_write(struct cli_state
*cli
,
465 int fnum
, uint16 write_mode
,
466 char *buf
, off_t offset
, size_t size
);
467 ssize_t
cli_smbwrite(struct cli_state
*cli
,
468 int fnum
, char *buf
, off_t offset
, size_t size1
);
470 /* The following definitions come from libsmb/cli_reg.c */
472 struct cli_state
*cli_winreg_initialise(struct cli_state
*cli
,
474 struct ntuser_creds
*creds
);
475 NTSTATUS
cli_reg_shutdown(struct cli_state
* cli
, TALLOC_CTX
*mem_ctx
,
476 const char *msg
, uint32 timeout
, uint16 flags
);
477 NTSTATUS
cli_reg_abort_shutdown(struct cli_state
* cli
, TALLOC_CTX
*mem_ctx
);
479 /* The following definitions come from libsmb/cli_samr.c */
481 struct cli_state
*cli_samr_initialise(struct cli_state
*cli
, char *system_name
,
482 struct ntuser_creds
*creds
);
483 NTSTATUS
cli_samr_connect(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
484 uint32 access_mask
, POLICY_HND
*connect_pol
);
485 NTSTATUS
cli_samr_close(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
486 POLICY_HND
*connect_pol
);
487 NTSTATUS
cli_samr_open_domain(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
488 POLICY_HND
*connect_pol
, uint32 access_mask
,
489 DOM_SID
*domain_sid
, POLICY_HND
*domain_pol
);
490 NTSTATUS
cli_samr_open_user(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
491 POLICY_HND
*domain_pol
, uint32 access_mask
,
492 uint32 user_rid
, POLICY_HND
*user_pol
);
493 NTSTATUS
cli_samr_open_group(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
494 POLICY_HND
*domain_pol
, uint32 access_mask
,
495 uint32 group_rid
, POLICY_HND
*group_pol
);
496 NTSTATUS
cli_samr_query_userinfo(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
497 POLICY_HND
*user_pol
, uint16 switch_value
,
498 SAM_USERINFO_CTR
**ctr
);
499 NTSTATUS
cli_samr_query_groupinfo(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
500 POLICY_HND
*group_pol
, uint32 info_level
,
501 GROUP_INFO_CTR
**ctr
);
502 NTSTATUS
cli_samr_query_usergroups(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
503 POLICY_HND
*user_pol
, uint32
*num_groups
,
505 NTSTATUS
cli_samr_query_useraliases(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
506 POLICY_HND
*user_pol
, uint32 num_sids
, DOM_SID2
*sid
,
507 uint32
*num_aliases
, uint32
**als_rids
);
508 NTSTATUS
cli_samr_query_groupmem(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
509 POLICY_HND
*group_pol
, uint32
*num_mem
,
510 uint32
**rid
, uint32
**attr
);
511 NTSTATUS
cli_samr_enum_dom_groups(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
512 POLICY_HND
*pol
, uint32
*start_idx
,
513 uint32 size
, struct acct_info
**dom_groups
,
514 uint32
*num_dom_groups
);
515 NTSTATUS
cli_samr_enum_als_groups(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
516 POLICY_HND
*pol
, uint32
*start_idx
,
517 uint32 size
, struct acct_info
**dom_groups
,
518 uint32
*num_dom_groups
);
519 NTSTATUS
cli_samr_query_aliasmem(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
520 POLICY_HND
*alias_pol
, uint32
*num_mem
,
522 NTSTATUS
cli_samr_open_alias(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
523 POLICY_HND
*domain_pol
, uint32 access_mask
,
524 uint32 alias_rid
, POLICY_HND
*alias_pol
);
525 NTSTATUS
cli_samr_query_dom_info(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
526 POLICY_HND
*domain_pol
, uint16 switch_value
,
528 void get_query_dispinfo_params(int loop_count
, uint32
*max_entries
,
530 NTSTATUS
cli_samr_query_dispinfo(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
531 POLICY_HND
*domain_pol
, uint32
*start_idx
,
532 uint16 switch_value
, uint32
*num_entries
,
533 uint32 max_entries
, uint32 max_size
,
534 SAM_DISPINFO_CTR
*ctr
);
535 NTSTATUS
cli_samr_lookup_rids(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
536 POLICY_HND
*domain_pol
, uint32 flags
,
537 uint32 num_rids
, uint32
*rids
,
538 uint32
*num_names
, char ***names
,
539 uint32
**name_types
);
540 NTSTATUS
cli_samr_lookup_names(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
541 POLICY_HND
*domain_pol
, uint32 flags
,
542 uint32 num_names
, const char **names
,
543 uint32
*num_rids
, uint32
**rids
,
545 NTSTATUS
cli_samr_create_dom_user(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
546 POLICY_HND
*domain_pol
, char *acct_name
,
547 uint32 acb_info
, uint32 unknown
,
548 POLICY_HND
*user_pol
, uint32
*rid
);
549 NTSTATUS
cli_samr_set_userinfo(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
550 POLICY_HND
*user_pol
, uint16 switch_value
,
551 uchar sess_key
[16], SAM_USERINFO_CTR
*ctr
);
552 NTSTATUS
cli_samr_set_userinfo2(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
553 POLICY_HND
*user_pol
, uint16 switch_value
,
554 uchar sess_key
[16], SAM_USERINFO_CTR
*ctr
);
555 NTSTATUS
cli_samr_delete_dom_user(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
556 POLICY_HND
*user_pol
);
557 NTSTATUS
cli_samr_query_sec_obj(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
558 POLICY_HND
*user_pol
, uint16 switch_value
,
559 TALLOC_CTX
*ctx
, SEC_DESC_BUF
**sec_desc_buf
);
561 /* The following definitions come from libsmb/clisecdesc.c */
563 SEC_DESC
*cli_query_secdesc(struct cli_state
*cli
, int fnum
,
564 TALLOC_CTX
*mem_ctx
);
565 BOOL
cli_set_secdesc(struct cli_state
*cli
, int fnum
, SEC_DESC
*sd
);
567 /* The following definitions come from libsmb/cli_spoolss.c */
569 struct cli_state
*cli_spoolss_initialise(struct cli_state
*cli
,
571 struct ntuser_creds
*creds
);
572 WERROR
cli_spoolss_open_printer_ex(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
573 char *printername
, const char *datatype
, uint32 access_required
,
574 char *station
, char *username
, POLICY_HND
*pol
);
575 WERROR
cli_spoolss_close_printer(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
577 WERROR
cli_spoolss_enum_printers(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
578 uint32 offered
, uint32
*needed
,
579 uint32 flags
, uint32 level
,
580 uint32
*num_printers
, PRINTER_INFO_CTR
*ctr
);
581 WERROR
cli_spoolss_enum_ports(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
582 uint32 offered
, uint32
*needed
,
583 uint32 level
, int *num_ports
, PORT_INFO_CTR
*ctr
);
584 WERROR
cli_spoolss_getprinter(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
585 uint32 offered
, uint32
*needed
,
586 POLICY_HND
*pol
, uint32 level
,
587 PRINTER_INFO_CTR
*ctr
);
588 WERROR
cli_spoolss_setprinter(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
589 POLICY_HND
*pol
, uint32 level
,
590 PRINTER_INFO_CTR
*ctr
, uint32 command
);
591 WERROR
cli_spoolss_getprinterdriver(struct cli_state
*cli
,
593 uint32 offered
, uint32
*needed
,
594 POLICY_HND
*pol
, uint32 level
,
595 const char *env
, PRINTER_DRIVER_CTR
*ctr
);
596 WERROR
cli_spoolss_enumprinterdrivers (struct cli_state
*cli
,
598 uint32 offered
, uint32
*needed
,
599 uint32 level
, const char *env
,
601 PRINTER_DRIVER_CTR
*ctr
);
602 WERROR
cli_spoolss_getprinterdriverdir (struct cli_state
*cli
,
604 uint32 offered
, uint32
*needed
,
605 uint32 level
, char *env
,
606 DRIVER_DIRECTORY_CTR
*ctr
);
607 WERROR
cli_spoolss_addprinterdriver (struct cli_state
*cli
,
608 TALLOC_CTX
*mem_ctx
, uint32 level
,
609 PRINTER_DRIVER_CTR
*ctr
);
610 WERROR
cli_spoolss_addprinterex (struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
611 uint32 level
, PRINTER_INFO_CTR
*ctr
);
612 WERROR
cli_spoolss_deleteprinterdriver (struct cli_state
*cli
,
613 TALLOC_CTX
*mem_ctx
, const char *arch
,
615 WERROR
cli_spoolss_getprintprocessordirectory(struct cli_state
*cli
,
617 uint32 offered
, uint32
*needed
,
618 char *name
, char *environment
,
620 WERROR
cli_spoolss_addform(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
621 POLICY_HND
*handle
, uint32 level
, FORM
*form
);
622 WERROR
cli_spoolss_setform(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
623 POLICY_HND
*handle
, uint32 level
, char *form_name
,
625 WERROR
cli_spoolss_getform(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
626 uint32 offered
, uint32
*needed
,
627 POLICY_HND
*handle
, char *formname
, uint32 level
,
629 WERROR
cli_spoolss_deleteform(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
630 POLICY_HND
*handle
, char *form_name
);
631 WERROR
cli_spoolss_enumforms(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
632 uint32 offered
, uint32
*needed
,
633 POLICY_HND
*handle
, int level
, uint32
*num_forms
,
635 WERROR
cli_spoolss_setprinterdata (struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
636 POLICY_HND
*pol
, char* valname
, char* value
);
638 /* The following definitions come from libsmb/cli_srvsvc.c */
640 struct cli_state
*cli_svrsvc_initialise(struct cli_state
*cli
,
642 struct ntuser_creds
*creds
);
643 NTSTATUS
cli_srvsvc_net_srv_get_info(struct cli_state
*cli
,
645 uint32 switch_value
, SRV_INFO_CTR
*ctr
);
647 /* The following definitions come from libsmb/clistr.c */
649 int clistr_push(struct cli_state
*cli
, void *dest
, const char *src
, int dest_len
, int flags
);
650 int clistr_pull(struct cli_state
*cli
, char *dest
, const void *src
, int dest_len
, int src_len
, int flags
);
651 int clistr_align_out(struct cli_state
*cli
, const void *p
, int flags
);
652 int clistr_align_in(struct cli_state
*cli
, const void *p
, int flags
);
654 /* The following definitions come from libsmb/clitrans.c */
656 BOOL
cli_send_trans(struct cli_state
*cli
, int trans
,
657 const char *pipe_name
,
659 uint16
*setup
, unsigned int lsetup
, unsigned int msetup
,
660 char *param
, unsigned int lparam
, unsigned int mparam
,
661 char *data
, unsigned int ldata
, unsigned int mdata
);
662 BOOL
cli_receive_trans(struct cli_state
*cli
,int trans
,
663 char **param
, unsigned int *param_len
,
664 char **data
, unsigned int *data_len
);
665 BOOL
cli_send_nt_trans(struct cli_state
*cli
,
668 uint16
*setup
, unsigned int lsetup
, unsigned int msetup
,
669 char *param
, unsigned int lparam
, unsigned int mparam
,
670 char *data
, unsigned int ldata
, unsigned int mdata
);
671 BOOL
cli_receive_nt_trans(struct cli_state
*cli
,
672 char **param
, unsigned int *param_len
,
673 char **data
, unsigned int *data_len
);
675 /* The following definitions come from libsmb/credentials.c */
677 char *credstr(const uchar
*cred
);
678 void cred_session_key(const DOM_CHAL
*clnt_chal
, const DOM_CHAL
*srv_chal
, const uchar
*pass
,
679 uchar session_key
[8]);
680 void cred_create(uchar session_key
[8], DOM_CHAL
*stor_cred
, UTIME timestamp
,
682 int cred_assert(DOM_CHAL
*cred
, uchar session_key
[8], DOM_CHAL
*stored_cred
,
684 BOOL
clnt_deal_with_creds(uchar sess_key
[8],
685 DOM_CRED
*sto_clnt_cred
, DOM_CRED
*rcv_srv_cred
);
686 BOOL
deal_with_creds(uchar sess_key
[8],
687 DOM_CRED
*sto_clnt_cred
,
688 DOM_CRED
*rcv_clnt_cred
, DOM_CRED
*rtn_srv_cred
);
690 /* The following definitions come from libsmb/doserr.c */
692 const char *dos_errstr(WERROR werror
);
694 /* The following definitions come from libsmb/errormap.c */
696 NTSTATUS
dos_to_ntstatus(int eclass
, int ecode
);
697 void ntstatus_to_dos(NTSTATUS ntstatus
, uint8
*eclass
, uint32
*ecode
);
698 NTSTATUS
werror_to_ntstatus(WERROR error
);
699 WERROR
ntstatus_to_werror(NTSTATUS error
);
701 /* The following definitions come from libsmb/namecache.c */
703 BOOL
namecache_enable(void);
704 void namecache_store(const char *name
, int name_type
,
705 int num_names
, struct in_addr
*ip_list
);
706 BOOL
namecache_fetch(const char *name
, int name_type
, struct in_addr
**ip_list
,
708 void namecache_flush(void);
710 /* The following definitions come from libsmb/namequery.c */
712 struct node_status
*node_status_query(int fd
,struct nmb_name
*name
,
713 struct in_addr to_ip
, int *num_names
);
714 BOOL
name_status_find(const char *q_name
, int q_type
, int type
, struct in_addr to_ip
, char *name
);
715 BOOL
name_register(int fd
, const char *name
, int name_type
,
716 struct in_addr name_ip
, int opcode
,
718 struct in_addr to_ip
, int *count
);
719 struct in_addr
*name_query(int fd
,const char *name
,int name_type
,
720 BOOL bcast
,BOOL recurse
,
721 struct in_addr to_ip
, int *count
, int *flags
);
722 FILE *startlmhosts(const char *fname
);
723 BOOL
getlmhostsent( FILE *fp
, pstring name
, int *name_type
, struct in_addr
*ipaddr
);
724 void endlmhosts(FILE *fp
);
725 BOOL
name_register_wins(const char *name
, int name_type
);
726 BOOL
name_resolve_bcast(const char *name
, int name_type
,
727 struct in_addr
**return_ip_list
, int *return_count
);
728 BOOL
resolve_name(const char *name
, struct in_addr
*return_ip
, int name_type
);
729 BOOL
resolve_name_2(const char *name
, struct in_addr
**return_ip
, int *count
, int name_type
);
730 BOOL
resolve_srv_name(const char* srv_name
, fstring dest_host
,
732 BOOL
find_master_ip(char *group
, struct in_addr
*master_ip
);
733 BOOL
lookup_dc_name(const char *srcname
, const char *domain
,
734 struct in_addr
*dc_ip
, char *ret_name
);
735 BOOL
get_dc_list(BOOL pdc_only
, const char *group
, struct in_addr
**ip_list
, int *count
);
736 BOOL
get_lmb_list(struct in_addr
**ip_list
, int *count
);
738 /* The following definitions come from libsmb/nmblib.c */
740 void debug_nmb_packet(struct packet_struct
*p
);
741 char *nmb_namestr(struct nmb_name
*n
);
742 struct packet_struct
*copy_packet(struct packet_struct
*packet
);
743 void free_packet(struct packet_struct
*packet
);
744 struct packet_struct
*parse_packet(char *buf
,int length
,
745 enum packet_type packet_type
);
746 struct packet_struct
*read_packet(int fd
,enum packet_type packet_type
);
747 void make_nmb_name( struct nmb_name
*n
, const char *name
, int type
);
748 BOOL
nmb_name_equal(struct nmb_name
*n1
, struct nmb_name
*n2
);
749 int build_packet(char *buf
, struct packet_struct
*p
);
750 BOOL
send_packet(struct packet_struct
*p
);
751 struct packet_struct
*receive_packet(int fd
,enum packet_type type
,int t
);
752 struct packet_struct
*receive_nmb_packet(int fd
, int t
, int trn_id
);
753 struct packet_struct
*receive_dgram_packet(int fd
, int t
, const char *mailslot_name
);
754 BOOL
match_mailslot_name(struct packet_struct
*p
, const char *mailslot_name
);
755 void sort_query_replies(char *data
, int n
, struct in_addr ip
);
756 char *dns_to_netbios_name(char *dns_name
);
757 int name_mangle( char *In
, char *Out
, char name_type
);
758 int name_extract(char *buf
,int ofs
,char *name
);
759 int name_len(char *s1
);
761 /* The following definitions come from libsmb/nterr.c */
763 const char *get_nt_error_msg(NTSTATUS nt_code
);
764 const char *nt_errstr(NTSTATUS nt_code
);
765 const char *get_nt_error_c_code(NTSTATUS nt_code
);
767 /* The following definitions come from libsmb/passchange.c */
769 BOOL
remote_password_change(const char *remote_machine
, const char *user_name
,
770 const char *old_passwd
, const char *new_passwd
,
771 char *err_str
, size_t err_str_len
);
773 /* The following definitions come from libsmb/pwd_cache.c */
775 void pwd_init(struct pwd_info
*pwd
);
776 BOOL
pwd_is_nullpwd(const struct pwd_info
*pwd
);
777 BOOL
pwd_compare(struct pwd_info
*pwd1
, struct pwd_info
*pwd2
);
778 void pwd_read(struct pwd_info
*pwd
, char *passwd_report
, BOOL do_encrypt
);
779 void pwd_set_nullpwd(struct pwd_info
*pwd
);
780 void pwd_set_cleartext(struct pwd_info
*pwd
, const char *clr
);
781 void pwd_get_cleartext(struct pwd_info
*pwd
, char *clr
);
782 void pwd_set_lm_nt_16(struct pwd_info
*pwd
, uchar lm_pwd
[16], uchar nt_pwd
[16]);
783 void pwd_get_lm_nt_16(struct pwd_info
*pwd
, uchar lm_pwd
[16], uchar nt_pwd
[16]);
784 void pwd_make_lm_nt_16(struct pwd_info
*pwd
, char *clr
);
785 void pwd_make_lm_nt_owf(struct pwd_info
*pwd
, uchar cryptkey
[8]);
786 void pwd_get_lm_nt_owf(struct pwd_info
*pwd
, uchar lm_owf
[24], uchar nt_owf
[24]);
788 /* The following definitions come from lib/smbrun.c */
790 int smbrun(char *cmd
, int *outfd
);
792 /* The following definitions come from libsmb/smbdes.c */
794 void E_P16(const unsigned char *p14
,unsigned char *p16
);
795 void E_P24(const unsigned char *p21
, const unsigned char *c8
, unsigned char *p24
);
796 void D_P16(const unsigned char *p14
, const unsigned char *in
, unsigned char *out
);
797 void E_old_pw_hash( unsigned char *p14
, const unsigned char *in
, unsigned char *out
);
798 void cred_hash1(unsigned char *out
, const unsigned char *in
, const unsigned char *key
);
799 void cred_hash2(unsigned char *out
, const unsigned char *in
, const unsigned char *key
);
800 void cred_hash3(unsigned char *out
, unsigned char *in
, const unsigned char *key
, int forw
);
801 void SamOEMhash( unsigned char *data
, const unsigned char *key
, int val
);
802 void sam_pwd_hash(unsigned int rid
, const uchar
*in
, uchar
*out
, int forw
);
804 /* The following definitions come from libsmb/smbencrypt.c */
806 void SMBencrypt(const uchar
*passwd
, uchar
*c8
, uchar
*p24
);
807 void E_md4hash(const uchar
*passwd
, uchar
*p16
);
808 void nt_lm_owf_gen(char *pwd
, uchar nt_p16
[16], uchar p16
[16]);
809 void SMBOWFencrypt(uchar passwd
[16], uchar
*c8
, uchar p24
[24]);
810 void NTLMSSPOWFencrypt(uchar passwd
[8], uchar
*ntlmchalresp
, uchar p24
[24]);
811 void SMBNTencrypt(const uchar
*passwd
, uchar
*c8
, uchar
*p24
);
812 BOOL
make_oem_passwd_hash(char data
[516], const char *passwd
, uchar old_pw_hash
[16], BOOL unicode
);
813 BOOL
encode_pw_buffer(char buffer
[516], const char *new_pass
,
814 int new_pw_len
, BOOL nt_pass_set
);
815 BOOL
decode_pw_buffer(char in_buffer
[516], char *new_pwrd
,
816 int new_pwrd_size
, uint32
*new_pw_len
,
817 uchar nt_p16
[16], uchar p16
[16]);
818 void nt_owf_genW(const UNISTR2
*pwd
, uchar nt_p16
[16]);
820 /* The following definitions come from libsmb/smberr.c */
822 const char *smb_dos_err_name(uint8
class, uint16 num
);
823 const char *get_dos_error_msg(WERROR result
);
824 const char *smb_dos_err_class(uint8
class);
825 const char *smb_dos_errstr(char *inbuf
);
826 WERROR
map_werror_from_unix(int error
);
828 /* The following definitions come from libsmb/unexpected.c */
830 void unexpected_packet(struct packet_struct
*p
);
831 void clear_unexpected(time_t t
);
832 struct packet_struct
*receive_unexpected(enum packet_type packet_type
, int id
,
833 const char *mailslot_name
);
835 /* The following definitions come from lib/snprintf.c */
838 /* The following definitions come from lib/substitute.c */
840 void sub_set_smb_name(const char *name
);
841 const char* get_remote_machine_name(void);
842 void standard_sub_basic(char *str
, int len
);
843 void standard_sub_advanced(int snum
, char *user
, const char *connectpath
, gid_t gid
, char *str
, int len
);
844 void standard_sub_conn(connection_struct
*conn
, char *str
, int len
);
845 void standard_sub_home(int snum
, char *user
, char *str
, int len
);
846 void standard_sub_snum(int snum
, char *str
, int len
);
847 void standard_sub_vuser(char *str
, int len
, user_struct
*vuser
);
848 void standard_sub_vsnum(char *str
, int len
, user_struct
*vuser
, int snum
);
850 /* The following definitions come from lib/sysacls.c */
852 int sys_acl_get_entry( SMB_ACL_T the_acl
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
853 int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*tag_type_p
);
854 int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
855 void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d
);
856 SMB_ACL_T
sys_acl_get_file( const char *path_p
, SMB_ACL_TYPE_T type
);
857 SMB_ACL_T
sys_acl_get_fd(int fd
);
858 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset
);
859 int sys_acl_add_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
860 int sys_acl_get_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
861 char *sys_acl_to_text( SMB_ACL_T the_acl
, ssize_t
*plen
);
862 SMB_ACL_T
sys_acl_init( int count
);
863 int sys_acl_create_entry( SMB_ACL_T
*pacl
, SMB_ACL_ENTRY_T
*pentry
);
864 int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry
, SMB_ACL_TAG_T tagtype
);
865 int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry
, void *qual
);
866 int sys_acl_set_permset( SMB_ACL_ENTRY_T entry
, SMB_ACL_PERMSET_T permset
);
867 int sys_acl_valid( SMB_ACL_T theacl
);
868 int sys_acl_set_file( const char *name
, SMB_ACL_TYPE_T acltype
, SMB_ACL_T theacl
);
869 int sys_acl_set_fd( int fd
, SMB_ACL_T theacl
);
870 int sys_acl_delete_def_file(const char *name
);
871 int sys_acl_free_text(char *text
);
872 int sys_acl_free_acl(SMB_ACL_T the_acl
) ;
873 int sys_acl_free_qualifier(void *qual
, SMB_ACL_TAG_T tagtype
);
874 int sys_acl_get_entry( SMB_ACL_T the_acl
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
875 int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*tag_type_p
);
876 int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
877 void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d
);
878 SMB_ACL_T
sys_acl_get_file( const char *path_p
, SMB_ACL_TYPE_T type
);
879 SMB_ACL_T
sys_acl_get_fd(int fd
);
880 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset
);
881 int sys_acl_add_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
882 int sys_acl_get_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
883 char *sys_acl_to_text( SMB_ACL_T the_acl
, ssize_t
*plen
);
884 SMB_ACL_T
sys_acl_init( int count
);
885 int sys_acl_create_entry( SMB_ACL_T
*pacl
, SMB_ACL_ENTRY_T
*pentry
);
886 int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry
, SMB_ACL_TAG_T tagtype
);
887 int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry
, void *qual
);
888 int sys_acl_set_permset( SMB_ACL_ENTRY_T entry
, SMB_ACL_PERMSET_T permset
);
889 int sys_acl_valid( SMB_ACL_T theacl
);
890 int sys_acl_set_file( const char *name
, SMB_ACL_TYPE_T acltype
, SMB_ACL_T theacl
);
891 int sys_acl_set_fd( int fd
, SMB_ACL_T theacl
);
892 int sys_acl_delete_def_file(const char *name
);
893 int sys_acl_free_text(char *text
);
894 int sys_acl_free_acl(SMB_ACL_T the_acl
) ;
895 int sys_acl_free_qualifier(void *qual
, SMB_ACL_TAG_T tagtype
);
896 int sys_acl_get_entry(SMB_ACL_T acl_d
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
897 int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*type_p
);
898 int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
899 void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d
);
900 SMB_ACL_T
sys_acl_get_file(const char *path_p
, SMB_ACL_TYPE_T type
);
901 SMB_ACL_T
sys_acl_get_fd(int fd
);
902 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d
);
903 int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d
, SMB_ACL_PERM_T perm
);
904 int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d
, SMB_ACL_PERM_T perm
);
905 char *sys_acl_to_text(SMB_ACL_T acl_d
, ssize_t
*len_p
);
906 SMB_ACL_T
sys_acl_init(int count
);
907 int sys_acl_create_entry(SMB_ACL_T
*acl_p
, SMB_ACL_ENTRY_T
*entry_p
);
908 int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T tag_type
);
909 int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d
, void *qual_p
);
910 int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T permset_d
);
911 int sys_acl_valid(SMB_ACL_T acl_d
);
912 int sys_acl_set_file(const char *name
, SMB_ACL_TYPE_T type
, SMB_ACL_T acl_d
);
913 int sys_acl_set_fd(int fd
, SMB_ACL_T acl_d
);
914 int sys_acl_delete_def_file(const char *path
);
915 int sys_acl_free_text(char *text
);
916 int sys_acl_free_acl(SMB_ACL_T acl_d
) ;
917 int sys_acl_free_qualifier(void *qual
, SMB_ACL_TAG_T tagtype
);
918 int sys_acl_get_entry(SMB_ACL_T acl_d
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
919 int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*type_p
);
920 int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
921 void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d
);
922 SMB_ACL_T
sys_acl_get_file(const char *path_p
, SMB_ACL_TYPE_T type
);
923 SMB_ACL_T
sys_acl_get_fd(int fd
);
924 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d
);
925 int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d
, SMB_ACL_PERM_T perm
);
926 int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d
, SMB_ACL_PERM_T perm
);
927 char *sys_acl_to_text(SMB_ACL_T acl_d
, ssize_t
*len_p
);
928 SMB_ACL_T
sys_acl_init(int count
);
929 int sys_acl_create_entry(SMB_ACL_T
*acl_p
, SMB_ACL_ENTRY_T
*entry_p
);
930 int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T tag_type
);
931 int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d
, void *qual_p
);
932 int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T permset_d
);
933 int sys_acl_valid(SMB_ACL_T acl_d
);
934 int sys_acl_set_file(const char *name
, SMB_ACL_TYPE_T type
, SMB_ACL_T acl_d
);
935 int sys_acl_set_fd(int fd
, SMB_ACL_T acl_d
);
936 int sys_acl_delete_def_file(const char *path
);
937 int sys_acl_free_text(char *text
);
938 int sys_acl_free_acl(SMB_ACL_T acl_d
) ;
939 int sys_acl_free_qualifier(void *qual
, SMB_ACL_TAG_T tagtype
);
940 int sys_acl_get_entry(SMB_ACL_T acl_d
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
941 int sys_acl_get_tag_type(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*type_p
);
942 int sys_acl_get_permset(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
943 void *sys_acl_get_qualifier(SMB_ACL_ENTRY_T entry_d
);
944 SMB_ACL_T
sys_acl_get_file(const char *path_p
, SMB_ACL_TYPE_T type
);
945 SMB_ACL_T
sys_acl_get_fd(int fd
);
946 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset_d
);
947 int sys_acl_add_perm(SMB_ACL_PERMSET_T permset_d
, SMB_ACL_PERM_T perm
);
948 int sys_acl_get_perm(SMB_ACL_PERMSET_T permset_d
, SMB_ACL_PERM_T perm
);
949 char *sys_acl_to_text(SMB_ACL_T acl_d
, ssize_t
*len_p
);
950 SMB_ACL_T
sys_acl_init(int count
);
951 int sys_acl_create_entry(SMB_ACL_T
*acl_p
, SMB_ACL_ENTRY_T
*entry_p
);
952 int sys_acl_set_tag_type(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T tag_type
);
953 int sys_acl_set_qualifier(SMB_ACL_ENTRY_T entry_d
, void *qual_p
);
954 int sys_acl_set_permset(SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T permset_d
);
955 int sys_acl_valid(SMB_ACL_T acl_d
);
956 int sys_acl_set_file(const char *name
, SMB_ACL_TYPE_T type
, SMB_ACL_T acl_d
);
957 int sys_acl_set_fd(int fd
, SMB_ACL_T acl_d
);
958 int sys_acl_delete_def_file(const char *name
);
959 int sys_acl_free_text(char *text
);
960 int sys_acl_free_acl(SMB_ACL_T acl_d
) ;
961 int sys_acl_free_qualifier(void *qual
, SMB_ACL_TAG_T tagtype
);
962 int sys_acl_get_entry( SMB_ACL_T theacl
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
963 int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*tag_type_p
);
964 int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
965 void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d
);
966 SMB_ACL_T
sys_acl_get_file( const char *path_p
, SMB_ACL_TYPE_T type
);
967 SMB_ACL_T
sys_acl_get_fd(int fd
);
968 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset
);
969 int sys_acl_add_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
970 char *sys_acl_to_text( SMB_ACL_T theacl
, ssize_t
*plen
);
971 SMB_ACL_T
sys_acl_init( int count
);
972 int sys_acl_create_entry( SMB_ACL_T
*pacl
, SMB_ACL_ENTRY_T
*pentry
);
973 int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry
, SMB_ACL_TAG_T tagtype
);
974 int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry
, void *qual
);
975 int sys_acl_set_permset( SMB_ACL_ENTRY_T entry
, SMB_ACL_PERMSET_T permset
);
976 int sys_acl_valid( SMB_ACL_T theacl
);
977 int sys_acl_set_file( const char *name
, SMB_ACL_TYPE_T acltype
, SMB_ACL_T theacl
);
978 int sys_acl_set_fd( int fd
, SMB_ACL_T theacl
);
979 int sys_acl_delete_def_file(const char *name
);
980 int sys_acl_get_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
981 int sys_acl_free_text(char *text
);
982 int sys_acl_free_acl(SMB_ACL_T posix_acl
);
983 int sys_acl_free_qualifier(void *qual
, SMB_ACL_TAG_T tagtype
);
984 int sys_acl_get_entry( SMB_ACL_T the_acl
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
985 int sys_acl_get_tag_type( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*tag_type_p
);
986 int sys_acl_get_permset( SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
987 void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d
);
988 SMB_ACL_T
sys_acl_get_file( const char *path_p
, SMB_ACL_TYPE_T type
);
989 SMB_ACL_T
sys_acl_get_fd(int fd
);
990 int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset
);
991 int sys_acl_add_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
992 int sys_acl_get_perm( SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
993 char *sys_acl_to_text( SMB_ACL_T the_acl
, ssize_t
*plen
);
994 int sys_acl_free_text(char *text
);
995 SMB_ACL_T
sys_acl_init( int count
);
996 int sys_acl_create_entry( SMB_ACL_T
*pacl
, SMB_ACL_ENTRY_T
*pentry
);
997 int sys_acl_set_tag_type( SMB_ACL_ENTRY_T entry
, SMB_ACL_TAG_T tagtype
);
998 int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry
, void *qual
);
999 int sys_acl_set_permset( SMB_ACL_ENTRY_T entry
, SMB_ACL_PERMSET_T permset
);
1000 int sys_acl_valid( SMB_ACL_T theacl
);
1001 int sys_acl_set_file( const char *name
, SMB_ACL_TYPE_T acltype
, SMB_ACL_T theacl
);
1002 int sys_acl_set_fd( int fd
, SMB_ACL_T theacl
);
1003 int sys_acl_delete_def_file(const char *name
);
1004 int sys_acl_free_acl(SMB_ACL_T the_acl
) ;
1005 int sys_acl_free_qualifier(void *qual
, SMB_ACL_TAG_T tagtype
);
1007 /* The following definitions come from lib/system.c */
1009 int sys_usleep(long usecs
);
1010 ssize_t
sys_read(int fd
, void *buf
, size_t count
);
1011 ssize_t
sys_write(int fd
, const void *buf
, size_t count
);
1012 ssize_t
sys_send(int s
, const void *msg
, size_t len
, int flags
);
1013 ssize_t
sys_sendto(int s
, const void *msg
, size_t len
, int flags
, const struct sockaddr
*to
, socklen_t tolen
);
1014 ssize_t
sys_recvfrom(int s
, void *buf
, size_t len
, int flags
, struct sockaddr
*from
, socklen_t
*fromlen
);
1015 int sys_fcntl_ptr(int fd
, int cmd
, void *arg
);
1016 int sys_fcntl_long(int fd
, int cmd
, long arg
);
1017 int sys_stat(const char *fname
,SMB_STRUCT_STAT
*sbuf
);
1018 int sys_fstat(int fd
,SMB_STRUCT_STAT
*sbuf
);
1019 int sys_lstat(const char *fname
,SMB_STRUCT_STAT
*sbuf
);
1020 int sys_ftruncate(int fd
, SMB_OFF_T offset
);
1021 SMB_OFF_T
sys_lseek(int fd
, SMB_OFF_T offset
, int whence
);
1022 int sys_fseek(FILE *fp
, SMB_OFF_T offset
, int whence
);
1023 SMB_OFF_T
sys_ftell(FILE *fp
);
1024 int sys_creat(const char *path
, mode_t mode
);
1025 int sys_open(const char *path
, int oflag
, mode_t mode
);
1026 FILE *sys_fopen(const char *path
, const char *type
);
1027 SMB_STRUCT_DIRENT
*sys_readdir(DIR *dirp
);
1028 int sys_mknod(const char *path
, mode_t mode
, SMB_DEV_T dev
);
1029 char *sys_realpath(const char *path
, char *resolved_path
);
1030 int sys_waitpid(pid_t pid
,int *status
,int options
);
1031 char *sys_getwd(char *s
);
1032 int sys_symlink(const char *oldpath
, const char *newpath
);
1033 int sys_readlink(const char *path
, char *buf
, size_t bufsiz
);
1034 int sys_link(const char *oldpath
, const char *newpath
);
1035 int sys_chown(const char *fname
,uid_t uid
,gid_t gid
);
1036 int sys_chroot(const char *dname
);
1037 struct hostent
*sys_gethostbyname(const char *name
);
1038 void oplock_set_capability(BOOL this_process
, BOOL inherit
);
1039 long sys_random(void);
1040 void sys_srandom(unsigned int seed
);
1041 int groups_max(void);
1042 int sys_getgroups(int setlen
, gid_t
*gidset
);
1043 int sys_setgroups(int setlen
, gid_t
*gidset
);
1044 void sys_setpwent(void);
1045 struct passwd
*sys_getpwent(void);
1046 void sys_endpwent(void);
1047 struct passwd
*sys_getpwnam(const char *name
);
1048 struct passwd
*sys_getpwuid(uid_t uid
);
1049 int wsys_stat(const smb_ucs2_t
*wfname
,SMB_STRUCT_STAT
*sbuf
);
1050 int wsys_lstat(const smb_ucs2_t
*wfname
,SMB_STRUCT_STAT
*sbuf
);
1051 int wsys_creat(const smb_ucs2_t
*wfname
, mode_t mode
);
1052 int wsys_open(const smb_ucs2_t
*wfname
, int oflag
, mode_t mode
);
1053 FILE *wsys_fopen(const smb_ucs2_t
*wfname
, const char *type
);
1054 DIR *wsys_opendir(const smb_ucs2_t
*wfname
);
1055 smb_ucs2_t
*wsys_getwd(smb_ucs2_t
*s
);
1056 int wsys_chown(const smb_ucs2_t
*wfname
, uid_t uid
, gid_t gid
);
1057 int wsys_chroot(const smb_ucs2_t
*wfname
);
1058 pid_t
sys_fork(void);
1059 pid_t
sys_getpid(void);
1060 int sys_popen(const char *command
);
1061 int sys_pclose(int fd
);
1062 void *sys_dlopen(const char *name
, int flags
);
1063 void *sys_dlsym(void *handle
, const char *symbol
);
1064 int sys_dlclose (void *handle
);
1065 const char *sys_dlerror(void);
1066 void sys_adminlog(int priority
, const char *format_str
, ...);
1068 /* The following definitions come from lib/talloc.c */
1070 TALLOC_CTX
*talloc_init(void);
1071 void *talloc(TALLOC_CTX
*t
, size_t size
);
1072 void *talloc_realloc(TALLOC_CTX
*t
, void *ptr
, size_t size
);
1073 void talloc_destroy_pool(TALLOC_CTX
*t
);
1074 void talloc_destroy(TALLOC_CTX
*t
);
1075 size_t talloc_pool_size(TALLOC_CTX
*t
);
1076 const char * talloc_pool_name(TALLOC_CTX
const *t
);
1077 void *talloc_zero(TALLOC_CTX
*t
, size_t size
);
1078 void *talloc_memdup(TALLOC_CTX
*t
, const void *p
, size_t size
);
1079 char *talloc_strdup(TALLOC_CTX
*t
, const char *p
);
1080 char *talloc_describe_all(TALLOC_CTX
*rt
);
1081 void talloc_get_allocation(TALLOC_CTX
*t
,
1082 size_t *total_bytes
,
1085 /* The following definitions come from lib/time.c */
1087 time_t get_time_t_min(void);
1088 time_t get_time_t_max(void);
1089 void GetTimeOfDay(struct timeval
*tval
);
1090 void TimeInit(void);
1091 void get_process_uptime(struct timeval
*ret_time
);
1092 int TimeDiff(time_t t
);
1093 struct tm
*LocalTime(time_t *t
);
1094 time_t nt_time_to_unix(NTTIME
*nt
);
1095 time_t nt_time_to_unix_abs(NTTIME
*nt
);
1096 time_t interpret_long_date(char *p
);
1097 void unix_to_nt_time(NTTIME
*nt
, time_t t
);
1098 void unix_to_nt_time_abs(NTTIME
*nt
, time_t t
);
1099 void put_long_date(char *p
,time_t t
);
1100 BOOL
null_mtime(time_t mtime
);
1101 void put_dos_date(char *buf
,int offset
,time_t unixdate
);
1102 void put_dos_date2(char *buf
,int offset
,time_t unixdate
);
1103 void put_dos_date3(char *buf
,int offset
,time_t unixdate
);
1104 time_t make_unix_date(void *date_ptr
);
1105 time_t make_unix_date2(void *date_ptr
);
1106 time_t make_unix_date3(void *date_ptr
);
1107 char *http_timestring(time_t t
);
1108 char *timestring(BOOL hires
);
1109 time_t get_create_time(SMB_STRUCT_STAT
*st
,BOOL fake_dirs
);
1110 void init_nt_time(NTTIME
*nt
);
1112 /* The following definitions come from lib/ufc.c */
1114 char *ufc_crypt(const char *key
,const char *salt
);
1116 /* The following definitions come from lib/username.c */
1118 BOOL
name_is_local(const char *name
);
1119 char *get_user_home_dir(char *user
);
1120 char *get_user_service_home_dir(char *user
);
1121 BOOL
map_username(char *user
);
1122 struct passwd
*Get_Pwnam(char *user
,BOOL allow_change
);
1123 BOOL
user_in_group_list(char *user
,char *gname
);
1124 BOOL
user_in_list(char *user
,char *list
);
1125 struct passwd
*smb_getpwnam(char *user
, BOOL allow_change
);
1127 /* The following definitions come from lib/util.c */
1129 const char *tmpdir(void);
1130 BOOL
in_group(gid_t group
, gid_t current_gid
, int ngroups
, gid_t
*groups
);
1131 const char *Atoic(const char *p
, int *n
, const char *c
);
1132 const char *get_numlist(const char *p
, uint32
**num
, int *count
);
1133 BOOL
file_exist(char *fname
,SMB_STRUCT_STAT
*sbuf
);
1134 time_t file_modtime(const char *fname
);
1135 BOOL
directory_exist(char *dname
,SMB_STRUCT_STAT
*st
);
1136 SMB_OFF_T
get_file_size(char *file_name
);
1137 char *attrib_string(uint16 mode
);
1138 void show_msg(char *buf
);
1139 void smb_setlen(char *buf
,int len
);
1140 int set_message(char *buf
,int num_words
,int num_bytes
,BOOL zero
);
1141 int set_message_bcc(char *buf
,int num_bytes
);
1142 int set_message_end(void *outbuf
,void *end_ptr
);
1143 void dos_clean_name(char *s
);
1144 void unix_clean_name(char *s
);
1145 void make_dir_struct(char *buf
,const char *mask
,const char *fname
,SMB_OFF_T size
,int mode
,time_t date
);
1146 void close_low_fds(void);
1147 int set_blocking(int fd
, BOOL set
);
1148 ssize_t
transfer_file_internal(int infd
, int outfd
, size_t n
, ssize_t (*read_fn
)(int, void *, size_t),
1149 ssize_t (*write_fn
)(int, const void *, size_t));
1150 SMB_OFF_T
transfer_file(int infd
,int outfd
,SMB_OFF_T n
);
1151 void msleep(unsigned int t
);
1152 void become_daemon(void);
1153 BOOL
yesno(char *p
);
1154 void *Realloc(void *p
,size_t size
);
1155 void safe_free(void *p
);
1156 BOOL
get_myname(char *my_name
);
1157 int interpret_protocol(char *str
,int def
);
1158 BOOL
is_ipaddress(const char *str
);
1159 uint32
interpret_addr(const char *str
);
1160 struct in_addr
*interpret_addr2(const char *str
);
1161 BOOL
is_zero_ip(struct in_addr ip
);
1162 void zero_ip(struct in_addr
*ip
);
1163 char *automount_lookup(char *user_name
);
1164 char *automount_lookup(char *user_name
);
1165 BOOL
same_net(struct in_addr ip1
,struct in_addr ip2
,struct in_addr mask
);
1166 BOOL
process_exists(pid_t pid
);
1167 char *uidtoname(uid_t uid
);
1168 char *gidtoname(gid_t gid
);
1169 uid_t
nametouid(char *name
);
1170 gid_t
nametogid(char *name
);
1171 void smb_panic(const char *why
);
1172 char *readdirname(DIR *p
);
1173 BOOL
is_in_path(const char *name
, name_compare_entry
*namelist
);
1174 void set_namearray(name_compare_entry
**ppname_array
, char *namelist
);
1175 void free_namearray(name_compare_entry
*name_array
);
1176 BOOL
fcntl_lock(int fd
, int op
, SMB_OFF_T offset
, SMB_OFF_T count
, int type
);
1177 BOOL
is_myname(char *s
);
1178 const char* get_my_primary_ip (void);
1179 BOOL
is_myname_or_ipaddr(char *s
);
1180 void set_remote_arch(enum remote_arch_types type
);
1181 enum remote_arch_types
get_remote_arch(void);
1182 void out_ascii(FILE *f
, unsigned char *buf
,int len
);
1183 void out_data(FILE *f
,char *buf1
,int len
, int per_line
);
1184 void print_asc(int level
, unsigned char *buf
,int len
);
1185 void dump_data(int level
,char *buf1
,int len
);
1186 char *tab_depth(int depth
);
1187 int str_checksum(const char *s
);
1188 void zero_free(void *p
, size_t size
);
1189 int set_maxfiles(int requested_max
);
1190 BOOL
reg_split_key(const char *full_keyname
, uint32
*reg_type
, char *key_name
);
1191 int smb_mkstemp(char *template);
1192 void *smb_xmalloc(size_t size
);
1193 void *smb_xmemdup(const void *p
, size_t size
);
1194 char *smb_xstrdup(const char *s
);
1195 int smb_xvasprintf(char **ptr
, const char *format
, va_list ap
);
1196 void *memdup(void *p
, size_t size
);
1197 char *myhostname(void);
1198 char *lock_path(const char *name
);
1199 char *pid_path(char *name
);
1200 char *parent_dirname(const char *path
);
1201 BOOL
ms_has_wild(char *s
);
1202 BOOL
mask_match(const char *string
, char *pattern
, BOOL is_case_sensitive
);
1203 BOOL
unix_wild_match(char *pattern
, char *string
);
1204 DATA_BLOB
data_blob(const void *p
, size_t length
);
1205 DATA_BLOB
data_blob_talloc(TALLOC_CTX
*mem_ctx
, const void *p
, size_t length
);
1206 void data_blob_free(DATA_BLOB
*d
);
1207 void data_blob_clear(DATA_BLOB
*d
);
1208 int _Insure_trap_error(int a1
, int a2
, int a3
, int a4
, int a5
, int a6
);
1210 /* The following definitions come from lib/util_file.c */
1212 BOOL
do_file_lock(int fd
, int waitsecs
, int type
);
1213 BOOL
file_lock(int fd
, int type
, int secs
, int *plock_depth
);
1214 BOOL
file_unlock(int fd
, int *plock_depth
);
1215 void *startfilepwent(char *pfile
, char *s_readbuf
, int bufsize
,
1216 int *file_lock_depth
, BOOL update
);
1217 void endfilepwent(void *vp
, int *file_lock_depth
);
1218 SMB_BIG_UINT
getfilepwpos(void *vp
);
1219 BOOL
setfilepwpos(void *vp
, SMB_BIG_UINT tok
);
1220 int getfileline(void *vp
, char *linebuf
, int linebuf_size
);
1221 char *fgets_slash(char *s2
,int maxlen
,FILE *f
);
1222 char *file_pload(const char *syscmd
, size_t *size
);
1223 char *fd_load(int fd
, size_t *size
);
1224 char *file_load(const char *fname
, size_t *size
);
1225 char **file_lines_load(const char *fname
, int *numlines
, BOOL convert
);
1226 char **fd_lines_load(int fd
, int *numlines
, BOOL convert
);
1227 char **file_lines_pload(const char *syscmd
, int *numlines
, BOOL convert
);
1228 void file_lines_free(char **lines
);
1229 void file_lines_slashcont(char **lines
);
1231 /* The following definitions come from lib/util_getent.c */
1233 struct sys_grent
* getgrent_list(void);
1234 void grent_free (struct sys_grent
*glist
);
1235 struct sys_pwent
* getpwent_list(void);
1236 void pwent_free (struct sys_pwent
*plist
);
1237 struct sys_userlist
*get_users_in_group(const char *gname
);
1238 void free_userlist(struct sys_userlist
*list_head
);
1240 /* The following definitions come from lib/util_seaccess.c */
1242 void se_map_generic(uint32
*access_mask
, struct generic_mapping
*mapping
);
1243 void se_map_standard(uint32
*access_mask
, struct standard_mapping
*mapping
);
1244 BOOL
se_access_check(SEC_DESC
*sd
, NT_USER_TOKEN
*token
,
1245 uint32 acc_desired
, uint32
*acc_granted
,
1247 SEC_DESC_BUF
*se_create_child_secdesc(TALLOC_CTX
*ctx
, SEC_DESC
*parent_ctr
,
1248 BOOL child_container
);
1250 /* The following definitions come from lib/util_sec.c */
1252 void sec_init(void);
1253 uid_t
sec_initial_uid(void);
1254 gid_t
sec_initial_gid(void);
1255 BOOL
non_root_mode(void);
1256 void gain_root_privilege(void);
1257 void gain_root_group_privilege(void);
1258 void set_effective_uid(uid_t uid
);
1259 void set_effective_gid(gid_t gid
);
1260 void save_re_uid(void);
1261 void restore_re_uid(void);
1262 void save_re_gid(void);
1263 void restore_re_gid(void);
1264 int set_re_uid(void);
1265 void become_user_permanently(uid_t uid
, gid_t gid
);
1266 BOOL
is_setuid_root(void) ;
1268 /* The following definitions come from lib/util_sid.c */
1270 void generate_wellknown_sids(void);
1271 BOOL
map_domain_sid_to_name(DOM_SID
*sid
, char *nt_domain
);
1272 BOOL
lookup_known_rid(DOM_SID
*sid
, uint32 rid
, char *name
, enum SID_NAME_USE
*psid_name_use
);
1273 BOOL
map_domain_name_to_sid(DOM_SID
*sid
, char *nt_domain
);
1274 void split_domain_name(const char *fullname
, char *domain
, char *name
);
1275 char *sid_to_string(fstring sidstr_out
, const DOM_SID
*sid
);
1276 const char *sid_string_static(const DOM_SID
*sid
);
1277 BOOL
string_to_sid(DOM_SID
*sidout
, const char *sidstr
);
1278 BOOL
sid_append_rid(DOM_SID
*sid
, uint32 rid
);
1279 BOOL
sid_split_rid(DOM_SID
*sid
, uint32
*rid
);
1280 BOOL
sid_peek_rid(DOM_SID
*sid
, uint32
*rid
);
1281 void sid_copy(DOM_SID
*dst
, const DOM_SID
*src
);
1282 DOM_SID
*sid_dup(DOM_SID
*src
);
1283 BOOL
sid_linearize(char *outbuf
, size_t len
, DOM_SID
*sid
);
1284 BOOL
sid_parse(char *inbuf
, size_t len
, DOM_SID
*sid
);
1285 int sid_compare_auth(const DOM_SID
*sid1
, const DOM_SID
*sid2
);
1286 int sid_compare(const DOM_SID
*sid1
, const DOM_SID
*sid2
);
1287 int sid_compare_domain(const DOM_SID
*sid1
, const DOM_SID
*sid2
);
1288 BOOL
sid_equal(const DOM_SID
*sid1
, const DOM_SID
*sid2
);
1289 BOOL
sid_check_is_domain(const DOM_SID
*sid
);
1290 BOOL
sid_check_is_builtin(const DOM_SID
*sid
);
1291 BOOL
sid_check_is_in_our_domain(const DOM_SID
*sid
);
1292 BOOL
sid_check_is_in_builtin(const DOM_SID
*sid
);
1293 size_t sid_size(DOM_SID
*sid
);
1294 BOOL
non_mappable_sid(DOM_SID
*sid
);
1295 char *sid_binstring(DOM_SID
*sid
);
1297 /* The following definitions come from lib/util_sock.c */
1299 BOOL
is_a_socket(int fd
);
1300 void set_socket_options(int fd
, const char *options
);
1301 ssize_t
read_udp_socket(int fd
,char *buf
,size_t len
);
1302 ssize_t
read_with_timeout(int fd
,char *buf
,size_t mincnt
,size_t maxcnt
,unsigned int time_out
);
1303 BOOL
send_keepalive(int client
);
1304 ssize_t
read_data(int fd
,char *buffer
,size_t N
);
1305 ssize_t
write_data(int fd
,char *buffer
,size_t N
);
1306 ssize_t
write_socket_data(int fd
,char *buffer
,size_t N
);
1307 ssize_t
write_socket(int fd
,char *buf
,size_t len
);
1308 ssize_t
read_smb_length(int fd
,char *inbuf
,unsigned int timeout
);
1309 BOOL
receive_smb(int fd
,char *buffer
, unsigned int timeout
);
1310 BOOL
client_receive_smb(int fd
,char *buffer
, unsigned int timeout
);
1311 BOOL
send_smb(int fd
,char *buffer
);
1312 BOOL
send_one_packet(char *buf
,int len
,struct in_addr ip
,int port
,int type
);
1313 int open_socket_in( int type
, int port
, int dlevel
, uint32 socket_addr
, BOOL rebind
);
1314 int open_socket_out(int type
, struct in_addr
*addr
, int port
,int timeout
);
1315 void client_setfd(int fd
);
1316 char *client_name(void);
1317 char *client_addr(void);
1318 char *get_socket_name(int fd
);
1319 char *get_socket_addr(int fd
);
1320 int create_pipe_sock(const char *socket_dir
,
1321 const char *socket_name
,
1323 int sock_exec(const char *prog
);
1325 /* The following definitions come from lib/util_str.c */
1327 void set_first_token(char *ptr
);
1328 BOOL
next_token(const char **ptr
,char *buff
,const char *sep
, size_t bufsize
);
1329 char **toktocliplist(int *ctok
, const char *sep
);
1330 int StrCaseCmp(const char *s
, const char *t
);
1331 int StrnCaseCmp(const char *s
, const char *t
, size_t n
);
1332 BOOL
strequal(const char *s1
, const char *s2
);
1333 BOOL
strequal_unix(const char *s1
, const char *s2
);
1334 BOOL
strnequal(const char *s1
,const char *s2
,size_t n
);
1335 BOOL
strcsequal(const char *s1
,const char *s2
);
1336 int strwicmp(const char *psz1
, const char *psz2
);
1337 void strlower(char *s
);
1338 void strupper(char *s
);
1339 char *strupper_static(const char *s
);
1340 void strnorm(char *s
);
1341 BOOL
strisnormal(char *s
);
1342 void string_replace(char *s
,char oldc
,char newc
);
1343 char *skip_string(char *buf
,size_t n
);
1344 size_t str_charnum(const char *s
);
1345 BOOL
trim_string(char *s
,const char *front
,const char *back
);
1346 BOOL
strhasupper(const char *s
);
1347 BOOL
strhaslower(const char *s
);
1348 size_t count_chars(const char *s
,char c
);
1349 BOOL
str_is_all(const char *s
,char c
);
1350 char *safe_strcpy(char *dest
,const char *src
, size_t maxlength
);
1351 char *safe_strcat(char *dest
, const char *src
, size_t maxlength
);
1352 char *alpha_strcpy(char *dest
, const char *src
, const char *other_safe_chars
, size_t maxlength
);
1353 char *StrnCpy(char *dest
,const char *src
,size_t n
);
1354 char *strncpyn(char *dest
, const char *src
,size_t n
, char c
);
1355 size_t strhex_to_str(char *p
, size_t len
, const char *strhex
);
1356 BOOL
in_list(char *s
,char *list
,BOOL casesensitive
);
1357 void string_free(char **s
);
1358 BOOL
string_set(char **dest
,const char *src
);
1359 void string_sub(char *s
,const char *pattern
,const char *insert
, size_t len
);
1360 void fstring_sub(char *s
,const char *pattern
,const char *insert
);
1361 void pstring_sub(char *s
,const char *pattern
,const char *insert
);
1362 void all_string_sub(char *s
,const char *pattern
,const char *insert
, size_t len
);
1363 void split_at_last_component(char *path
, char *front
, char sep
, char *back
);
1364 const char *octal_string(int i
);
1365 char *string_truncate(char *s
, int length
);
1366 char *binary_string(char *buf
, int len
);
1368 /* The following definitions come from lib/util_unistr.c */
1370 size_t unix_PutUniCode(char *dst
,const char *src
, ssize_t len
, BOOL null_terminate
);
1371 size_t dos_PutUniCode(char *dst
,const char *src
, ssize_t len
, BOOL null_terminate
);
1372 void unistr_to_dos(char *dest
, const char *src
, size_t len
);
1373 char *skip_unibuf(char *src
, size_t len
);
1374 char *dos_unistrn2(uint16
*src
, int len
);
1375 char *dos_unistr2(uint16
*src
);
1376 char *dos_unistr2_to_str(UNISTR2
*str
);
1377 void ascii_to_unistr(uint16
*dest
, const char *src
, int maxlen
);
1378 void unistr_to_ascii(char *dest
, const uint16
*src
, int len
);
1379 void unistr2_to_dos(char *dest
, const UNISTR2
*str
, size_t maxlen
);
1380 void unistr2_to_unix(char *dest
, const UNISTR2
*str
, size_t maxlen
);
1381 uint32
buffer2_to_uint32(BUFFER2
*str
);
1382 char *dos_buffer2_to_str(BUFFER2
*str
);
1383 char *dos_buffer2_to_multistr(BUFFER2
*str
);
1384 size_t dos_struni2(char *dst
, const char *src
, size_t max_len
);
1385 char *dos_unistr(char *buf
);
1386 int unistrlen(uint16
*s
);
1387 int unistrcpy(uint16
*dst
, uint16
*src
);
1388 void default_unicode_map(smb_ucs2_t
**pp_cp_to_ucs2
, uint16
**pp_ucs2_to_cp
);
1389 BOOL
load_unicode_map(const char *codepage
, smb_ucs2_t
**pp_cp_to_ucs2
, uint16
**pp_ucs2_to_cp
);
1390 BOOL
load_dos_unicode_map(int codepage
);
1391 BOOL
load_unix_unicode_map(const char *unix_char_set
, BOOL override
);
1392 smb_ucs2_t
*multibyte_to_unicode(smb_ucs2_t
*dst
, const char *src
,
1393 size_t dst_len
, smb_ucs2_t
*cp_to_ucs2
);
1394 char *unicode_to_unix(char *dst
, const smb_ucs2_t
*src
, size_t dst_len
);
1395 smb_ucs2_t
*unix_to_unicode(smb_ucs2_t
*dst
, const char *src
, size_t dst_len
);
1396 size_t unicode_to_unix_char(char *dst
, const smb_ucs2_t src
);
1397 char *unicode_to_dos(char *dst
, const smb_ucs2_t
*src
, size_t dst_len
);
1398 size_t unicode_to_dos_char(char *dst
, const smb_ucs2_t src
);
1399 smb_ucs2_t
*dos_to_unicode(smb_ucs2_t
*dst
, const char *src
, size_t dst_len
);
1400 size_t strlen_w(const smb_ucs2_t
*src
);
1401 smb_ucs2_t
*safe_strcpy_w(smb_ucs2_t
*dest
,const smb_ucs2_t
*src
, size_t maxlength
);
1402 smb_ucs2_t
*safe_strcat_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
, size_t maxlength
);
1403 int strcmp_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
1404 int strncmp_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
, size_t len
);
1405 smb_ucs2_t
*strstr_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
1406 smb_ucs2_t
*strchr_w(const smb_ucs2_t
*s
, smb_ucs2_t c
);
1407 smb_ucs2_t
*strrchr_w(const smb_ucs2_t
*s
, smb_ucs2_t c
);
1408 smb_ucs2_t
*strtok_w(smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
1409 smb_ucs2_t
*strdup_w(const smb_ucs2_t
*s
);
1410 int isupper_w( smb_ucs2_t val
);
1411 int islower_w( smb_ucs2_t val
);
1412 int isdigit_w( smb_ucs2_t val
);
1413 int isxdigit_w( smb_ucs2_t val
);
1414 int isspace_w( smb_ucs2_t val
);
1415 smb_ucs2_t
toupper_w( smb_ucs2_t val
);
1416 smb_ucs2_t
tolower_w( smb_ucs2_t val
);
1417 void set_first_token_w(smb_ucs2_t
*ptr
);
1418 BOOL
next_token_w(smb_ucs2_t
**ptr
, smb_ucs2_t
*buff
, smb_ucs2_t
*sep
, size_t bufsize
);
1419 smb_ucs2_t
**toktocliplist_w(int *ctok
, smb_ucs2_t
*sep
);
1420 int StrCaseCmp_w(const smb_ucs2_t
*s
, const smb_ucs2_t
*t
);
1421 int StrnCaseCmp_w(const smb_ucs2_t
*s
, const smb_ucs2_t
*t
, size_t n
);
1422 BOOL
strequal_w(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
1423 BOOL
strnequal_w(const smb_ucs2_t
*s1
,const smb_ucs2_t
*s2
,size_t n
);
1424 BOOL
strcsequal_w(const smb_ucs2_t
*s1
,const smb_ucs2_t
*s2
);
1425 void strlower_w(smb_ucs2_t
*s
);
1426 void strupper_w(smb_ucs2_t
*s
);
1427 void strnorm_w(smb_ucs2_t
*s
);
1428 BOOL
strisnormal_w(smb_ucs2_t
*s
);
1429 void string_replace_w(smb_ucs2_t
*s
, smb_ucs2_t oldc
, smb_ucs2_t newc
);
1430 smb_ucs2_t
*skip_string_w(smb_ucs2_t
*buf
,size_t n
);
1431 size_t str_charnum_w(const smb_ucs2_t
*s
);
1432 BOOL
trim_string_w(smb_ucs2_t
*s
,const smb_ucs2_t
*front
,const smb_ucs2_t
*back
);
1433 BOOL
strhasupper_w(const smb_ucs2_t
*s
);
1434 BOOL
strhaslower_w(const smb_ucs2_t
*s
);
1435 size_t count_chars_w(const smb_ucs2_t
*s
,smb_ucs2_t c
);
1436 BOOL
str_is_all_w(const smb_ucs2_t
*s
,smb_ucs2_t c
);
1437 smb_ucs2_t
*alpha_strcpy_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
, const smb_ucs2_t
*other_safe_chars
, size_t maxlength
);
1438 smb_ucs2_t
*StrnCpy_w(smb_ucs2_t
*dest
,const smb_ucs2_t
*src
,size_t n
);
1439 smb_ucs2_t
*strncpyn_w(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
,size_t n
, smb_ucs2_t c
);
1440 size_t strhex_to_str_w(char *p
, size_t len
, const smb_ucs2_t
*strhex
);
1441 BOOL
in_list_w(smb_ucs2_t
*s
,smb_ucs2_t
*list
,BOOL casesensitive
);
1442 BOOL
string_init_w(smb_ucs2_t
**dest
,const smb_ucs2_t
*src
);
1443 void string_free_w(smb_ucs2_t
**s
);
1444 BOOL
string_set_w(smb_ucs2_t
**dest
,const smb_ucs2_t
*src
);
1445 void string_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
, size_t len
);
1446 void fstring_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
);
1447 void pstring_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,smb_ucs2_t
*insert
);
1448 void all_string_sub_w(smb_ucs2_t
*s
,const smb_ucs2_t
*pattern
,const smb_ucs2_t
*insert
, size_t len
);
1449 void split_at_last_component_w(smb_ucs2_t
*path
, smb_ucs2_t
*front
, smb_ucs2_t sep
, smb_ucs2_t
*back
);
1450 smb_ucs2_t
*octal_string_w(int i
);
1451 smb_ucs2_t
*string_truncate_w(smb_ucs2_t
*s
, size_t length
);
1452 smb_ucs2_t
doscp2ucs2(int w
);
1453 int ucs2doscp(smb_ucs2_t w
);
1454 int rpcstr_pull(char* dest
, void *src
, int dest_len
, int src_len
, int flags
);
1456 /* The following definitions come from lib/wins_srv.c */
1458 BOOL
wins_srv_load_list( const char *src
);
1459 struct in_addr
wins_srv_ip( void );
1460 void wins_srv_died( struct in_addr boothill_ip
);
1461 unsigned long wins_srv_count( void );
1463 /* The following definitions come from locking/brlock.c */
1465 void brl_init(int read_only
);
1466 void brl_shutdown(int read_only
);
1467 NTSTATUS
brl_lock(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
1468 uint16 smbpid
, pid_t pid
, uint16 tid
,
1469 br_off start
, br_off size
,
1470 enum brl_type lock_type
);
1471 BOOL
brl_unlock(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
1472 uint16 smbpid
, pid_t pid
, uint16 tid
,
1473 br_off start
, br_off size
,
1474 BOOL remove_pending_locks_only
,
1475 void (*pre_unlock_fn
)(void *),
1476 void *pre_unlock_data
);
1477 BOOL
brl_locktest(SMB_DEV_T dev
, SMB_INO_T ino
, int fnum
,
1478 uint16 smbpid
, pid_t pid
, uint16 tid
,
1479 br_off start
, br_off size
,
1480 enum brl_type lock_type
, int check_self
);
1481 void brl_close(SMB_DEV_T dev
, SMB_INO_T ino
, pid_t pid
, int tid
, int fnum
);
1482 int brl_forall(BRLOCK_FN(fn
));
1484 /* The following definitions come from locking/locking.c */
1486 BOOL
is_locked(files_struct
*fsp
,connection_struct
*conn
,
1487 SMB_BIG_UINT count
,SMB_BIG_UINT offset
,
1488 enum brl_type lock_type
, BOOL check_self
);
1489 NTSTATUS
do_lock_spin(files_struct
*fsp
,connection_struct
*conn
, uint16 lock_pid
,
1490 SMB_BIG_UINT count
,SMB_BIG_UINT offset
,enum brl_type lock_type
);
1491 NTSTATUS
do_unlock(files_struct
*fsp
,connection_struct
*conn
, uint16 lock_pid
,
1492 SMB_BIG_UINT count
,SMB_BIG_UINT offset
);
1493 void locking_close_file(files_struct
*fsp
);
1494 BOOL
locking_init(int read_only
);
1495 BOOL
locking_end(void);
1496 BOOL
lock_share_entry(connection_struct
*conn
,
1497 SMB_DEV_T dev
, SMB_INO_T inode
);
1498 void unlock_share_entry(connection_struct
*conn
,
1499 SMB_DEV_T dev
, SMB_INO_T inode
);
1500 BOOL
lock_share_entry_fsp(files_struct
*fsp
);
1501 void unlock_share_entry_fsp(files_struct
*fsp
);
1502 int get_share_modes(connection_struct
*conn
,
1503 SMB_DEV_T dev
, SMB_INO_T inode
,
1504 share_mode_entry
**pp_shares
);
1505 BOOL
share_modes_identical( share_mode_entry
*e1
, share_mode_entry
*e2
);
1506 ssize_t
del_share_entry( SMB_DEV_T dev
, SMB_INO_T inode
,
1507 share_mode_entry
*entry
, share_mode_entry
**ppse
);
1508 ssize_t
del_share_mode(files_struct
*fsp
, share_mode_entry
**ppse
);
1509 BOOL
set_share_mode(files_struct
*fsp
, uint16 port
, uint16 op_type
);
1510 BOOL
remove_share_oplock(files_struct
*fsp
);
1511 BOOL
downgrade_share_oplock(files_struct
*fsp
);
1512 BOOL
modify_delete_flag( SMB_DEV_T dev
, SMB_INO_T inode
, BOOL delete_on_close
);
1513 int share_mode_forall(SHAREMODE_FN(fn
));
1515 /* The following definitions come from locking/posix.c */
1517 int fd_close_posix(struct connection_struct
*conn
, files_struct
*fsp
);
1518 BOOL
is_posix_locked(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
, enum brl_type lock_type
);
1519 BOOL
set_posix_lock(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
, enum brl_type lock_type
);
1520 BOOL
release_posix_lock(files_struct
*fsp
, SMB_BIG_UINT u_offset
, SMB_BIG_UINT u_count
);
1521 void posix_locking_close_file(files_struct
*fsp
);
1522 BOOL
posix_locking_init(int read_only
);
1523 BOOL
posix_locking_end(void);
1525 /* The following definitions come from msdfs/msdfs.c */
1527 BOOL
is_msdfs_link(connection_struct
* conn
, char* path
,
1528 struct referral
** reflistp
, int* refcnt
,
1529 SMB_STRUCT_STAT
*sbufp
);
1530 BOOL
dfs_redirect(char* pathname
, connection_struct
* conn
,
1531 BOOL findfirst_flag
);
1532 BOOL
get_referred_path(char *pathname
, struct junction_map
* jn
,
1533 int* consumedcntp
, BOOL
* self_referralp
);
1534 int setup_dfs_referral(char* pathname
, int max_referral_level
, char** ppdata
);
1535 int dfs_path_error(char* inbuf
, char* outbuf
);
1536 BOOL
create_junction(char* pathname
, struct junction_map
* jn
);
1537 BOOL
create_msdfs_link(struct junction_map
* jn
, BOOL exists
);
1538 BOOL
remove_msdfs_link(struct junction_map
* jn
);
1539 int enum_msdfs_links(struct junction_map
* jn
);
1541 /* The following definitions come from nmbd/asyncdns.c */
1543 int asyncdns_fd(void);
1544 void kill_async_dns_child(void);
1545 void start_async_dns(void);
1546 void run_dns_queue(void);
1547 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
1548 struct name_record
**n
);
1549 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
1550 struct name_record
**n
);
1551 void kill_async_dns_child(void);
1553 /* The following definitions come from nmbd/nmbd_become_dmb.c */
1555 void add_domain_names(time_t t
);
1557 /* The following definitions come from nmbd/nmbd_become_lmb.c */
1559 void insert_permanent_name_into_unicast( struct subnet_record
*subrec
,
1560 struct nmb_name
*nmbname
, uint16 nb_type
);
1561 void unbecome_local_master_browser(struct subnet_record
*subrec
, struct work_record
*work
,
1562 BOOL force_new_election
);
1563 void become_local_master_browser(struct subnet_record
*subrec
, struct work_record
*work
);
1564 void set_workgroup_local_master_browser_name( struct work_record
*work
, const char *newname
);
1566 /* The following definitions come from nmbd/nmbd_browserdb.c */
1568 void update_browser_death_time( struct browse_cache_record
*browc
);
1569 struct browse_cache_record
*create_browser_in_lmb_cache( char *work_name
,
1571 struct in_addr ip
);
1572 struct browse_cache_record
*find_browser_in_lmb_cache( char *browser_name
);
1573 void expire_lmb_browsers( time_t t
);
1575 /* The following definitions come from nmbd/nmbd_browsesync.c */
1577 void dmb_expire_and_sync_browser_lists(time_t t
);
1578 void announce_and_sync_with_domain_master_browser( struct subnet_record
*subrec
,
1579 struct work_record
*work
);
1580 void collect_all_workgroup_names_from_wins_server(time_t t
);
1581 void sync_all_dmbs(time_t t
);
1583 /* The following definitions come from nmbd/nmbd.c */
1586 /* The following definitions come from nmbd/nmbd_elections.c */
1588 void check_master_browser_exists(time_t t
);
1589 void run_elections(time_t t
);
1590 void process_election(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1591 BOOL
check_elections(void);
1592 void nmbd_message_election(int msg_type
, pid_t src
, void *buf
, size_t len
);
1594 /* The following definitions come from nmbd/nmbd_incomingdgrams.c */
1596 void tell_become_backup(void);
1597 void process_host_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1598 void process_workgroup_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1599 void process_local_master_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1600 void process_master_browser_announce(struct subnet_record
*subrec
,
1601 struct packet_struct
*p
,char *buf
);
1602 void process_lm_host_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1603 void process_get_backup_list_request(struct subnet_record
*subrec
,
1604 struct packet_struct
*p
,char *buf
);
1605 void process_reset_browser(struct subnet_record
*subrec
,
1606 struct packet_struct
*p
,char *buf
);
1607 void process_announce_request(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1608 void process_lm_announce_request(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
1610 /* The following definitions come from nmbd/nmbd_incomingrequests.c */
1612 void process_name_release_request(struct subnet_record
*subrec
,
1613 struct packet_struct
*p
);
1614 void process_name_refresh_request(struct subnet_record
*subrec
,
1615 struct packet_struct
*p
);
1616 void process_name_registration_request(struct subnet_record
*subrec
,
1617 struct packet_struct
*p
);
1618 void process_node_status_request(struct subnet_record
*subrec
, struct packet_struct
*p
);
1619 void process_name_query_request(struct subnet_record
*subrec
, struct packet_struct
*p
);
1621 /* The following definitions come from nmbd/nmbd_lmhosts.c */
1623 void load_lmhosts_file(char *fname
);
1624 BOOL
find_name_in_lmhosts(struct nmb_name
*nmbname
, struct name_record
**namerecp
);
1626 /* The following definitions come from nmbd/nmbd_logonnames.c */
1628 void add_logon_names(void);
1630 /* The following definitions come from nmbd/nmbd_mynames.c */
1632 void register_my_workgroup_one_subnet(struct subnet_record
*subrec
);
1633 BOOL
register_my_workgroup_and_names(void);
1634 void release_my_names(void);
1635 void refresh_my_names(time_t t
);
1637 /* The following definitions come from nmbd/nmbd_namelistdb.c */
1639 void set_samba_nb_type(void);
1640 void remove_name_from_namelist( struct subnet_record
*subrec
,
1641 struct name_record
*namerec
);
1642 struct name_record
*find_name_on_subnet( struct subnet_record
*subrec
,
1643 struct nmb_name
*nmbname
,
1645 struct name_record
*find_name_for_remote_broadcast_subnet(
1646 struct nmb_name
*nmbname
,
1648 void update_name_ttl( struct name_record
*namerec
, int ttl
);
1649 struct name_record
*add_name_to_subnet( struct subnet_record
*subrec
,
1654 enum name_source source
,
1656 struct in_addr
*iplist
);
1657 void standard_success_register(struct subnet_record
*subrec
,
1658 struct userdata_struct
*userdata
,
1659 struct nmb_name
*nmbname
, uint16 nb_flags
, int ttl
,
1660 struct in_addr registered_ip
);
1661 void standard_fail_register( struct subnet_record
*subrec
,
1662 struct response_record
*rrec
,
1663 struct nmb_name
*nmbname
);
1664 BOOL
find_ip_in_name_record( struct name_record
*namerec
, struct in_addr ip
);
1665 void add_ip_to_name_record( struct name_record
*namerec
, struct in_addr new_ip
);
1666 void remove_ip_from_name_record( struct name_record
*namerec
,
1667 struct in_addr remove_ip
);
1668 void standard_success_release( struct subnet_record
*subrec
,
1669 struct userdata_struct
*userdata
,
1670 struct nmb_name
*nmbname
,
1671 struct in_addr released_ip
);
1672 void expire_names_on_subnet(struct subnet_record
*subrec
, time_t t
);
1673 void expire_names(time_t t
);
1674 void add_samba_names_to_subnet( struct subnet_record
*subrec
);
1675 void dump_all_namelists(void);
1677 /* The following definitions come from nmbd/nmbd_namequery.c */
1679 BOOL
query_name(struct subnet_record
*subrec
, char *name
, int type
,
1680 query_name_success_function success_fn
,
1681 query_name_fail_function fail_fn
,
1682 struct userdata_struct
*userdata
);
1683 BOOL
query_name_from_wins_server(struct in_addr ip_to
,
1684 char *name
, int type
,
1685 query_name_success_function success_fn
,
1686 query_name_fail_function fail_fn
,
1687 struct userdata_struct
*userdata
);
1689 /* The following definitions come from nmbd/nmbd_nameregister.c */
1691 BOOL
register_name(struct subnet_record
*subrec
,
1692 const char *name
, int type
, uint16 nb_flags
,
1693 register_name_success_function success_fn
,
1694 register_name_fail_function fail_fn
,
1695 struct userdata_struct
*userdata
);
1696 BOOL
refresh_name(struct subnet_record
*subrec
, struct name_record
*namerec
,
1697 refresh_name_success_function success_fn
,
1698 refresh_name_fail_function fail_fn
,
1699 struct userdata_struct
*userdata
);
1701 /* The following definitions come from nmbd/nmbd_namerelease.c */
1703 BOOL
release_name(struct subnet_record
*subrec
, struct name_record
*namerec
,
1704 release_name_success_function success_fn
,
1705 release_name_fail_function fail_fn
,
1706 struct userdata_struct
*userdata
);
1708 /* The following definitions come from nmbd/nmbd_nodestatus.c */
1710 BOOL
node_status(struct subnet_record
*subrec
, struct nmb_name
*nmbname
,
1711 struct in_addr send_ip
, node_status_success_function success_fn
,
1712 node_status_fail_function fail_fn
, struct userdata_struct
*userdata
);
1714 /* The following definitions come from nmbd/nmbd_packets.c */
1716 uint16
get_nb_flags(char *buf
);
1717 void set_nb_flags(char *buf
, uint16 nb_flags
);
1718 struct response_record
*queue_register_name( struct subnet_record
*subrec
,
1719 response_function resp_fn
,
1720 timeout_response_function timeout_fn
,
1721 register_name_success_function success_fn
,
1722 register_name_fail_function fail_fn
,
1723 struct userdata_struct
*userdata
,
1724 struct nmb_name
*nmbname
,
1726 struct response_record
*queue_register_multihomed_name( struct subnet_record
*subrec
,
1727 response_function resp_fn
,
1728 timeout_response_function timeout_fn
,
1729 register_name_success_function success_fn
,
1730 register_name_fail_function fail_fn
,
1731 struct userdata_struct
*userdata
,
1732 struct nmb_name
*nmbname
,
1734 struct in_addr register_ip
);
1735 struct response_record
*queue_release_name( struct subnet_record
*subrec
,
1736 response_function resp_fn
,
1737 timeout_response_function timeout_fn
,
1738 release_name_success_function success_fn
,
1739 release_name_fail_function fail_fn
,
1740 struct userdata_struct
*userdata
,
1741 struct nmb_name
*nmbname
,
1743 struct in_addr release_ip
);
1744 struct response_record
*queue_refresh_name( struct subnet_record
*subrec
,
1745 response_function resp_fn
,
1746 timeout_response_function timeout_fn
,
1747 refresh_name_success_function success_fn
,
1748 refresh_name_fail_function fail_fn
,
1749 struct userdata_struct
*userdata
,
1750 struct name_record
*namerec
,
1751 struct in_addr refresh_ip
);
1752 struct response_record
*queue_query_name( struct subnet_record
*subrec
,
1753 response_function resp_fn
,
1754 timeout_response_function timeout_fn
,
1755 query_name_success_function success_fn
,
1756 query_name_fail_function fail_fn
,
1757 struct userdata_struct
*userdata
,
1758 struct nmb_name
*nmbname
);
1759 struct response_record
*queue_query_name_from_wins_server( struct in_addr to_ip
,
1760 response_function resp_fn
,
1761 timeout_response_function timeout_fn
,
1762 query_name_success_function success_fn
,
1763 query_name_fail_function fail_fn
,
1764 struct userdata_struct
*userdata
,
1765 struct nmb_name
*nmbname
);
1766 struct response_record
*queue_node_status( struct subnet_record
*subrec
,
1767 response_function resp_fn
,
1768 timeout_response_function timeout_fn
,
1769 node_status_success_function success_fn
,
1770 node_status_fail_function fail_fn
,
1771 struct userdata_struct
*userdata
,
1772 struct nmb_name
*nmbname
,
1773 struct in_addr send_ip
);
1774 void reply_netbios_packet(struct packet_struct
*orig_packet
,
1775 int rcode
, enum netbios_reply_type_code rcv_code
, int opcode
,
1776 int ttl
, char *data
,int len
);
1777 void run_packet_queue(void);
1778 void retransmit_or_expire_response_records(time_t t
);
1779 BOOL
listen_for_packets(BOOL run_election
);
1780 BOOL
send_mailslot(BOOL unique
, const char *mailslot
,char *buf
,int len
,
1781 const char *srcname
, int src_type
,
1782 const char *dstname
, int dest_type
,
1783 struct in_addr dest_ip
,struct in_addr src_ip
,
1786 /* The following definitions come from nmbd/nmbd_processlogon.c */
1788 void process_logon_packet(struct packet_struct
*p
,char *buf
,int len
,
1789 const char *mailslot
);
1791 /* The following definitions come from nmbd/nmbd_responserecordsdb.c */
1793 void remove_response_record(struct subnet_record
*subrec
,
1794 struct response_record
*rrec
);
1795 struct response_record
*make_response_record( struct subnet_record
*subrec
,
1796 struct packet_struct
*p
,
1797 response_function resp_fn
,
1798 timeout_response_function timeout_fn
,
1799 success_function success_fn
,
1800 fail_function fail_fn
,
1801 struct userdata_struct
*userdata
);
1802 struct response_record
*find_response_record(struct subnet_record
**ppsubrec
,
1804 BOOL
is_refresh_already_queued(struct subnet_record
*subrec
, struct name_record
*namerec
);
1806 /* The following definitions come from nmbd/nmbd_sendannounce.c */
1808 void send_browser_reset(int reset_type
, const char *to_name
, int to_type
, struct in_addr to_ip
);
1809 void broadcast_announce_request(struct subnet_record
*subrec
, struct work_record
*work
);
1810 void announce_my_server_names(time_t t
);
1811 void announce_my_lm_server_names(time_t t
);
1812 void reset_announce_timer(void);
1813 void announce_myself_to_domain_master_browser(time_t t
);
1814 void announce_my_servers_removed(void);
1815 void announce_remote(time_t t
);
1816 void browse_sync_remote(time_t t
);
1818 /* The following definitions come from nmbd/nmbd_serverlistdb.c */
1820 void remove_all_servers(struct work_record
*work
);
1821 struct server_record
*find_server_in_workgroup(struct work_record
*work
, char *name
);
1822 void remove_server_from_workgroup(struct work_record
*work
, struct server_record
*servrec
);
1823 struct server_record
*create_server_on_workgroup(struct work_record
*work
,
1824 char *name
,int servertype
,
1825 int ttl
,char *comment
);
1826 void update_server_ttl(struct server_record
*servrec
, int ttl
);
1827 void expire_servers(struct work_record
*work
, time_t t
);
1828 void write_browse_list_entry(FILE *fp
, fstring name
, uint32 rec_type
,
1829 fstring local_master_browser_name
, fstring description
);
1830 void write_browse_list(time_t t
, BOOL force_write
);
1832 /* The following definitions come from nmbd/nmbd_subnetdb.c */
1834 void close_subnet(struct subnet_record
*subrec
);
1835 struct subnet_record
*make_normal_subnet(struct interface
*iface
);
1836 BOOL
create_subnets(void);
1837 BOOL
we_are_a_wins_client(void);
1838 struct subnet_record
*get_next_subnet_maybe_unicast(struct subnet_record
*subrec
);
1839 struct subnet_record
*get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record
*subrec
);
1841 /* The following definitions come from nmbd/nmbd_synclists.c */
1843 void sync_browse_lists(struct work_record
*work
,
1844 char *name
, int nm_type
,
1845 struct in_addr ip
, BOOL local
, BOOL servers
);
1846 void sync_check_completion(void);
1848 /* The following definitions come from nmbd/nmbd_winsproxy.c */
1850 void make_wins_proxy_name_query_request( struct subnet_record
*subrec
,
1851 struct packet_struct
*incoming_packet
,
1852 struct nmb_name
*question_name
);
1854 /* The following definitions come from nmbd/nmbd_winsserver.c */
1856 BOOL
packet_is_for_wins_server(struct packet_struct
*packet
);
1857 BOOL
initialise_wins(void);
1858 void wins_process_name_refresh_request(struct subnet_record
*subrec
,
1859 struct packet_struct
*p
);
1860 void wins_process_name_registration_request(struct subnet_record
*subrec
,
1861 struct packet_struct
*p
);
1862 void wins_process_multihomed_name_registration_request( struct subnet_record
*subrec
,
1863 struct packet_struct
*p
);
1864 void send_wins_name_query_response(int rcode
, struct packet_struct
*p
,
1865 struct name_record
*namerec
);
1866 void wins_process_name_query_request(struct subnet_record
*subrec
,
1867 struct packet_struct
*p
);
1868 void wins_process_name_release_request(struct subnet_record
*subrec
,
1869 struct packet_struct
*p
);
1870 void initiate_wins_processing(time_t t
);
1871 void wins_write_database(BOOL background
);
1873 /* The following definitions come from nmbd/nmbd_workgroupdb.c */
1875 struct work_record
*find_workgroup_on_subnet(struct subnet_record
*subrec
,
1877 struct work_record
*create_workgroup_on_subnet(struct subnet_record
*subrec
,
1878 const char *name
, int ttl
);
1879 void update_workgroup_ttl(struct work_record
*work
, int ttl
);
1880 void initiate_myworkgroup_startup(struct subnet_record
*subrec
, struct work_record
*work
);
1881 void dump_workgroups(BOOL force_write
);
1882 void expire_workgroups_and_servers(time_t t
);
1884 /* The following definitions come from nsswitch/wb_client.c */
1886 BOOL
winbind_lookup_name(const char *dom_name
, const char *name
, DOM_SID
*sid
,
1887 enum SID_NAME_USE
*name_type
);
1888 BOOL
winbind_lookup_sid(DOM_SID
*sid
,
1889 fstring dom_name
, fstring name
,
1890 enum SID_NAME_USE
*name_type
);
1891 BOOL
winbind_sid_to_uid(uid_t
*puid
, DOM_SID
*sid
);
1892 BOOL
winbind_uid_to_sid(DOM_SID
*sid
, uid_t uid
);
1893 BOOL
winbind_sid_to_gid(gid_t
*pgid
, DOM_SID
*sid
);
1894 BOOL
winbind_gid_to_sid(DOM_SID
*sid
, gid_t gid
);
1895 int winbind_initgroups(char *user
, gid_t gid
);
1896 int winbind_getgroups(const char *user
, int size
, gid_t
*list
);
1897 BOOL
winbind_uidtoname(fstring name
, uid_t uid
);
1898 BOOL
winbind_gidtoname(fstring name
, gid_t gid
);
1899 BOOL
winbind_nametouid(uid_t
*puid
, const char *name
);
1900 BOOL
winbind_nametogid(gid_t
*pgid
, const char *gname
);
1902 /* The following definitions come from nsswitch/wb_common.c */
1904 void free_response(struct winbindd_response
*response
);
1905 void winbind_exclude_domain(const char *domain
);
1906 void init_request(struct winbindd_request
*request
, int request_type
);
1907 void init_response(struct winbindd_response
*response
);
1908 void close_sock(void);
1909 int winbind_open_pipe_sock(void);
1910 int write_sock(void *buffer
, int count
);
1911 int read_reply(struct winbindd_response
*response
);
1913 /* The following definitions come from param/loadparm.c */
1915 void lp_talloc_free(void);
1916 char *lp_logfile(void);
1917 char *lp_configfile(void);
1918 char *lp_tdb_passwd_file(void);
1919 char *lp_smb_passwd_file(void);
1920 char *lp_serverstring(void);
1921 char *lp_printcapname(void);
1922 char *lp_enumports_cmd(void);
1923 char *lp_addprinter_cmd(void);
1924 char *lp_deleteprinter_cmd(void);
1925 char *lp_os2_driver_map(void);
1926 char *lp_lockdir(void);
1927 char *lp_piddir(void);
1928 char *lp_utmpdir(void);
1929 char *lp_wtmpdir(void);
1931 char *lp_rootdir(void);
1932 char *lp_source_environment(void);
1933 char *lp_defaultservice(void);
1934 char *lp_msg_command(void);
1935 char *lp_dfree_command(void);
1936 char *lp_hosts_equiv(void);
1937 char *lp_auto_services(void);
1938 char *lp_passwd_program(void);
1939 char *lp_passwd_chat(void);
1940 char *lp_passwordserver(void);
1941 char *lp_name_resolve_order(void);
1942 char *lp_workgroup(void);
1943 char *lp_username_map(void);
1944 char *lp_groupname_map(void);
1945 char *lp_logon_script(void);
1946 char *lp_logon_path(void);
1947 char *lp_logon_drive(void);
1948 char *lp_logon_home(void);
1949 char *lp_remote_announce(void);
1950 char *lp_remote_browse_sync(void);
1951 char *lp_wins_server(void);
1952 char *lp_interfaces(void);
1953 char *lp_socket_address(void);
1954 char *lp_nis_home_map_name(void);
1955 char *lp_netbios_aliases(void);
1956 char *lp_panic_action(void);
1957 char *lp_adduser_script(void);
1958 char *lp_deluser_script(void);
1959 char *lp_wins_hook(void);
1960 char *lp_domain_admin_group(void);
1961 char *lp_domain_guest_group(void);
1962 char *lp_template_homedir(void);
1963 char *lp_template_shell(void);
1964 char *lp_winbind_separator(void);
1965 char *lp_acl_compatibility(void);
1966 BOOL
lp_winbind_enum_users(void);
1967 BOOL
lp_winbind_enum_groups(void);
1968 BOOL
lp_winbind_use_default_domain(void);
1969 char *lp_codepagedir(void);
1970 char *lp_ldap_server(void);
1971 char *lp_ldap_suffix(void);
1972 char *lp_ldap_filter(void);
1973 char *lp_ldap_admin_dn(void);
1974 int lp_ldap_port(void);
1975 int lp_ldap_ssl(void);
1976 char *lp_add_share_cmd(void);
1977 char *lp_change_share_cmd(void);
1978 char *lp_delete_share_cmd(void);
1979 char *lp_mangling_method(void);
1980 int lp_ssl_version(void);
1981 char *lp_ssl_hosts(void);
1982 char *lp_ssl_hosts_resign(void);
1983 char *lp_ssl_cacertdir(void);
1984 char *lp_ssl_cacertfile(void);
1985 char *lp_ssl_server_cert(void);
1986 char *lp_ssl_server_privkey(void);
1987 char *lp_ssl_client_cert(void);
1988 char *lp_ssl_client_privkey(void);
1989 char *lp_ssl_ciphers(void);
1990 char *lp_ssl_egdsocket(void);
1991 char *lp_ssl_entropyfile(void);
1992 int lp_ssl_entropybytes(void);
1993 BOOL
lp_ssl_enabled(void);
1994 BOOL
lp_ssl_reqClientCert(void);
1995 BOOL
lp_ssl_reqServerCert(void);
1996 BOOL
lp_ssl_compatibility(void);
1997 BOOL
lp_ms_add_printer_wizard(void);
1998 BOOL
lp_dns_proxy(void);
1999 BOOL
lp_wins_support(void);
2000 BOOL
lp_we_are_a_wins_server(void);
2001 BOOL
lp_wins_proxy(void);
2002 BOOL
lp_local_master(void);
2003 BOOL
lp_domain_logons(void);
2004 BOOL
lp_load_printers(void);
2005 BOOL
lp_use_rhosts(void);
2006 BOOL
lp_readprediction(void);
2007 BOOL
lp_readbmpx(void);
2008 BOOL
lp_readraw(void);
2009 BOOL
lp_large_readwrite(void);
2010 BOOL
lp_writeraw(void);
2011 BOOL
lp_null_passwords(void);
2012 BOOL
lp_obey_pam_restrictions(void);
2013 BOOL
lp_strip_dot(void);
2014 BOOL
lp_encrypted_passwords(void);
2015 BOOL
lp_update_encrypted(void);
2016 BOOL
lp_syslog_only(void);
2017 BOOL
lp_admin_log(void);
2018 BOOL
lp_timestamp_logs(void);
2019 BOOL
lp_debug_hires_timestamp(void);
2020 BOOL
lp_debug_pid(void);
2021 BOOL
lp_debug_uid(void);
2022 BOOL
lp_browse_list(void);
2023 BOOL
lp_nis_home_map(void);
2024 BOOL
lp_bind_interfaces_only(void);
2025 BOOL
lp_pam_password_change(void);
2026 BOOL
lp_unix_password_sync(void);
2027 BOOL
lp_passwd_chat_debug(void);
2028 BOOL
lp_nt_smb_support(void);
2029 BOOL
lp_nt_pipe_support(void);
2030 BOOL
lp_nt_status_support(void);
2031 BOOL
lp_stat_cache(void);
2032 BOOL
lp_allow_trusted_domains(void);
2033 BOOL
lp_restrict_anonymous(void);
2034 BOOL
lp_lanman_auth(void);
2035 BOOL
lp_host_msdfs(void);
2036 BOOL
lp_kernel_oplocks(void);
2037 BOOL
lp_enhanced_browsing(void);
2038 BOOL
lp_use_mmap(void);
2039 BOOL
lp_unix_extensions(void);
2040 int lp_os_level(void);
2041 int lp_max_ttl(void);
2042 int lp_max_wins_ttl(void);
2043 int lp_min_wins_ttl(void);
2044 int lp_max_log_size(void);
2045 int lp_max_open_files(void);
2046 int lp_maxxmit(void);
2047 int lp_maxmux(void);
2048 int lp_passwordlevel(void);
2049 int lp_usernamelevel(void);
2050 int lp_readsize(void);
2051 int lp_deadtime(void);
2052 int lp_maxprotocol(void);
2053 int lp_minprotocol(void);
2054 int lp_security(void);
2055 int lp_maxdisksize(void);
2056 int lp_lpqcachetime(void);
2057 int lp_max_smbd_processes(void);
2058 int lp_disable_spoolss(void);
2059 int lp_totalprintjobs(void);
2060 int lp_syslog(void);
2061 int lp_client_code_page(void);
2062 int lp_lm_announce(void);
2063 int lp_lm_interval(void);
2064 int lp_machine_password_timeout(void);
2065 int lp_change_notify_timeout(void);
2066 int lp_stat_cache_size(void);
2067 int lp_map_to_guest(void);
2068 int lp_min_passwd_length(void);
2069 int lp_oplock_break_wait_time(void);
2070 int lp_lock_spin_count(void);
2071 int lp_lock_sleep_time(void);
2072 int lp_name_cache_timeout(void);
2073 char *lp_preexec(int );
2074 char *lp_postexec(int );
2075 char *lp_rootpreexec(int );
2076 char *lp_rootpostexec(int );
2077 char *lp_servicename(int );
2078 char *lp_pathname(int );
2079 char *lp_dontdescend(int );
2080 char *lp_username(int );
2081 char *lp_guestaccount(int );
2082 char *lp_invalid_users(int );
2083 char *lp_valid_users(int );
2084 char *lp_admin_users(int );
2085 char *lp_printcommand(int );
2086 char *lp_lpqcommand(int );
2087 char *lp_lprmcommand(int );
2088 char *lp_lppausecommand(int );
2089 char *lp_lpresumecommand(int );
2090 char *lp_queuepausecommand(int );
2091 char *lp_queueresumecommand(int );
2092 char *lp_driverfile(int );
2093 char *lp_printerdriver(int );
2094 char *lp_hostsallow(int );
2095 char *lp_hostsdeny(int );
2096 char *lp_magicscript(int );
2097 char *lp_magicoutput(int );
2098 char *lp_comment(int );
2099 char *lp_force_user(int );
2100 char *lp_force_group(int );
2101 char *lp_readlist(int );
2102 char *lp_writelist(int );
2103 char *lp_printer_admin(int );
2104 char *lp_fstype(int );
2105 char *lp_vfsobj(int );
2106 char *lp_vfs_options(int );
2107 char *lp_mangled_map(int );
2108 char *lp_veto_files(int );
2109 char *lp_hide_files(int );
2110 char *lp_veto_oplocks(int );
2111 char *lp_driverlocation(int );
2112 BOOL
lp_msdfs_root(int );
2113 BOOL
lp_autoloaded(int );
2114 BOOL
lp_preexec_close(int );
2115 BOOL
lp_rootpreexec_close(int );
2116 BOOL
lp_casesensitive(int );
2117 BOOL
lp_preservecase(int );
2118 BOOL
lp_shortpreservecase(int );
2119 BOOL
lp_casemangle(int );
2120 BOOL
lp_status(int );
2121 BOOL
lp_hide_dot_files(int );
2122 BOOL
lp_hideunreadable(int );
2123 BOOL
lp_browseable(int );
2124 BOOL
lp_readonly(int );
2125 BOOL
lp_no_set_dir(int );
2126 BOOL
lp_guest_ok(int );
2127 BOOL
lp_guest_only(int );
2128 BOOL
lp_print_ok(int );
2129 BOOL
lp_postscript(int );
2130 BOOL
lp_map_hidden(int );
2131 BOOL
lp_map_archive(int );
2132 BOOL
lp_locking(int );
2133 BOOL
lp_strict_locking(int );
2134 BOOL
lp_share_modes(int );
2135 BOOL
lp_posix_locking(int );
2136 BOOL
lp_oplocks(int );
2137 BOOL
lp_level2_oplocks(int );
2138 BOOL
lp_onlyuser(int );
2139 BOOL
lp_manglednames(int );
2140 BOOL
lp_widelinks(int );
2141 BOOL
lp_symlinks(int );
2142 BOOL
lp_syncalways(int );
2143 BOOL
lp_strict_allocate(int );
2144 BOOL
lp_strict_sync(int );
2145 BOOL
lp_map_system(int );
2146 BOOL
lp_delete_readonly(int );
2147 BOOL
lp_fake_oplocks(int );
2148 BOOL
lp_recursive_veto_delete(int );
2149 BOOL
lp_dos_filemode(int );
2150 BOOL
lp_dos_filetimes(int );
2151 BOOL
lp_dos_filetime_resolution(int );
2152 BOOL
lp_fake_dir_create_times(int );
2153 BOOL
lp_blocking_locks(int );
2154 BOOL
lp_inherit_perms(int );
2155 BOOL
lp_inherit_acls(int );
2156 BOOL
lp_use_client_driver(int );
2157 BOOL
lp_default_devmode(int );
2158 BOOL
lp_nt_acl_support(int );
2159 BOOL
lp_force_unknown_acl_user(int );
2160 BOOL
lp_use_sendfile(int );
2161 BOOL
lp_profile_acls(int );
2162 int lp_create_mask(int );
2163 int lp_force_create_mode(int );
2164 int lp_security_mask(int );
2165 int lp_force_security_mode(int );
2166 int lp_dir_mask(int );
2167 int lp_force_dir_mode(int );
2168 int lp_dir_security_mask(int );
2169 int lp_force_dir_security_mode(int );
2170 int lp_max_connections(int );
2171 int lp_defaultcase(int );
2172 int lp_minprintspace(int );
2173 int lp_printing(int );
2174 int lp_oplock_contention_limit(int );
2175 int lp_csc_policy(int );
2176 int lp_write_cache_size(int );
2177 int lp_block_size(int );
2178 char lp_magicchar(int );
2179 int lp_winbind_cache_time(void);
2180 BOOL
lp_hide_local_users(void);
2181 BOOL
lp_add_home(char *pszHomename
, int iDefaultService
, char *pszHomedir
);
2182 int lp_add_service(char *pszService
, int iDefaultService
);
2183 BOOL
lp_add_printer(char *pszPrintername
, int iDefaultService
);
2184 BOOL
lp_file_list_changed(void);
2185 BOOL
lp_winbind_uid(uid_t
*low
, uid_t
*high
);
2186 BOOL
lp_winbind_gid(gid_t
*low
, gid_t
*high
);
2187 void *lp_local_ptr(int snum
, void *ptr
);
2188 BOOL
lp_do_parameter(int snum
, const char *pszParmName
, const char *pszParmValue
);
2189 void init_locals(void);
2190 BOOL
lp_is_default(int snum
, struct parm_struct
*parm
);
2191 struct parm_struct
*lp_next_parameter(int snum
, int *i
, int allparameters
);
2192 BOOL
lp_snum_ok(int iService
);
2193 void lp_add_one_printer(char *name
, char *comment
);
2194 BOOL
lp_loaded(void);
2195 void lp_killunused(BOOL (*snumused
) (int));
2196 void lp_killservice(int iServiceIn
);
2197 BOOL
lp_load(const char *pszFname
, BOOL global_only
, BOOL save_defaults
,
2199 void lp_resetnumservices(void);
2200 int lp_numservices(void);
2201 void lp_dump(FILE *f
, BOOL show_defaults
, int maxtoprint
, char *(*dos_to_ext
)(const char *));
2202 void lp_dump_one(FILE * f
, BOOL show_defaults
, int snum
, char *(*dos_to_ext
)(const char *));
2203 int lp_servicenumber(const char *pszServiceName
);
2204 char *volume_label(int snum
);
2205 int lp_server_role(void);
2206 BOOL
lp_domain_master(void);
2207 BOOL
lp_preferred_master(void);
2208 void lp_remove_service(int snum
);
2209 void lp_copy_service(int snum
, char *new_name
);
2210 int lp_default_server_announce(void);
2211 int lp_major_announce_version(void);
2212 int lp_minor_announce_version(void);
2213 void lp_set_name_resolve_order(char *new_order
);
2214 char *lp_printername(int snum
);
2215 void get_private_directory(pstring priv_dir
);
2216 void lp_set_logfile(const char *name
);
2217 const char *get_called_name(void);
2218 int lp_maxprintjobs(int snum
);
2220 /* The following definitions come from param/params.c */
2222 BOOL
pm_process( char *FileName
,
2223 BOOL (*sfunc
)(char *),
2224 BOOL (*pfunc
)(char *, char *) );
2226 /* The following definitions come from passdb/machine_sid.c */
2228 BOOL
pdb_generate_sam_sid(void);
2230 /* The following definitions come from passdb/pampass.c */
2232 BOOL
smb_pam_claim_session(char *user
, char *tty
, char *rhost
);
2233 BOOL
smb_pam_close_session(char *user
, char *tty
, char *rhost
);
2234 NTSTATUS
smb_pam_accountcheck(const char * user
);
2235 NTSTATUS
smb_pam_passcheck(char * user
, char * password
);
2236 BOOL
smb_pam_passchange(const char * user
, const char * oldpassword
, const char * newpassword
);
2237 NTSTATUS
smb_pam_accountcheck(const char * user
);
2238 BOOL
smb_pam_claim_session(char *user
, char *tty
, char *rhost
);
2239 BOOL
smb_pam_close_session(char *in_user
, char *tty
, char *rhost
);
2241 /* The following definitions come from passdb/pass_check.c */
2243 void dfs_unlogin(void);
2244 BOOL
pass_check(char *user
, char *password
, int pwlen
, struct passwd
*pwd
,
2245 BOOL (*fn
) (char *, char *));
2247 /* The following definitions come from passdb/passdb.c */
2249 BOOL
initialize_password_db(BOOL reload
);
2250 BOOL
pdb_init_sam(SAM_ACCOUNT
**user
);
2251 BOOL
pdb_init_sam_pw(SAM_ACCOUNT
**new_sam_acct
, struct passwd
*pwd
);
2252 BOOL
pdb_reset_sam(SAM_ACCOUNT
*user
);
2253 BOOL
pdb_free_sam(SAM_ACCOUNT
*user
);
2254 struct sam_disp_info
*pdb_sam_to_dispinfo(SAM_ACCOUNT
*user
);
2255 char *pdb_encode_acct_ctrl(uint16 acct_ctrl
, size_t length
);
2256 uint16
pdb_decode_acct_ctrl(const char *p
);
2257 void pdb_sethexpwd(char *p
, unsigned char *pwd
, uint16 acct_ctrl
);
2258 BOOL
pdb_gethexpwd(char *p
, unsigned char *pwd
);
2259 BOOL
pdb_name_to_rid(char *user_name
, uint32
*u_rid
, uint32
*g_rid
);
2260 uid_t
pdb_user_rid_to_uid(uint32 user_rid
);
2261 gid_t
pdb_user_rid_to_gid(uint32 user_rid
);
2262 uint32
pdb_uid_to_user_rid(uid_t uid
);
2263 uint32
pdb_gid_to_group_rid(gid_t gid
);
2264 BOOL
pdb_rid_is_user(uint32 rid
);
2265 BOOL
local_lookup_rid(uint32 rid
, char *name
, enum SID_NAME_USE
*psid_name_use
);
2266 BOOL
local_lookup_name(const char *c_domain
, const char *c_user
, DOM_SID
*psid
, enum SID_NAME_USE
*psid_name_use
);
2267 DOM_SID
*local_uid_to_sid(DOM_SID
*psid
, uid_t uid
);
2268 BOOL
local_sid_to_uid(uid_t
*puid
, DOM_SID
*psid
, enum SID_NAME_USE
*name_type
);
2269 DOM_SID
*local_gid_to_sid(DOM_SID
*psid
, gid_t gid
);
2270 BOOL
local_sid_to_gid(gid_t
*pgid
, DOM_SID
*psid
, enum SID_NAME_USE
*name_type
);
2271 void copy_id23_to_sam_passwd(SAM_ACCOUNT
*to
, SAM_USER_INFO_23
*from
);
2272 void copy_id21_to_sam_passwd(SAM_ACCOUNT
*to
, SAM_USER_INFO_21
*from
);
2273 void copy_sam_passwd(SAM_ACCOUNT
*to
, const SAM_ACCOUNT
*from
);
2274 BOOL
local_password_change(const char *user_name
, int local_flags
,
2275 const char *new_passwd
,
2276 char *err_str
, size_t err_str_len
,
2277 char *msg_str
, size_t msg_str_len
);
2278 uint16
pdb_get_acct_ctrl (SAM_ACCOUNT
*sampass
);
2279 time_t pdb_get_logon_time (SAM_ACCOUNT
*sampass
);
2280 time_t pdb_get_logoff_time (SAM_ACCOUNT
*sampass
);
2281 time_t pdb_get_kickoff_time (SAM_ACCOUNT
*sampass
);
2282 time_t pdb_get_pass_last_set_time (SAM_ACCOUNT
*sampass
);
2283 time_t pdb_get_pass_can_change_time (SAM_ACCOUNT
*sampass
);
2284 time_t pdb_get_pass_must_change_time (SAM_ACCOUNT
*sampass
);
2285 uint16
pdb_get_logon_divs (SAM_ACCOUNT
*sampass
);
2286 uint32
pdb_get_hours_len (SAM_ACCOUNT
*sampass
);
2287 uint8
* pdb_get_hours (SAM_ACCOUNT
*sampass
);
2288 uint8
* pdb_get_nt_passwd (SAM_ACCOUNT
*sampass
);
2289 uint8
* pdb_get_lanman_passwd (SAM_ACCOUNT
*sampass
);
2290 uint32
pdb_get_user_rid (SAM_ACCOUNT
*sampass
);
2291 uint32
pdb_get_group_rid (SAM_ACCOUNT
*sampass
);
2292 uid_t
pdb_get_uid (SAM_ACCOUNT
*sampass
);
2293 gid_t
pdb_get_gid (SAM_ACCOUNT
*sampass
);
2294 char* pdb_get_username (SAM_ACCOUNT
*sampass
);
2295 char* pdb_get_domain (SAM_ACCOUNT
*sampass
);
2296 char* pdb_get_nt_username (SAM_ACCOUNT
*sampass
);
2297 char* pdb_get_fullname (SAM_ACCOUNT
*sampass
);
2298 char* pdb_get_homedir (SAM_ACCOUNT
*sampass
);
2299 char* pdb_get_dirdrive (SAM_ACCOUNT
*sampass
);
2300 char* pdb_get_logon_script (SAM_ACCOUNT
*sampass
);
2301 char* pdb_get_profile_path (SAM_ACCOUNT
*sampass
);
2302 char* pdb_get_acct_desc (SAM_ACCOUNT
*sampass
);
2303 char* pdb_get_workstations (SAM_ACCOUNT
*sampass
);
2304 char* pdb_get_munged_dial (SAM_ACCOUNT
*sampass
);
2305 uint32
pdb_get_unknown3 (SAM_ACCOUNT
*sampass
);
2306 uint32
pdb_get_unknown5 (SAM_ACCOUNT
*sampass
);
2307 uint32
pdb_get_unknown6 (SAM_ACCOUNT
*sampass
);
2308 BOOL
pdb_set_acct_ctrl (SAM_ACCOUNT
*sampass
, uint16 flags
);
2309 BOOL
pdb_set_logon_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
2310 BOOL
pdb_set_logoff_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
2311 BOOL
pdb_set_kickoff_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
2312 BOOL
pdb_set_pass_can_change_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
2313 BOOL
pdb_set_pass_must_change_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
2314 BOOL
pdb_set_pass_last_set_time (SAM_ACCOUNT
*sampass
, time_t mytime
);
2315 BOOL
pdb_set_hours_len (SAM_ACCOUNT
*sampass
, uint32 len
);
2316 BOOL
pdb_set_logon_divs (SAM_ACCOUNT
*sampass
, uint16 hours
);
2317 BOOL
pdb_set_init_flag (SAM_ACCOUNT
*sampass
, uint32 flag
);
2318 BOOL
pdb_set_uid (SAM_ACCOUNT
*sampass
, uid_t uid
);
2319 BOOL
pdb_set_gid (SAM_ACCOUNT
*sampass
, gid_t gid
);
2320 BOOL
pdb_set_user_rid (SAM_ACCOUNT
*sampass
, uint32 rid
);
2321 BOOL
pdb_set_group_rid (SAM_ACCOUNT
*sampass
, uint32 grid
);
2322 BOOL
pdb_set_username(SAM_ACCOUNT
*sampass
, char *username
);
2323 BOOL
pdb_set_domain(SAM_ACCOUNT
*sampass
, char *domain
);
2324 BOOL
pdb_set_nt_username(SAM_ACCOUNT
*sampass
, char *nt_username
);
2325 BOOL
pdb_set_fullname(SAM_ACCOUNT
*sampass
, char *fullname
);
2326 BOOL
pdb_set_logon_script(SAM_ACCOUNT
*sampass
, char *logon_script
, BOOL store
);
2327 BOOL
pdb_set_profile_path (SAM_ACCOUNT
*sampass
, char *profile_path
, BOOL store
);
2328 BOOL
pdb_set_dir_drive (SAM_ACCOUNT
*sampass
, char *dir_drive
, BOOL store
);
2329 BOOL
pdb_set_homedir (SAM_ACCOUNT
*sampass
, char *homedir
, BOOL store
);
2330 BOOL
pdb_set_acct_desc (SAM_ACCOUNT
*sampass
, char *acct_desc
);
2331 BOOL
pdb_set_workstations (SAM_ACCOUNT
*sampass
, char *workstations
);
2332 BOOL
pdb_set_munged_dial (SAM_ACCOUNT
*sampass
, char *munged_dial
);
2333 BOOL
pdb_set_nt_passwd (SAM_ACCOUNT
*sampass
, uint8
*pwd
);
2334 BOOL
pdb_set_lanman_passwd (SAM_ACCOUNT
*sampass
, uint8
*pwd
);
2335 BOOL
pdb_set_plaintext_passwd (SAM_ACCOUNT
*sampass
, const char *plaintext
);
2336 BOOL
pdb_set_unknown_3 (SAM_ACCOUNT
*sampass
, uint32 unkn
);
2337 BOOL
pdb_set_unknown_5 (SAM_ACCOUNT
*sampass
, uint32 unkn
);
2338 BOOL
pdb_set_unknown_6 (SAM_ACCOUNT
*sampass
, uint32 unkn
);
2339 BOOL
pdb_set_hours (SAM_ACCOUNT
*sampass
, uint8
*hours
);
2340 BOOL
pdb_getsampwuid (SAM_ACCOUNT
* user
, uid_t uid
);
2342 /* The following definitions come from passdb/pdb_ldap.c */
2344 BOOL
pdb_setsampwent(BOOL update
);
2345 void pdb_endsampwent(void);
2346 BOOL
pdb_getsampwent(SAM_ACCOUNT
* user
);
2347 BOOL
pdb_getsampwnam(SAM_ACCOUNT
* user
, const char *sname
);
2348 BOOL
pdb_getsampwrid(SAM_ACCOUNT
* user
, uint32 rid
);
2349 BOOL
pdb_delete_sam_account(const char *sname
);
2350 BOOL
pdb_update_sam_account(SAM_ACCOUNT
* newpwd
, BOOL override
);
2351 BOOL
pdb_add_sam_account(SAM_ACCOUNT
* newpwd
);
2353 /* The following definitions come from passdb/pdb_nisplus.c */
2355 BOOL
pdb_setsampwent(BOOL update
);
2356 void pdb_endsampwent(void);
2357 BOOL
pdb_getsampwent(SAM_ACCOUNT
*user
);
2358 BOOL
pdb_getsampwnam(SAM_ACCOUNT
* user
, const char *sname
);
2359 BOOL
pdb_getsampwrid(SAM_ACCOUNT
* user
, uint32 rid
);
2360 BOOL
pdb_delete_sam_account(const char *sname
);
2361 BOOL
pdb_add_sam_account(SAM_ACCOUNT
* newpwd
);
2362 BOOL
pdb_update_sam_account(SAM_ACCOUNT
* newpwd
, BOOL override
);
2364 /* The following definitions come from passdb/pdb_smbpasswd.c */
2366 BOOL
pdb_setsampwent (BOOL update
);
2367 void pdb_endsampwent (void);
2368 BOOL
pdb_getsampwent(SAM_ACCOUNT
*user
);
2369 BOOL
pdb_getsampwnam(SAM_ACCOUNT
*sam_acct
, const char *username
);
2370 BOOL
pdb_getsampwrid(SAM_ACCOUNT
*sam_acct
,uint32 rid
);
2371 BOOL
pdb_add_sam_account(SAM_ACCOUNT
*sampass
);
2372 BOOL
pdb_update_sam_account(SAM_ACCOUNT
*sampass
, BOOL override
);
2373 BOOL
pdb_delete_sam_account (const char* username
);
2375 /* The following definitions come from passdb/pdb_tdb.c */
2377 BOOL
pdb_setsampwent(BOOL update
);
2378 void pdb_endsampwent(void);
2379 BOOL
pdb_getsampwent(SAM_ACCOUNT
*user
);
2380 BOOL
pdb_getsampwnam (SAM_ACCOUNT
*user
, const char *sname
);
2381 BOOL
pdb_getsampwrid (SAM_ACCOUNT
*user
, uint32 rid
);
2382 BOOL
pdb_delete_sam_account(const char *sname
);
2383 BOOL
pdb_update_sam_account (SAM_ACCOUNT
*newpwd
, BOOL override
);
2384 BOOL
pdb_add_sam_account (SAM_ACCOUNT
*newpwd
);
2386 /* The following definitions come from passdb/secrets.c */
2388 BOOL
secrets_init(void);
2389 void *secrets_fetch(const char *key
, size_t *size
);
2390 BOOL
secrets_store(const char *key
, const void *data
, size_t size
);
2391 BOOL
secrets_delete(const char *key
);
2392 BOOL
secrets_store_domain_sid(const char *domain
, DOM_SID
*sid
);
2393 BOOL
secrets_fetch_domain_sid(const char *domain
, DOM_SID
*sid
);
2394 const char *trust_keystr(const char *domain
);
2395 BOOL
secrets_lock_trust_account_password(const char *domain
, BOOL dolock
);
2396 BOOL
secrets_fetch_trust_account_password(const char *domain
, uint8 ret_pwd
[16],
2397 time_t *pass_last_set_time
);
2398 BOOL
secrets_store_trust_account_password(const char *domain
, uint8 new_pwd
[16]);
2399 BOOL
trust_password_delete(const char *domain
);
2400 void reset_globals_after_fork(void);
2401 BOOL
secrets_store_ldap_pw(const char* dn
, const char* pw
);
2402 BOOL
fetch_ldap_pw(const char *dn
, char* pw
, int len
);
2403 BOOL
secrets_named_mutex(const char *name
, unsigned int timeout
);
2404 void secrets_named_mutex_release(const char *name
);
2406 /* The following definitions come from passdb/smbpassfile.c */
2408 BOOL
migrate_from_old_password_file(char *domain
);
2410 /* The following definitions come from printing/load.c */
2412 void add_all_printers(void);
2413 void load_printers(void);
2415 /* The following definitions come from printing/lpq_parse.c */
2417 BOOL
parse_lpq_entry(int snum
,char *line
,
2418 print_queue_struct
*buf
,
2419 print_status_struct
*status
,BOOL first
);
2421 /* The following definitions come from printing/nt_printing.c */
2423 BOOL
nt_printing_init(void);
2424 uint32
update_c_setprinter(BOOL initialize
);
2425 uint32
get_c_setprinter(void);
2426 int get_builtin_ntforms(nt_forms_struct
**list
);
2427 BOOL
get_a_builtin_ntform(UNISTR2
*uni_formname
,nt_forms_struct
*form
);
2428 int get_ntforms(nt_forms_struct
**list
);
2429 int write_ntforms(nt_forms_struct
**list
, int number
);
2430 BOOL
add_a_form(nt_forms_struct
**list
, const FORM
*form
, int *count
);
2431 BOOL
delete_a_form(nt_forms_struct
**list
, UNISTR2
*del_name
, int *count
, WERROR
*ret
);
2432 void update_a_form(nt_forms_struct
**list
, const FORM
*form
, int count
);
2433 int get_ntdrivers(fstring
**list
, char *architecture
, uint32 version
);
2434 BOOL
get_short_archi(char *short_archi
, const char *long_archi
);
2435 WERROR
clean_up_driver_struct(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
,
2436 uint32 level
, struct current_user
*user
);
2437 BOOL
move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract
, uint32 level
,
2438 struct current_user
*user
, WERROR
*perr
);
2439 uint32
get_a_printer_driver_9x_compatible(pstring line
, const fstring model
);
2440 uint32
del_a_printer(char *sharename
);
2441 void add_a_specific_param(NT_PRINTER_INFO_LEVEL_2
*info_2
, NT_PRINTER_PARAM
**param
);
2442 BOOL
unlink_specific_param_if_exist(NT_PRINTER_INFO_LEVEL_2
*info_2
, NT_PRINTER_PARAM
*param
);
2443 void free_nt_printer_param(NT_PRINTER_PARAM
**param_ptr
);
2444 NT_DEVICEMODE
*construct_nt_devicemode(const fstring default_devicename
);
2445 NT_DEVICEMODE
*dup_nt_devicemode(NT_DEVICEMODE
*nt_devicemode
);
2446 void free_nt_devicemode(NT_DEVICEMODE
**devmode_ptr
);
2447 void get_printer_subst_params(int snum
, fstring
*printername
, fstring
*sharename
, fstring
*portname
);
2448 WERROR
mod_a_printer(NT_PRINTER_INFO_LEVEL printer
, uint32 level
);
2449 BOOL
set_driver_init(NT_PRINTER_INFO_LEVEL
*printer
, uint32 level
);
2450 BOOL
del_driver_init(char *drivername
);
2451 uint32
update_driver_init(NT_PRINTER_INFO_LEVEL printer
, uint32 level
);
2452 WERROR
save_driver_init(NT_PRINTER_INFO_LEVEL
*printer
, uint32 level
, NT_PRINTER_PARAM
*param
);
2453 WERROR
get_a_printer(NT_PRINTER_INFO_LEVEL
**pp_printer
, uint32 level
, fstring sharename
);
2454 uint32
free_a_printer(NT_PRINTER_INFO_LEVEL
**pp_printer
, uint32 level
);
2455 uint32
add_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver
, uint32 level
);
2456 WERROR
get_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL
*driver
, uint32 level
,
2457 fstring drivername
, const fstring architecture
, uint32 version
);
2458 uint32
free_a_printer_driver(NT_PRINTER_DRIVER_INFO_LEVEL driver
, uint32 level
);
2459 BOOL
printer_driver_in_use ( NT_PRINTER_DRIVER_INFO_LEVEL_3
*info_3
);
2460 WERROR
delete_printer_driver( NT_PRINTER_DRIVER_INFO_LEVEL_3
*info_3
, struct current_user
*user
,
2461 uint32 version
, BOOL delete_files
);
2462 BOOL
get_specific_param_by_index(NT_PRINTER_INFO_LEVEL printer
, uint32 level
, uint32 param_index
,
2463 fstring value
, uint8
**data
, uint32
*type
, uint32
*len
);
2464 BOOL
get_specific_param(NT_PRINTER_INFO_LEVEL printer
, uint32 level
,
2465 fstring value
, uint8
**data
, uint32
*type
, uint32
*len
);
2466 WERROR
nt_printing_setsec(char *printername
, SEC_DESC_BUF
*secdesc_ctr
);
2467 BOOL
nt_printing_getsec(TALLOC_CTX
*ctx
, char *printername
, SEC_DESC_BUF
**secdesc_ctr
);
2468 void map_printer_permissions(SEC_DESC
*sd
);
2469 BOOL
print_access_check(struct current_user
*user
, int snum
, int access_type
);
2470 BOOL
print_time_access_check(int snum
);
2471 WERROR
printer_write_default_dev(int snum
, const PRINTER_DEFAULT
*printer_default
);
2473 /* The following definitions come from printing/pcap.c */
2475 BOOL
pcap_printername_ok(char *pszPrintername
, const char *pszPrintcapname
);
2476 void pcap_printer_fn(void (*fn
)(char *, char *));
2478 /* The following definitions come from printing/print_cups.c */
2480 void cups_printer_fn(void (*fn
)(char *, char *));
2481 int cups_printername_ok(const char *name
);
2483 /* The following definitions come from printing/printfsp.c */
2485 files_struct
*print_fsp_open(connection_struct
*conn
, char *fname
);
2486 void print_fsp_end(files_struct
*fsp
, BOOL normal_close
);
2488 /* The following definitions come from printing/print_generic.c */
2491 /* The following definitions come from printing/printing.c */
2493 BOOL
print_backend_init(void);
2494 BOOL
print_job_exists(int jobid
);
2495 int print_job_snum(int jobid
);
2496 int print_job_fd(int jobid
);
2497 char *print_job_fname(int jobid
);
2498 BOOL
print_job_set_place(int jobid
, int place
);
2499 BOOL
print_job_set_name(int jobid
, char *name
);
2500 BOOL
print_job_delete(struct current_user
*user
, int jobid
, WERROR
*errcode
);
2501 BOOL
print_job_pause(struct current_user
*user
, int jobid
, WERROR
*errcode
);
2502 BOOL
print_job_resume(struct current_user
*user
, int jobid
, WERROR
*errcode
);
2503 int print_job_write(int jobid
, const char *buf
, int size
);
2504 int print_queue_length(int snum
, print_status_struct
*pstatus
);
2505 int print_job_start(struct current_user
*user
, int snum
, char *jobname
);
2506 void print_job_endpage(int jobid
);
2507 BOOL
print_job_end(int jobid
, BOOL normal_close
);
2508 int print_queue_status(int snum
,
2509 print_queue_struct
**queue
,
2510 print_status_struct
*status
);
2511 int print_queue_snum(char *qname
);
2512 BOOL
print_queue_pause(struct current_user
*user
, int snum
, WERROR
*errcode
);
2513 BOOL
print_queue_resume(struct current_user
*user
, int snum
, WERROR
*errcode
);
2514 BOOL
print_queue_purge(struct current_user
*user
, int snum
, WERROR
*errcode
);
2516 /* The following definitions come from printing/print_svid.c */
2518 void sysv_printer_fn(void (*fn
)(char *, char *));
2519 int sysv_printername_ok(char *name
);
2521 /* The following definitions come from profile/profile.c */
2523 void profile_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
2524 void reqprofile_message(int msg_type
, pid_t src
, void *buf
, size_t len
);
2525 BOOL
profile_setup(BOOL rdonly
);
2527 /* The following definitions come from rpc_client/cli_login.c */
2529 NTSTATUS
cli_nt_setup_creds(struct cli_state
*cli
, unsigned char mach_pwd
[16]);
2530 BOOL
cli_nt_srv_pwset(struct cli_state
*cli
, unsigned char *new_hashof_mach_pwd
);
2531 NTSTATUS
cli_nt_login_interactive(struct cli_state
*cli
, char *unix_domain
, char *unix_username
,
2532 uint32 smb_userid_low
, char *unix_password
,
2533 NET_ID_INFO_CTR
*ctr
, NET_USER_INFO_3
*user_info3
);
2534 NTSTATUS
cli_nt_login_network(struct cli_state
*cli
, char *unix_domain
, char *unix_username
,
2535 uint32 smb_userid_low
, const char lm_chal
[8],
2536 const char *lm_chal_resp
, const char *nt_chal_resp
,
2537 NET_ID_INFO_CTR
*ctr
, NET_USER_INFO_3
*user_info3
);
2538 BOOL
cli_nt_logoff(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
);
2540 /* The following definitions come from rpc_client/cli_netlogon.c */
2542 BOOL
cli_net_logon_ctrl2(struct cli_state
*cli
, NTSTATUS status_level
);
2543 NTSTATUS
cli_net_auth2(struct cli_state
*cli
, uint16 sec_chan
,
2544 uint32 neg_flags
, DOM_CHAL
*srv_chal
);
2545 BOOL
cli_net_req_chal(struct cli_state
*cli
, DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
);
2546 BOOL
cli_net_srv_pwset(struct cli_state
*cli
, uint8 hashed_mach_pwd
[16]);
2547 NTSTATUS
cli_net_sam_logon(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
,
2548 NET_USER_INFO_3
*user_info3
);
2549 BOOL
cli_net_sam_logoff(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
);
2551 /* The following definitions come from rpc_client/cli_pipe.c */
2553 BOOL
rpc_api_pipe_req(struct cli_state
*cli
, uint8 op_num
,
2554 prs_struct
*data
, prs_struct
*rdata
);
2555 BOOL
rpc_pipe_bind(struct cli_state
*cli
, const char *pipe_name
, char *my_name
);
2556 void cli_nt_set_ntlmssp_flgs(struct cli_state
*cli
, uint32 ntlmssp_flgs
);
2557 BOOL
cli_nt_session_open(struct cli_state
*cli
, const char *pipe_name
);
2558 void cli_nt_session_close(struct cli_state
*cli
);
2560 /* The following definitions come from rpc_client/cli_spoolss_notify.c */
2562 BOOL
spoolss_disconnect_from_client( struct cli_state
*cli
);
2563 BOOL
spoolss_connect_to_client( struct cli_state
*cli
, char *remote_machine
);
2564 WERROR
cli_spoolss_reply_open_printer(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
2565 char *printer
, uint32 localprinter
, uint32 type
,
2566 POLICY_HND
*handle
);
2567 WERROR
cli_spoolss_reply_close_printer(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
2568 POLICY_HND
*handle
);
2569 WERROR
cli_spoolss_routerreplyprinter (struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
2570 POLICY_HND
*pol
, uint32 condition
, uint32 changd_id
);
2571 WERROR
cli_spoolss_reply_rrpcn(struct cli_state
*cli
, TALLOC_CTX
*mem_ctx
,
2572 POLICY_HND
*handle
, PRINTER_MESSAGE_INFO
*info
,
2573 NT_PRINTER_INFO_LEVEL
*printer
);
2575 /* The following definitions come from rpc_client/cli_trust.c */
2577 BOOL
change_trust_account_password( char *domain
, const char *remote_machine_list
);
2579 /* The following definitions come from rpcclient/cmd_dfs.c */
2582 /* The following definitions come from rpcclient/cmd_lsarpc.c */
2585 /* The following definitions come from rpcclient/cmd_netlogon.c */
2588 /* The following definitions come from rpcclient/cmd_reg.c */
2591 /* The following definitions come from rpcclient/cmd_samr.c */
2594 /* The following definitions come from rpcclient/cmd_spoolss.c */
2596 BOOL
get_short_archi(char *short_archi
, const char *long_archi
);
2597 void set_drv_info_3_env (DRIVER_INFO_3
*info
, const char *arch
);
2599 /* The following definitions come from rpcclient/cmd_srvsvc.c */
2602 /* The following definitions come from rpcclient/display_sec.c */
2604 char *get_sec_mask_str(uint32 type
);
2605 void display_sec_access(SEC_ACCESS
*info
);
2606 void display_sec_ace(SEC_ACE
*ace
);
2607 void display_sec_acl(SEC_ACL
*sec_acl
);
2608 void display_sec_desc(SEC_DESC
*sec
);
2610 /* The following definitions come from rpcclient/rpcclient.c */
2612 void fetch_machine_sid(struct cli_state
*cli
);
2613 int main(int argc
, char *argv
[]);
2615 /* The following definitions come from rpc_parse/parse_dfs.c */
2617 void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST
*q_d
);
2618 BOOL
dfs_io_q_dfs_exist(const char *desc
, DFS_Q_DFS_EXIST
*q_d
, prs_struct
*ps
, int depth
);
2619 BOOL
dfs_io_r_dfs_exist(const char *desc
, DFS_R_DFS_EXIST
*q_d
, prs_struct
*ps
, int depth
);
2620 BOOL
init_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE
*q_d
, const char *entrypath
,
2621 const char *servername
, const char *sharename
);
2622 BOOL
dfs_io_q_dfs_remove(const char *desc
, DFS_Q_DFS_REMOVE
*q_d
, prs_struct
*ps
, int depth
);
2623 BOOL
dfs_io_r_dfs_remove(const char *desc
, DFS_R_DFS_REMOVE
*r_d
, prs_struct
*ps
, int depth
);
2624 BOOL
init_dfs_q_dfs_add(DFS_Q_DFS_ADD
*q_d
, const char *entrypath
, const char *servername
,
2625 const char *sharename
, const char *comment
, uint32 flags
);
2626 BOOL
dfs_io_q_dfs_add(const char *desc
, DFS_Q_DFS_ADD
*q_d
, prs_struct
*ps
, int depth
);
2627 BOOL
dfs_io_r_dfs_add(const char *desc
, DFS_R_DFS_ADD
*r_d
, prs_struct
*ps
, int depth
);
2628 BOOL
init_dfs_q_dfs_get_info(DFS_Q_DFS_GET_INFO
*q_d
, const char *entrypath
,
2629 const char *servername
, const char *sharename
,
2631 BOOL
dfs_io_q_dfs_get_info(const char* desc
, DFS_Q_DFS_GET_INFO
* q_i
, prs_struct
* ps
, int depth
);
2632 BOOL
dfs_io_r_dfs_get_info(const char* desc
, DFS_R_DFS_GET_INFO
* r_i
, prs_struct
* ps
, int depth
);
2633 BOOL
init_dfs_q_dfs_enum(DFS_Q_DFS_ENUM
*q_d
, uint32 level
, DFS_INFO_CTR
*ctr
);
2634 BOOL
dfs_io_q_dfs_enum(const char *desc
, DFS_Q_DFS_ENUM
*q_d
, prs_struct
*ps
, int depth
);
2635 BOOL
dfs_io_dfs_info_ctr(const char *desc
, DFS_INFO_CTR
* ctr
, uint32 num_entries
, uint32 level
, prs_struct
* ps
, int depth
);
2636 BOOL
dfs_io_r_dfs_enum(const char *desc
, DFS_R_DFS_ENUM
*q_d
, prs_struct
*ps
, int depth
);
2637 BOOL
dfs_io_dfs_storage_info(const char *desc
, DFS_INFO_3
* info3
, prs_struct
*ps
, int depth
);
2639 /* The following definitions come from rpc_parse/parse_lsa.c */
2641 void init_lsa_trans_name(LSA_TRANS_NAME
*trn
, UNISTR2
*uni_name
,
2642 uint16 sid_name_use
, const char *name
, uint32 idx
);
2643 void init_lsa_sec_qos(LSA_SEC_QOS
*qos
, uint16 imp_lev
, uint8 ctxt
, uint8 eff
);
2644 void init_lsa_obj_attr(LSA_OBJ_ATTR
*attr
, uint32 attributes
, LSA_SEC_QOS
*qos
);
2645 void init_q_open_pol(LSA_Q_OPEN_POL
*r_q
, uint16 system_name
,
2646 uint32 attributes
, uint32 desired_access
,
2648 BOOL
lsa_io_q_open_pol(const char *desc
, LSA_Q_OPEN_POL
*r_q
, prs_struct
*ps
,
2650 BOOL
lsa_io_r_open_pol(const char *desc
, LSA_R_OPEN_POL
*r_p
, prs_struct
*ps
,
2652 void init_q_open_pol2(LSA_Q_OPEN_POL2
*r_q
, const char *server_name
,
2653 uint32 attributes
, uint32 desired_access
,
2655 BOOL
lsa_io_q_open_pol2(const char *desc
, LSA_Q_OPEN_POL2
*r_q
, prs_struct
*ps
,
2657 BOOL
lsa_io_r_open_pol2(const char *desc
, LSA_R_OPEN_POL2
*r_p
, prs_struct
*ps
,
2659 void init_q_query_sec_obj(LSA_Q_QUERY_SEC_OBJ
*q_q
, const POLICY_HND
*hnd
,
2661 BOOL
lsa_io_q_query_sec_obj(const char *desc
, LSA_Q_QUERY_SEC_OBJ
*q_q
,
2662 prs_struct
*ps
, int depth
);
2663 BOOL
lsa_io_r_query_sec_obj(const char *desc
, LSA_R_QUERY_SEC_OBJ
*r_u
,
2664 prs_struct
*ps
, int depth
);
2665 void init_q_query(LSA_Q_QUERY_INFO
*q_q
, POLICY_HND
*hnd
, uint16 info_class
);
2666 BOOL
lsa_io_q_query(const char *desc
, LSA_Q_QUERY_INFO
*q_q
, prs_struct
*ps
,
2668 BOOL
init_q_enum_trust_dom(LSA_Q_ENUM_TRUST_DOM
* q_e
, POLICY_HND
*pol
,
2669 uint32 enum_context
, uint32 preferred_len
);
2670 BOOL
lsa_io_q_enum_trust_dom(const char *desc
, LSA_Q_ENUM_TRUST_DOM
*q_e
,
2671 prs_struct
*ps
, int depth
);
2672 void init_r_enum_trust_dom(TALLOC_CTX
*ctx
, LSA_R_ENUM_TRUST_DOM
*r_e
, uint32 enum_context
,
2673 const char *domain_name
, DOM_SID
*domain_sid
,
2675 BOOL
lsa_io_r_enum_trust_dom(const char *desc
, LSA_R_ENUM_TRUST_DOM
*r_e
,
2676 prs_struct
*ps
, int depth
);
2677 BOOL
lsa_io_dom_query_5(const char *desc
, DOM_QUERY_5
*d_q
, prs_struct
*ps
, int depth
);
2678 BOOL
lsa_io_r_query(const char *desc
, LSA_R_QUERY_INFO
*r_q
, prs_struct
*ps
,
2680 void init_lsa_sid_enum(TALLOC_CTX
*mem_ctx
, LSA_SID_ENUM
*sen
,
2681 int num_entries
, DOM_SID
*sids
);
2682 void init_q_lookup_sids(TALLOC_CTX
*mem_ctx
, LSA_Q_LOOKUP_SIDS
*q_l
,
2683 POLICY_HND
*hnd
, int num_sids
, DOM_SID
*sids
,
2685 BOOL
lsa_io_q_lookup_sids(const char *desc
, LSA_Q_LOOKUP_SIDS
*q_s
, prs_struct
*ps
,
2687 BOOL
lsa_io_r_lookup_sids(const char *desc
, LSA_R_LOOKUP_SIDS
*r_s
,
2688 prs_struct
*ps
, int depth
);
2689 void init_q_lookup_names(TALLOC_CTX
*mem_ctx
, LSA_Q_LOOKUP_NAMES
*q_l
,
2690 POLICY_HND
*hnd
, int num_names
, const char **names
);
2691 BOOL
lsa_io_q_lookup_names(const char *desc
, LSA_Q_LOOKUP_NAMES
*q_r
,
2692 prs_struct
*ps
, int depth
);
2693 BOOL
lsa_io_r_lookup_names(const char *desc
, LSA_R_LOOKUP_NAMES
*r_r
,
2694 prs_struct
*ps
, int depth
);
2695 void init_lsa_q_close(LSA_Q_CLOSE
*q_c
, POLICY_HND
*hnd
);
2696 BOOL
lsa_io_q_close(const char *desc
, LSA_Q_CLOSE
*q_c
, prs_struct
*ps
, int depth
);
2697 BOOL
lsa_io_r_close(const char *desc
, LSA_R_CLOSE
*r_c
, prs_struct
*ps
, int depth
);
2698 BOOL
lsa_io_q_open_secret(const char *desc
, LSA_Q_OPEN_SECRET
*q_c
, prs_struct
*ps
, int depth
);
2699 BOOL
lsa_io_r_open_secret(const char *desc
, LSA_R_OPEN_SECRET
*r_c
, prs_struct
*ps
, int depth
);
2700 void init_q_enum_privs(LSA_Q_ENUM_PRIVS
*q_q
, POLICY_HND
*hnd
, uint32 enum_context
, uint32 pref_max_length
);
2701 BOOL
lsa_io_q_enum_privs(const char *desc
, LSA_Q_ENUM_PRIVS
*q_q
, prs_struct
*ps
, int depth
);
2702 void init_lsa_r_enum_privs(LSA_R_ENUM_PRIVS
*r_u
, uint32 enum_context
,
2703 uint32 count
, LSA_PRIV_ENTRY
*entries
);
2704 BOOL
lsa_io_r_enum_privs(const char *desc
, LSA_R_ENUM_PRIVS
*r_q
, prs_struct
*ps
, int depth
);
2705 void init_lsa_priv_get_dispname(LSA_Q_PRIV_GET_DISPNAME
*trn
, POLICY_HND
*hnd
, const char *name
, uint16 lang_id
, uint16 lang_id_sys
);
2706 BOOL
lsa_io_q_priv_get_dispname(const char *desc
, LSA_Q_PRIV_GET_DISPNAME
*q_q
, prs_struct
*ps
, int depth
);
2707 BOOL
lsa_io_r_priv_get_dispname(const char *desc
, LSA_R_PRIV_GET_DISPNAME
*r_q
, prs_struct
*ps
, int depth
);
2708 void init_lsa_q_enum_accounts(LSA_Q_ENUM_ACCOUNTS
*trn
, POLICY_HND
*hnd
, uint32 enum_context
, uint32 pref_max_length
);
2709 BOOL
lsa_io_q_enum_accounts(const char *desc
, LSA_Q_ENUM_ACCOUNTS
*q_q
, prs_struct
*ps
, int depth
);
2710 void init_lsa_r_enum_accounts(LSA_R_ENUM_ACCOUNTS
*r_u
, uint32 enum_context
);
2711 BOOL
lsa_io_r_enum_accounts(const char *desc
, LSA_R_ENUM_ACCOUNTS
*r_q
, prs_struct
*ps
, int depth
);
2712 BOOL
lsa_io_q_unk_get_connuser(const char *desc
, LSA_Q_UNK_GET_CONNUSER
*q_c
, prs_struct
*ps
, int depth
);
2713 BOOL
lsa_io_r_unk_get_connuser(const char *desc
, LSA_R_UNK_GET_CONNUSER
*r_c
, prs_struct
*ps
, int depth
);
2714 void init_lsa_q_open_account(LSA_Q_OPENACCOUNT
*trn
, POLICY_HND
*hnd
, DOM_SID
*sid
, uint32 desired_access
);
2715 BOOL
lsa_io_q_open_account(const char *desc
, LSA_Q_OPENACCOUNT
*r_c
, prs_struct
*ps
, int depth
);
2716 BOOL
lsa_io_r_open_account(const char *desc
, LSA_R_OPENACCOUNT
*r_c
, prs_struct
*ps
, int depth
);
2717 void init_lsa_q_enum_privsaccount(LSA_Q_ENUMPRIVSACCOUNT
*trn
, POLICY_HND
*hnd
);
2718 BOOL
lsa_io_q_enum_privsaccount(const char *desc
, LSA_Q_ENUMPRIVSACCOUNT
*r_c
, prs_struct
*ps
, int depth
);
2719 BOOL
lsa_io_luid(const char *desc
, LUID
*r_c
, prs_struct
*ps
, int depth
);
2720 BOOL
lsa_io_luid_attr(const char *desc
, LUID_ATTR
*r_c
, prs_struct
*ps
, int depth
);
2721 BOOL
lsa_io_privilege_set(const char *desc
, PRIVILEGE_SET
*r_c
, prs_struct
*ps
, int depth
);
2722 void init_lsa_r_enum_privsaccount(LSA_R_ENUMPRIVSACCOUNT
*r_u
, LUID_ATTR
*set
, uint32 count
, uint32 control
);
2723 BOOL
lsa_io_r_enum_privsaccount(const char *desc
, LSA_R_ENUMPRIVSACCOUNT
*r_c
, prs_struct
*ps
, int depth
);
2724 BOOL
lsa_io_q_getsystemaccount(const char *desc
, LSA_Q_GETSYSTEMACCOUNT
*r_c
, prs_struct
*ps
, int depth
);
2725 BOOL
lsa_io_r_getsystemaccount(const char *desc
, LSA_R_GETSYSTEMACCOUNT
*r_c
, prs_struct
*ps
, int depth
);
2726 BOOL
lsa_io_q_setsystemaccount(const char *desc
, LSA_Q_SETSYSTEMACCOUNT
*r_c
, prs_struct
*ps
, int depth
);
2727 BOOL
lsa_io_r_setsystemaccount(const char *desc
, LSA_R_SETSYSTEMACCOUNT
*r_c
, prs_struct
*ps
, int depth
);
2728 void init_lsa_q_lookupprivvalue(LSA_Q_LOOKUPPRIVVALUE
*trn
, POLICY_HND
*hnd
, const char *name
);
2729 BOOL
lsa_io_q_lookupprivvalue(const char *desc
, LSA_Q_LOOKUPPRIVVALUE
*r_c
, prs_struct
*ps
, int depth
);
2730 BOOL
lsa_io_r_lookupprivvalue(const char *desc
, LSA_R_LOOKUPPRIVVALUE
*r_c
, prs_struct
*ps
, int depth
);
2731 BOOL
lsa_io_q_addprivs(const char *desc
, LSA_Q_ADDPRIVS
*r_c
, prs_struct
*ps
, int depth
);
2732 BOOL
lsa_io_r_addprivs(const char *desc
, LSA_R_ADDPRIVS
*r_c
, prs_struct
*ps
, int depth
);
2733 BOOL
lsa_io_q_removeprivs(const char *desc
, LSA_Q_REMOVEPRIVS
*r_c
, prs_struct
*ps
, int depth
);
2734 BOOL
lsa_io_r_removeprivs(const char *desc
, LSA_R_REMOVEPRIVS
*r_c
, prs_struct
*ps
, int depth
);
2735 BOOL
policy_handle_is_valid(const POLICY_HND
*hnd
);
2737 /* The following definitions come from rpc_parse/parse_misc.c */
2739 TALLOC_CTX
*get_current_rpc_talloc(void);
2740 void set_current_rpc_talloc( TALLOC_CTX
*ctx
);
2741 void main_loop_talloc_free(void);
2742 TALLOC_CTX
*main_loop_talloc_get(void);
2743 TALLOC_CTX
*get_talloc_ctx(void);
2744 BOOL
smb_io_time(const char *desc
, NTTIME
*nttime
, prs_struct
*ps
, int depth
);
2745 BOOL
smb_io_lookup_level(const char *desc
, LOOKUP_LEVEL
*level
, prs_struct
*ps
, int depth
);
2746 uint32
get_enum_hnd(ENUM_HND
*enh
);
2747 void init_enum_hnd(ENUM_HND
*enh
, uint32 hnd
);
2748 BOOL
smb_io_enum_hnd(const char *desc
, ENUM_HND
*hnd
, prs_struct
*ps
, int depth
);
2749 BOOL
smb_io_dom_sid(const char *desc
, DOM_SID
*sid
, prs_struct
*ps
, int depth
);
2750 void init_dom_sid(DOM_SID
*sid
, const char *str_sid
);
2751 void init_dom_sid2(DOM_SID2
*sid2
, const DOM_SID
*sid
);
2752 BOOL
smb_io_dom_sid2(const char *desc
, DOM_SID2
*sid
, prs_struct
*ps
, int depth
);
2753 void init_str_hdr(STRHDR
*hdr
, int max_len
, int len
, uint32 buffer
);
2754 BOOL
smb_io_strhdr(const char *desc
, STRHDR
*hdr
, prs_struct
*ps
, int depth
);
2755 void init_uni_hdr(UNIHDR
*hdr
, int len
);
2756 BOOL
smb_io_unihdr(const char *desc
, UNIHDR
*hdr
, prs_struct
*ps
, int depth
);
2757 void init_buf_hdr(BUFHDR
*hdr
, int max_len
, int len
);
2758 BOOL
smb_io_hdrbuf_pre(const char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
, uint32
*offset
);
2759 BOOL
smb_io_hdrbuf_post(const char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
,
2760 uint32 ptr_hdrbuf
, uint32 max_len
, uint32 len
);
2761 BOOL
smb_io_hdrbuf(const char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
);
2762 void init_uni_hdr2(UNIHDR2
*hdr
, int len
);
2763 BOOL
smb_io_unihdr2(const char *desc
, UNIHDR2
*hdr2
, prs_struct
*ps
, int depth
);
2764 void init_unistr(UNISTR
*str
, const char *buf
);
2765 BOOL
smb_io_unistr(const char *desc
, UNISTR
*uni
, prs_struct
*ps
, int depth
);
2766 void init_buffer3_uint32(BUFFER3
*str
, uint32 val
);
2767 void init_buffer3_str(BUFFER3
*str
, char *buf
, int len
);
2768 void init_buffer3_hex(BUFFER3
*str
, char *buf
);
2769 void init_buffer3_bytes(BUFFER3
*str
, uint8
*buf
, int len
);
2770 BOOL
smb_io_buffer3(const char *desc
, BUFFER3
*buf3
, prs_struct
*ps
, int depth
);
2771 BOOL
smb_io_buffer5(const char *desc
, BUFFER5
*buf5
, prs_struct
*ps
, int depth
);
2772 void init_buffer2(BUFFER2
*str
, uint8
*buf
, int len
);
2773 BOOL
smb_io_buffer2(const char *desc
, BUFFER2
*buf2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2774 void init_buf_unistr2(UNISTR2
*str
, uint32
*ptr
, const char *buf
);
2775 void copy_unistr2(UNISTR2
*str
, const UNISTR2
*from
);
2776 void init_string2(STRING2
*str
, const char *buf
, int max_len
, int str_len
);
2777 BOOL
smb_io_string2(const char *desc
, STRING2
*str2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2778 void init_unistr2(UNISTR2
*str
, const char *buf
, size_t len
);
2779 void init_unistr2_from_unistr (UNISTR2
*to
, UNISTR
*from
);
2780 BOOL
smb_io_unistr2(const char *desc
, UNISTR2
*uni2
, uint32 buffer
, prs_struct
*ps
, int depth
);
2781 void init_dom_rid2(DOM_RID2
*rid2
, uint32 rid
, uint8 type
, uint32 idx
);
2782 BOOL
smb_io_dom_rid2(const char *desc
, DOM_RID2
*rid2
, prs_struct
*ps
, int depth
);
2783 void init_dom_rid3(DOM_RID3
*rid3
, uint32 rid
, uint8 type
);
2784 BOOL
smb_io_dom_rid3(const char *desc
, DOM_RID3
*rid3
, prs_struct
*ps
, int depth
);
2785 void init_dom_rid4(DOM_RID4
*rid4
, uint16 unknown
, uint16 attr
, uint32 rid
);
2786 void init_log_info(DOM_LOG_INFO
*log
, const char *logon_srv
, const char *acct_name
,
2787 uint16 sec_chan
, const char *comp_name
);
2788 BOOL
smb_io_log_info(const char *desc
, DOM_LOG_INFO
*log
, prs_struct
*ps
, int depth
);
2789 BOOL
smb_io_chal(const char *desc
, DOM_CHAL
*chal
, prs_struct
*ps
, int depth
);
2790 BOOL
smb_io_cred(const char *desc
, DOM_CRED
*cred
, prs_struct
*ps
, int depth
);
2791 void init_clnt_info2(DOM_CLNT_INFO2
*clnt
,
2792 const char *logon_srv
, const char *comp_name
,
2793 DOM_CRED
*clnt_cred
);
2794 BOOL
smb_io_clnt_info2(const char *desc
, DOM_CLNT_INFO2
*clnt
, prs_struct
*ps
, int depth
);
2795 void init_clnt_info(DOM_CLNT_INFO
*clnt
,
2796 const char *logon_srv
, const char *acct_name
,
2797 uint16 sec_chan
, const char *comp_name
,
2799 BOOL
smb_io_clnt_info(const char *desc
, DOM_CLNT_INFO
*clnt
, prs_struct
*ps
, int depth
);
2800 void init_logon_id(DOM_LOGON_ID
*log
, uint32 log_id_low
, uint32 log_id_high
);
2801 BOOL
smb_io_logon_id(const char *desc
, DOM_LOGON_ID
*log
, prs_struct
*ps
, int depth
);
2802 void init_owf_info(OWF_INFO
*hash
, uint8 data
[16]);
2803 BOOL
smb_io_owf_info(const char *desc
, OWF_INFO
*hash
, prs_struct
*ps
, int depth
);
2804 BOOL
smb_io_gid(const char *desc
, DOM_GID
*gid
, prs_struct
*ps
, int depth
);
2805 BOOL
smb_io_pol_hnd(const char *desc
, POLICY_HND
*pol
, prs_struct
*ps
, int depth
);
2806 void init_unistr3(UNISTR3
*str
, const char *buf
);
2807 BOOL
smb_io_unistr3(const char *desc
, UNISTR3
*name
, prs_struct
*ps
, int depth
);
2808 BOOL
prs_uint64(const char *name
, prs_struct
*ps
, int depth
, UINT64_S
*data64
);
2809 BOOL
smb_io_bufhdr2(const char *desc
, BUFHDR2
*hdr
, prs_struct
*ps
, int depth
);
2810 BOOL
smb_io_buffer4(const char *desc
, BUFFER4
*buf4
, uint32 buffer
, prs_struct
*ps
, int depth
);
2811 BOOL
make_uni_hdr(UNIHDR
*hdr
, int len
);
2812 BOOL
make_bufhdr2(BUFHDR2
*hdr
, uint32 info_level
, uint32 length
, uint32 buffer
);
2814 /* The following definitions come from rpc_parse/parse_net.c */
2816 BOOL
net_io_q_logon_ctrl2(const char *desc
, NET_Q_LOGON_CTRL2
*q_l
, prs_struct
*ps
, int depth
);
2817 void init_net_q_logon_ctrl2(NET_Q_LOGON_CTRL2
*q_l
, const char *srv_name
,
2818 uint32 query_level
);
2819 void init_net_r_logon_ctrl2(NET_R_LOGON_CTRL2
*r_l
, uint32 query_level
,
2820 uint32 flags
, uint32 pdc_status
,
2821 uint32 logon_attempts
, uint32 tc_status
,
2822 const char *trusted_domain_name
);
2823 BOOL
net_io_r_logon_ctrl2(const char *desc
, NET_R_LOGON_CTRL2
*r_l
, prs_struct
*ps
, int depth
);
2824 BOOL
net_io_q_logon_ctrl(const char *desc
, NET_Q_LOGON_CTRL
*q_l
, prs_struct
*ps
,
2826 void init_net_q_logon_ctrl(NET_Q_LOGON_CTRL
*q_l
, const char *srv_name
,
2827 uint32 query_level
);
2828 void init_net_r_logon_ctrl(NET_R_LOGON_CTRL
*r_l
, uint32 query_level
,
2829 uint32 flags
, uint32 pdc_status
);
2830 BOOL
net_io_r_logon_ctrl(const char *desc
, NET_R_LOGON_CTRL
*r_l
, prs_struct
*ps
,
2832 void init_r_trust_dom(NET_R_TRUST_DOM_LIST
*r_t
,
2833 uint32 num_doms
, const char *dom_name
);
2834 BOOL
net_io_r_trust_dom(const char *desc
, NET_R_TRUST_DOM_LIST
*r_t
, prs_struct
*ps
, int depth
);
2835 BOOL
net_io_q_trust_dom(const char *desc
, NET_Q_TRUST_DOM_LIST
*q_l
, prs_struct
*ps
, int depth
);
2836 void init_q_req_chal(NET_Q_REQ_CHAL
*q_c
,
2837 const char *logon_srv
, const char *logon_clnt
,
2838 DOM_CHAL
*clnt_chal
);
2839 BOOL
net_io_q_req_chal(const char *desc
, NET_Q_REQ_CHAL
*q_c
, prs_struct
*ps
, int depth
);
2840 BOOL
net_io_r_req_chal(const char *desc
, NET_R_REQ_CHAL
*r_c
, prs_struct
*ps
, int depth
);
2841 BOOL
net_io_q_auth(const char *desc
, NET_Q_AUTH
*q_a
, prs_struct
*ps
, int depth
);
2842 BOOL
net_io_r_auth(const char *desc
, NET_R_AUTH
*r_a
, prs_struct
*ps
, int depth
);
2843 void init_q_auth_2(NET_Q_AUTH_2
*q_a
,
2844 const char *logon_srv
, const char *acct_name
, uint16 sec_chan
, const char *comp_name
,
2845 DOM_CHAL
*clnt_chal
, uint32 clnt_flgs
);
2846 BOOL
net_io_q_auth_2(const char *desc
, NET_Q_AUTH_2
*q_a
, prs_struct
*ps
, int depth
);
2847 BOOL
net_io_r_auth_2(const char *desc
, NET_R_AUTH_2
*r_a
, prs_struct
*ps
, int depth
);
2848 void init_q_srv_pwset(NET_Q_SRV_PWSET
*q_s
, const char *logon_srv
, const char *acct_name
,
2849 uint16 sec_chan
, const char *comp_name
, DOM_CRED
*cred
, char nt_cypher
[16]);
2850 BOOL
net_io_q_srv_pwset(const char *desc
, NET_Q_SRV_PWSET
*q_s
, prs_struct
*ps
, int depth
);
2851 BOOL
net_io_r_srv_pwset(const char *desc
, NET_R_SRV_PWSET
*r_s
, prs_struct
*ps
, int depth
);
2852 void init_id_info1(NET_ID_INFO_1
*id
, const char *domain_name
,
2853 uint32 param_ctrl
, uint32 log_id_low
, uint32 log_id_high
,
2854 const char *user_name
, const char *wksta_name
,
2855 const char *sess_key
,
2856 unsigned char lm_cypher
[16], unsigned char nt_cypher
[16]);
2857 void init_id_info2(NET_ID_INFO_2
* id
, const char *domain_name
,
2859 uint32 log_id_low
, uint32 log_id_high
,
2860 const char *user_name
, const char *wksta_name
,
2861 const uchar lm_challenge
[8],
2862 const uchar
* lm_chal_resp
, int lm_chal_resp_len
,
2863 const uchar
* nt_chal_resp
, int nt_chal_resp_len
);
2864 void init_sam_info(DOM_SAM_INFO
*sam
,
2865 const char *logon_srv
, const char *comp_name
, DOM_CRED
*clnt_cred
,
2866 DOM_CRED
*rtn_cred
, uint16 logon_level
,
2867 NET_ID_INFO_CTR
*ctr
);
2868 void init_net_user_info3(TALLOC_CTX
*ctx
, NET_USER_INFO_3
*usr
, SAM_ACCOUNT
*sampw
,
2869 uint16 logon_count
, uint16 bad_pw_count
,
2870 uint32 num_groups
, DOM_GID
*gids
,
2871 uint32 user_flgs
, uchar
*sess_key
,
2872 const char *logon_srv
, const char *logon_dom
,
2873 DOM_SID
*dom_sid
, const char *other_sids
);
2874 BOOL
net_io_q_sam_logon(const char *desc
, NET_Q_SAM_LOGON
*q_l
, prs_struct
*ps
, int depth
);
2875 BOOL
net_io_r_sam_logon(const char *desc
, NET_R_SAM_LOGON
*r_l
, prs_struct
*ps
, int depth
);
2876 BOOL
net_io_q_sam_logoff(const char *desc
, NET_Q_SAM_LOGOFF
*q_l
, prs_struct
*ps
, int depth
);
2877 BOOL
net_io_r_sam_logoff(const char *desc
, NET_R_SAM_LOGOFF
*r_l
, prs_struct
*ps
, int depth
);
2878 BOOL
init_net_q_sam_sync(NET_Q_SAM_SYNC
* q_s
, const char *srv_name
,
2879 const char *cli_name
, DOM_CRED
* cli_creds
,
2880 DOM_CRED
*ret_creds
, uint32 database_id
);
2881 BOOL
net_io_q_sam_sync(const char *desc
, NET_Q_SAM_SYNC
* q_s
, prs_struct
*ps
,
2883 BOOL
make_sam_account_info(SAM_ACCOUNT_INFO
* info
,
2884 const UNISTR2
*user_name
,
2885 const UNISTR2
*full_name
,
2886 uint32 user_rid
, uint32 group_rid
,
2887 const UNISTR2
*home_dir
,
2888 const UNISTR2
*dir_drive
,
2889 const UNISTR2
*log_scr
,
2890 const UNISTR2
*desc
,
2892 const UNISTR2
*prof_path
,
2893 const UNISTR2
*wkstas
,
2894 const UNISTR2
*unk_str
, const UNISTR2
*mung_dial
);
2895 BOOL
net_io_r_sam_sync(const char *desc
, uint8 sess_key
[16],
2896 NET_R_SAM_SYNC
* r_s
, prs_struct
*ps
, int depth
);
2897 BOOL
init_net_q_sam_deltas(NET_Q_SAM_DELTAS
*q_s
, const char *srv_name
,
2898 const char *cli_name
, DOM_CRED
*cli_creds
,
2899 uint32 database_id
, UINT64_S dom_mod_count
);
2900 BOOL
net_io_q_sam_deltas(const char *desc
, NET_Q_SAM_DELTAS
*q_s
, prs_struct
*ps
,
2902 BOOL
net_io_r_sam_deltas(const char *desc
, uint8 sess_key
[16],
2903 NET_R_SAM_DELTAS
*r_s
, prs_struct
*ps
, int depth
);
2905 /* The following definitions come from rpc_parse/parse_prs.c */
2907 void prs_dump(const char *name
, int v
, prs_struct
*ps
);
2908 void prs_debug(prs_struct
*ps
, int depth
, const char *desc
, const char *fn_name
);
2909 BOOL
prs_init(prs_struct
*ps
, uint32 size
, TALLOC_CTX
*ctx
, BOOL io
);
2910 BOOL
prs_read(prs_struct
*ps
, int fd
, size_t len
, int timeout
);
2911 void prs_mem_free(prs_struct
*ps
);
2912 void prs_mem_clear(prs_struct
*ps
);
2913 char *prs_alloc_mem(prs_struct
*ps
, size_t size
);
2914 TALLOC_CTX
*prs_get_mem_context(prs_struct
*ps
);
2915 void prs_give_memory(prs_struct
*ps
, char *buf
, uint32 size
, BOOL is_dynamic
);
2916 char *prs_take_memory(prs_struct
*ps
, uint32
*psize
);
2917 BOOL
prs_set_buffer_size(prs_struct
*ps
, uint32 newsize
);
2918 BOOL
prs_grow(prs_struct
*ps
, uint32 extra_space
);
2919 BOOL
prs_force_grow(prs_struct
*ps
, uint32 extra_space
);
2920 char *prs_data_p(prs_struct
*ps
);
2921 uint32
prs_data_size(prs_struct
*ps
);
2922 uint32
prs_offset(prs_struct
*ps
);
2923 BOOL
prs_set_offset(prs_struct
*ps
, uint32 offset
);
2924 BOOL
prs_append_prs_data(prs_struct
*dst
, prs_struct
*src
);
2925 BOOL
prs_append_some_prs_data(prs_struct
*dst
, prs_struct
*src
, int32 start
, uint32 len
);
2926 BOOL
prs_append_data(prs_struct
*dst
, char *src
, uint32 len
);
2927 void prs_set_endian_data(prs_struct
*ps
, BOOL endian
);
2928 BOOL
prs_align(prs_struct
*ps
);
2929 BOOL
prs_align_uint16(prs_struct
*ps
);
2930 BOOL
prs_align_uint64(prs_struct
*ps
);
2931 BOOL
prs_align_needed(prs_struct
*ps
, uint32 needed
);
2932 char *prs_mem_get(prs_struct
*ps
, uint32 extra_size
);
2933 void prs_switch_type(prs_struct
*ps
, BOOL io
);
2934 void prs_force_dynamic(prs_struct
*ps
);
2935 BOOL
prs_uint8(const char *name
, prs_struct
*ps
, int depth
, uint8
*data8
);
2936 BOOL
prs_uint16(const char *name
, prs_struct
*ps
, int depth
, uint16
*data16
);
2937 BOOL
prs_uint32(const char *name
, prs_struct
*ps
, int depth
, uint32
*data32
);
2938 BOOL
prs_ntstatus(const char *name
, prs_struct
*ps
, int depth
, NTSTATUS
*status
);
2939 BOOL
prs_werror(const char *name
, prs_struct
*ps
, int depth
, WERROR
*status
);
2940 BOOL
prs_uint8s(BOOL charmode
, const char *name
, prs_struct
*ps
, int depth
, uint8
*data8s
, int len
);
2941 BOOL
prs_uint16s(BOOL charmode
, const char *name
, prs_struct
*ps
, int depth
, uint16
*data16s
, int len
);
2942 BOOL
prs_uint16uni(BOOL charmode
, const char *name
, prs_struct
*ps
, int depth
, uint16
*data16s
, int len
);
2943 BOOL
prs_uint32s(BOOL charmode
, const char *name
, prs_struct
*ps
, int depth
, uint32
*data32s
, int len
);
2944 BOOL
prs_buffer5(BOOL charmode
, const char *name
, prs_struct
*ps
, int depth
, BUFFER5
*str
);
2945 BOOL
prs_buffer2(BOOL charmode
, const char *name
, prs_struct
*ps
, int depth
, BUFFER2
*str
);
2946 BOOL
prs_string2(BOOL charmode
, const char *name
, prs_struct
*ps
, int depth
, STRING2
*str
);
2947 BOOL
prs_unistr2(BOOL charmode
, const char *name
, prs_struct
*ps
, int depth
, UNISTR2
*str
);
2948 BOOL
prs_unistr3(BOOL charmode
, const char *name
, UNISTR3
*str
, prs_struct
*ps
, int depth
);
2949 BOOL
prs_unistr(const char *name
, prs_struct
*ps
, int depth
, UNISTR
*str
);
2950 BOOL
prs_string(const char *name
, prs_struct
*ps
, int depth
, char *str
, int len
, int max_buf_size
);
2951 BOOL
prs_uint16_pre(const char *name
, prs_struct
*ps
, int depth
, uint16
*data16
, uint32
*offset
);
2952 BOOL
prs_uint16_post(const char *name
, prs_struct
*ps
, int depth
, uint16
*data16
,
2953 uint32 ptr_uint16
, uint32 start_offset
);
2954 BOOL
prs_uint32_pre(const char *name
, prs_struct
*ps
, int depth
, uint32
*data32
, uint32
*offset
);
2955 BOOL
prs_uint32_post(const char *name
, prs_struct
*ps
, int depth
, uint32
*data32
,
2956 uint32 ptr_uint32
, uint32 data_size
);
2957 int tdb_prs_store(TDB_CONTEXT
*tdb
, char *keystr
, prs_struct
*ps
);
2958 int tdb_prs_fetch(TDB_CONTEXT
*tdb
, char *keystr
, prs_struct
*ps
, TALLOC_CTX
*mem_ctx
);
2959 BOOL
prs_hash1(prs_struct
*ps
, uint32 offset
, uint8 sess_key
[16]);
2961 /* The following definitions come from rpc_parse/parse_reg.c */
2963 void init_reg_q_open_hkcr(REG_Q_OPEN_HKCR
*q_o
,
2964 uint16 unknown_0
, uint32 level
);
2965 BOOL
reg_io_q_open_hkcr(const char *desc
, REG_Q_OPEN_HKCR
*r_q
, prs_struct
*ps
, int depth
);
2966 BOOL
reg_io_r_open_hkcr(const char *desc
, REG_R_OPEN_HKCR
*r_r
, prs_struct
*ps
, int depth
);
2967 void init_reg_q_open_hklm(REG_Q_OPEN_HKLM
* q_o
,
2968 uint16 unknown_0
, uint32 access_mask
);
2969 BOOL
reg_io_q_open_hklm(const char *desc
, REG_Q_OPEN_HKLM
* r_q
, prs_struct
*ps
,
2971 BOOL
reg_io_r_open_hklm(const char *desc
, REG_R_OPEN_HKLM
* r_r
, prs_struct
*ps
,
2973 void init_reg_q_flush_key(REG_Q_FLUSH_KEY
*q_u
, POLICY_HND
*pol
);
2974 BOOL
reg_io_q_flush_key(const char *desc
, REG_Q_FLUSH_KEY
*r_q
, prs_struct
*ps
, int depth
);
2975 BOOL
reg_io_r_flush_key(const char *desc
, REG_R_FLUSH_KEY
*r_r
, prs_struct
*ps
, int depth
);
2976 void init_reg_q_create_key(REG_Q_CREATE_KEY
*q_c
, POLICY_HND
*hnd
,
2977 const char *name
, const char *class, SEC_ACCESS
*sam_access
,
2978 SEC_DESC_BUF
*sec_buf
);
2979 BOOL
reg_io_q_create_key(const char *desc
, REG_Q_CREATE_KEY
*r_q
, prs_struct
*ps
, int depth
);
2980 BOOL
reg_io_r_create_key(const char *desc
, REG_R_CREATE_KEY
*r_r
, prs_struct
*ps
, int depth
);
2981 void init_reg_q_delete_val(REG_Q_DELETE_VALUE
*q_c
, POLICY_HND
*hnd
,
2983 BOOL
reg_io_q_delete_val(const char *desc
, REG_Q_DELETE_VALUE
*r_q
, prs_struct
*ps
, int depth
);
2984 BOOL
reg_io_r_delete_val(const char *desc
, REG_R_DELETE_VALUE
*r_r
, prs_struct
*ps
, int depth
);
2985 void init_reg_q_delete_key(REG_Q_DELETE_KEY
*q_c
, POLICY_HND
*hnd
,
2987 BOOL
reg_io_q_delete_key(const char *desc
, REG_Q_DELETE_KEY
*r_q
, prs_struct
*ps
, int depth
);
2988 BOOL
reg_io_r_delete_key(const char *desc
, REG_R_DELETE_KEY
*r_r
, prs_struct
*ps
, int depth
);
2989 void init_reg_q_query_key(REG_Q_QUERY_KEY
*q_o
, POLICY_HND
*hnd
,
2990 uint32 max_class_len
);
2991 BOOL
reg_io_q_query_key(const char *desc
, REG_Q_QUERY_KEY
*r_q
, prs_struct
*ps
, int depth
);
2992 BOOL
reg_io_r_query_key(const char *desc
, REG_R_QUERY_KEY
*r_r
, prs_struct
*ps
, int depth
);
2993 void init_reg_q_unk_1a(REG_Q_UNK_1A
*q_o
, POLICY_HND
*hnd
);
2994 BOOL
reg_io_q_unk_1a(const char *desc
, REG_Q_UNK_1A
*r_q
, prs_struct
*ps
, int depth
);
2995 BOOL
reg_io_r_unk_1a(const char *desc
, REG_R_UNK_1A
*r_r
, prs_struct
*ps
, int depth
);
2996 void init_reg_q_open_hku(REG_Q_OPEN_HKU
*q_o
,
2997 uint16 unknown_0
, uint32 level
);
2998 BOOL
reg_io_q_open_hku(const char *desc
, REG_Q_OPEN_HKU
*r_q
, prs_struct
*ps
, int depth
);
2999 BOOL
reg_io_r_open_hku(const char *desc
, REG_R_OPEN_HKU
*r_r
, prs_struct
*ps
, int depth
);
3000 void init_reg_q_close(REG_Q_CLOSE
*q_c
, POLICY_HND
*hnd
);
3001 BOOL
reg_io_q_close(const char *desc
, REG_Q_CLOSE
*q_u
, prs_struct
*ps
, int depth
);
3002 BOOL
reg_io_r_close(const char *desc
, REG_R_CLOSE
*r_u
, prs_struct
*ps
, int depth
);
3003 void init_reg_q_set_key_sec(REG_Q_SET_KEY_SEC
*q_i
, POLICY_HND
*pol
, SEC_DESC_BUF
*sec_desc_buf
);
3004 BOOL
reg_io_q_set_key_sec(const char *desc
, REG_Q_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
3005 BOOL
reg_io_r_set_key_sec(const char *desc
, REG_R_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
3006 void init_reg_q_get_key_sec(REG_Q_GET_KEY_SEC
*q_i
, POLICY_HND
*pol
,
3007 uint32 sec_buf_size
, SEC_DESC_BUF
*psdb
);
3008 BOOL
reg_io_q_get_key_sec(const char *desc
, REG_Q_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
3009 BOOL
reg_io_r_get_key_sec(const char *desc
, REG_R_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
3010 BOOL
init_reg_q_info(REG_Q_INFO
*q_i
, POLICY_HND
*pol
, char* val_name
);
3011 BOOL
reg_io_q_info(const char *desc
, REG_Q_INFO
*r_q
, prs_struct
*ps
, int depth
);
3012 BOOL
init_reg_r_info(uint32 include_keyval
, REG_R_INFO
*r_r
,
3013 BUFFER2
* buf
, uint32 type
, NTSTATUS status
);
3014 BOOL
reg_io_r_info(const char *desc
, REG_R_INFO
*r_r
, prs_struct
*ps
, int depth
);
3015 void init_reg_q_enum_val(REG_Q_ENUM_VALUE
*q_i
, POLICY_HND
*pol
,
3016 uint32 val_idx
, uint32 max_val_len
,
3017 uint32 max_buf_len
);
3018 BOOL
reg_io_q_enum_val(const char *desc
, REG_Q_ENUM_VALUE
*q_q
, prs_struct
*ps
, int depth
);
3019 BOOL
reg_io_r_enum_val(const char *desc
, REG_R_ENUM_VALUE
*r_q
, prs_struct
*ps
, int depth
);
3020 void init_reg_q_create_val(REG_Q_CREATE_VALUE
*q_i
, POLICY_HND
*pol
,
3021 const char *val_name
, uint32 type
,
3023 BOOL
reg_io_q_create_val(const char *desc
, REG_Q_CREATE_VALUE
*q_q
, prs_struct
*ps
, int depth
);
3024 BOOL
reg_io_r_create_val(const char *desc
, REG_R_CREATE_VALUE
*r_q
, prs_struct
*ps
, int depth
);
3025 void init_reg_q_enum_key(REG_Q_ENUM_KEY
*q_i
, POLICY_HND
*pol
, uint32 key_idx
);
3026 BOOL
reg_io_q_enum_key(const char *desc
, REG_Q_ENUM_KEY
*q_q
, prs_struct
*ps
, int depth
);
3027 BOOL
reg_io_r_enum_key(const char *desc
, REG_R_ENUM_KEY
*r_q
, prs_struct
*ps
, int depth
);
3028 void init_reg_q_open_entry(REG_Q_OPEN_ENTRY
*r_q
, POLICY_HND
*pol
,
3029 const char *key_name
, uint32 unk
);
3030 BOOL
reg_io_q_open_entry(const char *desc
, REG_Q_OPEN_ENTRY
*r_q
, prs_struct
*ps
, int depth
);
3031 void init_reg_r_open_entry(REG_R_OPEN_ENTRY
*r_r
,
3032 POLICY_HND
*pol
, NTSTATUS status
);
3033 BOOL
reg_io_r_open_entry(const char *desc
, REG_R_OPEN_ENTRY
*r_r
, prs_struct
*ps
, int depth
);
3034 void init_reg_q_shutdown(REG_Q_SHUTDOWN
* q_s
,
3035 const char *msg
, uint32 timeout
, uint16 flags
);
3036 BOOL
reg_io_q_shutdown(const char *desc
, REG_Q_SHUTDOWN
* q_s
, prs_struct
*ps
,
3038 BOOL
reg_io_r_shutdown(const char *desc
, REG_R_SHUTDOWN
* r_s
, prs_struct
*ps
,
3040 void init_reg_q_abort_shutdown(REG_Q_ABORT_SHUTDOWN
* q_s
);
3041 BOOL
reg_io_q_abort_shutdown(const char *desc
, REG_Q_ABORT_SHUTDOWN
* q_s
,
3042 prs_struct
*ps
, int depth
);
3043 BOOL
reg_io_r_abort_shutdown(const char *desc
, REG_R_ABORT_SHUTDOWN
* r_s
,
3044 prs_struct
*ps
, int depth
);
3046 /* The following definitions come from rpc_parse/parse_rpc.c */
3048 void init_rpc_hdr(RPC_HDR
*hdr
, enum RPC_PKT_TYPE pkt_type
, uint8 flags
,
3049 uint32 call_id
, int data_len
, int auth_len
);
3050 BOOL
smb_io_rpc_hdr(const char *desc
, RPC_HDR
*rpc
, prs_struct
*ps
, int depth
);
3051 void init_rpc_hdr_rb(RPC_HDR_RB
*rpc
,
3052 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
3053 uint32 num_elements
, uint16 context_id
, uint8 num_syntaxes
,
3054 RPC_IFACE
*abstract
, RPC_IFACE
*transfer
);
3055 BOOL
smb_io_rpc_hdr_rb(const char *desc
, RPC_HDR_RB
*rpc
, prs_struct
*ps
, int depth
);
3056 void init_rpc_hdr_ba(RPC_HDR_BA
*rpc
,
3057 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
3058 const char *pipe_addr
,
3059 uint8 num_results
, uint16 result
, uint16 reason
,
3060 RPC_IFACE
*transfer
);
3061 BOOL
smb_io_rpc_hdr_ba(const char *desc
, RPC_HDR_BA
*rpc
, prs_struct
*ps
, int depth
);
3062 void init_rpc_hdr_req(RPC_HDR_REQ
*hdr
, uint32 alloc_hint
, uint16 opnum
);
3063 BOOL
smb_io_rpc_hdr_req(const char *desc
, RPC_HDR_REQ
*rpc
, prs_struct
*ps
, int depth
);
3064 BOOL
smb_io_rpc_hdr_resp(const char *desc
, RPC_HDR_RESP
*rpc
, prs_struct
*ps
, int depth
);
3065 BOOL
smb_io_rpc_hdr_fault(const char *desc
, RPC_HDR_FAULT
*rpc
, prs_struct
*ps
, int depth
);
3066 void init_rpc_hdr_autha(RPC_HDR_AUTHA
*rai
,
3067 uint16 max_tsize
, uint16 max_rsize
,
3068 uint8 auth_type
, uint8 auth_level
,
3069 uint8 stub_type_len
);
3070 BOOL
smb_io_rpc_hdr_autha(const char *desc
, RPC_HDR_AUTHA
*rai
, prs_struct
*ps
, int depth
);
3071 BOOL
rpc_hdr_auth_chk(RPC_HDR_AUTH
*rai
);
3072 void init_rpc_hdr_auth(RPC_HDR_AUTH
*rai
,
3073 uint8 auth_type
, uint8 auth_level
,
3074 uint8 stub_type_len
,
3076 BOOL
smb_io_rpc_hdr_auth(const char *desc
, RPC_HDR_AUTH
*rai
, prs_struct
*ps
, int depth
);
3077 BOOL
rpc_auth_verifier_chk(RPC_AUTH_VERIFIER
*rav
,
3078 const char *signature
, uint32 msg_type
);
3079 void init_rpc_auth_verifier(RPC_AUTH_VERIFIER
*rav
,
3080 const char *signature
, uint32 msg_type
);
3081 BOOL
smb_io_rpc_auth_verifier(const char *desc
, RPC_AUTH_VERIFIER
*rav
, prs_struct
*ps
, int depth
);
3082 void init_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG
*neg
,
3084 fstring myname
, fstring domain
);
3085 BOOL
smb_io_rpc_auth_ntlmssp_neg(const char *desc
, RPC_AUTH_NTLMSSP_NEG
*neg
, prs_struct
*ps
, int depth
);
3086 void init_rpc_auth_ntlmssp_chal(RPC_AUTH_NTLMSSP_CHAL
*chl
,
3088 uint8 challenge
[8]);
3089 BOOL
smb_io_rpc_auth_ntlmssp_chal(const char *desc
, RPC_AUTH_NTLMSSP_CHAL
*chl
, prs_struct
*ps
, int depth
);
3090 void init_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP
*rsp
,
3091 uchar lm_resp
[24], uchar nt_resp
[24],
3092 const char *domain
, const char *user
, const char *wks
,
3094 BOOL
smb_io_rpc_auth_ntlmssp_resp(const char *desc
, RPC_AUTH_NTLMSSP_RESP
*rsp
, prs_struct
*ps
, int depth
);
3095 BOOL
rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
, uint32 crc32
, uint32 seq_num
);
3096 void init_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
,
3097 uint32 ver
, uint32 crc32
, uint32 seq_num
);
3098 BOOL
smb_io_rpc_auth_ntlmssp_chk(const char *desc
, RPC_AUTH_NTLMSSP_CHK
*chk
, prs_struct
*ps
, int depth
);
3100 /* The following definitions come from rpc_parse/parse_samr.c */
3102 void init_samr_q_close_hnd(SAMR_Q_CLOSE_HND
* q_c
, POLICY_HND
*hnd
);
3103 BOOL
samr_io_q_close_hnd(const char *desc
, SAMR_Q_CLOSE_HND
* q_u
,
3104 prs_struct
*ps
, int depth
);
3105 BOOL
samr_io_r_close_hnd(const char *desc
, SAMR_R_CLOSE_HND
* r_u
,
3106 prs_struct
*ps
, int depth
);
3107 void init_samr_q_lookup_domain(SAMR_Q_LOOKUP_DOMAIN
* q_u
,
3108 POLICY_HND
*pol
, const char *dom_name
);
3109 BOOL
samr_io_q_lookup_domain(const char *desc
, SAMR_Q_LOOKUP_DOMAIN
* q_u
,
3110 prs_struct
*ps
, int depth
);
3111 void init_samr_r_lookup_domain(SAMR_R_LOOKUP_DOMAIN
* r_u
,
3112 DOM_SID
*dom_sid
, NTSTATUS status
);
3113 BOOL
samr_io_r_lookup_domain(const char *desc
, SAMR_R_LOOKUP_DOMAIN
* r_u
,
3114 prs_struct
*ps
, int depth
);
3115 void init_samr_q_unknown_2d(SAMR_Q_UNKNOWN_2D
* q_u
, POLICY_HND
*dom_pol
, DOM_SID
*sid
);
3116 BOOL
samr_io_q_unknown_2d(const char *desc
, SAMR_Q_UNKNOWN_2D
* q_u
,
3117 prs_struct
*ps
, int depth
);
3118 BOOL
samr_io_r_unknown_2d(const char *desc
, SAMR_R_UNKNOWN_2D
* r_u
,
3119 prs_struct
*ps
, int depth
);
3120 void init_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN
* q_u
,
3121 POLICY_HND
*pol
, uint32 flags
,
3122 const DOM_SID
*sid
);
3123 BOOL
samr_io_q_open_domain(const char *desc
, SAMR_Q_OPEN_DOMAIN
* q_u
,
3124 prs_struct
*ps
, int depth
);
3125 BOOL
samr_io_r_open_domain(const char *desc
, SAMR_R_OPEN_DOMAIN
* r_u
,
3126 prs_struct
*ps
, int depth
);
3127 void init_samr_q_get_usrdom_pwinfo(SAMR_Q_GET_USRDOM_PWINFO
* q_u
,
3128 POLICY_HND
*user_pol
);
3129 BOOL
samr_io_q_get_usrdom_pwinfo(const char *desc
, SAMR_Q_GET_USRDOM_PWINFO
* q_u
,
3130 prs_struct
*ps
, int depth
);
3131 void init_samr_r_get_usrdom_pwinfo(SAMR_R_GET_USRDOM_PWINFO
*r_u
, NTSTATUS status
);
3132 BOOL
samr_io_r_get_usrdom_pwinfo(const char *desc
, SAMR_R_GET_USRDOM_PWINFO
* r_u
,
3133 prs_struct
*ps
, int depth
);
3134 void init_samr_q_query_sec_obj(SAMR_Q_QUERY_SEC_OBJ
* q_u
,
3135 POLICY_HND
*user_pol
, uint32 sec_info
);
3136 BOOL
samr_io_q_query_sec_obj(const char *desc
, SAMR_Q_QUERY_SEC_OBJ
* q_u
,
3137 prs_struct
*ps
, int depth
);
3138 void init_samr_q_query_dom_info(SAMR_Q_QUERY_DOMAIN_INFO
* q_u
,
3139 POLICY_HND
*domain_pol
, uint16 switch_value
);
3140 BOOL
samr_io_q_query_dom_info(const char *desc
, SAMR_Q_QUERY_DOMAIN_INFO
* q_u
,
3141 prs_struct
*ps
, int depth
);
3142 void init_unk_info3(SAM_UNK_INFO_3
*u_3
, NTTIME nt_logout
);
3143 void init_unk_info6(SAM_UNK_INFO_6
* u_6
);
3144 void init_unk_info7(SAM_UNK_INFO_7
* u_7
);
3145 void init_unk_info12(SAM_UNK_INFO_12
* u_12
, NTTIME nt_lock_duration
, NTTIME nt_reset_time
, uint16 lockout
);
3146 void init_unk_info5(SAM_UNK_INFO_5
* u_5
,const char *server
);
3147 void init_unk_info2(SAM_UNK_INFO_2
* u_2
,
3148 const char *domain
, const char *server
,
3149 uint32 seq_num
, uint32 num_users
, uint32 num_groups
, uint32 num_alias
);
3150 void init_unk_info1(SAM_UNK_INFO_1
*u_1
, uint16 min_pass_len
, uint16 pass_hist
,
3151 uint32 flag
, NTTIME nt_expire
, NTTIME nt_min_age
);
3152 void init_samr_r_query_dom_info(SAMR_R_QUERY_DOMAIN_INFO
* r_u
,
3153 uint16 switch_value
, SAM_UNK_CTR
* ctr
,
3155 BOOL
samr_io_r_query_dom_info(const char *desc
, SAMR_R_QUERY_DOMAIN_INFO
* r_u
,
3156 prs_struct
*ps
, int depth
);
3157 BOOL
samr_io_r_query_sec_obj(const char *desc
, SAMR_R_QUERY_SEC_OBJ
* r_u
,
3158 prs_struct
*ps
, int depth
);
3159 void init_sam_entry(SAM_ENTRY
* sam
, uint32 len_sam_name
, uint32 rid
);
3160 void init_samr_q_enum_dom_users(SAMR_Q_ENUM_DOM_USERS
* q_e
, POLICY_HND
*pol
,
3162 uint16 acb_mask
, uint16 unk_1
, uint32 size
);
3163 BOOL
samr_io_q_enum_dom_users(const char *desc
, SAMR_Q_ENUM_DOM_USERS
* q_e
,
3164 prs_struct
*ps
, int depth
);
3165 void init_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS
* r_u
,
3166 uint32 next_idx
, uint32 num_sam_entries
);
3167 BOOL
samr_io_r_enum_dom_users(const char *desc
, SAMR_R_ENUM_DOM_USERS
* r_u
,
3168 prs_struct
*ps
, int depth
);
3169 void init_samr_q_query_dispinfo(SAMR_Q_QUERY_DISPINFO
* q_e
, POLICY_HND
*pol
,
3170 uint16 switch_level
, uint32 start_idx
,
3171 uint32 max_entries
, uint32 max_size
);
3172 BOOL
samr_io_q_query_dispinfo(const char *desc
, SAMR_Q_QUERY_DISPINFO
* q_e
,
3173 prs_struct
*ps
, int depth
);
3174 NTSTATUS
init_sam_dispinfo_1(TALLOC_CTX
*ctx
, SAM_DISPINFO_1
*sam
, uint32 num_entries
,
3175 uint32 start_idx
, DISP_USER_INFO
*disp_user_info
);
3176 NTSTATUS
init_sam_dispinfo_2(TALLOC_CTX
*ctx
, SAM_DISPINFO_2
*sam
, uint32 num_entries
,
3177 uint32 start_idx
, DISP_USER_INFO
*disp_user_info
);
3178 NTSTATUS
init_sam_dispinfo_3(TALLOC_CTX
*ctx
, SAM_DISPINFO_3
*sam
, uint32 num_entries
,
3179 uint32 start_idx
, DISP_GROUP_INFO
*disp_group_info
);
3180 NTSTATUS
init_sam_dispinfo_4(TALLOC_CTX
*ctx
, SAM_DISPINFO_4
*sam
, uint32 num_entries
,
3181 uint32 start_idx
, DISP_USER_INFO
*disp_user_info
);
3182 NTSTATUS
init_sam_dispinfo_5(TALLOC_CTX
*ctx
, SAM_DISPINFO_5
*sam
, uint32 num_entries
,
3183 uint32 start_idx
, DISP_GROUP_INFO
*disp_group_info
);
3184 void init_samr_r_query_dispinfo(SAMR_R_QUERY_DISPINFO
* r_u
,
3185 uint32 num_entries
, uint32 total_size
, uint32 data_size
,
3186 uint16 switch_level
, SAM_DISPINFO_CTR
* ctr
,
3188 BOOL
samr_io_r_query_dispinfo(const char *desc
, SAMR_R_QUERY_DISPINFO
* r_u
,
3189 prs_struct
*ps
, int depth
);
3190 void init_samr_q_open_group(SAMR_Q_OPEN_GROUP
* q_c
,
3192 uint32 access_mask
, uint32 rid
);
3193 BOOL
samr_io_q_open_group(const char *desc
, SAMR_Q_OPEN_GROUP
* q_u
,
3194 prs_struct
*ps
, int depth
);
3195 BOOL
samr_io_r_open_group(const char *desc
, SAMR_R_OPEN_GROUP
* r_u
,
3196 prs_struct
*ps
, int depth
);
3197 void init_samr_group_info1(GROUP_INFO1
* gr1
,
3198 const char *acct_name
, const char *acct_desc
,
3199 uint32 num_members
);
3200 BOOL
samr_io_group_info1(const char *desc
, GROUP_INFO1
* gr1
,
3201 prs_struct
*ps
, int depth
);
3202 void init_samr_group_info3(GROUP_INFO3
*gr3
);
3203 BOOL
samr_io_group_info3(const char *desc
, GROUP_INFO3
*gr3
, prs_struct
*ps
, int depth
);
3204 void init_samr_group_info4(GROUP_INFO4
* gr4
, const char *acct_desc
);
3205 BOOL
samr_io_group_info4(const char *desc
, GROUP_INFO4
* gr4
,
3206 prs_struct
*ps
, int depth
);
3207 void init_samr_q_create_dom_group(SAMR_Q_CREATE_DOM_GROUP
* q_e
,
3208 POLICY_HND
*pol
, const char *acct_desc
,
3209 uint32 access_mask
);
3210 BOOL
samr_io_q_create_dom_group(const char *desc
, SAMR_Q_CREATE_DOM_GROUP
* q_e
,
3211 prs_struct
*ps
, int depth
);
3212 BOOL
samr_io_r_create_dom_group(const char *desc
, SAMR_R_CREATE_DOM_GROUP
* r_u
,
3213 prs_struct
*ps
, int depth
);
3214 void init_samr_q_delete_dom_group(SAMR_Q_DELETE_DOM_GROUP
* q_c
,
3216 BOOL
samr_io_q_delete_dom_group(const char *desc
, SAMR_Q_DELETE_DOM_GROUP
* q_u
,
3217 prs_struct
*ps
, int depth
);
3218 BOOL
samr_io_r_delete_dom_group(const char *desc
, SAMR_R_DELETE_DOM_GROUP
* r_u
,
3219 prs_struct
*ps
, int depth
);
3220 void init_samr_q_del_groupmem(SAMR_Q_DEL_GROUPMEM
* q_e
,
3221 POLICY_HND
*pol
, uint32 rid
);
3222 BOOL
samr_io_q_del_groupmem(const char *desc
, SAMR_Q_DEL_GROUPMEM
* q_e
,
3223 prs_struct
*ps
, int depth
);
3224 void init_samr_r_del_groupmem(SAMR_R_DEL_GROUPMEM
* r_u
, POLICY_HND
*pol
,
3226 BOOL
samr_io_r_del_groupmem(const char *desc
, SAMR_R_DEL_GROUPMEM
* r_u
,
3227 prs_struct
*ps
, int depth
);
3228 void init_samr_q_add_groupmem(SAMR_Q_ADD_GROUPMEM
* q_e
,
3229 POLICY_HND
*pol
, uint32 rid
);
3230 BOOL
samr_io_q_add_groupmem(const char *desc
, SAMR_Q_ADD_GROUPMEM
* q_e
,
3231 prs_struct
*ps
, int depth
);
3232 void init_samr_r_add_groupmem(SAMR_R_ADD_GROUPMEM
* r_u
, POLICY_HND
*pol
,
3234 BOOL
samr_io_r_add_groupmem(const char *desc
, SAMR_R_ADD_GROUPMEM
* r_u
,
3235 prs_struct
*ps
, int depth
);
3236 void init_samr_q_set_groupinfo(SAMR_Q_SET_GROUPINFO
* q_e
,
3237 POLICY_HND
*pol
, GROUP_INFO_CTR
* ctr
);
3238 BOOL
samr_io_q_set_groupinfo(const char *desc
, SAMR_Q_SET_GROUPINFO
* q_e
,
3239 prs_struct
*ps
, int depth
);
3240 void init_samr_r_set_groupinfo(SAMR_R_SET_GROUPINFO
* r_u
, NTSTATUS status
);
3241 BOOL
samr_io_r_set_groupinfo(const char *desc
, SAMR_R_SET_GROUPINFO
* r_u
,
3242 prs_struct
*ps
, int depth
);
3243 void init_samr_q_query_groupinfo(SAMR_Q_QUERY_GROUPINFO
* q_e
,
3244 POLICY_HND
*pol
, uint16 switch_level
);
3245 BOOL
samr_io_q_query_groupinfo(const char *desc
, SAMR_Q_QUERY_GROUPINFO
* q_e
,
3246 prs_struct
*ps
, int depth
);
3247 void init_samr_r_query_groupinfo(SAMR_R_QUERY_GROUPINFO
* r_u
,
3248 GROUP_INFO_CTR
* ctr
, NTSTATUS status
);
3249 BOOL
samr_io_r_query_groupinfo(const char *desc
, SAMR_R_QUERY_GROUPINFO
* r_u
,
3250 prs_struct
*ps
, int depth
);
3251 void init_samr_q_query_groupmem(SAMR_Q_QUERY_GROUPMEM
* q_c
, POLICY_HND
*hnd
);
3252 BOOL
samr_io_q_query_groupmem(const char *desc
, SAMR_Q_QUERY_GROUPMEM
* q_u
,
3253 prs_struct
*ps
, int depth
);
3254 void init_samr_r_query_groupmem(SAMR_R_QUERY_GROUPMEM
* r_u
,
3255 uint32 num_entries
, uint32
*rid
,
3256 uint32
*attr
, NTSTATUS status
);
3257 BOOL
samr_io_r_query_groupmem(const char *desc
, SAMR_R_QUERY_GROUPMEM
* r_u
,
3258 prs_struct
*ps
, int depth
);
3259 void init_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS
* q_u
,
3261 BOOL
samr_io_q_query_usergroups(const char *desc
, SAMR_Q_QUERY_USERGROUPS
* q_u
,
3262 prs_struct
*ps
, int depth
);
3263 void init_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS
* r_u
,
3264 uint32 num_gids
, DOM_GID
* gid
,
3266 BOOL
samr_io_gids(const char *desc
, uint32
*num_gids
, DOM_GID
** gid
,
3267 prs_struct
*ps
, int depth
);
3268 BOOL
samr_io_r_query_usergroups(const char *desc
, SAMR_R_QUERY_USERGROUPS
* r_u
,
3269 prs_struct
*ps
, int depth
);
3270 void init_samr_q_enum_domains(SAMR_Q_ENUM_DOMAINS
* q_e
,
3272 uint32 start_idx
, uint32 size
);
3273 BOOL
samr_io_q_enum_domains(const char *desc
, SAMR_Q_ENUM_DOMAINS
* q_e
,
3274 prs_struct
*ps
, int depth
);
3275 void init_samr_r_enum_domains(SAMR_R_ENUM_DOMAINS
* r_u
,
3276 uint32 next_idx
, uint32 num_sam_entries
);
3277 BOOL
samr_io_r_enum_domains(const char *desc
, SAMR_R_ENUM_DOMAINS
* r_u
,
3278 prs_struct
*ps
, int depth
);
3279 void init_samr_q_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS
* q_e
,
3281 uint32 start_idx
, uint32 size
);
3282 BOOL
samr_io_q_enum_dom_groups(const char *desc
, SAMR_Q_ENUM_DOM_GROUPS
* q_e
,
3283 prs_struct
*ps
, int depth
);
3284 void init_samr_r_enum_dom_groups(SAMR_R_ENUM_DOM_GROUPS
* r_u
,
3285 uint32 next_idx
, uint32 num_sam_entries
);
3286 BOOL
samr_io_r_enum_dom_groups(const char *desc
, SAMR_R_ENUM_DOM_GROUPS
* r_u
,
3287 prs_struct
*ps
, int depth
);
3288 void init_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES
* q_e
,
3289 POLICY_HND
*pol
, uint32 start_idx
,
3291 BOOL
samr_io_q_enum_dom_aliases(const char *desc
, SAMR_Q_ENUM_DOM_ALIASES
* q_e
,
3292 prs_struct
*ps
, int depth
);
3293 void init_samr_r_enum_dom_aliases(SAMR_R_ENUM_DOM_ALIASES
*r_u
, uint32 next_idx
, uint32 num_sam_entries
);
3294 BOOL
samr_io_r_enum_dom_aliases(const char *desc
, SAMR_R_ENUM_DOM_ALIASES
* r_u
,
3295 prs_struct
*ps
, int depth
);
3296 void init_samr_alias_info1(ALIAS_INFO1
* al1
, const char *acct_name
, uint32 num_member
, const char *acct_desc
);
3297 BOOL
samr_io_alias_info1(const char *desc
, ALIAS_INFO1
* al1
,
3298 prs_struct
*ps
, int depth
);
3299 void init_samr_alias_info3(ALIAS_INFO3
* al3
, const char *acct_desc
);
3300 BOOL
samr_io_alias_info3(const char *desc
, ALIAS_INFO3
* al3
,
3301 prs_struct
*ps
, int depth
);
3302 BOOL
samr_alias_info_ctr(const char *desc
, ALIAS_INFO_CTR
* ctr
,
3303 prs_struct
*ps
, int depth
);
3304 void init_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO
* q_e
,
3305 POLICY_HND
*pol
, uint16 switch_level
);
3306 BOOL
samr_io_q_query_aliasinfo(const char *desc
, SAMR_Q_QUERY_ALIASINFO
* q_e
,
3307 prs_struct
*ps
, int depth
);
3308 void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO
* r_u
,
3309 ALIAS_INFO_CTR
* ctr
, NTSTATUS status
);
3310 BOOL
samr_io_r_query_aliasinfo(const char *desc
, SAMR_R_QUERY_ALIASINFO
* r_u
,
3311 prs_struct
*ps
, int depth
);
3312 void init_samr_q_set_aliasinfo(SAMR_Q_SET_ALIASINFO
* q_u
,
3313 POLICY_HND
*hnd
, ALIAS_INFO_CTR
* ctr
);
3314 BOOL
samr_io_q_set_aliasinfo(const char *desc
, SAMR_Q_SET_ALIASINFO
* q_u
,
3315 prs_struct
*ps
, int depth
);
3316 BOOL
samr_io_r_set_aliasinfo(const char *desc
, SAMR_R_SET_ALIASINFO
* r_u
,
3317 prs_struct
*ps
, int depth
);
3318 void init_samr_q_query_useraliases(SAMR_Q_QUERY_USERALIASES
* q_u
,
3321 uint32
*ptr_sid
, DOM_SID2
* sid
);
3322 BOOL
samr_io_q_query_useraliases(const char *desc
, SAMR_Q_QUERY_USERALIASES
* q_u
,
3323 prs_struct
*ps
, int depth
);
3324 void init_samr_r_query_useraliases(SAMR_R_QUERY_USERALIASES
* r_u
,
3325 uint32 num_rids
, uint32
*rid
,
3327 BOOL
samr_io_rids(const char *desc
, uint32
*num_rids
, uint32
**rid
,
3328 prs_struct
*ps
, int depth
);
3329 BOOL
samr_io_r_query_useraliases(const char *desc
, SAMR_R_QUERY_USERALIASES
* r_u
,
3330 prs_struct
*ps
, int depth
);
3331 void init_samr_q_open_alias(SAMR_Q_OPEN_ALIAS
* q_u
, POLICY_HND
*pol
,
3332 uint32 access_mask
, uint32 rid
);
3333 BOOL
samr_io_q_open_alias(const char *desc
, SAMR_Q_OPEN_ALIAS
* q_u
,
3334 prs_struct
*ps
, int depth
);
3335 BOOL
samr_io_r_open_alias(const char *desc
, SAMR_R_OPEN_ALIAS
* r_u
,
3336 prs_struct
*ps
, int depth
);
3337 void init_samr_q_lookup_rids(TALLOC_CTX
*ctx
, SAMR_Q_LOOKUP_RIDS
* q_u
,
3338 POLICY_HND
*pol
, uint32 flags
,
3339 uint32 num_rids
, uint32
*rid
);
3340 BOOL
samr_io_q_lookup_rids(const char *desc
, SAMR_Q_LOOKUP_RIDS
* q_u
,
3341 prs_struct
*ps
, int depth
);
3342 void init_samr_r_lookup_rids(SAMR_R_LOOKUP_RIDS
* r_u
,
3343 uint32 num_names
, UNIHDR
* hdr_name
,
3344 UNISTR2
*uni_name
, uint32
*type
);
3345 BOOL
samr_io_r_lookup_rids(const char *desc
, SAMR_R_LOOKUP_RIDS
* r_u
,
3346 prs_struct
*ps
, int depth
);
3347 void init_samr_q_delete_alias(SAMR_Q_DELETE_DOM_ALIAS
* q_u
, POLICY_HND
*hnd
);
3348 BOOL
samr_io_q_delete_alias(const char *desc
, SAMR_Q_DELETE_DOM_ALIAS
* q_u
,
3349 prs_struct
*ps
, int depth
);
3350 BOOL
samr_io_r_delete_alias(const char *desc
, SAMR_R_DELETE_DOM_ALIAS
* r_u
,
3351 prs_struct
*ps
, int depth
);
3352 void init_samr_q_create_dom_alias(SAMR_Q_CREATE_DOM_ALIAS
* q_u
,
3353 POLICY_HND
*hnd
, const char *acct_desc
);
3354 BOOL
samr_io_q_create_dom_alias(const char *desc
, SAMR_Q_CREATE_DOM_ALIAS
* q_u
,
3355 prs_struct
*ps
, int depth
);
3356 BOOL
samr_io_r_create_dom_alias(const char *desc
, SAMR_R_CREATE_DOM_ALIAS
* r_u
,
3357 prs_struct
*ps
, int depth
);
3358 void init_samr_q_add_aliasmem(SAMR_Q_ADD_ALIASMEM
* q_u
, POLICY_HND
*hnd
,
3360 BOOL
samr_io_q_add_aliasmem(const char *desc
, SAMR_Q_ADD_ALIASMEM
* q_u
,
3361 prs_struct
*ps
, int depth
);
3362 BOOL
samr_io_r_add_aliasmem(const char *desc
, SAMR_R_ADD_ALIASMEM
* r_u
,
3363 prs_struct
*ps
, int depth
);
3364 void init_samr_q_del_aliasmem(SAMR_Q_DEL_ALIASMEM
* q_u
, POLICY_HND
*hnd
,
3366 BOOL
samr_io_q_del_aliasmem(const char *desc
, SAMR_Q_DEL_ALIASMEM
* q_u
,
3367 prs_struct
*ps
, int depth
);
3368 BOOL
samr_io_r_del_aliasmem(const char *desc
, SAMR_R_DEL_ALIASMEM
* r_u
,
3369 prs_struct
*ps
, int depth
);
3370 void init_samr_q_delete_dom_alias(SAMR_Q_DELETE_DOM_ALIAS
* q_c
,
3372 BOOL
samr_io_q_delete_dom_alias(const char *desc
, SAMR_Q_DELETE_DOM_ALIAS
* q_u
,
3373 prs_struct
*ps
, int depth
);
3374 void init_samr_r_delete_dom_alias(SAMR_R_DELETE_DOM_ALIAS
* r_u
,
3376 BOOL
samr_io_r_delete_dom_alias(const char *desc
, SAMR_R_DELETE_DOM_ALIAS
* r_u
,
3377 prs_struct
*ps
, int depth
);
3378 void init_samr_q_query_aliasmem(SAMR_Q_QUERY_ALIASMEM
* q_c
,
3380 BOOL
samr_io_q_query_aliasmem(const char *desc
, SAMR_Q_QUERY_ALIASMEM
* q_u
,
3381 prs_struct
*ps
, int depth
);
3382 void init_samr_r_query_aliasmem(SAMR_R_QUERY_ALIASMEM
* r_u
,
3383 uint32 num_sids
, DOM_SID2
* sid
,
3385 BOOL
samr_io_r_query_aliasmem(const char *desc
, SAMR_R_QUERY_ALIASMEM
* r_u
,
3386 prs_struct
*ps
, int depth
);
3387 NTSTATUS
init_samr_q_lookup_names(TALLOC_CTX
*ctx
, SAMR_Q_LOOKUP_NAMES
* q_u
,
3388 POLICY_HND
*pol
, uint32 flags
,
3389 uint32 num_names
, const char **name
);
3390 BOOL
samr_io_q_lookup_names(const char *desc
, SAMR_Q_LOOKUP_NAMES
* q_u
,
3391 prs_struct
*ps
, int depth
);
3392 NTSTATUS
init_samr_r_lookup_names(TALLOC_CTX
*ctx
, SAMR_R_LOOKUP_NAMES
* r_u
,
3394 uint32
*rid
, uint32
*type
,
3396 BOOL
samr_io_r_lookup_names(const char *desc
, SAMR_R_LOOKUP_NAMES
* r_u
,
3397 prs_struct
*ps
, int depth
);
3398 void init_samr_q_delete_dom_user(SAMR_Q_DELETE_DOM_USER
* q_c
,
3400 BOOL
samr_io_q_delete_dom_user(const char *desc
, SAMR_Q_DELETE_DOM_USER
* q_u
,
3401 prs_struct
*ps
, int depth
);
3402 BOOL
samr_io_r_delete_dom_user(const char *desc
, SAMR_R_DELETE_DOM_USER
* r_u
,
3403 prs_struct
*ps
, int depth
);
3404 void init_samr_q_open_user(SAMR_Q_OPEN_USER
* q_u
,
3406 uint32 access_mask
, uint32 rid
);
3407 BOOL
samr_io_q_open_user(const char *desc
, SAMR_Q_OPEN_USER
* q_u
,
3408 prs_struct
*ps
, int depth
);
3409 BOOL
samr_io_r_open_user(const char *desc
, SAMR_R_OPEN_USER
* r_u
,
3410 prs_struct
*ps
, int depth
);
3411 void init_samr_q_create_user(SAMR_Q_CREATE_USER
* q_u
,
3414 uint32 acb_info
, uint32 access_mask
);
3415 BOOL
samr_io_q_create_user(const char *desc
, SAMR_Q_CREATE_USER
* q_u
,
3416 prs_struct
*ps
, int depth
);
3417 BOOL
samr_io_r_create_user(const char *desc
, SAMR_R_CREATE_USER
* r_u
,
3418 prs_struct
*ps
, int depth
);
3419 void init_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO
* q_u
,
3420 POLICY_HND
*hnd
, uint16 switch_value
);
3421 BOOL
samr_io_q_query_userinfo(const char *desc
, SAMR_Q_QUERY_USERINFO
* q_u
,
3422 prs_struct
*ps
, int depth
);
3423 void init_sam_user_info12(SAM_USER_INFO_12
* usr
,
3424 const uint8 lm_pwd
[16], const uint8 nt_pwd
[16]);
3425 void init_sam_user_info10(SAM_USER_INFO_10
* usr
, uint32 acb_info
);
3426 void init_sam_user_info11(SAM_USER_INFO_11
* usr
,
3428 const char *mach_acct
,
3429 uint32 rid_user
, uint32 rid_group
, uint16 acct_ctrl
);
3430 void init_sam_user_info24(SAM_USER_INFO_24
* usr
, char newpass
[516], uint16 pw_len
);
3431 void init_sam_user_info23W(SAM_USER_INFO_23
* usr
, NTTIME
* logon_time
, /* all zeros */
3432 NTTIME
* logoff_time
, /* all zeros */
3433 NTTIME
* kickoff_time
, /* all zeros */
3434 NTTIME
* pass_last_set_time
, /* all zeros */
3435 NTTIME
* pass_can_change_time
, /* all zeros */
3436 NTTIME
* pass_must_change_time
, /* all zeros */
3447 uint32 user_rid
, /* 0x0000 0000 */
3454 char newpass
[516], uint32 unknown_6
);
3455 void init_sam_user_info23A(SAM_USER_INFO_23
* usr
, NTTIME
* logon_time
, /* all zeros */
3456 NTTIME
* logoff_time
, /* all zeros */
3457 NTTIME
* kickoff_time
, /* all zeros */
3458 NTTIME
* pass_last_set_time
, /* all zeros */
3459 NTTIME
* pass_can_change_time
, /* all zeros */
3460 NTTIME
* pass_must_change_time
, /* all zeros */
3461 const char *user_name
, /* NULL */
3462 const char *full_name
,
3463 const char *home_dir
, const char *dir_drive
, const char *log_scr
,
3464 const char *prof_path
, const char *desc
, const char *wkstas
,
3465 const char *unk_str
, const char *mung_dial
, uint32 user_rid
, /* 0x0000 0000 */
3466 uint32 group_rid
, uint32 acb_info
,
3467 uint32 unknown_3
, uint16 logon_divs
,
3468 LOGON_HRS
* hrs
, uint32 unknown_5
,
3469 char newpass
[516], uint32 unknown_6
);
3470 void init_sam_user_info21W(SAM_USER_INFO_21
* usr
,
3471 NTTIME
* logon_time
,
3472 NTTIME
* logoff_time
,
3473 NTTIME
* kickoff_time
,
3474 NTTIME
* pass_last_set_time
,
3475 NTTIME
* pass_can_change_time
,
3476 NTTIME
* pass_must_change_time
,
3495 uint32 unknown_5
, uint32 unknown_6
);
3496 void init_sam_user_info21A(SAM_USER_INFO_21
*usr
, SAM_ACCOUNT
*pw
);
3497 void init_sam_user_info20A(SAM_USER_INFO_20
*usr
, SAM_ACCOUNT
*pw
);
3498 NTSTATUS
make_samr_userinfo_ctr_usr21(TALLOC_CTX
*ctx
, SAM_USERINFO_CTR
* ctr
,
3499 uint16 switch_value
,
3500 SAM_USER_INFO_21
* usr
);
3501 void init_samr_userinfo_ctr(SAM_USERINFO_CTR
* ctr
, uchar
* sess_key
,
3502 uint16 switch_value
, void *info
);
3503 void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO
* r_u
,
3504 SAM_USERINFO_CTR
* ctr
, NTSTATUS status
);
3505 BOOL
samr_io_r_query_userinfo(const char *desc
, SAMR_R_QUERY_USERINFO
* r_u
,
3506 prs_struct
*ps
, int depth
);
3507 void init_samr_q_set_userinfo(SAMR_Q_SET_USERINFO
* q_u
,
3508 POLICY_HND
*hnd
, unsigned char sess_key
[16],
3509 uint16 switch_value
, void *info
);
3510 BOOL
samr_io_q_set_userinfo(const char *desc
, SAMR_Q_SET_USERINFO
* q_u
,
3511 prs_struct
*ps
, int depth
);
3512 void init_samr_r_set_userinfo(SAMR_R_SET_USERINFO
* r_u
, NTSTATUS status
);
3513 BOOL
samr_io_r_set_userinfo(const char *desc
, SAMR_R_SET_USERINFO
* r_u
,
3514 prs_struct
*ps
, int depth
);
3515 void init_samr_q_set_userinfo2(SAMR_Q_SET_USERINFO2
* q_u
,
3516 POLICY_HND
*hnd
, unsigned char sess_key
[16],
3517 uint16 switch_value
, SAM_USERINFO_CTR
* ctr
);
3518 BOOL
samr_io_q_set_userinfo2(const char *desc
, SAMR_Q_SET_USERINFO2
* q_u
,
3519 prs_struct
*ps
, int depth
);
3520 void init_samr_r_set_userinfo2(SAMR_R_SET_USERINFO2
* r_u
, NTSTATUS status
);
3521 BOOL
samr_io_r_set_userinfo2(const char *desc
, SAMR_R_SET_USERINFO2
* r_u
,
3522 prs_struct
*ps
, int depth
);
3523 void init_samr_q_connect(SAMR_Q_CONNECT
* q_u
,
3524 const char *srv_name
, uint32 access_mask
);
3525 BOOL
samr_io_q_connect(const char *desc
, SAMR_Q_CONNECT
* q_u
,
3526 prs_struct
*ps
, int depth
);
3527 BOOL
samr_io_r_connect(const char *desc
, SAMR_R_CONNECT
* r_u
,
3528 prs_struct
*ps
, int depth
);
3529 void init_samr_q_connect_anon(SAMR_Q_CONNECT_ANON
* q_u
);
3530 BOOL
samr_io_q_connect_anon(const char *desc
, SAMR_Q_CONNECT_ANON
* q_u
,
3531 prs_struct
*ps
, int depth
);
3532 BOOL
samr_io_r_connect_anon(const char *desc
, SAMR_R_CONNECT_ANON
* r_u
,
3533 prs_struct
*ps
, int depth
);
3534 void init_samr_q_get_dom_pwinfo(SAMR_Q_GET_DOM_PWINFO
* q_u
,
3535 const char *srv_name
);
3536 BOOL
samr_io_q_get_dom_pwinfo(const char *desc
, SAMR_Q_GET_DOM_PWINFO
* q_u
,
3537 prs_struct
*ps
, int depth
);
3538 BOOL
samr_io_r_get_dom_pwinfo(const char *desc
, SAMR_R_GET_DOM_PWINFO
* r_u
,
3539 prs_struct
*ps
, int depth
);
3540 void init_enc_passwd(SAMR_ENC_PASSWD
* pwd
, char pass
[512]);
3541 BOOL
samr_io_enc_passwd(const char *desc
, SAMR_ENC_PASSWD
* pwd
,
3542 prs_struct
*ps
, int depth
);
3543 void init_enc_hash(SAMR_ENC_HASH
* hsh
, uchar hash
[16]);
3544 BOOL
samr_io_enc_hash(const char *desc
, SAMR_ENC_HASH
* hsh
,
3545 prs_struct
*ps
, int depth
);
3546 void init_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER
* q_u
,
3547 const char *dest_host
, const char *user_name
,
3548 char nt_newpass
[516],
3549 uchar nt_oldhash
[16],
3550 char lm_newpass
[516],
3551 uchar lm_oldhash
[16]);
3552 BOOL
samr_io_q_chgpasswd_user(const char *desc
, SAMR_Q_CHGPASSWD_USER
* q_u
,
3553 prs_struct
*ps
, int depth
);
3554 void init_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER
* r_u
, NTSTATUS status
);
3555 BOOL
samr_io_r_chgpasswd_user(const char *desc
, SAMR_R_CHGPASSWD_USER
* r_u
,
3556 prs_struct
*ps
, int depth
);
3557 void init_samr_q_unknown_2e(SAMR_Q_UNKNOWN_2E
*q_u
,
3558 POLICY_HND
*domain_pol
, uint16 switch_value
);
3559 BOOL
samr_io_q_unknown_2e(const char *desc
, SAMR_Q_UNKNOWN_2E
*q_u
,
3560 prs_struct
*ps
, int depth
);
3561 void init_samr_r_samr_unknown_2e(SAMR_R_UNKNOWN_2E
* r_u
,
3562 uint16 switch_value
, SAM_UNK_CTR
* ctr
,
3564 BOOL
samr_io_r_samr_unknown_2e(const char *desc
, SAMR_R_UNKNOWN_2E
* r_u
,
3565 prs_struct
*ps
, int depth
);
3566 void init_samr_q_set_domain_info(SAMR_Q_SET_DOMAIN_INFO
*q_u
,
3567 POLICY_HND
*domain_pol
, uint16 switch_value
, SAM_UNK_CTR
*ctr
);
3568 BOOL
samr_io_q_set_domain_info(const char *desc
, SAMR_Q_SET_DOMAIN_INFO
*q_u
,
3569 prs_struct
*ps
, int depth
);
3570 void init_samr_r_set_domain_info(SAMR_R_SET_DOMAIN_INFO
* r_u
, NTSTATUS status
);
3571 BOOL
samr_io_r_set_domain_info(const char *desc
, SAMR_R_SET_DOMAIN_INFO
* r_u
,
3572 prs_struct
*ps
, int depth
);
3574 /* The following definitions come from rpc_parse/parse_sec.c */
3576 void init_sec_access(SEC_ACCESS
*t
, uint32 mask
);
3577 BOOL
sec_io_access(const char *desc
, SEC_ACCESS
*t
, prs_struct
*ps
, int depth
);
3578 void init_sec_ace(SEC_ACE
*t
, DOM_SID
*sid
, uint8 type
, SEC_ACCESS mask
, uint8 flag
);
3579 BOOL
sec_io_ace(const char *desc
, SEC_ACE
*psa
, prs_struct
*ps
, int depth
);
3580 SEC_ACL
*make_sec_acl(TALLOC_CTX
*ctx
, uint16 revision
, int num_aces
, SEC_ACE
*ace_list
);
3581 SEC_ACL
*dup_sec_acl(TALLOC_CTX
*ctx
, SEC_ACL
*src
);
3582 BOOL
sec_io_acl(const char *desc
, SEC_ACL
**ppsa
, prs_struct
*ps
, int depth
);
3583 size_t sec_desc_size(SEC_DESC
*psd
);
3584 BOOL
sec_ace_equal(SEC_ACE
*s1
, SEC_ACE
*s2
);
3585 BOOL
sec_acl_equal(SEC_ACL
*s1
, SEC_ACL
*s2
);
3586 BOOL
sec_desc_equal(SEC_DESC
*s1
, SEC_DESC
*s2
);
3587 SEC_DESC_BUF
*sec_desc_merge(TALLOC_CTX
*ctx
, SEC_DESC_BUF
*new_sdb
, SEC_DESC_BUF
*old_sdb
);
3588 SEC_DESC
*make_sec_desc(TALLOC_CTX
*ctx
, uint16 revision
,
3589 DOM_SID
*owner_sid
, DOM_SID
*grp_sid
,
3590 SEC_ACL
*sacl
, SEC_ACL
*dacl
, size_t *sd_size
);
3591 SEC_DESC
*dup_sec_desc( TALLOC_CTX
*ctx
, SEC_DESC
*src
);
3592 SEC_DESC
*make_standard_sec_desc(TALLOC_CTX
*ctx
, DOM_SID
*owner_sid
, DOM_SID
*grp_sid
,
3593 SEC_ACL
*dacl
, size_t *sd_size
);
3594 BOOL
sec_io_desc(const char *desc
, SEC_DESC
**ppsd
, prs_struct
*ps
, int depth
);
3595 SEC_DESC_BUF
*make_sec_desc_buf(TALLOC_CTX
*ctx
, size_t len
, SEC_DESC
*sec_desc
);
3596 SEC_DESC_BUF
*dup_sec_desc_buf(TALLOC_CTX
*ctx
, SEC_DESC_BUF
*src
);
3597 BOOL
sec_io_desc_buf(const char *desc
, SEC_DESC_BUF
**ppsdb
, prs_struct
*ps
, int depth
);
3599 /* The following definitions come from rpc_parse/parse_spoolss.c */
3601 BOOL
make_systemtime(SYSTEMTIME
*systime
, struct tm
*unixtime
);
3602 BOOL
smb_io_notify_info_data_strings(const char *desc
,SPOOL_NOTIFY_INFO_DATA
*data
,
3603 prs_struct
*ps
, int depth
);
3604 BOOL
spoolss_io_devmode(const char *desc
, prs_struct
*ps
, int depth
, DEVICEMODE
*devmode
);
3605 BOOL
make_spoolss_q_open_printer_ex(SPOOL_Q_OPEN_PRINTER_EX
*q_u
,
3606 const fstring printername
,
3607 const fstring datatype
,
3608 uint32 access_required
,
3609 const fstring clientname
,
3610 const fstring user_name
);
3611 BOOL
make_spoolss_q_addprinterex(
3612 TALLOC_CTX
*mem_ctx
,
3613 SPOOL_Q_ADDPRINTEREX
*q_u
,
3614 const char *srv_name
,
3615 const char* clientname
,
3616 const char* user_name
,
3618 PRINTER_INFO_CTR
*ctr
);
3619 BOOL
make_spoolss_printer_info_2(TALLOC_CTX
*mem_ctx
, SPOOL_PRINTER_INFO_LEVEL_2
**spool_info2
,
3620 PRINTER_INFO_2
*info
);
3621 BOOL
spoolss_io_q_open_printer(const char *desc
, SPOOL_Q_OPEN_PRINTER
*q_u
, prs_struct
*ps
, int depth
);
3622 BOOL
spoolss_io_r_open_printer(const char *desc
, SPOOL_R_OPEN_PRINTER
*r_u
, prs_struct
*ps
, int depth
);
3623 BOOL
spoolss_io_q_open_printer_ex(const char *desc
, SPOOL_Q_OPEN_PRINTER_EX
*q_u
, prs_struct
*ps
, int depth
);
3624 BOOL
spoolss_io_r_open_printer_ex(const char *desc
, SPOOL_R_OPEN_PRINTER_EX
*r_u
, prs_struct
*ps
, int depth
);
3625 BOOL
make_spoolss_q_deleteprinterdriver(
3626 TALLOC_CTX
*mem_ctx
,
3627 SPOOL_Q_DELETEPRINTERDRIVER
*q_u
,
3632 BOOL
make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA
*q_u
,
3633 const POLICY_HND
*handle
,
3634 UNISTR2
*valuename
, uint32 size
);
3635 BOOL
spoolss_io_q_getprinterdata(const char *desc
, SPOOL_Q_GETPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
3636 BOOL
spoolss_io_q_deleteprinterdata(const char *desc
, SPOOL_Q_DELETEPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
3637 BOOL
spoolss_io_r_deleteprinterdata(const char *desc
, SPOOL_R_DELETEPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
3638 BOOL
spoolss_io_r_getprinterdata(const char *desc
, SPOOL_R_GETPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
3639 BOOL
make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER
*q_u
, POLICY_HND
*hnd
);
3640 BOOL
spoolss_io_q_abortprinter(const char *desc
, SPOOL_Q_ABORTPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3641 BOOL
spoolss_io_r_abortprinter(const char *desc
, SPOOL_R_ABORTPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3642 BOOL
spoolss_io_q_deleteprinter(const char *desc
, SPOOL_Q_DELETEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3643 BOOL
spoolss_io_r_deleteprinter(const char *desc
, SPOOL_R_DELETEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3644 BOOL
spoolss_io_q_deleteprinterdriver(const char *desc
, SPOOL_Q_DELETEPRINTERDRIVER
*q_u
, prs_struct
*ps
, int depth
);
3645 BOOL
spoolss_io_r_deleteprinterdriver(const char *desc
, SPOOL_R_DELETEPRINTERDRIVER
*r_u
, prs_struct
*ps
, int depth
);
3646 BOOL
spoolss_io_q_closeprinter(const char *desc
, SPOOL_Q_CLOSEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3647 BOOL
spoolss_io_r_closeprinter(const char *desc
, SPOOL_R_CLOSEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3648 BOOL
spoolss_io_q_startdocprinter(const char *desc
, SPOOL_Q_STARTDOCPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3649 BOOL
spoolss_io_r_startdocprinter(const char *desc
, SPOOL_R_STARTDOCPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3650 BOOL
spoolss_io_q_enddocprinter(const char *desc
, SPOOL_Q_ENDDOCPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3651 BOOL
spoolss_io_r_enddocprinter(const char *desc
, SPOOL_R_ENDDOCPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3652 BOOL
spoolss_io_q_startpageprinter(const char *desc
, SPOOL_Q_STARTPAGEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3653 BOOL
spoolss_io_r_startpageprinter(const char *desc
, SPOOL_R_STARTPAGEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3654 BOOL
spoolss_io_q_endpageprinter(const char *desc
, SPOOL_Q_ENDPAGEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3655 BOOL
spoolss_io_r_endpageprinter(const char *desc
, SPOOL_R_ENDPAGEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3656 BOOL
spoolss_io_q_writeprinter(const char *desc
, SPOOL_Q_WRITEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3657 BOOL
spoolss_io_r_writeprinter(const char *desc
, SPOOL_R_WRITEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3658 BOOL
spoolss_io_q_rffpcnex(const char *desc
, SPOOL_Q_RFFPCNEX
*q_u
, prs_struct
*ps
, int depth
);
3659 BOOL
spoolss_io_r_rffpcnex(const char *desc
, SPOOL_R_RFFPCNEX
*r_u
, prs_struct
*ps
, int depth
);
3660 BOOL
spoolss_io_q_rfnpcnex(const char *desc
, SPOOL_Q_RFNPCNEX
*q_u
, prs_struct
*ps
, int depth
);
3661 BOOL
spoolss_io_r_rfnpcnex(const char *desc
, SPOOL_R_RFNPCNEX
*r_u
, prs_struct
*ps
, int depth
);
3662 BOOL
smb_io_printer_info_0(const char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_0
*info
, int depth
);
3663 BOOL
smb_io_printer_info_1(const char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_1
*info
, int depth
);
3664 BOOL
smb_io_printer_info_2(const char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_2
*info
, int depth
);
3665 BOOL
smb_io_printer_info_3(const char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_3
*info
, int depth
);
3666 BOOL
smb_io_printer_info_4(const char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_4
*info
, int depth
);
3667 BOOL
smb_io_printer_info_5(const char *desc
, NEW_BUFFER
*buffer
, PRINTER_INFO_5
*info
, int depth
);
3668 BOOL
smb_io_port_info_1(const char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_1
*info
, int depth
);
3669 BOOL
smb_io_port_info_2(const char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_2
*info
, int depth
);
3670 BOOL
smb_io_printer_driver_info_1(const char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_1
*info
, int depth
) ;
3671 BOOL
smb_io_printer_driver_info_2(const char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_2
*info
, int depth
) ;
3672 BOOL
smb_io_printer_driver_info_3(const char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_3
*info
, int depth
);
3673 BOOL
smb_io_printer_driver_info_6(const char *desc
, NEW_BUFFER
*buffer
, DRIVER_INFO_6
*info
, int depth
);
3674 BOOL
smb_io_job_info_1(const char *desc
, NEW_BUFFER
*buffer
, JOB_INFO_1
*info
, int depth
);
3675 BOOL
smb_io_job_info_2(const char *desc
, NEW_BUFFER
*buffer
, JOB_INFO_2
*info
, int depth
);
3676 BOOL
smb_io_form_1(const char *desc
, NEW_BUFFER
*buffer
, FORM_1
*info
, int depth
);
3677 void spoolss_move_buffer(NEW_BUFFER
*src
, NEW_BUFFER
**dest
);
3678 uint32
new_get_buffer_size(NEW_BUFFER
*buffer
);
3679 BOOL
smb_io_driverdir_1(const char *desc
, NEW_BUFFER
*buffer
, DRIVER_DIRECTORY_1
*info
, int depth
);
3680 BOOL
smb_io_port_1(const char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_1
*info
, int depth
);
3681 BOOL
smb_io_port_2(const char *desc
, NEW_BUFFER
*buffer
, PORT_INFO_2
*info
, int depth
);
3682 BOOL
smb_io_printprocessor_info_1(const char *desc
, NEW_BUFFER
*buffer
, PRINTPROCESSOR_1
*info
, int depth
);
3683 BOOL
smb_io_printprocdatatype_info_1(const char *desc
, NEW_BUFFER
*buffer
, PRINTPROCDATATYPE_1
*info
, int depth
);
3684 BOOL
smb_io_printmonitor_info_1(const char *desc
, NEW_BUFFER
*buffer
, PRINTMONITOR_1
*info
, int depth
);
3685 BOOL
smb_io_printmonitor_info_2(const char *desc
, NEW_BUFFER
*buffer
, PRINTMONITOR_2
*info
, int depth
);
3686 uint32
spoolss_size_printer_info_0(PRINTER_INFO_0
*info
);
3687 uint32
spoolss_size_printer_info_1(PRINTER_INFO_1
*info
);
3688 uint32
spoolss_size_printer_info_2(PRINTER_INFO_2
*info
);
3689 uint32
spoolss_size_printer_info_4(PRINTER_INFO_4
*info
);
3690 uint32
spoolss_size_printer_info_5(PRINTER_INFO_5
*info
);
3691 uint32
spoolss_size_printer_info_3(PRINTER_INFO_3
*info
);
3692 uint32
spoolss_size_printer_driver_info_1(DRIVER_INFO_1
*info
);
3693 uint32
spoolss_size_printer_driver_info_2(DRIVER_INFO_2
*info
);
3694 uint32
spoolss_size_string_array(uint16
*string
);
3695 uint32
spoolss_size_printer_driver_info_3(DRIVER_INFO_3
*info
);
3696 uint32
spoolss_size_printer_driver_info_6(DRIVER_INFO_6
*info
);
3697 uint32
spoolss_size_job_info_1(JOB_INFO_1
*info
);
3698 uint32
spoolss_size_job_info_2(JOB_INFO_2
*info
);
3699 uint32
spoolss_size_form_1(FORM_1
*info
);
3700 uint32
spoolss_size_port_info_1(PORT_INFO_1
*info
);
3701 uint32
spoolss_size_driverdir_info_1(DRIVER_DIRECTORY_1
*info
);
3702 uint32
spoolss_size_printprocessordirectory_info_1(PRINTPROCESSOR_DIRECTORY_1
*info
);
3703 uint32
spoolss_size_port_info_2(PORT_INFO_2
*info
);
3704 uint32
spoolss_size_printprocessor_info_1(PRINTPROCESSOR_1
*info
);
3705 uint32
spoolss_size_printprocdatatype_info_1(PRINTPROCDATATYPE_1
*info
);
3706 uint32
spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES
*p
);
3707 uint32
spoolss_size_printmonitor_info_1(PRINTMONITOR_1
*info
);
3708 uint32
spoolss_size_printmonitor_info_2(PRINTMONITOR_2
*info
);
3709 BOOL
make_spoolss_q_getprinterdriver2(SPOOL_Q_GETPRINTERDRIVER2
*q_u
,
3710 const POLICY_HND
*hnd
,
3711 const fstring architecture
,
3712 uint32 level
, uint32 clientmajor
, uint32 clientminor
,
3713 NEW_BUFFER
*buffer
, uint32 offered
);
3714 BOOL
spoolss_io_q_getprinterdriver2(const char *desc
, SPOOL_Q_GETPRINTERDRIVER2
*q_u
, prs_struct
*ps
, int depth
);
3715 BOOL
spoolss_io_r_getprinterdriver2(const char *desc
, SPOOL_R_GETPRINTERDRIVER2
*r_u
, prs_struct
*ps
, int depth
);
3716 BOOL
make_spoolss_q_enumprinters(
3717 SPOOL_Q_ENUMPRINTERS
*q_u
,
3724 BOOL
make_spoolss_q_enumports(SPOOL_Q_ENUMPORTS
*q_u
,
3725 fstring servername
, uint32 level
,
3726 NEW_BUFFER
*buffer
, uint32 offered
);
3727 BOOL
spoolss_io_q_enumprinters(const char *desc
, SPOOL_Q_ENUMPRINTERS
*q_u
, prs_struct
*ps
, int depth
);
3728 BOOL
spoolss_io_r_enumprinters(const char *desc
, SPOOL_R_ENUMPRINTERS
*r_u
, prs_struct
*ps
, int depth
);
3729 BOOL
spoolss_io_r_getprinter(const char *desc
, SPOOL_R_GETPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3730 BOOL
spoolss_io_q_getprinter(const char *desc
, SPOOL_Q_GETPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3731 BOOL
make_spoolss_q_getprinter(
3732 TALLOC_CTX
*mem_ctx
,
3733 SPOOL_Q_GETPRINTER
*q_u
,
3734 const POLICY_HND
*hnd
,
3739 BOOL
make_spoolss_q_setprinter(TALLOC_CTX
*mem_ctx
, SPOOL_Q_SETPRINTER
*q_u
,
3740 const POLICY_HND
*hnd
, uint32 level
, PRINTER_INFO_CTR
*info
,
3742 BOOL
spoolss_io_r_setprinter(const char *desc
, SPOOL_R_SETPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3743 BOOL
spoolss_io_q_setprinter(const char *desc
, SPOOL_Q_SETPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3744 BOOL
spoolss_io_r_fcpn(const char *desc
, SPOOL_R_FCPN
*r_u
, prs_struct
*ps
, int depth
);
3745 BOOL
spoolss_io_q_fcpn(const char *desc
, SPOOL_Q_FCPN
*q_u
, prs_struct
*ps
, int depth
);
3746 BOOL
spoolss_io_r_addjob(const char *desc
, SPOOL_R_ADDJOB
*r_u
, prs_struct
*ps
, int depth
);
3747 BOOL
spoolss_io_q_addjob(const char *desc
, SPOOL_Q_ADDJOB
*q_u
, prs_struct
*ps
, int depth
);
3748 BOOL
spoolss_io_r_enumjobs(const char *desc
, SPOOL_R_ENUMJOBS
*r_u
, prs_struct
*ps
, int depth
);
3749 BOOL
make_spoolss_q_enumjobs(SPOOL_Q_ENUMJOBS
*q_u
, const POLICY_HND
*hnd
,
3755 BOOL
spoolss_io_q_enumjobs(const char *desc
, SPOOL_Q_ENUMJOBS
*q_u
, prs_struct
*ps
, int depth
);
3756 BOOL
spoolss_io_r_schedulejob(const char *desc
, SPOOL_R_SCHEDULEJOB
*r_u
, prs_struct
*ps
, int depth
);
3757 BOOL
spoolss_io_q_schedulejob(const char *desc
, SPOOL_Q_SCHEDULEJOB
*q_u
, prs_struct
*ps
, int depth
);
3758 BOOL
spoolss_io_r_setjob(const char *desc
, SPOOL_R_SETJOB
*r_u
, prs_struct
*ps
, int depth
);
3759 BOOL
spoolss_io_q_setjob(const char *desc
, SPOOL_Q_SETJOB
*q_u
, prs_struct
*ps
, int depth
);
3760 BOOL
spoolss_io_r_enumprinterdrivers(const char *desc
, SPOOL_R_ENUMPRINTERDRIVERS
*r_u
, prs_struct
*ps
, int depth
);
3761 BOOL
make_spoolss_q_enumprinterdrivers(SPOOL_Q_ENUMPRINTERDRIVERS
*q_u
,
3763 const char *environment
,
3765 NEW_BUFFER
*buffer
, uint32 offered
);
3766 BOOL
spoolss_io_q_enumprinterdrivers(const char *desc
, SPOOL_Q_ENUMPRINTERDRIVERS
*q_u
, prs_struct
*ps
, int depth
);
3767 BOOL
spoolss_io_q_enumforms(const char *desc
, SPOOL_Q_ENUMFORMS
*q_u
, prs_struct
*ps
, int depth
);
3768 BOOL
spoolss_io_r_enumforms(const char *desc
, SPOOL_R_ENUMFORMS
*r_u
, prs_struct
*ps
, int depth
);
3769 BOOL
spoolss_io_q_getform(const char *desc
, SPOOL_Q_GETFORM
*q_u
, prs_struct
*ps
, int depth
);
3770 BOOL
spoolss_io_r_getform(const char *desc
, SPOOL_R_GETFORM
*r_u
, prs_struct
*ps
, int depth
);
3771 BOOL
spoolss_io_r_enumports(const char *desc
, SPOOL_R_ENUMPORTS
*r_u
, prs_struct
*ps
, int depth
);
3772 BOOL
spoolss_io_q_enumports(const char *desc
, SPOOL_Q_ENUMPORTS
*q_u
, prs_struct
*ps
, int depth
);
3773 BOOL
spool_io_printer_info_level_1(const char *desc
, SPOOL_PRINTER_INFO_LEVEL_1
*il
, prs_struct
*ps
, int depth
);
3774 BOOL
spool_io_printer_info_level_3(const char *desc
, SPOOL_PRINTER_INFO_LEVEL_3
*il
, prs_struct
*ps
, int depth
);
3775 BOOL
spool_io_printer_info_level_2(const char *desc
, SPOOL_PRINTER_INFO_LEVEL_2
*il
, prs_struct
*ps
, int depth
);
3776 BOOL
spool_io_printer_info_level(const char *desc
, SPOOL_PRINTER_INFO_LEVEL
*il
, prs_struct
*ps
, int depth
);
3777 BOOL
spoolss_io_q_addprinterex(const char *desc
, SPOOL_Q_ADDPRINTEREX
*q_u
, prs_struct
*ps
, int depth
);
3778 BOOL
spoolss_io_r_addprinterex(const char *desc
, SPOOL_R_ADDPRINTEREX
*r_u
,
3779 prs_struct
*ps
, int depth
);
3780 BOOL
spool_io_printer_driver_info_level_3(const char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
**q_u
,
3781 prs_struct
*ps
, int depth
);
3782 BOOL
spool_io_printer_driver_info_level_6(const char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL_6
**q_u
,
3783 prs_struct
*ps
, int depth
);
3784 BOOL
smb_io_unibuffer(const char *desc
, UNISTR2
*buffer
, prs_struct
*ps
, int depth
);
3785 BOOL
spool_io_printer_driver_info_level(const char *desc
, SPOOL_PRINTER_DRIVER_INFO_LEVEL
*il
, prs_struct
*ps
, int depth
);
3786 BOOL
make_spoolss_q_addprinterdriver(TALLOC_CTX
*mem_ctx
,
3787 SPOOL_Q_ADDPRINTERDRIVER
*q_u
, const char* srv_name
,
3788 uint32 level
, PRINTER_DRIVER_CTR
*info
);
3789 BOOL
make_spoolss_driver_info_3(TALLOC_CTX
*mem_ctx
,
3790 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
**spool_drv_info
,
3791 DRIVER_INFO_3
*info3
);
3792 BOOL
make_spoolss_buffer5(TALLOC_CTX
*mem_ctx
, BUFFER5
*buf5
, uint32 len
, uint16
*src
);
3793 BOOL
spoolss_io_q_addprinterdriver(const char *desc
, SPOOL_Q_ADDPRINTERDRIVER
*q_u
, prs_struct
*ps
, int depth
);
3794 BOOL
spoolss_io_r_addprinterdriver(const char *desc
, SPOOL_R_ADDPRINTERDRIVER
*q_u
, prs_struct
*ps
, int depth
);
3795 BOOL
uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3
*uni
,
3796 NT_PRINTER_DRIVER_INFO_LEVEL_3
**asc
);
3797 BOOL
uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6
*uni
,
3798 NT_PRINTER_DRIVER_INFO_LEVEL_6
**asc
);
3799 BOOL
uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2
*uni
,
3800 NT_PRINTER_INFO_LEVEL_2
**asc
);
3801 BOOL
make_spoolss_q_getprinterdriverdir(SPOOL_Q_GETPRINTERDRIVERDIR
*q_u
,
3802 fstring servername
, fstring env_name
, uint32 level
,
3803 NEW_BUFFER
*buffer
, uint32 offered
);
3804 BOOL
spoolss_io_q_getprinterdriverdir(const char *desc
, SPOOL_Q_GETPRINTERDRIVERDIR
*q_u
, prs_struct
*ps
, int depth
);
3805 BOOL
spoolss_io_r_getprinterdriverdir(const char *desc
, SPOOL_R_GETPRINTERDRIVERDIR
*r_u
, prs_struct
*ps
, int depth
);
3806 BOOL
spoolss_io_r_enumprintprocessors(const char *desc
, SPOOL_R_ENUMPRINTPROCESSORS
*r_u
, prs_struct
*ps
, int depth
);
3807 BOOL
spoolss_io_q_enumprintprocessors(const char *desc
, SPOOL_Q_ENUMPRINTPROCESSORS
*q_u
, prs_struct
*ps
, int depth
);
3808 BOOL
spoolss_io_q_addprintprocessor(const char *desc
, SPOOL_Q_ADDPRINTPROCESSOR
*q_u
, prs_struct
*ps
, int depth
);
3809 BOOL
spoolss_io_r_addprintprocessor(const char *desc
, SPOOL_R_ADDPRINTPROCESSOR
*r_u
, prs_struct
*ps
, int depth
);
3810 BOOL
spoolss_io_r_enumprintprocdatatypes(const char *desc
, SPOOL_R_ENUMPRINTPROCDATATYPES
*r_u
, prs_struct
*ps
, int depth
);
3811 BOOL
spoolss_io_q_enumprintprocdatatypes(const char *desc
, SPOOL_Q_ENUMPRINTPROCDATATYPES
*q_u
, prs_struct
*ps
, int depth
);
3812 BOOL
spoolss_io_q_enumprintmonitors(const char *desc
, SPOOL_Q_ENUMPRINTMONITORS
*q_u
, prs_struct
*ps
, int depth
);
3813 BOOL
spoolss_io_r_enumprintmonitors(const char *desc
, SPOOL_R_ENUMPRINTMONITORS
*r_u
, prs_struct
*ps
, int depth
);
3814 BOOL
spoolss_io_r_enumprinterdata(const char *desc
, SPOOL_R_ENUMPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
3815 BOOL
spoolss_io_q_enumprinterdata(const char *desc
, SPOOL_Q_ENUMPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
3816 BOOL
make_spoolss_q_enumprinterdata(SPOOL_Q_ENUMPRINTERDATA
*q_u
,
3817 const POLICY_HND
*hnd
,
3818 uint32 idx
, uint32 valuelen
, uint32 datalen
);
3819 BOOL
make_spoolss_q_setprinterdata(SPOOL_Q_SETPRINTERDATA
*q_u
, TALLOC_CTX
*ctx
, const POLICY_HND
*hnd
,
3820 char* value
, char* data
);
3821 BOOL
spoolss_io_q_setprinterdata(const char *desc
, SPOOL_Q_SETPRINTERDATA
*q_u
, prs_struct
*ps
, int depth
);
3822 BOOL
spoolss_io_r_setprinterdata(const char *desc
, SPOOL_R_SETPRINTERDATA
*r_u
, prs_struct
*ps
, int depth
);
3823 BOOL
spoolss_io_q_resetprinter(const char *desc
, SPOOL_Q_RESETPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3824 BOOL
spoolss_io_r_resetprinter(const char *desc
, SPOOL_R_RESETPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3825 BOOL
convert_specific_param(NT_PRINTER_PARAM
**param
, const UNISTR2
*value
,
3826 uint32 type
, const uint8
*data
, uint32 len
);
3827 BOOL
spoolss_io_q_deleteform(const char *desc
, SPOOL_Q_DELETEFORM
*q_u
, prs_struct
*ps
, int depth
);
3828 BOOL
spoolss_io_r_deleteform(const char *desc
, SPOOL_R_DELETEFORM
*r_u
, prs_struct
*ps
, int depth
);
3829 BOOL
spoolss_io_q_addform(const char *desc
, SPOOL_Q_ADDFORM
*q_u
, prs_struct
*ps
, int depth
);
3830 BOOL
spoolss_io_r_addform(const char *desc
, SPOOL_R_ADDFORM
*r_u
, prs_struct
*ps
, int depth
);
3831 BOOL
spoolss_io_q_setform(const char *desc
, SPOOL_Q_SETFORM
*q_u
, prs_struct
*ps
, int depth
);
3832 BOOL
spoolss_io_r_setform(const char *desc
, SPOOL_R_SETFORM
*r_u
, prs_struct
*ps
, int depth
);
3833 BOOL
spoolss_io_r_getjob(const char *desc
, SPOOL_R_GETJOB
*r_u
, prs_struct
*ps
, int depth
);
3834 BOOL
spoolss_io_q_getjob(const char *desc
, SPOOL_Q_GETJOB
*q_u
, prs_struct
*ps
, int depth
);
3835 void free_devmode(DEVICEMODE
*devmode
);
3836 void free_printer_info_1(PRINTER_INFO_1
*printer
);
3837 void free_printer_info_2(PRINTER_INFO_2
*printer
);
3838 void free_printer_info_3(PRINTER_INFO_3
*printer
);
3839 void free_printer_info_4(PRINTER_INFO_4
*printer
);
3840 void free_printer_info_5(PRINTER_INFO_5
*printer
);
3841 void free_job_info_2(JOB_INFO_2
*job
);
3842 BOOL
make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER
*q_u
,
3843 const fstring string
, uint32 printer
, uint32 type
);
3844 BOOL
spoolss_io_q_replyopenprinter(const char *desc
, SPOOL_Q_REPLYOPENPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3845 BOOL
spoolss_io_r_replyopenprinter(const char *desc
, SPOOL_R_REPLYOPENPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3846 BOOL
make_spoolss_q_routerreplyprinter(SPOOL_Q_ROUTERREPLYPRINTER
*q_u
, POLICY_HND
*hnd
,
3847 uint32 condition
, uint32 change_id
);
3848 BOOL
spoolss_io_q_routerreplyprinter (const char *desc
, SPOOL_Q_ROUTERREPLYPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3849 BOOL
spoolss_io_r_routerreplyprinter (const char *desc
, SPOOL_R_ROUTERREPLYPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3850 BOOL
make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER
*q_u
, POLICY_HND
*hnd
);
3851 BOOL
spoolss_io_q_replycloseprinter(const char *desc
, SPOOL_Q_REPLYCLOSEPRINTER
*q_u
, prs_struct
*ps
, int depth
);
3852 BOOL
spoolss_io_r_replycloseprinter(const char *desc
, SPOOL_R_REPLYCLOSEPRINTER
*r_u
, prs_struct
*ps
, int depth
);
3853 BOOL
make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN
*q_u
, POLICY_HND
*hnd
,
3854 uint32 change_low
, uint32 change_high
,
3855 SPOOL_NOTIFY_INFO
*info
);
3856 BOOL
spoolss_io_q_reply_rrpcn(const char *desc
, SPOOL_Q_REPLY_RRPCN
*q_u
, prs_struct
*ps
, int depth
);
3857 BOOL
spoolss_io_r_reply_rrpcn(const char *desc
, SPOOL_R_REPLY_RRPCN
*r_u
, prs_struct
*ps
, int depth
);
3858 BOOL
spoolss_io_q_getprinterdataex(const char *desc
, SPOOL_Q_GETPRINTERDATAEX
*q_u
, prs_struct
*ps
, int depth
);
3859 BOOL
spoolss_io_r_getprinterdataex(const char *desc
, SPOOL_R_GETPRINTERDATAEX
*r_u
, prs_struct
*ps
, int depth
);
3860 BOOL
spoolss_io_q_setprinterdataex(const char *desc
, SPOOL_Q_SETPRINTERDATAEX
*q_u
, prs_struct
*ps
, int depth
);
3861 BOOL
spoolss_io_r_setprinterdataex(const char *desc
, SPOOL_R_SETPRINTERDATAEX
*r_u
, prs_struct
*ps
, int depth
);
3862 BOOL
spoolss_io_q_enumprinterkey(const char *desc
, SPOOL_Q_ENUMPRINTERKEY
*q_u
, prs_struct
*ps
, int depth
);
3863 BOOL
spoolss_io_r_enumprinterkey(const char *desc
, SPOOL_R_ENUMPRINTERKEY
*r_u
, prs_struct
*ps
, int depth
);
3864 BOOL
spoolss_io_q_enumprinterdataex(const char *desc
, SPOOL_Q_ENUMPRINTERDATAEX
*q_u
, prs_struct
*ps
, int depth
);
3865 BOOL
spoolss_io_r_enumprinterdataex(const char *desc
, SPOOL_R_ENUMPRINTERDATAEX
*r_u
, prs_struct
*ps
, int depth
);
3866 BOOL
make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTORY
*q_u
, const char *name
, char *environment
, int level
, NEW_BUFFER
*buffer
, uint32 offered
);
3867 BOOL
spoolss_io_q_getprintprocessordirectory(const char *desc
, SPOOL_Q_GETPRINTPROCESSORDIRECTORY
*q_u
, prs_struct
*ps
, int depth
);
3868 BOOL
spoolss_io_r_getprintprocessordirectory(const char *desc
, SPOOL_R_GETPRINTPROCESSORDIRECTORY
*r_u
, prs_struct
*ps
, int depth
);
3869 BOOL
smb_io_printprocessordirectory_1(const char *desc
, NEW_BUFFER
*buffer
, PRINTPROCESSOR_DIRECTORY_1
*info
, int depth
);
3870 BOOL
make_spoolss_q_addform(SPOOL_Q_ADDFORM
*q_u
, POLICY_HND
*handle
,
3871 int level
, FORM
*form
);
3872 BOOL
make_spoolss_q_setform(SPOOL_Q_SETFORM
*q_u
, POLICY_HND
*handle
,
3873 int level
, char *form_name
, FORM
*form
);
3874 BOOL
make_spoolss_q_deleteform(SPOOL_Q_DELETEFORM
*q_u
, POLICY_HND
*handle
, char *form
);
3875 BOOL
make_spoolss_q_getform(SPOOL_Q_GETFORM
*q_u
, POLICY_HND
*handle
,
3876 char *formname
, uint32 level
, NEW_BUFFER
*buffer
,
3878 BOOL
make_spoolss_q_enumforms(SPOOL_Q_ENUMFORMS
*q_u
, POLICY_HND
*handle
,
3879 uint32 level
, NEW_BUFFER
*buffer
,
3882 /* The following definitions come from rpc_parse/parse_srv.c */
3884 void init_srv_share_info1_str(SH_INFO_1_STR
*sh1
, const char *net_name
, const char *remark
);
3885 void init_srv_share_info1(SH_INFO_1
*sh1
, const char *net_name
, uint32 type
, const char *remark
);
3886 void init_srv_share_info2_str(SH_INFO_2_STR
*sh2
,
3887 const char *net_name
, const char *remark
,
3888 const char *path
, const char *passwd
);
3889 void init_srv_share_info2(SH_INFO_2
*sh2
,
3890 const char *net_name
, uint32 type
, const char *remark
,
3891 uint32 perms
, uint32 max_uses
, uint32 num_uses
,
3892 const char *path
, const char *passwd
);
3893 void init_srv_share_info501(SH_INFO_501
*sh501
, const char *net_name
, uint32 type
, const char *remark
, uint32 csc_policy
);
3894 void init_srv_share_info501_str(SH_INFO_501_STR
*sh501
, const char *net_name
, const char *remark
);
3895 void init_srv_share_info502(SH_INFO_502
*sh502
,
3896 const char *net_name
, uint32 type
, const char *remark
,
3897 uint32 perms
, uint32 max_uses
, uint32 num_uses
,
3898 const char *path
, const char *passwd
, SEC_DESC
*psd
, size_t sd_size
);
3899 void init_srv_share_info502_str(SH_INFO_502_STR
*sh502str
,
3901 const char *net_name
, const char *remark
,
3902 const char *path
, const char *passwd
, SEC_DESC
*psd
, size_t sd_size
);
3903 void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM
*q_n
,
3904 const char *srv_name
, uint32 info_level
,
3905 uint32 preferred_len
, ENUM_HND
*hnd
);
3906 BOOL
srv_io_q_net_share_enum(const char *desc
, SRV_Q_NET_SHARE_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3907 BOOL
srv_io_r_net_share_enum(const char *desc
, SRV_R_NET_SHARE_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3908 BOOL
srv_io_q_net_share_get_info(const char *desc
, SRV_Q_NET_SHARE_GET_INFO
*q_n
, prs_struct
*ps
, int depth
);
3909 BOOL
srv_io_r_net_share_get_info(const char *desc
, SRV_R_NET_SHARE_GET_INFO
*r_n
, prs_struct
*ps
, int depth
);
3910 BOOL
srv_io_q_net_share_set_info(const char *desc
, SRV_Q_NET_SHARE_SET_INFO
*q_n
, prs_struct
*ps
, int depth
);
3911 BOOL
srv_io_r_net_share_set_info(const char *desc
, SRV_R_NET_SHARE_SET_INFO
*q_n
, prs_struct
*ps
, int depth
);
3912 BOOL
srv_io_q_net_share_add(const char *desc
, SRV_Q_NET_SHARE_ADD
*q_n
, prs_struct
*ps
, int depth
);
3913 BOOL
srv_io_r_net_share_add(const char *desc
, SRV_R_NET_SHARE_ADD
*q_n
, prs_struct
*ps
, int depth
);
3914 BOOL
srv_io_q_net_share_del(const char *desc
, SRV_Q_NET_SHARE_DEL
*q_n
, prs_struct
*ps
, int depth
);
3915 BOOL
srv_io_r_net_share_del(const char *desc
, SRV_R_NET_SHARE_DEL
*q_n
, prs_struct
*ps
, int depth
);
3916 void init_srv_sess_info0_str(SESS_INFO_0_STR
*ss0
, const char *name
);
3917 void init_srv_sess_info0(SESS_INFO_0
*ss0
, const char *name
);
3918 void init_srv_sess_info1_str(SESS_INFO_1_STR
*ss1
, const char *name
, const char *user
);
3919 void init_srv_sess_info1(SESS_INFO_1
*ss1
,
3920 const char *name
, const char *user
,
3921 uint32 num_opens
, uint32 open_time
, uint32 idle_time
,
3923 void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM
*q_n
,
3924 const char *srv_name
, const char *qual_name
,
3925 uint32 sess_level
, SRV_SESS_INFO_CTR
*ctr
,
3926 uint32 preferred_len
,
3928 BOOL
srv_io_q_net_sess_enum(const char *desc
, SRV_Q_NET_SESS_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3929 BOOL
srv_io_r_net_sess_enum(const char *desc
, SRV_R_NET_SESS_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3930 void init_srv_conn_info0(CONN_INFO_0
*ss0
, uint32 id
);
3931 void init_srv_conn_info1_str(CONN_INFO_1_STR
*ss1
, const char *usr_name
, const char *net_name
);
3932 void init_srv_conn_info1(CONN_INFO_1
*ss1
,
3933 uint32 id
, uint32 type
,
3934 uint32 num_opens
, uint32 num_users
, uint32 open_time
,
3935 const char *usr_name
, const char *net_name
);
3936 void init_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM
*q_n
,
3937 const char *srv_name
, const char *qual_name
,
3938 uint32 conn_level
, SRV_CONN_INFO_CTR
*ctr
,
3939 uint32 preferred_len
,
3941 BOOL
srv_io_q_net_conn_enum(const char *desc
, SRV_Q_NET_CONN_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3942 BOOL
srv_io_r_net_conn_enum(const char *desc
, SRV_R_NET_CONN_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3943 void init_srv_file_info3_str(FILE_INFO_3_STR
*fi3
, const char *user_name
, const char *path_name
);
3944 void init_srv_file_info3(FILE_INFO_3
*fl3
,
3945 uint32 id
, uint32 perms
, uint32 num_locks
,
3946 const char *path_name
, const char *user_name
);
3947 void init_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM
*q_n
,
3948 const char *srv_name
, const char *qual_name
,
3949 uint32 file_level
, SRV_FILE_INFO_CTR
*ctr
,
3950 uint32 preferred_len
,
3952 BOOL
srv_io_q_net_file_enum(const char *desc
, SRV_Q_NET_FILE_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3953 BOOL
srv_io_r_net_file_enum(const char *desc
, SRV_R_NET_FILE_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3954 void init_srv_info_100(SRV_INFO_100
*sv100
, uint32 platform_id
, const char *name
);
3955 void init_srv_info_101(SRV_INFO_101
*sv101
, uint32 platform_id
, const char *name
,
3956 uint32 ver_major
, uint32 ver_minor
,
3957 uint32 srv_type
, const char *comment
);
3958 void init_srv_info_102(SRV_INFO_102
*sv102
, uint32 platform_id
, const char *name
,
3959 const char *comment
, uint32 ver_major
, uint32 ver_minor
,
3960 uint32 srv_type
, uint32 users
, uint32 disc
, uint32 hidden
,
3961 uint32 announce
, uint32 ann_delta
, uint32 licenses
,
3962 const char *usr_path
);
3963 void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO
*srv
,
3964 const char *server_name
, uint32 switch_value
);
3965 BOOL
srv_io_q_net_srv_get_info(const char *desc
, SRV_Q_NET_SRV_GET_INFO
*q_n
, prs_struct
*ps
, int depth
);
3966 void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO
*srv
,
3967 uint32 switch_value
, SRV_INFO_CTR
*ctr
, WERROR status
);
3968 void init_srv_r_net_srv_set_info(SRV_R_NET_SRV_SET_INFO
*srv
,
3969 uint32 switch_value
, WERROR status
);
3970 BOOL
srv_io_q_net_srv_set_info(const char *desc
, SRV_Q_NET_SRV_SET_INFO
*q_n
,
3971 prs_struct
*ps
, int depth
);
3972 BOOL
srv_io_r_net_srv_get_info(const char *desc
, SRV_R_NET_SRV_GET_INFO
*r_n
, prs_struct
*ps
, int depth
);
3973 BOOL
srv_io_r_net_srv_set_info(const char *desc
, SRV_R_NET_SRV_SET_INFO
*r_n
,
3974 prs_struct
*ps
, int depth
);
3975 BOOL
srv_io_q_net_remote_tod(const char *desc
, SRV_Q_NET_REMOTE_TOD
*q_n
, prs_struct
*ps
, int depth
);
3976 void init_time_of_day_info(TIME_OF_DAY_INFO
*tod
, uint32 elapsedt
, uint32 msecs
,
3977 uint32 hours
, uint32 mins
, uint32 secs
, uint32 hunds
,
3978 uint32 zone
, uint32 tintervals
, uint32 day
,
3979 uint32 month
, uint32 year
, uint32 weekday
);
3980 BOOL
srv_io_r_net_remote_tod(const char *desc
, SRV_R_NET_REMOTE_TOD
*r_n
, prs_struct
*ps
, int depth
);
3981 BOOL
srv_io_q_net_disk_enum(const char *desc
, SRV_Q_NET_DISK_ENUM
*q_n
, prs_struct
*ps
, int depth
);
3982 BOOL
srv_io_r_net_disk_enum(const char *desc
, SRV_R_NET_DISK_ENUM
*r_n
, prs_struct
*ps
, int depth
);
3983 BOOL
srv_io_q_net_name_validate(const char *desc
, SRV_Q_NET_NAME_VALIDATE
*q_n
, prs_struct
*ps
, int depth
);
3984 BOOL
srv_io_r_net_name_validate(const char *desc
, SRV_R_NET_NAME_VALIDATE
*r_n
, prs_struct
*ps
, int depth
);
3985 BOOL
srv_io_q_net_file_query_secdesc(const char *desc
, SRV_Q_NET_FILE_QUERY_SECDESC
*q_n
, prs_struct
*ps
, int depth
);
3986 BOOL
srv_io_r_net_file_query_secdesc(const char *desc
, SRV_R_NET_FILE_QUERY_SECDESC
*r_n
, prs_struct
*ps
, int depth
);
3987 BOOL
srv_io_q_net_file_set_secdesc(const char *desc
, SRV_Q_NET_FILE_SET_SECDESC
*q_n
, prs_struct
*ps
, int depth
);
3988 BOOL
srv_io_r_net_file_set_secdesc(const char *desc
, SRV_R_NET_FILE_SET_SECDESC
*r_n
, prs_struct
*ps
, int depth
);
3990 /* The following definitions come from rpc_parse/parse_wks.c */
3992 void init_wks_q_query_info(WKS_Q_QUERY_INFO
*q_u
,
3993 const char *server
, uint16 switch_value
) ;
3994 BOOL
wks_io_q_query_info(const char *desc
, WKS_Q_QUERY_INFO
*q_u
, prs_struct
*ps
, int depth
);
3995 void init_wks_info_100(WKS_INFO_100
*inf
,
3996 uint32 platform_id
, uint32 ver_major
, uint32 ver_minor
,
3997 const char *my_name
, const char *domain_name
);
3998 void init_wks_r_query_info(WKS_R_QUERY_INFO
*r_u
,
3999 uint32 switch_value
, WKS_INFO_100
*wks100
,
4001 BOOL
wks_io_r_query_info(const char *desc
, WKS_R_QUERY_INFO
*r_u
, prs_struct
*ps
, int depth
);
4003 /* The following definitions come from rpc_server/srv_dfs.c */
4005 BOOL
api_netdfs_rpc(pipes_struct
*p
);
4007 /* The following definitions come from rpc_server/srv_dfs_nt.c */
4009 uint32
_dfs_exist(pipes_struct
*p
, DFS_Q_DFS_EXIST
*q_u
, DFS_R_DFS_EXIST
*r_u
);
4010 WERROR
_dfs_add(pipes_struct
*p
, DFS_Q_DFS_ADD
* q_u
, DFS_R_DFS_ADD
*r_u
);
4011 WERROR
_dfs_remove(pipes_struct
*p
, DFS_Q_DFS_REMOVE
*q_u
,
4012 DFS_R_DFS_REMOVE
*r_u
);
4013 WERROR
_dfs_enum(pipes_struct
*p
, DFS_Q_DFS_ENUM
*q_u
, DFS_R_DFS_ENUM
*r_u
);
4014 WERROR
_dfs_get_info(pipes_struct
*p
, DFS_Q_DFS_GET_INFO
*q_u
,
4015 DFS_R_DFS_GET_INFO
*r_u
);
4017 /* The following definitions come from rpc_server/srv_lsa.c */
4019 BOOL
api_ntlsa_rpc(pipes_struct
*p
);
4021 /* The following definitions come from rpc_server/srv_lsa_hnd.c */
4023 BOOL
init_pipe_handle_list(pipes_struct
*p
, char *pipe_name
);
4024 BOOL
create_policy_hnd(pipes_struct
*p
, POLICY_HND
*hnd
, void (*free_fn
)(void *), void *data_ptr
);
4025 BOOL
find_policy_by_hnd(pipes_struct
*p
, POLICY_HND
*hnd
, void **data_p
);
4026 BOOL
close_policy_hnd(pipes_struct
*p
, POLICY_HND
*hnd
);
4027 void close_policy_by_pipe(pipes_struct
*p
);
4029 /* The following definitions come from rpc_server/srv_lsa_nt.c */
4031 NTSTATUS
_lsa_open_policy2(pipes_struct
*p
, LSA_Q_OPEN_POL2
*q_u
, LSA_R_OPEN_POL2
*r_u
);
4032 NTSTATUS
_lsa_open_policy(pipes_struct
*p
, LSA_Q_OPEN_POL
*q_u
, LSA_R_OPEN_POL
*r_u
);
4033 NTSTATUS
_lsa_enum_trust_dom(pipes_struct
*p
, LSA_Q_ENUM_TRUST_DOM
*q_u
, LSA_R_ENUM_TRUST_DOM
*r_u
);
4034 NTSTATUS
_lsa_query_info(pipes_struct
*p
, LSA_Q_QUERY_INFO
*q_u
, LSA_R_QUERY_INFO
*r_u
);
4035 NTSTATUS
_lsa_lookup_sids(pipes_struct
*p
, LSA_Q_LOOKUP_SIDS
*q_u
, LSA_R_LOOKUP_SIDS
*r_u
);
4036 NTSTATUS
_lsa_lookup_names(pipes_struct
*p
,LSA_Q_LOOKUP_NAMES
*q_u
, LSA_R_LOOKUP_NAMES
*r_u
);
4037 NTSTATUS
_lsa_close(pipes_struct
*p
, LSA_Q_CLOSE
*q_u
, LSA_R_CLOSE
*r_u
);
4038 NTSTATUS
_lsa_open_secret(pipes_struct
*p
, LSA_Q_OPEN_SECRET
*q_u
, LSA_R_OPEN_SECRET
*r_u
);
4039 NTSTATUS
_lsa_enum_privs(pipes_struct
*p
, LSA_Q_ENUM_PRIVS
*q_u
, LSA_R_ENUM_PRIVS
*r_u
);
4040 NTSTATUS
_lsa_priv_get_dispname(pipes_struct
*p
, LSA_Q_PRIV_GET_DISPNAME
*q_u
, LSA_R_PRIV_GET_DISPNAME
*r_u
);
4041 NTSTATUS
_lsa_unk_get_connuser(pipes_struct
*p
, LSA_Q_UNK_GET_CONNUSER
*q_u
, LSA_R_UNK_GET_CONNUSER
*r_u
);
4042 NTSTATUS
_lsa_open_account(pipes_struct
*p
, LSA_Q_OPENACCOUNT
*q_u
, LSA_R_OPENACCOUNT
*r_u
);
4043 NTSTATUS
_lsa_getsystemaccount(pipes_struct
*p
, LSA_Q_GETSYSTEMACCOUNT
*q_u
, LSA_R_GETSYSTEMACCOUNT
*r_u
);
4045 /* The following definitions come from rpc_server/srv_netlog.c */
4047 BOOL
api_netlog_rpc(pipes_struct
*p
);
4049 /* The following definitions come from rpc_server/srv_netlog_nt.c */
4051 NTSTATUS
_net_logon_ctrl(pipes_struct
*p
, NET_Q_LOGON_CTRL
*q_u
,
4052 NET_R_LOGON_CTRL
*r_u
);
4053 NTSTATUS
_net_logon_ctrl2(pipes_struct
*p
, NET_Q_LOGON_CTRL2
*q_u
, NET_R_LOGON_CTRL2
*r_u
);
4054 NTSTATUS
_net_trust_dom_list(pipes_struct
*p
, NET_Q_TRUST_DOM_LIST
*q_u
, NET_R_TRUST_DOM_LIST
*r_u
);
4055 NTSTATUS
_net_req_chal(pipes_struct
*p
, NET_Q_REQ_CHAL
*q_u
, NET_R_REQ_CHAL
*r_u
);
4056 NTSTATUS
_net_auth(pipes_struct
*p
, NET_Q_AUTH
*q_u
, NET_R_AUTH
*r_u
);
4057 NTSTATUS
_net_auth_2(pipes_struct
*p
, NET_Q_AUTH_2
*q_u
, NET_R_AUTH_2
*r_u
);
4058 NTSTATUS
_net_srv_pwset(pipes_struct
*p
, NET_Q_SRV_PWSET
*q_u
, NET_R_SRV_PWSET
*r_u
);
4059 NTSTATUS
_net_sam_logoff(pipes_struct
*p
, NET_Q_SAM_LOGOFF
*q_u
, NET_R_SAM_LOGOFF
*r_u
);
4060 NTSTATUS
_net_sam_logon(pipes_struct
*p
, NET_Q_SAM_LOGON
*q_u
, NET_R_SAM_LOGON
*r_u
);
4062 /* The following definitions come from rpc_server/srv_pipe.c */
4064 BOOL
create_next_pdu(pipes_struct
*p
);
4065 BOOL
api_pipe_bind_auth_resp(pipes_struct
*p
, prs_struct
*rpc_in_p
);
4066 BOOL
setup_fault_pdu(pipes_struct
*p
, NTSTATUS status
);
4067 BOOL
check_bind_req(char* pipe_name
, RPC_IFACE
* abstract
,
4068 RPC_IFACE
* transfer
);
4069 BOOL
api_pipe_bind_req(pipes_struct
*p
, prs_struct
*rpc_in_p
);
4070 BOOL
api_pipe_auth_process(pipes_struct
*p
, prs_struct
*rpc_in
);
4071 struct current_user
*get_current_user(struct current_user
*user
, pipes_struct
*p
);
4072 BOOL
api_pipe_request(pipes_struct
*p
);
4073 BOOL
api_rpcTNP(pipes_struct
*p
, const char *rpc_name
,
4074 struct api_struct
*api_rpc_cmds
);
4076 /* The following definitions come from rpc_server/srv_pipe_hnd.c */
4078 pipes_struct
*get_first_pipe(void);
4079 pipes_struct
*get_next_pipe(pipes_struct
*p
);
4080 void set_pipe_handle_offset(int max_open_files
);
4081 void reset_chain_p(void);
4082 void init_rpc_pipe_hnd(void);
4083 pipes_struct
*open_rpc_pipe_p(char *pipe_name
,
4084 connection_struct
*conn
, uint16 vuid
);
4085 void free_pipe_context(pipes_struct
*p
);
4086 ssize_t
write_to_pipe(pipes_struct
*p
, char *data
, size_t n
);
4087 ssize_t
read_from_pipe(pipes_struct
*p
, char *data
, size_t n
);
4088 BOOL
wait_rpc_pipe_hnd_state(pipes_struct
*p
, uint16 priority
);
4089 BOOL
set_rpc_pipe_hnd_state(pipes_struct
*p
, uint16 device_state
);
4090 BOOL
close_rpc_pipe_hnd(pipes_struct
*p
, connection_struct
*conn
);
4091 pipes_struct
*get_rpc_pipe_p(char *buf
, int where
);
4092 pipes_struct
*get_rpc_pipe(int pnum
);
4094 /* The following definitions come from rpc_server/srv_reg.c */
4096 BOOL
api_reg_rpc(pipes_struct
*p
);
4098 /* The following definitions come from rpc_server/srv_reg_nt.c */
4100 NTSTATUS
_reg_close(pipes_struct
*p
, REG_Q_CLOSE
*q_u
, REG_R_CLOSE
*r_u
);
4101 NTSTATUS
_reg_open(pipes_struct
*p
, REG_Q_OPEN_HKLM
*q_u
, REG_R_OPEN_HKLM
*r_u
);
4102 NTSTATUS
_reg_open_entry(pipes_struct
*p
, REG_Q_OPEN_ENTRY
*q_u
, REG_R_OPEN_ENTRY
*r_u
);
4103 NTSTATUS
_reg_info(pipes_struct
*p
, REG_Q_INFO
*q_u
, REG_R_INFO
*r_u
);
4105 /* The following definitions come from rpc_server/srv_samr.c */
4107 BOOL
api_samr_rpc(pipes_struct
*p
);
4109 /* The following definitions come from rpc_server/srv_samr_nt.c */
4111 NTSTATUS
_samr_close_hnd(pipes_struct
*p
, SAMR_Q_CLOSE_HND
*q_u
, SAMR_R_CLOSE_HND
*r_u
);
4112 NTSTATUS
_samr_open_domain(pipes_struct
*p
, SAMR_Q_OPEN_DOMAIN
*q_u
, SAMR_R_OPEN_DOMAIN
*r_u
);
4113 NTSTATUS
_samr_get_usrdom_pwinfo(pipes_struct
*p
, SAMR_Q_GET_USRDOM_PWINFO
*q_u
, SAMR_R_GET_USRDOM_PWINFO
*r_u
);
4114 NTSTATUS
_samr_query_sec_obj(pipes_struct
*p
, SAMR_Q_QUERY_SEC_OBJ
*q_u
, SAMR_R_QUERY_SEC_OBJ
*r_u
);
4115 NTSTATUS
_samr_enum_dom_users(pipes_struct
*p
, SAMR_Q_ENUM_DOM_USERS
*q_u
, SAMR_R_ENUM_DOM_USERS
*r_u
);
4116 NTSTATUS
_samr_enum_dom_groups(pipes_struct
*p
, SAMR_Q_ENUM_DOM_GROUPS
*q_u
, SAMR_R_ENUM_DOM_GROUPS
*r_u
);
4117 NTSTATUS
_samr_enum_dom_aliases(pipes_struct
*p
, SAMR_Q_ENUM_DOM_ALIASES
*q_u
, SAMR_R_ENUM_DOM_ALIASES
*r_u
);
4118 NTSTATUS
_samr_query_dispinfo(pipes_struct
*p
, SAMR_Q_QUERY_DISPINFO
*q_u
, SAMR_R_QUERY_DISPINFO
*r_u
);
4119 NTSTATUS
_samr_query_aliasinfo(pipes_struct
*p
, SAMR_Q_QUERY_ALIASINFO
*q_u
, SAMR_R_QUERY_ALIASINFO
*r_u
);
4120 NTSTATUS
_samr_lookup_names(pipes_struct
*p
, SAMR_Q_LOOKUP_NAMES
*q_u
, SAMR_R_LOOKUP_NAMES
*r_u
);
4121 NTSTATUS
_samr_chgpasswd_user(pipes_struct
*p
, SAMR_Q_CHGPASSWD_USER
*q_u
, SAMR_R_CHGPASSWD_USER
*r_u
);
4122 NTSTATUS
_samr_lookup_rids(pipes_struct
*p
, SAMR_Q_LOOKUP_RIDS
*q_u
, SAMR_R_LOOKUP_RIDS
*r_u
);
4123 NTSTATUS
_api_samr_open_user(pipes_struct
*p
, SAMR_Q_OPEN_USER
*q_u
, SAMR_R_OPEN_USER
*r_u
);
4124 NTSTATUS
_samr_query_userinfo(pipes_struct
*p
, SAMR_Q_QUERY_USERINFO
*q_u
, SAMR_R_QUERY_USERINFO
*r_u
);
4125 NTSTATUS
_samr_query_usergroups(pipes_struct
*p
, SAMR_Q_QUERY_USERGROUPS
*q_u
, SAMR_R_QUERY_USERGROUPS
*r_u
);
4126 NTSTATUS
_samr_query_dom_info(pipes_struct
*p
, SAMR_Q_QUERY_DOMAIN_INFO
*q_u
, SAMR_R_QUERY_DOMAIN_INFO
*r_u
);
4127 NTSTATUS
_api_samr_create_user(pipes_struct
*p
, SAMR_Q_CREATE_USER
*q_u
, SAMR_R_CREATE_USER
*r_u
);
4128 NTSTATUS
_samr_connect_anon(pipes_struct
*p
, SAMR_Q_CONNECT_ANON
*q_u
, SAMR_R_CONNECT_ANON
*r_u
);
4129 NTSTATUS
_samr_connect(pipes_struct
*p
, SAMR_Q_CONNECT
*q_u
, SAMR_R_CONNECT
*r_u
);
4130 NTSTATUS
_samr_lookup_domain(pipes_struct
*p
, SAMR_Q_LOOKUP_DOMAIN
*q_u
, SAMR_R_LOOKUP_DOMAIN
*r_u
);
4131 NTSTATUS
_samr_enum_domains(pipes_struct
*p
, SAMR_Q_ENUM_DOMAINS
*q_u
, SAMR_R_ENUM_DOMAINS
*r_u
);
4132 NTSTATUS
_api_samr_open_alias(pipes_struct
*p
, SAMR_Q_OPEN_ALIAS
*q_u
, SAMR_R_OPEN_ALIAS
*r_u
);
4133 NTSTATUS
_samr_set_userinfo(pipes_struct
*p
, SAMR_Q_SET_USERINFO
*q_u
, SAMR_R_SET_USERINFO
*r_u
);
4134 NTSTATUS
_samr_set_userinfo2(pipes_struct
*p
, SAMR_Q_SET_USERINFO2
*q_u
, SAMR_R_SET_USERINFO2
*r_u
);
4135 NTSTATUS
_samr_query_useraliases(pipes_struct
*p
, SAMR_Q_QUERY_USERALIASES
*q_u
, SAMR_R_QUERY_USERALIASES
*r_u
);
4136 NTSTATUS
_samr_query_aliasmem(pipes_struct
*p
, SAMR_Q_QUERY_ALIASMEM
*q_u
, SAMR_R_QUERY_ALIASMEM
*r_u
);
4137 NTSTATUS
_samr_query_groupmem(pipes_struct
*p
, SAMR_Q_QUERY_GROUPMEM
*q_u
, SAMR_R_QUERY_GROUPMEM
*r_u
);
4138 NTSTATUS
_samr_add_aliasmem(pipes_struct
*p
, SAMR_Q_ADD_ALIASMEM
*q_u
, SAMR_R_ADD_ALIASMEM
*r_u
);
4139 NTSTATUS
_samr_del_aliasmem(pipes_struct
*p
, SAMR_Q_DEL_ALIASMEM
*q_u
, SAMR_R_DEL_ALIASMEM
*r_u
);
4140 NTSTATUS
_samr_add_groupmem(pipes_struct
*p
, SAMR_Q_ADD_GROUPMEM
*q_u
, SAMR_R_ADD_GROUPMEM
*r_u
);
4141 NTSTATUS
_samr_del_groupmem(pipes_struct
*p
, SAMR_Q_DEL_GROUPMEM
*q_u
, SAMR_R_DEL_GROUPMEM
*r_u
);
4142 NTSTATUS
_samr_delete_dom_user(pipes_struct
*p
, SAMR_Q_DELETE_DOM_USER
*q_u
, SAMR_R_DELETE_DOM_USER
*r_u
);
4143 NTSTATUS
_samr_delete_dom_group(pipes_struct
*p
, SAMR_Q_DELETE_DOM_GROUP
*q_u
, SAMR_R_DELETE_DOM_GROUP
*r_u
);
4144 NTSTATUS
_samr_delete_dom_alias(pipes_struct
*p
, SAMR_Q_DELETE_DOM_ALIAS
*q_u
, SAMR_R_DELETE_DOM_ALIAS
*r_u
);
4145 NTSTATUS
_samr_create_dom_group(pipes_struct
*p
, SAMR_Q_CREATE_DOM_GROUP
*q_u
, SAMR_R_CREATE_DOM_GROUP
*r_u
);
4146 NTSTATUS
_samr_create_dom_alias(pipes_struct
*p
, SAMR_Q_CREATE_DOM_ALIAS
*q_u
, SAMR_R_CREATE_DOM_ALIAS
*r_u
);
4147 NTSTATUS
_samr_query_groupinfo(pipes_struct
*p
, SAMR_Q_QUERY_GROUPINFO
*q_u
, SAMR_R_QUERY_GROUPINFO
*r_u
);
4148 NTSTATUS
_samr_set_groupinfo(pipes_struct
*p
, SAMR_Q_SET_GROUPINFO
*q_u
, SAMR_R_SET_GROUPINFO
*r_u
);
4149 NTSTATUS
_samr_get_dom_pwinfo(pipes_struct
*p
, SAMR_Q_GET_DOM_PWINFO
*q_u
, SAMR_R_GET_DOM_PWINFO
*r_u
);
4150 NTSTATUS
_samr_open_group(pipes_struct
*p
, SAMR_Q_OPEN_GROUP
*q_u
, SAMR_R_OPEN_GROUP
*r_u
);
4151 NTSTATUS
_samr_unknown_2d(pipes_struct
*p
, SAMR_Q_UNKNOWN_2D
*q_u
, SAMR_R_UNKNOWN_2D
*r_u
);
4153 /* The following definitions come from rpc_server/srv_spoolss.c */
4155 BOOL
api_spoolss_rpc(pipes_struct
*p
);
4157 /* The following definitions come from rpc_server/srv_spoolss_nt.c */
4159 void do_drv_upgrade_printer(int msg_type
, pid_t src
, void *buf
, size_t len
);
4160 WERROR
_spoolss_open_printer(pipes_struct
*p
, SPOOL_Q_OPEN_PRINTER
*q_u
, SPOOL_R_OPEN_PRINTER
*r_u
);
4161 WERROR
_spoolss_open_printer_ex( pipes_struct
*p
, SPOOL_Q_OPEN_PRINTER_EX
*q_u
, SPOOL_R_OPEN_PRINTER_EX
*r_u
);
4162 BOOL
convert_devicemode(const char *printername
, const DEVICEMODE
*devmode
,
4163 NT_DEVICEMODE
**pp_nt_devmode
);
4164 WERROR
_spoolss_closeprinter(pipes_struct
*p
, SPOOL_Q_CLOSEPRINTER
*q_u
, SPOOL_R_CLOSEPRINTER
*r_u
);
4165 WERROR
_spoolss_deleteprinter(pipes_struct
*p
, SPOOL_Q_DELETEPRINTER
*q_u
, SPOOL_R_DELETEPRINTER
*r_u
);
4166 WERROR
_spoolss_deleteprinterdriver(pipes_struct
*p
, SPOOL_Q_DELETEPRINTERDRIVER
*q_u
,
4167 SPOOL_R_DELETEPRINTERDRIVER
*r_u
);
4168 WERROR
_spoolss_getprinterdata(pipes_struct
*p
, SPOOL_Q_GETPRINTERDATA
*q_u
, SPOOL_R_GETPRINTERDATA
*r_u
);
4169 WERROR
_spoolss_rffpcnex(pipes_struct
*p
, SPOOL_Q_RFFPCNEX
*q_u
, SPOOL_R_RFFPCNEX
*r_u
);
4170 void spoolss_notify_server_name(int snum
,
4171 SPOOL_NOTIFY_INFO_DATA
*data
,
4172 print_queue_struct
*queue
,
4173 NT_PRINTER_INFO_LEVEL
*printer
,
4174 TALLOC_CTX
*mem_ctx
) ;
4175 void spoolss_notify_printer_name(int snum
,
4176 SPOOL_NOTIFY_INFO_DATA
*data
,
4177 print_queue_struct
*queue
,
4178 NT_PRINTER_INFO_LEVEL
*printer
,
4179 TALLOC_CTX
*mem_ctx
);
4180 void spoolss_notify_share_name(int snum
,
4181 SPOOL_NOTIFY_INFO_DATA
*data
,
4182 print_queue_struct
*queue
,
4183 NT_PRINTER_INFO_LEVEL
*printer
,
4184 TALLOC_CTX
*mem_ctx
);
4185 void spoolss_notify_port_name(int snum
,
4186 SPOOL_NOTIFY_INFO_DATA
*data
,
4187 print_queue_struct
*queue
,
4188 NT_PRINTER_INFO_LEVEL
*printer
,
4189 TALLOC_CTX
*mem_ctx
);
4190 void spoolss_notify_driver_name(int snum
,
4191 SPOOL_NOTIFY_INFO_DATA
*data
,
4192 print_queue_struct
*queue
,
4193 NT_PRINTER_INFO_LEVEL
*printer
,
4194 TALLOC_CTX
*mem_ctx
);
4195 void spoolss_notify_comment(int snum
,
4196 SPOOL_NOTIFY_INFO_DATA
*data
,
4197 print_queue_struct
*queue
,
4198 NT_PRINTER_INFO_LEVEL
*printer
,
4199 TALLOC_CTX
*mem_ctx
);
4200 void spoolss_notify_location(int snum
,
4201 SPOOL_NOTIFY_INFO_DATA
*data
,
4202 print_queue_struct
*queue
,
4203 NT_PRINTER_INFO_LEVEL
*printer
,
4204 TALLOC_CTX
*mem_ctx
);
4205 void spoolss_notify_sepfile(int snum
,
4206 SPOOL_NOTIFY_INFO_DATA
*data
,
4207 print_queue_struct
*queue
,
4208 NT_PRINTER_INFO_LEVEL
*printer
,
4209 TALLOC_CTX
*mem_ctx
);
4210 void spoolss_notify_print_processor(int snum
,
4211 SPOOL_NOTIFY_INFO_DATA
*data
,
4212 print_queue_struct
*queue
,
4213 NT_PRINTER_INFO_LEVEL
*printer
,
4214 TALLOC_CTX
*mem_ctx
);
4215 void spoolss_notify_parameters(int snum
,
4216 SPOOL_NOTIFY_INFO_DATA
*data
,
4217 print_queue_struct
*queue
,
4218 NT_PRINTER_INFO_LEVEL
*printer
,
4219 TALLOC_CTX
*mem_ctx
);
4220 void spoolss_notify_datatype(int snum
,
4221 SPOOL_NOTIFY_INFO_DATA
*data
,
4222 print_queue_struct
*queue
,
4223 NT_PRINTER_INFO_LEVEL
*printer
,
4224 TALLOC_CTX
*mem_ctx
);
4225 void spoolss_notify_attributes(int snum
,
4226 SPOOL_NOTIFY_INFO_DATA
*data
,
4227 print_queue_struct
*queue
,
4228 NT_PRINTER_INFO_LEVEL
*printer
,
4229 TALLOC_CTX
*mem_ctx
);
4230 void spoolss_notify_cjobs(int snum
,
4231 SPOOL_NOTIFY_INFO_DATA
*data
,
4232 print_queue_struct
*queue
,
4233 NT_PRINTER_INFO_LEVEL
*printer
,
4234 TALLOC_CTX
*mem_ctx
);
4235 void construct_info_data(SPOOL_NOTIFY_INFO_DATA
*info_data
, uint16 type
, uint16 field
, int id
);
4236 WERROR
_spoolss_rfnpcnex( pipes_struct
*p
, SPOOL_Q_RFNPCNEX
*q_u
, SPOOL_R_RFNPCNEX
*r_u
);
4237 WERROR
_spoolss_enumprinters( pipes_struct
*p
, SPOOL_Q_ENUMPRINTERS
*q_u
, SPOOL_R_ENUMPRINTERS
*r_u
);
4238 WERROR
_spoolss_getprinter(pipes_struct
*p
, SPOOL_Q_GETPRINTER
*q_u
, SPOOL_R_GETPRINTER
*r_u
);
4239 WERROR
_spoolss_getprinterdriver2(pipes_struct
*p
, SPOOL_Q_GETPRINTERDRIVER2
*q_u
, SPOOL_R_GETPRINTERDRIVER2
*r_u
);
4240 WERROR
_spoolss_startpageprinter(pipes_struct
*p
, SPOOL_Q_STARTPAGEPRINTER
*q_u
, SPOOL_R_STARTPAGEPRINTER
*r_u
);
4241 WERROR
_spoolss_endpageprinter(pipes_struct
*p
, SPOOL_Q_ENDPAGEPRINTER
*q_u
, SPOOL_R_ENDPAGEPRINTER
*r_u
);
4242 WERROR
_spoolss_startdocprinter(pipes_struct
*p
, SPOOL_Q_STARTDOCPRINTER
*q_u
, SPOOL_R_STARTDOCPRINTER
*r_u
);
4243 WERROR
_spoolss_enddocprinter(pipes_struct
*p
, SPOOL_Q_ENDDOCPRINTER
*q_u
, SPOOL_R_ENDDOCPRINTER
*r_u
);
4244 WERROR
_spoolss_writeprinter(pipes_struct
*p
, SPOOL_Q_WRITEPRINTER
*q_u
, SPOOL_R_WRITEPRINTER
*r_u
);
4245 WERROR
_spoolss_abortprinter(pipes_struct
*p
, SPOOL_Q_ABORTPRINTER
*q_u
, SPOOL_R_ABORTPRINTER
*r_u
);
4246 WERROR
_spoolss_setprinter(pipes_struct
*p
, SPOOL_Q_SETPRINTER
*q_u
, SPOOL_R_SETPRINTER
*r_u
);
4247 WERROR
_spoolss_fcpn(pipes_struct
*p
, SPOOL_Q_FCPN
*q_u
, SPOOL_R_FCPN
*r_u
);
4248 WERROR
_spoolss_addjob(pipes_struct
*p
, SPOOL_Q_ADDJOB
*q_u
, SPOOL_R_ADDJOB
*r_u
);
4249 WERROR
_spoolss_enumjobs( pipes_struct
*p
, SPOOL_Q_ENUMJOBS
*q_u
, SPOOL_R_ENUMJOBS
*r_u
);
4250 WERROR
_spoolss_schedulejob( pipes_struct
*p
, SPOOL_Q_SCHEDULEJOB
*q_u
, SPOOL_R_SCHEDULEJOB
*r_u
);
4251 WERROR
_spoolss_setjob(pipes_struct
*p
, SPOOL_Q_SETJOB
*q_u
, SPOOL_R_SETJOB
*r_u
);
4252 WERROR
_spoolss_enumprinterdrivers( pipes_struct
*p
, SPOOL_Q_ENUMPRINTERDRIVERS
*q_u
, SPOOL_R_ENUMPRINTERDRIVERS
*r_u
);
4253 WERROR
_spoolss_enumforms(pipes_struct
*p
, SPOOL_Q_ENUMFORMS
*q_u
, SPOOL_R_ENUMFORMS
*r_u
);
4254 WERROR
_spoolss_getform(pipes_struct
*p
, SPOOL_Q_GETFORM
*q_u
, SPOOL_R_GETFORM
*r_u
);
4255 WERROR
_spoolss_enumports( pipes_struct
*p
, SPOOL_Q_ENUMPORTS
*q_u
, SPOOL_R_ENUMPORTS
*r_u
);
4256 WERROR
_spoolss_addprinterex( pipes_struct
*p
, SPOOL_Q_ADDPRINTEREX
*q_u
, SPOOL_R_ADDPRINTEREX
*r_u
);
4257 WERROR
_spoolss_addprinterdriver(pipes_struct
*p
, SPOOL_Q_ADDPRINTERDRIVER
*q_u
, SPOOL_R_ADDPRINTERDRIVER
*r_u
);
4258 WERROR
_spoolss_getprinterdriverdirectory(pipes_struct
*p
, SPOOL_Q_GETPRINTERDRIVERDIR
*q_u
, SPOOL_R_GETPRINTERDRIVERDIR
*r_u
);
4259 WERROR
_spoolss_enumprinterdata(pipes_struct
*p
, SPOOL_Q_ENUMPRINTERDATA
*q_u
, SPOOL_R_ENUMPRINTERDATA
*r_u
);
4260 WERROR
_spoolss_setprinterdata( pipes_struct
*p
, SPOOL_Q_SETPRINTERDATA
*q_u
, SPOOL_R_SETPRINTERDATA
*r_u
);
4261 WERROR
_spoolss_resetprinter(pipes_struct
*p
, SPOOL_Q_RESETPRINTER
*q_u
, SPOOL_R_RESETPRINTER
*r_u
);
4262 WERROR
_spoolss_deleteprinterdata(pipes_struct
*p
, SPOOL_Q_DELETEPRINTERDATA
*q_u
, SPOOL_R_DELETEPRINTERDATA
*r_u
);
4263 WERROR
_spoolss_addform( pipes_struct
*p
, SPOOL_Q_ADDFORM
*q_u
, SPOOL_R_ADDFORM
*r_u
);
4264 WERROR
_spoolss_deleteform( pipes_struct
*p
, SPOOL_Q_DELETEFORM
*q_u
, SPOOL_R_DELETEFORM
*r_u
);
4265 WERROR
_spoolss_setform(pipes_struct
*p
, SPOOL_Q_SETFORM
*q_u
, SPOOL_R_SETFORM
*r_u
);
4266 WERROR
_spoolss_enumprintprocessors(pipes_struct
*p
, SPOOL_Q_ENUMPRINTPROCESSORS
*q_u
, SPOOL_R_ENUMPRINTPROCESSORS
*r_u
);
4267 WERROR
_spoolss_enumprintprocdatatypes(pipes_struct
*p
, SPOOL_Q_ENUMPRINTPROCDATATYPES
*q_u
, SPOOL_R_ENUMPRINTPROCDATATYPES
*r_u
);
4268 WERROR
_spoolss_enumprintmonitors(pipes_struct
*p
, SPOOL_Q_ENUMPRINTMONITORS
*q_u
, SPOOL_R_ENUMPRINTMONITORS
*r_u
);
4269 WERROR
_spoolss_getjob( pipes_struct
*p
, SPOOL_Q_GETJOB
*q_u
, SPOOL_R_GETJOB
*r_u
);
4270 WERROR
_spoolss_getprinterdataex(pipes_struct
*p
, SPOOL_Q_GETPRINTERDATAEX
*q_u
, SPOOL_R_GETPRINTERDATAEX
*r_u
);
4271 WERROR
_spoolss_setprinterdataex(pipes_struct
*p
, SPOOL_Q_SETPRINTERDATAEX
*q_u
, SPOOL_R_SETPRINTERDATAEX
*r_u
);
4272 WERROR
_spoolss_enumprinterkey(pipes_struct
*p
, SPOOL_Q_ENUMPRINTERKEY
*q_u
, SPOOL_R_ENUMPRINTERKEY
*r_u
);
4273 WERROR
_spoolss_enumprinterdataex(pipes_struct
*p
, SPOOL_Q_ENUMPRINTERDATAEX
*q_u
, SPOOL_R_ENUMPRINTERDATAEX
*r_u
);
4274 WERROR
_spoolss_getprintprocessordirectory(pipes_struct
*p
, SPOOL_Q_GETPRINTPROCESSORDIRECTORY
*q_u
, SPOOL_R_GETPRINTPROCESSORDIRECTORY
*r_u
);
4276 /* The following definitions come from rpc_server/srv_srvsvc.c */
4278 BOOL
api_srvsvc_rpc(pipes_struct
*p
);
4280 /* The following definitions come from rpc_server/srv_srvsvc_nt.c */
4282 BOOL
share_info_db_init(void);
4283 void map_generic_share_sd_bits(SEC_DESC
*psd
);
4284 BOOL
share_access_check(connection_struct
*conn
, int snum
, uint16 vuid
, uint32 desired_access
);
4285 WERROR
_srv_net_srv_get_info(pipes_struct
*p
, SRV_Q_NET_SRV_GET_INFO
*q_u
, SRV_R_NET_SRV_GET_INFO
*r_u
);
4286 WERROR
_srv_net_srv_set_info(pipes_struct
*p
, SRV_Q_NET_SRV_SET_INFO
*q_u
, SRV_R_NET_SRV_SET_INFO
*r_u
);
4287 WERROR
_srv_net_file_enum(pipes_struct
*p
, SRV_Q_NET_FILE_ENUM
*q_u
, SRV_R_NET_FILE_ENUM
*r_u
);
4288 WERROR
_srv_net_conn_enum(pipes_struct
*p
, SRV_Q_NET_CONN_ENUM
*q_u
, SRV_R_NET_CONN_ENUM
*r_u
);
4289 WERROR
_srv_net_sess_enum(pipes_struct
*p
, SRV_Q_NET_SESS_ENUM
*q_u
, SRV_R_NET_SESS_ENUM
*r_u
);
4290 WERROR
_srv_net_share_enum_all(pipes_struct
*p
, SRV_Q_NET_SHARE_ENUM
*q_u
, SRV_R_NET_SHARE_ENUM
*r_u
);
4291 WERROR
_srv_net_share_enum(pipes_struct
*p
, SRV_Q_NET_SHARE_ENUM
*q_u
, SRV_R_NET_SHARE_ENUM
*r_u
);
4292 WERROR
_srv_net_share_get_info(pipes_struct
*p
, SRV_Q_NET_SHARE_GET_INFO
*q_u
, SRV_R_NET_SHARE_GET_INFO
*r_u
);
4293 WERROR
_srv_net_share_set_info(pipes_struct
*p
, SRV_Q_NET_SHARE_SET_INFO
*q_u
, SRV_R_NET_SHARE_SET_INFO
*r_u
);
4294 WERROR
_srv_net_share_add(pipes_struct
*p
, SRV_Q_NET_SHARE_ADD
*q_u
, SRV_R_NET_SHARE_ADD
*r_u
);
4295 WERROR
_srv_net_share_del(pipes_struct
*p
, SRV_Q_NET_SHARE_DEL
*q_u
, SRV_R_NET_SHARE_DEL
*r_u
);
4296 WERROR
_srv_net_remote_tod(pipes_struct
*p
, SRV_Q_NET_REMOTE_TOD
*q_u
, SRV_R_NET_REMOTE_TOD
*r_u
);
4297 WERROR
_srv_net_file_query_secdesc(pipes_struct
*p
, SRV_Q_NET_FILE_QUERY_SECDESC
*q_u
,
4298 SRV_R_NET_FILE_QUERY_SECDESC
*r_u
);
4299 WERROR
_srv_net_file_set_secdesc(pipes_struct
*p
, SRV_Q_NET_FILE_SET_SECDESC
*q_u
,
4300 SRV_R_NET_FILE_SET_SECDESC
*r_u
);
4301 WERROR
_srv_net_disk_enum(pipes_struct
*p
, SRV_Q_NET_DISK_ENUM
*q_u
, SRV_R_NET_DISK_ENUM
*r_u
);
4302 WERROR
_srv_net_name_validate(pipes_struct
*p
, SRV_Q_NET_NAME_VALIDATE
*q_u
, SRV_R_NET_NAME_VALIDATE
*r_u
);
4304 /* The following definitions come from rpc_server/srv_util.c */
4306 int make_dom_gids(TALLOC_CTX
*ctx
, char *gids_str
, DOM_GID
**ppgids
);
4307 void get_domain_user_groups(char *domain_groups
, char *user
);
4308 NTSTATUS
local_lookup_group_name(uint32 rid
, char *group_name
, uint32
*type
);
4309 NTSTATUS
local_lookup_alias_name(uint32 rid
, char *alias_name
, uint32
*type
);
4310 NTSTATUS
local_lookup_user_name(uint32 rid
, char *user_name
, uint32
*type
);
4311 NTSTATUS
local_lookup_group_rid(char *group_name
, uint32
*rid
);
4312 NTSTATUS
local_lookup_alias_rid(char *alias_name
, uint32
*rid
);
4313 NTSTATUS
local_lookup_user_rid(char *user_name
, uint32
*rid
);
4315 /* The following definitions come from rpc_server/srv_wkssvc.c */
4317 BOOL
api_wkssvc_rpc(pipes_struct
*p
);
4319 /* The following definitions come from rpc_server/srv_wkssvc_nt.c */
4321 NTSTATUS
_wks_query_info(pipes_struct
*p
, WKS_Q_QUERY_INFO
*q_u
, WKS_R_QUERY_INFO
*r_u
);
4323 /* The following definitions come from smbd/blocking.c */
4325 BOOL
push_blocking_lock_request( char *inbuf
, int length
, int lock_timeout
,
4326 int lock_num
, uint16 lock_pid
, SMB_BIG_UINT offset
, SMB_BIG_UINT count
);
4327 void remove_pending_lock_requests_by_fid(files_struct
*fsp
);
4328 void remove_pending_lock_requests_by_mid(int mid
);
4329 unsigned blocking_locks_timeout(unsigned default_timeout
);
4330 void process_blocking_lock_queue(time_t t
);
4332 /* The following definitions come from smbd/chgpasswd.c */
4334 BOOL
chgpasswd(char *name
, const char *oldpass
, const char *newpass
, BOOL as_root
);
4335 BOOL
chgpasswd(char *name
, const char *oldpass
, const char *newpass
, BOOL as_root
);
4336 BOOL
check_lanman_password(char *user
, uchar
* pass1
,
4337 uchar
* pass2
, SAM_ACCOUNT
**hnd
);
4338 BOOL
change_lanman_password(SAM_ACCOUNT
*sampass
, uchar
* pass1
,
4340 BOOL
pass_oem_change(char *user
,
4341 uchar
* lmdata
, uchar
* lmhash
,
4342 uchar
* ntdata
, uchar
* nthash
);
4343 BOOL
check_oem_password(char *user
,
4344 uchar
* lmdata
, uchar
* lmhash
,
4345 uchar
* ntdata
, uchar
* nthash
,
4346 SAM_ACCOUNT
**hnd
, char *new_passwd
,
4347 int new_passwd_size
);
4348 BOOL
change_oem_password(SAM_ACCOUNT
*hnd
, char *new_passwd
,
4350 BOOL
check_plaintext_password(char *user
, char *old_passwd
,
4351 int old_passwd_size
, SAM_ACCOUNT
**hnd
);
4353 /* The following definitions come from smbd/close.c */
4355 int close_file(files_struct
*fsp
, BOOL normal_close
);
4357 /* The following definitions come from smbd/conn.c */
4359 void conn_init(void);
4360 int conn_num_open(void);
4361 BOOL
conn_snum_used(int snum
);
4362 connection_struct
*conn_find(int cnum
);
4363 connection_struct
*conn_new(void);
4364 void conn_close_all(void);
4365 BOOL
conn_idle_all(time_t t
, int deadtime
);
4366 void conn_free(connection_struct
*conn
);
4367 void msg_force_tdis(int msg_type
, pid_t pid
, void *buf
, size_t len
);
4369 /* The following definitions come from smbd/connection.c */
4371 TDB_CONTEXT
*conn_tdb_ctx(void);
4372 BOOL
yield_connection(connection_struct
*conn
,const char *name
);
4373 BOOL
claim_connection(connection_struct
*conn
,const char *name
,int max_connections
,BOOL Clear
);
4375 /* The following definitions come from smbd/dfree.c */
4377 SMB_BIG_UINT
sys_disk_free(const char *path
, BOOL small_query
,
4378 SMB_BIG_UINT
*bsize
,SMB_BIG_UINT
*dfree
,SMB_BIG_UINT
*dsize
);
4380 /* The following definitions come from smbd/dir.c */
4382 void init_dptrs(void);
4383 char *dptr_path(int key
);
4384 char *dptr_wcard(int key
);
4385 BOOL
dptr_set_wcard(int key
, char *wcard
);
4386 BOOL
dptr_set_attr(int key
, uint16 attr
);
4387 uint16
dptr_attr(int key
);
4388 void dptr_close(int *key
);
4389 void dptr_closecnum(connection_struct
*conn
);
4390 void dptr_idlecnum(connection_struct
*conn
);
4391 void dptr_closepath(char *path
,uint16 spid
);
4392 int dptr_create(connection_struct
*conn
,char *path
, BOOL old_handle
, BOOL expect_close
,uint16 spid
);
4393 BOOL
dptr_fill(char *buf1
,unsigned int key
);
4394 void *dptr_fetch(char *buf
,int *num
);
4395 void *dptr_fetch_lanman2(int dptr_num
);
4396 BOOL
dir_check_ftype(connection_struct
*conn
,int mode
,SMB_STRUCT_STAT
*st
,int dirtype
);
4397 BOOL
get_dir_entry(connection_struct
*conn
,char *mask
,int dirtype
,char *fname
,
4398 SMB_OFF_T
*size
,int *mode
,time_t *date
,BOOL check_descend
);
4399 void *OpenDir(connection_struct
*conn
, const char *name
, BOOL use_veto
);
4400 void CloseDir(void *p
);
4401 char *ReadDirName(void *p
);
4402 BOOL
SeekDir(void *p
,int pos
);
4403 int TellDir(void *p
);
4404 void DirCacheAdd( const char *path
, const char *name
, const char *dname
, int snum
);
4405 char *DirCacheCheck( const char *path
, const char *name
, int snum
);
4406 void DirCacheFlush(int snum
);
4408 /* The following definitions come from smbd/dosmode.c */
4410 mode_t
unix_mode(connection_struct
*conn
,int dosmode
,const char *fname
);
4411 int dos_mode(connection_struct
*conn
,char *path
,SMB_STRUCT_STAT
*sbuf
);
4412 int file_chmod(connection_struct
*conn
,char *fname
,int dosmode
,SMB_STRUCT_STAT
*st
);
4413 int file_utime(connection_struct
*conn
, char *fname
, struct utimbuf
*times
);
4414 BOOL
set_filetime(connection_struct
*conn
, char *fname
, time_t mtime
);
4416 /* The following definitions come from smbd/error.c */
4418 int cached_error_packet(char *outbuf
,files_struct
*fsp
,int line
,const char *file
);
4419 int unix_error_packet(char *outbuf
,int def_class
,uint32 def_code
,
4420 int line
, const char *file
);
4421 int error_packet(char *outbuf
,NTSTATUS ntstatus
,
4422 uint8 eclass
,uint32 ecode
,int line
, const char *file
);
4424 /* The following definitions come from smbd/fileio.c */
4426 SMB_OFF_T
seek_file(files_struct
*fsp
,SMB_OFF_T pos
);
4427 BOOL
read_from_write_cache(files_struct
*fsp
,char *data
,SMB_OFF_T pos
,size_t n
);
4428 ssize_t
read_file(files_struct
*fsp
,char *data
,SMB_OFF_T pos
,size_t n
);
4429 ssize_t
write_file(files_struct
*fsp
, char *data
, SMB_OFF_T pos
, size_t n
);
4430 void delete_write_cache(files_struct
*fsp
);
4431 void set_filelen_write_cache(files_struct
*fsp
, SMB_OFF_T file_size
);
4432 ssize_t
flush_write_cache(files_struct
*fsp
, enum flush_reason_enum reason
);
4433 void sync_file(connection_struct
*conn
, files_struct
*fsp
);
4434 int fsp_stat(files_struct
*fsp
, SMB_STRUCT_STAT
*pst
);
4436 /* The following definitions come from smbd/filename.c */
4438 BOOL
unix_convert(char *name
,connection_struct
*conn
,char *saved_last_component
,
4439 BOOL
*bad_path
, SMB_STRUCT_STAT
*pst
);
4440 BOOL
check_name(char *name
,connection_struct
*conn
);
4442 /* The following definitions come from smbd/files.c */
4444 files_struct
*file_new(connection_struct
*conn
);
4445 void file_close_conn(connection_struct
*conn
);
4446 void file_init(void);
4447 void file_close_user(int vuid
);
4448 files_struct
*file_find_fd(int fd
);
4449 files_struct
*file_find_dif(SMB_DEV_T dev
, SMB_INO_T inode
, unsigned long file_id
);
4450 files_struct
*file_find_fsp(files_struct
*orig_fsp
);
4451 files_struct
*file_find_di_first(SMB_DEV_T dev
, SMB_INO_T inode
);
4452 files_struct
*file_find_di_next(files_struct
*start_fsp
);
4453 files_struct
*file_find_print(void);
4454 void file_sync_all(connection_struct
*conn
);
4455 void file_free(files_struct
*fsp
);
4456 files_struct
*file_fsp(char *buf
, int where
);
4457 void file_chain_reset(void);
4458 void file_chain_save(void);
4459 void file_chain_restore(void);
4461 /* The following definitions come from smbd/ipc.c */
4463 void send_trans_reply(char *outbuf
,
4464 char *rparam
, int rparam_len
,
4465 char *rdata
, int rdata_len
,
4466 BOOL buffer_too_large
);
4467 int reply_trans(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int bufsize
);
4469 /* The following definitions come from smbd/lanman.c */
4471 int api_reply(connection_struct
*conn
,uint16 vuid
,char *outbuf
,char *data
,char *params
,
4472 int tdscnt
,int tpscnt
,int mdrcnt
,int mprcnt
);
4474 /* The following definitions come from smbd/mangle.c */
4476 void mangle_reset_cache(void);
4477 BOOL
mangle_is_mangled(const char *s
);
4478 BOOL
mangle_is_8_3(const char *fname
, BOOL check_case
);
4479 BOOL
mangle_is_8_3_wildcards(const char *fname
, BOOL check_case
);
4480 BOOL
mangle_check_cache(char *s
);
4481 void mangle_map(char *OutName
, BOOL need83
, BOOL cache83
, int snum
);
4483 /* The following definitions come from smbd/mangle_hash2.c */
4485 struct mangle_fns
*mangle_hash2_init(void);
4487 /* The following definitions come from smbd/mangle_hash.c */
4489 struct mangle_fns
*mangle_hash_init(void);
4491 /* The following definitions come from smbd/mangle_map.c */
4493 void mangle_map_filename(char *fname
, int snum
);
4495 /* The following definitions come from smbd/message.c */
4497 int reply_sends(connection_struct
*conn
,
4498 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4499 int reply_sendstrt(connection_struct
*conn
,
4500 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4501 int reply_sendtxt(connection_struct
*conn
,
4502 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4503 int reply_sendend(connection_struct
*conn
,
4504 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4506 /* The following definitions come from smbd/negprot.c */
4508 int reply_negprot(connection_struct
*conn
,
4509 char *inbuf
,char *outbuf
, int dum_size
,
4512 /* The following definitions come from smbd/noquotas.c */
4514 BOOL
disk_quotas(const char *path
,SMB_BIG_UINT
*bsize
,SMB_BIG_UINT
*dfree
,SMB_BIG_UINT
*dsize
);
4516 /* The following definitions come from smbd/notify.c */
4518 void remove_pending_change_notify_requests_by_fid(files_struct
*fsp
);
4519 void remove_pending_change_notify_requests_by_mid(int mid
);
4520 void remove_pending_change_notify_requests_by_filename(files_struct
*fsp
);
4521 int change_notify_timeout(void);
4522 BOOL
process_pending_change_notify_queue(time_t t
);
4523 BOOL
change_notify_set(char *inbuf
, files_struct
*fsp
, connection_struct
*conn
, uint32 flags
);
4524 BOOL
init_change_notify(void);
4526 /* The following definitions come from smbd/notify_hash.c */
4528 struct cnotify_fns
*hash_notify_init(void) ;
4530 /* The following definitions come from smbd/notify_kernel.c */
4532 struct cnotify_fns
*kernel_notify_init(void) ;
4534 /* The following definitions come from smbd/nttrans.c */
4536 int reply_ntcreate_and_X(connection_struct
*conn
,
4537 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4538 int reply_ntcancel(connection_struct
*conn
,
4539 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4540 int reply_nttranss(connection_struct
*conn
,
4541 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4542 int reply_nttrans(connection_struct
*conn
,
4543 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4545 /* The following definitions come from smbd/open.c */
4547 int fd_close(struct connection_struct
*conn
, files_struct
*fsp
);
4548 files_struct
*open_file_shared(connection_struct
*conn
,char *fname
, SMB_STRUCT_STAT
*psbuf
,
4549 int share_mode
,int ofun
, mode_t mode
,int oplock_request
, int *Access
,int *action
);
4550 files_struct
*open_file_shared1(connection_struct
*conn
,char *fname
, SMB_STRUCT_STAT
*psbuf
,
4551 uint32 desired_access
,
4552 int share_mode
,int ofun
, mode_t mode
,int oplock_request
,
4553 int *Access
,int *action
);
4554 files_struct
*open_file_fchmod(connection_struct
*conn
, const char *fname
, SMB_STRUCT_STAT
*psbuf
);
4555 int close_file_fchmod(files_struct
*fsp
);
4556 files_struct
*open_directory(connection_struct
*conn
, char *fname
, SMB_STRUCT_STAT
*psbuf
,
4557 uint32 desired_access
, int share_mode
, int smb_ofun
, mode_t unixmode
, int *action
);
4558 files_struct
*open_file_stat(connection_struct
*conn
, char *fname
, SMB_STRUCT_STAT
*psbuf
);
4560 /* The following definitions come from smbd/oplock.c */
4562 int32
get_number_of_exclusive_open_oplocks(void);
4563 BOOL
oplock_message_waiting(fd_set
*fds
);
4564 BOOL
receive_local_message( char *buffer
, int buffer_len
, int timeout
);
4565 BOOL
set_file_oplock(files_struct
*fsp
, int oplock_type
);
4566 void release_file_oplock(files_struct
*fsp
);
4567 BOOL
remove_oplock(files_struct
*fsp
, BOOL break_to_none
);
4568 int setup_oplock_select_set( fd_set
*fds
);
4569 BOOL
process_local_message(char *buffer
, int buf_size
);
4570 BOOL
oplock_break_level2(files_struct
*fsp
, BOOL local_request
, int token
);
4571 BOOL
request_oplock_break(share_mode_entry
*share_entry
, BOOL async
);
4572 BOOL
attempt_close_oplocked_file(files_struct
*fsp
);
4573 void release_level_2_oplocks_on_change(files_struct
*fsp
);
4574 BOOL
init_oplocks(void);
4576 /* The following definitions come from smbd/oplock_irix.c */
4578 struct kernel_oplocks
*irix_init_kernel_oplocks(void) ;
4580 /* The following definitions come from smbd/oplock_linux.c */
4582 struct kernel_oplocks
*linux_init_kernel_oplocks(void) ;
4584 /* The following definitions come from smbd/password.c */
4586 void generate_next_challenge(char *challenge
);
4587 BOOL
set_challenge(unsigned char *challenge
);
4588 user_struct
*get_valid_user_struct(uint16 vuid
);
4589 void invalidate_vuid(uint16 vuid
);
4590 void invalidate_all_vuids(void);
4591 char *validated_username(uint16 vuid
);
4592 char *validated_domain(uint16 vuid
);
4593 NT_USER_TOKEN
*create_nt_token(uid_t uid
, gid_t gid
, int ngroups
, gid_t
*groups
, BOOL is_guest
, NT_USER_TOKEN
*sup_tok
);
4594 int register_vuid(uid_t uid
,gid_t gid
, char *unix_name
, char *requested_name
,
4595 char *domain
,BOOL guest
, NT_USER_TOKEN
**pptok
);
4596 void add_session_user(char *user
);
4597 BOOL
smb_password_check(char *password
, unsigned char *part_passwd
, unsigned char *c8
);
4598 BOOL
smb_password_ok(SAM_ACCOUNT
*sampass
, uchar chal
[8],
4599 uchar lm_pass
[24], uchar nt_pass
[24]);
4600 BOOL
pass_check_smb(char *user
, char *domain
, uchar
*chal
,
4601 uchar
*lm_pwd
, uchar
*nt_pwd
, struct passwd
*pwd
);
4602 BOOL
password_ok(char *user
, char *password
, int pwlen
, struct passwd
*pwd
);
4603 BOOL
user_ok(char *user
,int snum
);
4604 BOOL
authorise_login(int snum
,char *user
,char *password
, int pwlen
,
4605 BOOL
*guest
,BOOL
*force
,uint16 vuid
);
4606 BOOL
check_hosts_equiv(char *user
);
4607 struct cli_state
*server_client(void);
4608 struct cli_state
*server_cryptkey(void);
4609 BOOL
server_validate(char *user
, char *domain
,
4610 char *pass
, int passlen
,
4611 char *ntpass
, int ntpasslen
);
4612 BOOL
domain_client_validate( char *user
, char *domain
,
4613 char *smb_apasswd
, int smb_apasslen
,
4614 char *smb_ntpasswd
, int smb_ntpasslen
,
4615 BOOL
*user_exists
, NT_USER_TOKEN
**pptoken
);
4617 /* The following definitions come from smbd/pipes.c */
4619 int reply_open_pipe_and_X(connection_struct
*conn
,
4620 char *inbuf
,char *outbuf
,int length
,int bufsize
);
4621 int reply_pipe_write(char *inbuf
,char *outbuf
,int length
,int dum_bufsize
);
4622 int reply_pipe_write_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
4623 int reply_pipe_read_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
4624 int reply_pipe_close(connection_struct
*conn
, char *inbuf
,char *outbuf
);
4626 /* The following definitions come from smbd/posix_acls.c */
4628 SMB_ACL_T
free_empty_sys_acl(connection_struct
*conn
, SMB_ACL_T acl
);
4629 size_t get_nt_acl(files_struct
*fsp
, SEC_DESC
**ppdesc
);
4630 BOOL
set_nt_acl(files_struct
*fsp
, uint32 security_info_sent
, SEC_DESC
*psd
);
4631 int chmod_acl(connection_struct
*conn
, const char *name
, mode_t mode
);
4632 int inherit_access_acl(connection_struct
*conn
, const char *name
, mode_t mode
);
4633 int fchmod_acl(files_struct
*fsp
, int fd
, mode_t mode
);
4634 BOOL
directory_has_default_acl(connection_struct
*conn
, const char *fname
);
4636 /* The following definitions come from smbd/process.c */
4638 BOOL
push_oplock_pending_smb_message(char *buf
, int msg_len
);
4639 BOOL
receive_next_smb(char *inbuf
, int bufsize
, int timeout
);
4640 void respond_to_all_remaining_local_messages(void);
4641 void process_smb(char *inbuf
, char *outbuf
);
4642 const char *smb_fn_name(int type
);
4643 void construct_reply_common(char *inbuf
,char *outbuf
);
4644 int chain_reply(char *inbuf
,char *outbuf
,int size
,int bufsize
);
4645 void check_reload(int t
);
4646 void smbd_process(void);
4648 /* The following definitions come from smbd/reply.c */
4650 int reply_special(char *inbuf
,char *outbuf
);
4651 int reply_tcon(connection_struct
*conn
,
4652 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4653 int reply_tcon_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4654 int reply_unknown(char *inbuf
,char *outbuf
);
4655 int reply_ioctl(connection_struct
*conn
,
4656 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4657 int smb_create_user(char *unix_user
, char *homedir
);
4658 int reply_sesssetup_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4659 int reply_chkpth(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4660 int reply_getatr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4661 int reply_setatr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4662 int reply_dskattr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4663 int reply_search(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4664 int reply_fclose(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4665 int reply_open(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4666 int reply_open_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4667 int reply_ulogoffX(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4668 int reply_mknew(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4669 int reply_ctemp(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4670 NTSTATUS
unlink_internals(connection_struct
*conn
, int dirtype
, char *name
);
4671 int reply_unlink(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4672 void fail_readraw(void);
4673 void send_file_readbraw(connection_struct
*conn
, files_struct
*fsp
, SMB_OFF_T startpos
, size_t nread
,
4674 ssize_t mincount
, char *outbuf
);
4675 int reply_readbraw(connection_struct
*conn
, char *inbuf
, char *outbuf
, int dum_size
, int dum_buffsize
);
4676 int reply_lockread(connection_struct
*conn
, char *inbuf
,char *outbuf
, int length
, int dum_buffsiz
);
4677 int reply_read(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4678 int send_file_readX(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,
4679 files_struct
*fsp
, SMB_OFF_T startpos
, size_t smb_maxcnt
);
4680 int reply_read_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4681 int reply_writebraw(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4682 int reply_writeunlock(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4683 int reply_write(connection_struct
*conn
, char *inbuf
,char *outbuf
,int size
,int dum_buffsize
);
4684 int reply_write_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4685 int reply_lseek(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4686 int reply_flush(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4687 int reply_exit(connection_struct
*conn
,
4688 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4689 int reply_close(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
,
4691 int reply_writeclose(connection_struct
*conn
,
4692 char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4693 int reply_lock(connection_struct
*conn
,
4694 char *inbuf
,char *outbuf
, int length
, int dum_buffsize
);
4695 int reply_unlock(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4696 int reply_tdis(connection_struct
*conn
,
4697 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4698 int reply_echo(connection_struct
*conn
,
4699 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4700 int reply_printopen(connection_struct
*conn
,
4701 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4702 int reply_printclose(connection_struct
*conn
,
4703 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4704 int reply_printqueue(connection_struct
*conn
,
4705 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4706 int reply_printwrite(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4707 NTSTATUS
mkdir_internal(connection_struct
*conn
, pstring directory
);
4708 int reply_mkdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4709 BOOL
rmdir_internals(connection_struct
*conn
, char *directory
);
4710 int reply_rmdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4711 NTSTATUS
rename_internals(connection_struct
*conn
, char *name
, char *newname
, BOOL replace_if_exists
);
4712 int reply_mv(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4713 int reply_copy(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4714 int reply_setdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4715 uint16
get_lock_pid( char *data
, int data_offset
, BOOL large_file_format
);
4716 SMB_BIG_UINT
get_lock_count( char *data
, int data_offset
, BOOL large_file_format
);
4717 SMB_BIG_UINT
get_lock_offset( char *data
, int data_offset
, BOOL large_file_format
, BOOL
*err
);
4718 int reply_lockingX(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4719 int reply_readbmpx(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4720 int reply_setattrE(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4721 int reply_writebmpx(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4722 int reply_writebs(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
4723 int reply_getattrE(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
4725 /* The following definitions come from smbd/sec_ctx.c */
4727 int get_current_groups(gid_t gid
, int *p_ngroups
, gid_t
**p_groups
);
4728 void delete_nt_token(NT_USER_TOKEN
**pptoken
);
4729 NT_USER_TOKEN
*dup_nt_token(NT_USER_TOKEN
*ptoken
);
4730 BOOL
initialise_groups(char *user
, uid_t uid
, gid_t gid
);
4731 BOOL
push_sec_ctx(void);
4732 void set_sec_ctx(uid_t uid
, gid_t gid
, int ngroups
, gid_t
*groups
, NT_USER_TOKEN
*token
);
4733 void set_root_sec_ctx(void);
4734 BOOL
pop_sec_ctx(void);
4735 void init_sec_ctx(void);
4737 /* The following definitions come from smbd/server.c */
4739 int smbd_server_fd(void);
4740 void smbd_set_server_fd(int fd
);
4741 BOOL
allowable_number_of_smbd_processes(void);
4742 BOOL
reload_services(BOOL test
);
4743 int32
increment_smbd_process_count(void);
4744 void exit_server(const char *reason
);
4746 /* The following definitions come from smbd/service.c */
4748 BOOL
set_current_service(connection_struct
*conn
,BOOL do_chdir
);
4749 int add_home_service(char *service
, char *homedir
);
4750 int find_service(char *service
);
4751 connection_struct
*make_connection(char *service
,char *user
,char *password
, int pwlen
, char *dev
,uint16 vuid
, int *ecode
);
4752 void close_cnum(connection_struct
*conn
, uint16 vuid
);
4754 /* The following definitions come from smbd/session.c */
4756 BOOL
session_claim(uint16 vuid
);
4757 void session_yield(uint16 vuid
);
4759 /* The following definitions come from smbd/ssl.c */
4761 int sslutil_init(int isServer
);
4762 int sslutil_accept(int fd
);
4763 int sslutil_fd_is_ssl(int fd
);
4764 int sslutil_connect(int fd
);
4765 int sslutil_disconnect(int fd
);
4766 int sslutil_negotiate_ssl(int fd
, int msg_type
);
4768 /* The following definitions come from smbd/statcache.c */
4770 void stat_cache_add( char *full_orig_name
, char *orig_translated_path
);
4771 BOOL
stat_cache_lookup(connection_struct
*conn
, char *name
, char *dirpath
,
4772 char **start
, SMB_STRUCT_STAT
*pst
);
4773 BOOL
reset_stat_cache( void );
4775 /* The following definitions come from smbd/trans2.c */
4777 SMB_BIG_UINT
get_allocation_size(files_struct
*fsp
, SMB_STRUCT_STAT
*sbuf
);
4778 time_t interpret_long_unix_date(char *p
);
4779 NTSTATUS
set_bad_path_error(int err
, BOOL bad_path
);
4780 NTSTATUS
set_delete_on_close_internal(files_struct
*fsp
, BOOL delete_on_close
);
4781 NTSTATUS
set_delete_on_close_over_all(files_struct
*fsp
, BOOL delete_on_close
);
4782 int reply_findclose(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4783 int reply_findnclose(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4784 int reply_transs2(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4785 int reply_trans2(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
4787 /* The following definitions come from smbd/uid.c */
4789 BOOL
change_to_guest(void);
4790 BOOL
change_to_user(connection_struct
*conn
, uint16 vuid
);
4791 BOOL
change_to_root_user(void);
4792 BOOL
become_authenticated_pipe_user(pipes_struct
*p
);
4793 BOOL
unbecome_authenticated_pipe_user(void);
4794 void init_conn_ctx(void);
4795 void become_root(void);
4796 void unbecome_root(void);
4797 BOOL
become_user(connection_struct
*conn
, uint16 vuid
);
4798 BOOL
unbecome_user(void);
4799 void add_supplementary_nt_login_groups(int *n_groups
, gid_t
**pp_groups
, NT_USER_TOKEN
**pptok
);
4800 BOOL
lookup_name(const char *name
, DOM_SID
*psid
, enum SID_NAME_USE
*name_type
);
4801 BOOL
lookup_sid(DOM_SID
*sid
, fstring dom_name
, fstring name
, enum SID_NAME_USE
*name_type
);
4802 DOM_SID
*uid_to_sid(DOM_SID
*psid
, uid_t uid
);
4803 DOM_SID
*gid_to_sid(DOM_SID
*psid
, gid_t gid
);
4804 BOOL
sid_to_uid(DOM_SID
*psid
, uid_t
*puid
, enum SID_NAME_USE
*sidtype
);
4805 BOOL
sid_to_gid(DOM_SID
*psid
, gid_t
*pgid
, enum SID_NAME_USE
*sidtype
);
4807 /* The following definitions come from smbd/utmp.c */
4809 void sys_utmp_yield(const char *username
, const char *hostname
,
4810 const char *id_str
, int id_num
);
4811 void sys_utmp_claim(const char *username
, const char *hostname
,
4812 const char *id_str
, int id_num
);
4814 /* The following definitions come from smbd/vfs.c */
4816 BOOL
smbd_vfs_init(connection_struct
*conn
);
4817 BOOL
vfs_directory_exist(connection_struct
*conn
, const char *dname
, SMB_STRUCT_STAT
*st
);
4818 int vfs_mkdir(connection_struct
*conn
, char *const fname
, mode_t mode
);
4819 char *vfs_getwd(connection_struct
*conn
, char *unix_path
);
4820 BOOL
vfs_object_exist(connection_struct
*conn
, const char *fname
,SMB_STRUCT_STAT
*sbuf
);
4821 BOOL
vfs_file_exist(connection_struct
*conn
, const char *fname
,SMB_STRUCT_STAT
*sbuf
);
4822 ssize_t
vfs_read_data(files_struct
*fsp
, char *buf
, size_t byte_count
);
4823 ssize_t
vfs_write_data(files_struct
*fsp
,const char *buffer
,size_t N
);
4824 int vfs_allocate_file_space(files_struct
*fsp
, SMB_BIG_UINT len
);
4825 int vfs_set_filelen(files_struct
*fsp
, SMB_OFF_T len
);
4826 SMB_OFF_T
vfs_transfer_file(files_struct
*in
, files_struct
*out
, SMB_OFF_T n
);
4827 char *vfs_readdirname(connection_struct
*conn
, void *p
);
4828 int vfs_ChDir(connection_struct
*conn
, const char *path
);
4829 char *vfs_GetWd(connection_struct
*conn
, char *path
);
4830 BOOL
reduce_name(connection_struct
*conn
, char *s
,char *dir
,BOOL widelinks
);
4832 /* The following definitions come from smbd/vfs-wrap.c */
4834 int vfswrap_dummy_connect(connection_struct
*conn
, const char *service
, const char *user
);
4835 void vfswrap_dummy_disconnect(connection_struct
*conn
);
4836 SMB_BIG_UINT
vfswrap_disk_free(connection_struct
*conn
, const char *path
, BOOL small_query
, SMB_BIG_UINT
*bsize
,
4837 SMB_BIG_UINT
*dfree
, SMB_BIG_UINT
*dsize
);
4838 DIR *vfswrap_opendir(connection_struct
*conn
, const char *fname
);
4839 struct dirent
*vfswrap_readdir(connection_struct
*conn
, DIR *dirp
);
4840 int vfswrap_mkdir(connection_struct
*conn
, const char *path
, mode_t mode
);
4841 int vfswrap_rmdir(connection_struct
*conn
, const char *path
);
4842 int vfswrap_closedir(connection_struct
*conn
, DIR *dirp
);
4843 int vfswrap_open(connection_struct
*conn
, const char *fname
, int flags
, mode_t mode
);
4844 int vfswrap_close(files_struct
*fsp
, int fd
);
4845 ssize_t
vfswrap_read(files_struct
*fsp
, int fd
, void *data
, size_t n
);
4846 ssize_t
vfswrap_write(files_struct
*fsp
, int fd
, const void *data
, size_t n
);
4847 ssize_t
vfswrap_sendfile(int tofd
, struct files_struct
*fsp
, int fromfd
, const DATA_BLOB
*hdr
,
4848 SMB_OFF_T offset
, size_t n
);
4849 SMB_OFF_T
vfswrap_lseek(files_struct
*fsp
, int filedes
, SMB_OFF_T offset
, int whence
);
4850 int vfswrap_rename(connection_struct
*conn
, const char *oldname
, const char *newname
);
4851 int vfswrap_fsync(files_struct
*fsp
, int fd
);
4852 int vfswrap_stat(connection_struct
*conn
, const char *fname
, SMB_STRUCT_STAT
*sbuf
);
4853 int vfswrap_fstat(files_struct
*fsp
, int fd
, SMB_STRUCT_STAT
*sbuf
);
4854 int vfswrap_lstat(connection_struct
*conn
, const char *path
, SMB_STRUCT_STAT
*sbuf
);
4855 int vfswrap_unlink(connection_struct
*conn
, const char *path
);
4856 int vfswrap_chmod(connection_struct
*conn
, const char *path
, mode_t mode
);
4857 int vfswrap_fchmod(files_struct
*fsp
, int fd
, mode_t mode
);
4858 int vfswrap_chown(connection_struct
*conn
, const char *path
, uid_t uid
, gid_t gid
);
4859 int vfswrap_fchown(files_struct
*fsp
, int fd
, uid_t uid
, gid_t gid
);
4860 int vfswrap_chdir(connection_struct
*conn
, const char *path
);
4861 char *vfswrap_getwd(connection_struct
*conn
, char *path
);
4862 int vfswrap_utime(connection_struct
*conn
, const char *path
, struct utimbuf
*times
);
4863 int vfswrap_ftruncate(files_struct
*fsp
, int fd
, SMB_OFF_T len
);
4864 BOOL
vfswrap_lock(files_struct
*fsp
, int fd
, int op
, SMB_OFF_T offset
, SMB_OFF_T count
, int type
);
4865 int vfswrap_symlink(connection_struct
*conn
, const char *oldpath
, const char *newpath
);
4866 int vfswrap_readlink(connection_struct
*conn
, const char *path
, char *buf
, size_t bufsiz
);
4867 int vfswrap_link(connection_struct
*conn
, const char *oldpath
, const char *newpath
);
4868 int vfswrap_mknod(connection_struct
*conn
, const char *pathname
, mode_t mode
, SMB_DEV_T dev
);
4869 char *vfswrap_realpath(connection_struct
*conn
, const char *path
, char *resolved_path
);
4870 size_t vfswrap_fget_nt_acl(files_struct
*fsp
, int fd
, SEC_DESC
**ppdesc
);
4871 size_t vfswrap_get_nt_acl(files_struct
*fsp
, const char *name
, SEC_DESC
**ppdesc
);
4872 BOOL
vfswrap_fset_nt_acl(files_struct
*fsp
, int fd
, uint32 security_info_sent
, SEC_DESC
*psd
);
4873 BOOL
vfswrap_set_nt_acl(files_struct
*fsp
, const char *name
, uint32 security_info_sent
, SEC_DESC
*psd
);
4874 int vfswrap_chmod_acl(connection_struct
*conn
, const char *name
, mode_t mode
);
4875 int vfswrap_fchmod_acl(files_struct
*fsp
, int fd
, mode_t mode
);
4876 int vfswrap_sys_acl_get_entry(struct connection_struct
*conn
, SMB_ACL_T theacl
, int entry_id
, SMB_ACL_ENTRY_T
*entry_p
);
4877 int vfswrap_sys_acl_get_tag_type(struct connection_struct
*conn
, SMB_ACL_ENTRY_T entry_d
, SMB_ACL_TAG_T
*tag_type_p
);
4878 int vfswrap_sys_acl_get_permset(struct connection_struct
*conn
, SMB_ACL_ENTRY_T entry_d
, SMB_ACL_PERMSET_T
*permset_p
);
4879 void * vfswrap_sys_acl_get_qualifier(struct connection_struct
*conn
, SMB_ACL_ENTRY_T entry_d
);
4880 SMB_ACL_T
vfswrap_sys_acl_get_file(struct connection_struct
*conn
, const char *path_p
, SMB_ACL_TYPE_T type
);
4881 SMB_ACL_T
vfswrap_sys_acl_get_fd(struct files_struct
*fsp
, int fd
);
4882 int vfswrap_sys_acl_clear_perms(struct connection_struct
*conn
, SMB_ACL_PERMSET_T permset
);
4883 int vfswrap_sys_acl_add_perm(struct connection_struct
*conn
, SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
4884 char * vfswrap_sys_acl_to_text(struct connection_struct
*conn
, SMB_ACL_T theacl
, ssize_t
*plen
);
4885 SMB_ACL_T
vfswrap_sys_acl_init(struct connection_struct
*conn
, int count
);
4886 int vfswrap_sys_acl_create_entry(struct connection_struct
*conn
, SMB_ACL_T
*pacl
, SMB_ACL_ENTRY_T
*pentry
);
4887 int vfswrap_sys_acl_set_tag_type(struct connection_struct
*conn
, SMB_ACL_ENTRY_T entry
, SMB_ACL_TAG_T tagtype
);
4888 int vfswrap_sys_acl_set_qualifier(struct connection_struct
*conn
, SMB_ACL_ENTRY_T entry
, void *qual
);
4889 int vfswrap_sys_acl_set_permset(struct connection_struct
*conn
, SMB_ACL_ENTRY_T entry
, SMB_ACL_PERMSET_T permset
);
4890 int vfswrap_sys_acl_valid(struct connection_struct
*conn
, SMB_ACL_T theacl
);
4891 int vfswrap_sys_acl_set_file(struct connection_struct
*conn
, const char *name
, SMB_ACL_TYPE_T acltype
, SMB_ACL_T theacl
);
4892 int vfswrap_sys_acl_set_fd(struct files_struct
*fsp
, int fd
, SMB_ACL_T theacl
);
4893 int vfswrap_sys_acl_delete_def_file(struct connection_struct
*conn
, const char *path
);
4894 int vfswrap_sys_acl_get_perm(struct connection_struct
*conn
, SMB_ACL_PERMSET_T permset
, SMB_ACL_PERM_T perm
);
4895 int vfswrap_sys_acl_free_text(struct connection_struct
*conn
, char *text
);
4896 int vfswrap_sys_acl_free_acl(struct connection_struct
*conn
, SMB_ACL_T posix_acl
);
4897 int vfswrap_sys_acl_free_qualifier(struct connection_struct
*conn
, void *qualifier
, SMB_ACL_TAG_T tagtype
);
4899 /* The following definitions come from smbwrapper/realcalls.c */
4901 int real_utime(const char *name
, struct utimbuf
*buf
);
4902 int real_utimes(const char *name
, struct timeval tv
[2]);
4904 /* The following definitions come from smbwrapper/shared.c */
4906 void smbw_setup_shared(void);
4907 char *smbw_getshared(const char *name
);
4908 void smbw_setshared(const char *name
, const char *val
);
4909 int smbw_setenv(const char *name
, const char *value
);
4910 int smbw_shared_fd(int fd
);
4912 /* The following definitions come from smbwrapper/smbw.c */
4914 void smbw_init(void);
4915 int smbw_fd(int fd
);
4916 int smbw_local_fd(int fd
);
4917 ino_t
smbw_inode(const char *name
);
4918 void clean_fname(char *name
);
4919 char *smbw_parse_path(const char *fname
, char *server
, char *share
, char *path
);
4920 int smbw_path(const char *path
);
4921 int smbw_errno(struct cli_state
*c
);
4922 void get_envvar_auth_data(char *server
, char *share
, char **workgroup
,
4923 char **username
, char **password
);
4924 void smbw_set_auth_data_fn(smbw_get_auth_data_fn fn
);
4925 struct smbw_server
*smbw_server(char *server
, char *share
);
4926 struct smbw_file
*smbw_file(int fd
);
4927 int smbw_open(const char *fname
, int flags
, mode_t mode
);
4928 ssize_t
smbw_pread(int fd
, void *buf
, size_t count
, off_t ofs
);
4929 ssize_t
smbw_read(int fd
, void *buf
, size_t count
);
4930 ssize_t
smbw_write(int fd
, void *buf
, size_t count
);
4931 ssize_t
smbw_pwrite(int fd
, void *buf
, size_t count
, off_t ofs
);
4932 int smbw_close(int fd
);
4933 int smbw_fcntl(int fd
, int cmd
, long arg
);
4934 int smbw_access(const char *name
, int mode
);
4935 int smbw_readlink(const char *path
, char *buf
, size_t bufsize
);
4936 int smbw_unlink(const char *fname
);
4937 int smbw_rename(const char *oldname
, const char *newname
);
4938 int smbw_utime(const char *fname
, void *buf
);
4939 int smbw_utimes(const char *fname
, void *buf
);
4940 int smbw_chown(const char *fname
, uid_t owner
, gid_t group
);
4941 int smbw_chmod(const char *fname
, mode_t newmode
);
4942 off_t
smbw_lseek(int fd
, off_t offset
, int whence
);
4943 int smbw_dup(int fd
);
4944 int smbw_dup2(int fd
, int fd2
);
4945 int smbw_fork(void);
4947 /* The following definitions come from smbwrapper/smbw_dir.c */
4949 struct smbw_dir
*smbw_dir(int fd
);
4950 int smbw_dirp(DIR *dirp
);
4951 int smbw_dir_open(const char *fname
);
4952 int smbw_dir_fstat(int fd
, struct stat
*st
);
4953 int smbw_dir_close(int fd
);
4954 int smbw_getdents(unsigned int fd
, struct dirent
*dirp
, int count
);
4955 int smbw_chdir(const char *name
);
4956 off_t
smbw_dir_lseek(int fd
, off_t offset
, int whence
);
4957 int smbw_mkdir(const char *fname
, mode_t mode
);
4958 int smbw_rmdir(const char *fname
);
4959 char *smbw_getcwd(char *buf
, size_t size
);
4960 int smbw_fchdir(unsigned int fd
);
4961 DIR *smbw_opendir(const char *fname
);
4962 struct dirent
*smbw_readdir(DIR *dirp
);
4963 int smbw_closedir(DIR *dirp
);
4964 void smbw_seekdir(DIR *dirp
, off_t offset
);
4965 off_t
smbw_telldir(DIR *dirp
);
4967 /* The following definitions come from smbwrapper/smbw_stat.c */
4969 void smbw_setup_stat(struct stat
*st
, char *fname
, size_t size
, int mode
);
4970 BOOL
smbw_getatr(struct smbw_server
*srv
, char *path
,
4971 uint16
*mode
, size_t *size
,
4972 time_t *c_time
, time_t *a_time
, time_t *m_time
,
4974 int smbw_stat_printjob(struct smbw_server
*srv
,char *path
,
4975 size_t *size
, time_t *m_time
);
4976 int smbw_fstat(int fd
, struct stat
*st
);
4977 int smbw_stat(const char *fname
, struct stat
*st
);
4979 /* The following definitions come from tdb/spinlock.c */
4981 int tdb_spinlock(TDB_CONTEXT
*tdb
, int list
, int rw_type
);
4982 int tdb_spinunlock(TDB_CONTEXT
*tdb
, int list
, int rw_type
);
4983 int tdb_create_rwlocks(int fd
, unsigned int hash_size
);
4984 int tdb_clear_spinlocks(TDB_CONTEXT
*tdb
);
4985 int tdb_clear_spinlocks(TDB_CONTEXT
*tdb
);
4987 /* The following definitions come from tdb/tdb.c */
4989 void tdb_set_lock_alarm(sig_atomic_t *palarm
);
4990 void tdb_dump_all(TDB_CONTEXT
*tdb
);
4991 int tdb_printfreelist(TDB_CONTEXT
*tdb
);
4992 enum TDB_ERROR
tdb_error(TDB_CONTEXT
*tdb
);
4993 const char *tdb_errorstr(TDB_CONTEXT
*tdb
);
4994 TDB_DATA
tdb_fetch(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4995 int tdb_exists(TDB_CONTEXT
*tdb
, TDB_DATA key
);
4996 int tdb_traverse(TDB_CONTEXT
*tdb
, tdb_traverse_func fn
, void *state
);
4997 TDB_DATA
tdb_firstkey(TDB_CONTEXT
*tdb
);
4998 TDB_DATA
tdb_nextkey(TDB_CONTEXT
*tdb
, TDB_DATA oldkey
);
4999 int tdb_delete(TDB_CONTEXT
*tdb
, TDB_DATA key
);
5000 int tdb_store(TDB_CONTEXT
*tdb
, TDB_DATA key
, TDB_DATA dbuf
, int flag
);
5001 int tdb_append(TDB_CONTEXT
*tdb
, TDB_DATA key
, TDB_DATA new_dbuf
);
5002 TDB_CONTEXT
*tdb_open(const char *name
, int hash_size
, int tdb_flags
,
5003 int open_flags
, mode_t mode
);
5004 TDB_CONTEXT
*tdb_open_ex(const char *name
, int hash_size
, int tdb_flags
,
5005 int open_flags
, mode_t mode
,
5006 tdb_log_func log_fn
);
5007 int tdb_close(TDB_CONTEXT
*tdb
);
5008 int tdb_lockall(TDB_CONTEXT
*tdb
);
5009 void tdb_unlockall(TDB_CONTEXT
*tdb
);
5010 int tdb_lockkeys(TDB_CONTEXT
*tdb
, u32 number
, TDB_DATA keys
[]);
5011 void tdb_unlockkeys(TDB_CONTEXT
*tdb
);
5012 int tdb_chainlock(TDB_CONTEXT
*tdb
, TDB_DATA key
);
5013 int tdb_chainunlock(TDB_CONTEXT
*tdb
, TDB_DATA key
);
5014 int tdb_chainlock_read(TDB_CONTEXT
*tdb
, TDB_DATA key
);
5015 int tdb_chainunlock_read(TDB_CONTEXT
*tdb
, TDB_DATA key
);
5016 void tdb_logging_function(TDB_CONTEXT
*tdb
, void (*fn
)(TDB_CONTEXT
*, int , const char *, ...));
5017 int tdb_reopen(TDB_CONTEXT
*tdb
);
5018 int tdb_reopen_all(void);
5020 /* The following definitions come from tdb/tdbutil.c */
5022 int tdb_chainlock_with_timeout( TDB_CONTEXT
*tdb
, TDB_DATA key
, unsigned int timeout
);
5023 int tdb_lock_bystring(TDB_CONTEXT
*tdb
, const char *keyval
, unsigned int timeout
);
5024 void tdb_unlock_bystring(TDB_CONTEXT
*tdb
, const char *keyval
);
5025 int32
tdb_fetch_int32_byblob(TDB_CONTEXT
*tdb
, const char *keyval
, size_t len
);
5026 int32
tdb_fetch_int32(TDB_CONTEXT
*tdb
, const char *keystr
);
5027 int tdb_store_int32_byblob(TDB_CONTEXT
*tdb
, const char *keystr
, size_t len
, int32 v
);
5028 int tdb_store_int32(TDB_CONTEXT
*tdb
, const char *keystr
, int32 v
);
5029 BOOL
tdb_fetch_uint32_byblob(TDB_CONTEXT
*tdb
, const char *keyval
, size_t len
, uint32
*value
);
5030 BOOL
tdb_fetch_uint32(TDB_CONTEXT
*tdb
, const char *keystr
, uint32
*value
);
5031 BOOL
tdb_store_uint32_byblob(TDB_CONTEXT
*tdb
, const char *keystr
, size_t len
, uint32 value
);
5032 BOOL
tdb_store_uint32(TDB_CONTEXT
*tdb
, const char *keystr
, uint32 value
);
5033 int tdb_store_by_string(TDB_CONTEXT
*tdb
, const char *keystr
, void *buffer
, int len
);
5034 TDB_DATA
tdb_fetch_by_string(TDB_CONTEXT
*tdb
, const char *keystr
);
5035 int32
tdb_change_int32_atomic(TDB_CONTEXT
*tdb
, const char *keystr
, int32
*oldval
, int32 change_val
);
5036 BOOL
tdb_change_uint32_atomic(TDB_CONTEXT
*tdb
, char *keystr
, uint32
*oldval
, uint32 change_val
);
5037 size_t tdb_pack(char *buf
, int bufsize
, const char *fmt
, ...);
5038 int tdb_unpack(char *buf
, int bufsize
, const char *fmt
, ...);
5039 TDB_CONTEXT
*tdb_open_log(const char *name
, int hash_size
, int tdb_flags
,
5040 int open_flags
, mode_t mode
);
5041 int tdb_traverse_delete_fn(TDB_CONTEXT
*the_tdb
, TDB_DATA key
, TDB_DATA dbuf
,
5044 /* The following definitions come from utils/nbio.c */
5046 void nb_setup(struct cli_state
*cli
);
5047 void nb_unlink(char *fname
);
5048 void nb_open(char *fname
, int handle
, int size
);
5049 void nb_write(int handle
, int size
, int offset
);
5050 void nb_read(int handle
, int size
, int offset
);
5051 void nb_close(int handle
);
5052 void nb_mkdir(char *fname
);
5053 void nb_rmdir(char *fname
);
5054 void nb_rename(char *old
, char *new);
5055 void nb_stat(char *fname
, int size
);
5056 void nb_create(char *fname
, int size
);
5058 /* The following definitions come from utils/torture.c */
5060 int cli_setfileinfo_test(struct cli_state
*cli
, int fnum
, int level
, char *data
, int data_len
);
5062 /* The following definitions come from web/cgi.c */
5064 void cgi_load_variables(FILE *f1
);
5065 const char *cgi_variable(const char *name
);
5067 char *cgi_user_name(void);
5068 void cgi_setup(const char *rootdir
, int auth_required
);
5069 const char *cgi_baseurl(void);
5070 const char *cgi_pathinfo(void);
5071 char *cgi_remote_host(void);
5072 char *cgi_remote_addr(void);
5073 BOOL
cgi_waspost(void);
5075 /* The following definitions come from web/diagnose.c */
5077 BOOL
nmbd_running(void);
5078 BOOL
smbd_running(void);
5080 /* The following definitions come from web/startstop.c */
5082 void start_smbd(void);
5083 void start_nmbd(void);
5084 void stop_smbd(void);
5085 void stop_nmbd(void);
5086 void kill_pid(pid_t pid
);
5088 /* The following definitions come from web/statuspage.c */
5090 void status_page(void);
5092 /* The following definitions come from web/swat.c */
5094 #endif /* _PROTO_H_ */