3 /* This file is automatically generated with "make proto". DO NOT EDIT */
6 /*The following definitions come from client/client.c */
8 void do_list(const char *mask
,uint16 attribute
,void (*fn
)(file_info
*),BOOL rec
, BOOL dirs
);
9 struct cli_state
*do_connect(char *server
, char *share
);
11 /*The following definitions come from client/clitar.c */
14 void cmd_tarmode(void);
15 void cmd_setmode(void);
17 int process_tar(void);
18 int tar_parseargs(int argc
, char *argv
[], char *Optarg
, int Optind
);
20 /*The following definitions come from lib/access.c */
22 BOOL
allow_access(char *deny_list
,char *allow_list
,
23 char *cname
,char *caddr
);
24 BOOL
check_access(int sock
, char *allow_list
, char *deny_list
);
26 /*The following definitions come from lib/bitmap.c */
28 struct bitmap
*bitmap_allocate(int n
);
29 BOOL
bitmap_set(struct bitmap
*bm
, unsigned i
);
30 BOOL
bitmap_clear(struct bitmap
*bm
, unsigned i
);
31 BOOL
bitmap_query(struct bitmap
*bm
, unsigned i
);
32 int bitmap_find(struct bitmap
*bm
, unsigned ofs
);
34 /*The following definitions come from lib/charcnv.c */
36 char *unix2dos_format(char *str
,BOOL overwrite
);
37 char *dos2unix_format(char *str
, BOOL overwrite
);
38 void interpret_character_set(char *str
, int codepage
);
40 /*The following definitions come from lib/charset.c */
42 void charset_initialise(void);
43 void codepage_initialise(int client_codepage
);
44 void add_char_string(char *s
);
46 /*The following definitions come from lib/crc32.c */
48 uint32
crc32_calc_buffer( char *buffer
, uint32 count
);
50 /*The following definitions come from lib/debug.c */
52 void sig_usr2( int sig
);
53 void sig_usr1( int sig
);
54 void setup_logging( char *pname
, BOOL interactive
);
55 void reopen_logs( void );
56 void force_check_log_size( void );
57 BOOL
need_to_check_log_size( void );
58 void check_log_size( void );
59 void dbgflush( void );
60 BOOL
dbghdr( int level
, const char *file
, const char *func
, int line
);
62 /*The following definitions come from lib/doscalls.c */
64 int dos_unlink(char *fname
);
65 int dos_open(char *fname
,int flags
,mode_t mode
);
66 DIR *dos_opendir(char *dname
);
67 char *dos_readdirname(DIR *p
);
68 int dos_chown(char *fname
, uid_t uid
, gid_t gid
);
69 int dos_stat(char *fname
,SMB_STRUCT_STAT
*sbuf
);
70 int dos_lstat(char *fname
,SMB_STRUCT_STAT
*sbuf
);
71 int dos_mkdir(char *dname
,mode_t mode
);
72 int dos_rmdir(char *dname
);
73 int dos_chdir(char *dname
);
74 int dos_utime(char *fname
,struct utimbuf
*times
);
75 int dos_rename(char *from
, char *to
);
76 int dos_chmod(char *fname
,mode_t mode
);
77 char *dos_getwd(char *unix_path
);
78 BOOL
dos_file_exist(char *fname
,SMB_STRUCT_STAT
*sbuf
);
79 BOOL
dos_directory_exist(char *dname
,SMB_STRUCT_STAT
*st
);
80 time_t dos_file_modtime(char *fname
);
81 SMB_OFF_T
dos_file_size(char *file_name
);
82 int dos_ChDir(char *path
);
83 char *dos_GetWd(char *path
);
85 /*The following definitions come from lib/fault.c */
87 void fault_setup(void (*fn
)(void *));
89 /*The following definitions come from lib/fnmatch.c */
91 int fnmatch (const char *pattern
, const char *string
, int flags
);
93 /*The following definitions come from lib/genrand.c */
95 void generate_random_buffer( unsigned char *out
, int len
, BOOL re_seed
);
97 /*The following definitions come from lib/getsmbpass.c */
99 char *getsmbpass(char *prompt
) ;
101 /*The following definitions come from lib/hash.c */
103 BOOL
hash_table_init(hash_table
*table
, int num_buckets
, compare_function compare_func
);
104 int string_hash(int hash_size
, const char *key
);
105 hash_element
*hash_lookup(hash_table
*table
, char *key
);
106 hash_element
*hash_insert(hash_table
*table
, char *value
, char *key
);
107 void hash_remove(hash_table
*table
, hash_element
*hash_elem
);
108 void hash_clear(hash_table
*table
);
110 /*The following definitions come from lib/interface.c */
112 void load_interfaces(void);
113 BOOL
interfaces_changed(void);
114 BOOL
ismyip(struct in_addr ip
);
115 BOOL
is_local_net(struct in_addr from
);
116 int iface_count(void);
117 BOOL
we_are_multihomed(void);
118 struct interface
*get_interface(int n
);
119 struct in_addr
*iface_n_ip(int n
);
120 struct in_addr
*iface_n_bcast(int n
);
121 unsigned iface_hash(void);
122 struct in_addr
*iface_bcast(struct in_addr ip
);
123 struct in_addr
*iface_ip(struct in_addr ip
);
125 /*The following definitions come from lib/interfaces.c */
127 int get_interfaces(struct iface_struct
*ifaces
, int max_interfaces
);
129 /*The following definitions come from lib/kanji.c */
131 void interpret_coding_system(char *str
);
132 void initialize_multibyte_vectors( int client_codepage
);
134 /*The following definitions come from lib/md4.c */
136 void mdfour(unsigned char *out
, unsigned char *in
, int n
);
138 /*The following definitions come from lib/pidfile.c */
140 pid_t
pidfile_pid(char *name
);
141 void pidfile_create(char *name
);
143 /*The following definitions come from lib/replace.c */
145 char *rep_inet_ntoa(struct in_addr ip
);
147 /*The following definitions come from lib/signal.c */
149 void BlockSignals(BOOL block
,int signum
);
150 void CatchSignal(int signum
,void (*handler
)(int ));
151 void CatchChild(void);
152 void CatchChildLeaveStatus(void);
154 /*The following definitions come from lib/slprintf.c */
156 int vslprintf(char *str
, int n
, char *format
, va_list ap
);
158 /*The following definitions come from lib/smbrun.c */
160 int smbrun(char *cmd
,char *outfile
,BOOL shared
);
162 /*The following definitions come from lib/snprintf.c */
165 /*The following definitions come from lib/system.c */
167 int sys_select(int maxfd
, fd_set
*fds
,struct timeval
*tval
);
168 int sys_select(int maxfd
, fd_set
*fds
,struct timeval
*tval
);
169 int sys_usleep(long usecs
);
170 int sys_stat(const char *fname
,SMB_STRUCT_STAT
*sbuf
);
171 int sys_fstat(int fd
,SMB_STRUCT_STAT
*sbuf
);
172 int sys_lstat(const char *fname
,SMB_STRUCT_STAT
*sbuf
);
173 int sys_ftruncate(int fd
, SMB_OFF_T offset
);
174 SMB_OFF_T
sys_lseek(int fd
, SMB_OFF_T offset
, int whence
);
175 int sys_fseek(FILE *fp
, SMB_OFF_T offset
, int whence
);
176 SMB_OFF_T
sys_ftell(FILE *fp
);
177 int sys_creat(const char *path
, mode_t mode
);
178 int sys_open(const char *path
, int oflag
, mode_t mode
);
179 FILE *sys_fopen(const char *path
, const char *type
);
180 void *sys_mmap(void *addr
, size_t len
, int prot
, int flags
, int fd
, SMB_OFF_T offset
);
181 SMB_STRUCT_DIRENT
*sys_readdir(DIR *dirp
);
182 int sys_waitpid(pid_t pid
,int *status
,int options
);
183 char *sys_getwd(char *s
);
184 int sys_chown(const char *fname
,uid_t uid
,gid_t gid
);
185 int sys_chroot(const char *dname
);
186 struct hostent
*sys_gethostbyname(const char *name
);
187 BOOL
set_process_capability( uint32 cap_flag
, BOOL enable
);
188 BOOL
set_inherited_process_capability( uint32 cap_flag
, BOOL enable
);
189 long sys_random(void);
190 void sys_srandom(unsigned int seed
);
191 int groups_max(void);
192 int sys_getgroups(int setlen
, gid_t
*gidset
);
193 int sys_setgroups(int setlen
, gid_t
*gidset
);
194 struct passwd
*sys_getpwnam(const char *name
);
195 struct passwd
*sys_getpwuid(uid_t uid
);
196 FILE *sys_popen(const char *command
, const char *mode
, BOOL paranoid
);
197 int sys_pclose( FILE *fp
);
199 /*The following definitions come from lib/talloc.c */
201 TALLOC_CTX
*talloc_init(void);
202 void *talloc(TALLOC_CTX
*t
, size_t size
);
203 void talloc_destroy(TALLOC_CTX
*t
);
205 /*The following definitions come from lib/time.c */
207 void GetTimeOfDay(struct timeval
*tval
);
209 int TimeDiff(time_t t
);
210 struct tm
*LocalTime(time_t *t
);
211 time_t nt_time_to_unix(NTTIME
*nt
);
212 time_t interpret_long_date(char *p
);
213 void unix_to_nt_time(NTTIME
*nt
, time_t t
);
214 void put_long_date(char *p
,time_t t
);
215 BOOL
null_mtime(time_t mtime
);
216 void put_dos_date(char *buf
,int offset
,time_t unixdate
);
217 void put_dos_date2(char *buf
,int offset
,time_t unixdate
);
218 void put_dos_date3(char *buf
,int offset
,time_t unixdate
);
219 time_t make_unix_date(void *date_ptr
);
220 time_t make_unix_date2(void *date_ptr
);
221 time_t make_unix_date3(void *date_ptr
);
222 char *http_timestring(time_t t
);
223 char *timestring(BOOL hires
);
224 time_t get_create_time(SMB_STRUCT_STAT
*st
,BOOL fake_dirs
);
226 /*The following definitions come from lib/ufc.c */
228 char *ufc_crypt(char *key
,char *salt
);
230 /*The following definitions come from lib/username.c */
232 char *get_user_home_dir(char *user
);
233 BOOL
map_username(char *user
);
234 struct passwd
*Get_Pwnam(char *user
,BOOL allow_change
);
235 BOOL
user_in_list(char *user
,char *list
);
237 /*The following definitions come from lib/util.c */
240 BOOL
in_group(gid_t group
, gid_t current_gid
, int ngroups
, gid_t
*groups
);
241 char *Atoic(char *p
, int *n
, char *c
);
242 char *get_numlist(char *p
, uint32
**num
, int *count
);
243 char *dns_to_netbios_name(char *dns_name
);
244 int name_mangle( char *In
, char *Out
, char name_type
);
245 BOOL
file_exist(char *fname
,SMB_STRUCT_STAT
*sbuf
);
246 time_t file_modtime(char *fname
);
247 BOOL
directory_exist(char *dname
,SMB_STRUCT_STAT
*st
);
248 SMB_OFF_T
get_file_size(char *file_name
);
249 char *attrib_string(uint16 mode
);
250 void show_msg(char *buf
);
251 void smb_setlen(char *buf
,int len
);
252 int set_message(char *buf
,int num_words
,int num_bytes
,BOOL zero
);
253 void dos_clean_name(char *s
);
254 void unix_clean_name(char *s
);
255 BOOL
reduce_name(char *s
,char *dir
,BOOL widelinks
);
256 void expand_mask(char *Mask
,BOOL doext
);
257 void make_dir_struct(char *buf
,char *mask
,char *fname
,SMB_OFF_T size
,int mode
,time_t date
);
258 void close_low_fds(void);
259 int set_blocking(int fd
, BOOL set
);
260 SMB_OFF_T
transfer_file(int infd
,int outfd
,SMB_OFF_T n
,char *header
,int headlen
,int align
);
261 int name_extract(char *buf
,int ofs
,char *name
);
262 int name_len(char *s1
);
264 BOOL
unix_do_match(char *str
, char *regexp
, BOOL case_sig
);
265 BOOL
mask_match(char *str
, char *regexp
, BOOL case_sig
, BOOL trans2
);
266 void become_daemon(void);
268 int set_filelen(int fd
, SMB_OFF_T len
);
269 void *Realloc(void *p
,size_t size
);
270 BOOL
get_myname(char *my_name
);
271 int interpret_protocol(char *str
,int def
);
272 BOOL
is_ipaddress(const char *str
);
273 uint32
interpret_addr(char *str
);
274 struct in_addr
*interpret_addr2(char *str
);
275 BOOL
zero_ip(struct in_addr ip
);
276 BOOL
matchname(char *remotehost
,struct in_addr addr
);
277 void standard_sub_basic(char *str
);
278 void standard_sub(connection_struct
*conn
,char *str
);
279 BOOL
same_net(struct in_addr ip1
,struct in_addr ip2
,struct in_addr mask
);
280 struct hostent
*Get_Hostbyname(const char *name
);
281 BOOL
process_exists(pid_t pid
);
282 char *uidtoname(uid_t uid
);
283 char *gidtoname(gid_t gid
);
284 uid_t
nametouid(const char *name
);
285 gid_t
nametogid(const char *name
);
286 void smb_panic(char *why
);
287 char *readdirname(DIR *p
);
288 BOOL
is_in_path(char *name
, name_compare_entry
*namelist
);
289 void set_namearray(name_compare_entry
**ppname_array
, char *namelist
);
290 void free_namearray(name_compare_entry
*name_array
);
291 uint32
map_lock_offset(uint32 high
, uint32 low
);
292 BOOL
fcntl_lock(int fd
, int op
, SMB_OFF_T offset
, SMB_OFF_T count
, int type
);
293 BOOL
is_myname(char *s
);
294 void set_remote_arch(enum remote_arch_types type
);
295 enum remote_arch_types
get_remote_arch(void);
296 char *align2(char *q
, char *base
);
297 char *align4(char *q
, char *base
);
298 void out_ascii(FILE *f
, unsigned char *buf
,int len
);
299 void out_data(FILE *f
,char *buf1
,int len
, int per_line
);
300 void print_asc(int level
, unsigned char *buf
,int len
);
301 void dump_data(int level
,char *buf1
,int len
);
302 char *tab_depth(int depth
);
303 int str_checksum(const char *s
);
304 void zero_free(void *p
, size_t size
);
305 int set_maxfiles(int requested_max
);
306 BOOL
reg_split_key(char *full_keyname
, uint32
*reg_type
, char *key_name
);
307 char *smbd_mktemp(char *template);
308 int smb_mkstemp(char *template);
309 void *memdup(void *p
, size_t size
);
310 char *myhostname(void);
311 char *parent_dirname(const char *path
);
313 /*The following definitions come from lib/util_file.c */
315 BOOL
do_file_lock(int fd
, int waitsecs
, int type
);
316 BOOL
file_lock(int fd
, int type
, int secs
, int *plock_depth
);
317 BOOL
file_unlock(int fd
, int *plock_depth
);
318 void *startfilepwent(char *pfile
, char *s_readbuf
, int bufsize
,
319 int *file_lock_depth
, BOOL update
);
320 void endfilepwent(void *vp
, int *file_lock_depth
);
321 SMB_BIG_UINT
getfilepwpos(void *vp
);
322 BOOL
setfilepwpos(void *vp
, SMB_BIG_UINT tok
);
323 int getfileline(void *vp
, char *linebuf
, int linebuf_size
);
324 char *fgets_slash(char *s2
,int maxlen
,FILE *f
);
326 /*The following definitions come from lib/util_sec.c */
328 void gain_root_privilege(void);
329 void gain_root_group_privilege(void);
330 void set_effective_uid(uid_t uid
);
331 void set_effective_gid(gid_t gid
);
332 void save_re_uid(void);
333 void restore_re_uid(void);
334 int set_re_uid(void);
335 void become_user_permanently(uid_t uid
, gid_t gid
);
337 /*The following definitions come from lib/util_sid.c */
339 void generate_wellknown_sids(void);
340 BOOL
map_domain_sid_to_name(DOM_SID
*sid
, char *nt_domain
);
341 BOOL
lookup_known_rid(DOM_SID
*sid
, uint32 rid
, char *name
, uint8
*psid_name_use
);
342 BOOL
map_domain_name_to_sid(DOM_SID
*sid
, char *nt_domain
);
343 void split_domain_name(const char *fullname
, char *domain
, char *name
);
344 char *sid_to_string(fstring sidstr_out
, DOM_SID
*sid
);
345 BOOL
string_to_sid(DOM_SID
*sidout
, char *sidstr
);
346 BOOL
sid_append_rid(DOM_SID
*sid
, uint32 rid
);
347 BOOL
sid_split_rid(DOM_SID
*sid
, uint32
*rid
);
348 void sid_copy(DOM_SID
*dst
, DOM_SID
*src
);
349 DOM_SID
*sid_dup(DOM_SID
*src
);
350 BOOL
sid_linearize(char *outbuf
, size_t len
, DOM_SID
*sid
);
351 BOOL
sid_equal(DOM_SID
*sid1
, DOM_SID
*sid2
);
352 size_t sid_size(DOM_SID
*sid
);
354 /*The following definitions come from lib/util_sock.c */
356 BOOL
is_a_socket(int fd
);
357 void set_socket_options(int fd
, char *options
);
358 void close_sockets(void );
359 ssize_t
read_udp_socket(int fd
,char *buf
,size_t len
);
360 ssize_t
read_with_timeout(int fd
,char *buf
,size_t mincnt
,size_t maxcnt
,unsigned int time_out
);
361 BOOL
send_keepalive(int client
);
362 ssize_t
read_data(int fd
,char *buffer
,size_t N
);
363 ssize_t
write_data(int fd
,char *buffer
,size_t N
);
364 ssize_t
write_socket_data(int fd
,char *buffer
,size_t N
);
365 ssize_t
write_socket(int fd
,char *buf
,size_t len
);
366 ssize_t
read_smb_length(int fd
,char *inbuf
,unsigned int timeout
);
367 BOOL
receive_smb(int fd
,char *buffer
, unsigned int timeout
);
368 BOOL
client_receive_smb(int fd
,char *buffer
, unsigned int timeout
);
369 BOOL
send_null_session_msg(int fd
);
370 BOOL
send_smb(int fd
,char *buffer
);
371 BOOL
send_one_packet(char *buf
,int len
,struct in_addr ip
,int port
,int type
);
372 int open_socket_in(int type
, int port
, int dlevel
,uint32 socket_addr
, BOOL rebind
);
373 int open_socket_out(int type
, struct in_addr
*addr
, int port
,int timeout
);
374 void reset_globals_after_fork(void);
375 char *client_name(int fd
);
376 char *client_addr(int fd
);
378 /*The following definitions come from lib/util_str.c */
380 void set_first_token(char *ptr
);
381 BOOL
next_token(char **ptr
,char *buff
,char *sep
, size_t bufsize
);
382 char **toktocliplist(int *ctok
, char *sep
);
383 int StrCaseCmp(const char *s
, const char *t
);
384 int StrnCaseCmp(const char *s
, const char *t
, size_t n
);
385 BOOL
strequal(const char *s1
, const char *s2
);
386 BOOL
strnequal(const char *s1
,const char *s2
,size_t n
);
387 BOOL
strcsequal(const char *s1
,const char *s2
);
388 void strlower(char *s
);
389 void strupper(char *s
);
390 void strnorm(char *s
);
391 BOOL
strisnormal(char *s
);
392 void string_replace(char *s
,char oldc
,char newc
);
393 char *skip_string(char *buf
,size_t n
);
394 size_t str_charnum(const char *s
);
395 BOOL
trim_string(char *s
,const char *front
,const char *back
);
396 BOOL
strhasupper(const char *s
);
397 BOOL
strhaslower(const char *s
);
398 size_t count_chars(const char *s
,char c
);
399 BOOL
str_is_all(const char *s
,char c
);
400 char *safe_strcpy(char *dest
,const char *src
, size_t maxlength
);
401 char *safe_strcat(char *dest
, const char *src
, size_t maxlength
);
402 char *alpha_strcpy(char *dest
, const char *src
, const char *other_safe_chars
, size_t maxlength
);
403 char *StrnCpy(char *dest
,const char *src
,size_t n
);
404 char *strncpyn(char *dest
, const char *src
,size_t n
, char c
);
405 size_t strhex_to_str(char *p
, size_t len
, const char *strhex
);
406 BOOL
in_list(char *s
,char *list
,BOOL casesensitive
);
407 void string_free(char **s
);
408 BOOL
string_set(char **dest
,const char *src
);
409 BOOL
string_sub(char *s
,const char *pattern
,const char *insert
, size_t len
);
410 BOOL
fstring_sub(char *s
,const char *pattern
,const char *insert
);
411 BOOL
pstring_sub(char *s
,const char *pattern
,const char *insert
);
412 BOOL
all_string_sub(char *s
,const char *pattern
,const char *insert
, size_t len
);
413 void split_at_last_component(char *path
, char *front
, char sep
, char *back
);
414 char *octal_string(int i
);
415 char *string_truncate(char *s
, int length
);
417 /*The following definitions come from lib/util_unistr.c */
419 int dos_PutUniCode(char *dst
,const char *src
, ssize_t len
, BOOL null_terminate
);
420 char *skip_unibuf(char *src
, size_t len
);
421 char *dos_unistrn2(uint16
*src
, int len
);
422 char *dos_unistr2(uint16
*src
);
423 char *dos_unistr2_to_str(UNISTR2
*str
);
424 uint32
buffer2_to_uint32(BUFFER2
*str
);
425 char *dos_buffer2_to_str(BUFFER2
*str
);
426 char *dos_buffer2_to_multistr(BUFFER2
*str
);
427 size_t dos_struni2(char *dst
, const char *src
, size_t max_len
);
428 char *dos_unistr(char *buf
);
429 int unistrcpy(char *dst
, char *src
);
430 void default_unicode_map(smb_ucs2_t
**pp_cp_to_ucs2
, uint16
**pp_ucs2_to_cp
);
431 BOOL
load_unicode_map(const char *codepage
, smb_ucs2_t
**pp_cp_to_ucs2
, uint16
**pp_ucs2_to_cp
);
432 BOOL
load_dos_unicode_map(int codepage
);
433 BOOL
load_unix_unicode_map(const char *unix_char_set
);
434 smb_ucs2_t
*multibyte_to_unicode(smb_ucs2_t
*dst
, const char *src
,
435 size_t dst_len
, smb_ucs2_t
*cp_to_ucs2
);
436 char *unicode_to_unix(char *dst
, const smb_ucs2_t
*src
, size_t dst_len
);
437 smb_ucs2_t
*unix_to_unicode(smb_ucs2_t
*dst
, const char *src
, size_t dst_len
);
438 char *unicode_to_dos(char *dst
, const smb_ucs2_t
*src
, size_t dst_len
);
439 smb_ucs2_t
*dos_to_unicode(smb_ucs2_t
*dst
, const char *src
, size_t dst_len
);
440 size_t wstrlen(const smb_ucs2_t
*src
);
441 smb_ucs2_t
*safe_wstrcpy(smb_ucs2_t
*dest
,const smb_ucs2_t
*src
, size_t maxlength
);
442 smb_ucs2_t
*safe_wstrcat(smb_ucs2_t
*dest
, const smb_ucs2_t
*src
, size_t maxlength
);
443 int wstrcmp(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
444 int wstrncmp(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
, size_t len
);
445 smb_ucs2_t
*wstrstr(const smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
446 smb_ucs2_t
*wstrchr(const smb_ucs2_t
*s
, smb_ucs2_t c
);
447 smb_ucs2_t
*wstrrchr(const smb_ucs2_t
*s
, smb_ucs2_t c
);
448 smb_ucs2_t
*wstrtok(smb_ucs2_t
*s1
, const smb_ucs2_t
*s2
);
450 /*The following definitions come from libsmb/clientgen.c */
452 int cli_set_port(struct cli_state
*cli
, int port
);
453 char *cli_errstr(struct cli_state
*cli
);
454 BOOL
cli_api_pipe(struct cli_state
*cli
, char *pipe_name
, int pipe_name_len
,
455 uint16
*setup
, uint32 setup_count
, uint32 max_setup_count
,
456 char *params
, uint32 param_count
, uint32 max_param_count
,
457 char *data
, uint32 data_count
, uint32 max_data_count
,
458 char **rparam
, uint32
*rparam_count
,
459 char **rdata
, uint32
*rdata_count
);
460 BOOL
cli_api(struct cli_state
*cli
,
461 char *param
, int prcnt
, int mprcnt
,
462 char *data
, int drcnt
, int mdrcnt
,
463 char **rparam
, int *rprcnt
,
464 char **rdata
, int *rdrcnt
);
465 BOOL
cli_NetWkstaUserLogon(struct cli_state
*cli
,char *user
, char *workstation
);
466 int cli_RNetShareEnum(struct cli_state
*cli
, void (*fn
)(const char *, uint32
, const char *));
467 BOOL
cli_NetServerEnum(struct cli_state
*cli
, char *workgroup
, uint32 stype
,
468 void (*fn
)(const char *, uint32
, const char *));
469 BOOL
cli_session_setup(struct cli_state
*cli
,
471 char *pass
, int passlen
,
472 char *ntpass
, int ntpasslen
,
474 BOOL
cli_ulogoff(struct cli_state
*cli
);
475 BOOL
cli_send_tconX(struct cli_state
*cli
,
476 char *share
, char *dev
, char *pass
, int passlen
);
477 BOOL
cli_tdis(struct cli_state
*cli
);
478 BOOL
cli_rename(struct cli_state
*cli
, char *fname_src
, char *fname_dst
);
479 BOOL
cli_unlink(struct cli_state
*cli
, char *fname
);
480 BOOL
cli_mkdir(struct cli_state
*cli
, char *dname
);
481 BOOL
cli_rmdir(struct cli_state
*cli
, char *dname
);
482 int cli_nt_create(struct cli_state
*cli
, char *fname
);
483 int cli_open(struct cli_state
*cli
, char *fname
, int flags
, int share_mode
);
484 BOOL
cli_close(struct cli_state
*cli
, int fnum
);
485 BOOL
cli_lock(struct cli_state
*cli
, int fnum
,
486 uint32 offset
, uint32 len
, int timeout
, enum brl_type lock_type
);
487 BOOL
cli_unlock(struct cli_state
*cli
, int fnum
, uint32 offset
, uint32 len
);
488 size_t cli_read(struct cli_state
*cli
, int fnum
, char *buf
, off_t offset
, size_t size
);
489 ssize_t
cli_write(struct cli_state
*cli
,
490 int fnum
, uint16 write_mode
,
491 char *buf
, off_t offset
, size_t size
);
492 ssize_t
cli_smbwrite(struct cli_state
*cli
,
493 int fnum
, char *buf
, off_t offset
, size_t size1
);
494 BOOL
cli_getattrE(struct cli_state
*cli
, int fd
,
495 uint16
*attr
, size_t *size
,
496 time_t *c_time
, time_t *a_time
, time_t *m_time
);
497 BOOL
cli_getatr(struct cli_state
*cli
, char *fname
,
498 uint16
*attr
, size_t *size
, time_t *t
);
499 BOOL
cli_setatr(struct cli_state
*cli
, char *fname
, uint16 attr
, time_t t
);
500 BOOL
cli_qpathinfo(struct cli_state
*cli
, const char *fname
,
501 time_t *c_time
, time_t *a_time
, time_t *m_time
,
502 size_t *size
, uint16
*mode
);
503 BOOL
cli_qpathinfo2(struct cli_state
*cli
, const char *fname
,
504 time_t *c_time
, time_t *a_time
, time_t *m_time
,
505 time_t *w_time
, size_t *size
, uint16
*mode
,
507 BOOL
cli_qfileinfo(struct cli_state
*cli
, int fnum
,
508 uint16
*mode
, size_t *size
,
509 time_t *c_time
, time_t *a_time
, time_t *m_time
,
510 time_t *w_time
, SMB_INO_T
*ino
);
511 int cli_list(struct cli_state
*cli
,const char *Mask
,uint16 attribute
,
512 void (*fn
)(file_info
*, const char *));
513 BOOL
cli_oem_change_password(struct cli_state
*cli
, const char *user
, const char *new_password
,
514 const char *old_password
);
515 BOOL
cli_negprot(struct cli_state
*cli
);
516 BOOL
cli_session_request(struct cli_state
*cli
,
517 struct nmb_name
*calling
, struct nmb_name
*called
);
518 BOOL
cli_connect(struct cli_state
*cli
, const char *host
, struct in_addr
*ip
);
519 struct cli_state
*cli_initialise(struct cli_state
*cli
);
520 void cli_shutdown(struct cli_state
*cli
);
521 int cli_error(struct cli_state
*cli
, uint8
*eclass
, uint32
*num
, uint32
*nt_rpc_error
);
522 void cli_sockopt(struct cli_state
*cli
, char *options
);
523 uint16
cli_setpid(struct cli_state
*cli
, uint16 pid
);
524 BOOL
cli_reestablish_connection(struct cli_state
*cli
);
525 BOOL
cli_establish_connection(struct cli_state
*cli
,
526 char *dest_host
, struct in_addr
*dest_ip
,
527 struct nmb_name
*calling
, struct nmb_name
*called
,
528 char *service
, char *service_type
,
529 BOOL do_shutdown
, BOOL do_tcon
);
530 int cli_printjob_del(struct cli_state
*cli
, int job
);
531 int cli_print_queue(struct cli_state
*cli
,
532 void (*fn
)(struct print_job_info
*));
533 BOOL
cli_chkpath(struct cli_state
*cli
, char *path
);
534 BOOL
cli_message_start(struct cli_state
*cli
, char *host
, char *username
,
536 BOOL
cli_message_text(struct cli_state
*cli
, char *msg
, int len
, int grp
);
537 BOOL
cli_message_end(struct cli_state
*cli
, int grp
);
538 BOOL
cli_dskattr(struct cli_state
*cli
, int *bsize
, int *total
, int *avail
);
539 BOOL
attempt_netbios_session_request(struct cli_state
*cli
, char *srchost
, char *desthost
,
540 struct in_addr
*pdest_ip
);
542 /*The following definitions come from libsmb/credentials.c */
544 char *credstr(uchar
*cred
);
545 void cred_session_key(DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
, char *pass
,
546 uchar session_key
[8]);
547 void cred_create(uchar session_key
[8], DOM_CHAL
*stor_cred
, UTIME timestamp
,
549 int cred_assert(DOM_CHAL
*cred
, uchar session_key
[8], DOM_CHAL
*stored_cred
,
551 BOOL
clnt_deal_with_creds(uchar sess_key
[8],
552 DOM_CRED
*sto_clnt_cred
, DOM_CRED
*rcv_srv_cred
);
553 BOOL
deal_with_creds(uchar sess_key
[8],
554 DOM_CRED
*sto_clnt_cred
,
555 DOM_CRED
*rcv_clnt_cred
, DOM_CRED
*rtn_srv_cred
);
557 /*The following definitions come from libsmb/namequery.c */
559 BOOL
name_status(int fd
,char *name
,int name_type
,BOOL recurse
,
560 struct in_addr to_ip
,char *master
,char *rname
,
561 void (*fn
)(struct packet_struct
*));
562 struct in_addr
*name_query(int fd
,const char *name
,int name_type
, BOOL bcast
,BOOL recurse
,
563 struct in_addr to_ip
, int *count
, void (*fn
)(struct packet_struct
*));
564 FILE *startlmhosts(char *fname
);
565 BOOL
getlmhostsent( FILE *fp
, pstring name
, int *name_type
, struct in_addr
*ipaddr
);
566 void endlmhosts(FILE *fp
);
567 BOOL
resolve_name(const char *name
, struct in_addr
*return_ip
, int name_type
);
568 BOOL
find_master_ip(char *group
, struct in_addr
*master_ip
);
569 BOOL
lookup_pdc_name(const char *srcname
, const char *domain
, struct in_addr
*pdc_ip
, char *ret_name
);
570 BOOL
get_dc_list(char *group
, struct in_addr
**ip_list
, int *count
);
572 /*The following definitions come from libsmb/nmblib.c */
574 void debug_nmb_packet(struct packet_struct
*p
);
575 char *nmb_namestr(struct nmb_name
*n
);
576 struct packet_struct
*copy_packet(struct packet_struct
*packet
);
577 void free_packet(struct packet_struct
*packet
);
578 struct packet_struct
*read_packet(int fd
,enum packet_type packet_type
);
579 void make_nmb_name( struct nmb_name
*n
, const char *name
, int type
);
580 BOOL
nmb_name_equal(struct nmb_name
*n1
, struct nmb_name
*n2
);
581 BOOL
send_packet(struct packet_struct
*p
);
582 struct packet_struct
*receive_packet(int fd
,enum packet_type type
,int t
);
583 void sort_query_replies(char *data
, int n
, struct in_addr ip
);
585 /*The following definitions come from libsmb/nterr.c */
587 char *get_nt_error_msg(uint32 nt_code
);
589 /*The following definitions come from libsmb/passchange.c */
591 BOOL
remote_password_change(const char *remote_machine
, const char *user_name
,
592 const char *old_passwd
, const char *new_passwd
,
593 char *err_str
, size_t err_str_len
);
595 /*The following definitions come from libsmb/pwd_cache.c */
597 void pwd_init(struct pwd_info
*pwd
);
598 void pwd_obfuscate_key(struct pwd_info
*pwd
, uint32 int_key
, char *str_key
);
599 void pwd_read(struct pwd_info
*pwd
, char *passwd_report
, BOOL do_encrypt
);
600 void pwd_set_nullpwd(struct pwd_info
*pwd
);
601 void pwd_set_cleartext(struct pwd_info
*pwd
, char *clr
);
602 void pwd_get_cleartext(struct pwd_info
*pwd
, char *clr
);
603 void pwd_set_lm_nt_16(struct pwd_info
*pwd
, uchar lm_pwd
[16], uchar nt_pwd
[16]);
604 void pwd_get_lm_nt_16(struct pwd_info
*pwd
, uchar lm_pwd
[16], uchar nt_pwd
[16]);
605 void pwd_make_lm_nt_16(struct pwd_info
*pwd
, char *clr
);
606 void pwd_make_lm_nt_owf(struct pwd_info
*pwd
, uchar cryptkey
[8]);
607 void pwd_get_lm_nt_owf(struct pwd_info
*pwd
, uchar lm_owf
[24], uchar nt_owf
[24]);
609 /*The following definitions come from libsmb/smbdes.c */
611 void E_P16(unsigned char *p14
,unsigned char *p16
);
612 void E_P24(unsigned char *p21
, unsigned char *c8
, unsigned char *p24
);
613 void D_P16(unsigned char *p14
, unsigned char *in
, unsigned char *out
);
614 void E_old_pw_hash( unsigned char *p14
, unsigned char *in
, unsigned char *out
);
615 void cred_hash1(unsigned char *out
,unsigned char *in
,unsigned char *key
);
616 void cred_hash2(unsigned char *out
,unsigned char *in
,unsigned char *key
);
617 void cred_hash3(unsigned char *out
,unsigned char *in
,unsigned char *key
, int forw
);
618 void SamOEMhash( unsigned char *data
, unsigned char *key
, int val
);
620 /*The following definitions come from libsmb/smbencrypt.c */
622 void SMBencrypt(uchar
*passwd
, uchar
*c8
, uchar
*p24
);
623 void E_md4hash(uchar
*passwd
, uchar
*p16
);
624 void nt_lm_owf_gen(char *pwd
, uchar nt_p16
[16], uchar p16
[16]);
625 void SMBOWFencrypt(uchar passwd
[16], uchar
*c8
, uchar p24
[24]);
626 void NTLMSSPOWFencrypt(uchar passwd
[8], uchar
*ntlmchalresp
, uchar p24
[24]);
627 void SMBNTencrypt(uchar
*passwd
, uchar
*c8
, uchar
*p24
);
628 BOOL
make_oem_passwd_hash(char data
[516], const char *passwd
, uchar old_pw_hash
[16], BOOL unicode
);
630 /*The following definitions come from libsmb/smberr.c */
632 char *smb_errstr(char *inbuf
);
634 /*The following definitions come from locking/locking.c */
636 BOOL
is_locked(files_struct
*fsp
,connection_struct
*conn
,
637 SMB_OFF_T count
,SMB_OFF_T offset
, int lock_type
);
638 BOOL
do_lock(files_struct
*fsp
,connection_struct
*conn
,
639 SMB_OFF_T count
,SMB_OFF_T offset
,int lock_type
,
640 int *eclass
,uint32
*ecode
);
641 BOOL
do_unlock(files_struct
*fsp
,connection_struct
*conn
,
642 SMB_OFF_T count
,SMB_OFF_T offset
,int *eclass
,uint32
*ecode
);
643 BOOL
locking_init(int read_only
);
644 BOOL
locking_end(void);
645 BOOL
lock_share_entry(connection_struct
*conn
,
646 SMB_DEV_T dev
, SMB_INO_T inode
, int *ptok
);
647 BOOL
unlock_share_entry(connection_struct
*conn
,
648 SMB_DEV_T dev
, SMB_INO_T inode
, int token
);
649 int get_share_modes(connection_struct
*conn
,
650 int token
, SMB_DEV_T dev
, SMB_INO_T inode
,
651 share_mode_entry
**shares
);
652 void del_share_mode(int token
, files_struct
*fsp
);
653 BOOL
set_share_mode(int token
, files_struct
*fsp
, uint16 port
, uint16 op_type
);
654 BOOL
remove_share_oplock(int token
, files_struct
*fsp
);
655 BOOL
downgrade_share_oplock(int token
, files_struct
*fsp
);
656 BOOL
modify_share_mode(int token
, files_struct
*fsp
, int new_mode
, uint16 new_oplock
);
657 int share_mode_forall(void (*fn
)(share_mode_entry
*, char *));
658 void share_status(FILE *f
);
660 /*The following definitions come from locking/locking_shm.c */
662 struct share_ops
*locking_shm_init(int ronly
);
664 /*The following definitions come from locking/locking_slow.c */
666 struct share_ops
*locking_slow_init(int ronly
);
668 /*The following definitions come from locking/shmem.c */
670 struct shmem_ops
*smb_shm_open(int ronly
);
672 /*The following definitions come from locking/shmem_sysv.c */
674 struct shmem_ops
*sysv_shm_open(int ronly
);
676 /*The following definitions come from nmbd/asyncdns.c */
678 int asyncdns_fd(void);
679 void kill_async_dns_child(void);
680 void start_async_dns(void);
681 void run_dns_queue(void);
682 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
683 struct name_record
**n
);
684 BOOL
queue_dns_query(struct packet_struct
*p
,struct nmb_name
*question
,
685 struct name_record
**n
);
686 void kill_async_dns_child(void);
688 /*The following definitions come from nmbd/nmbd.c */
690 BOOL
reload_services(BOOL test
);
692 /*The following definitions come from nmbd/nmbd_become_dmb.c */
694 void add_domain_names(time_t t
);
696 /*The following definitions come from nmbd/nmbd_become_lmb.c */
698 void insert_permanent_name_into_unicast( struct subnet_record
*subrec
,
699 struct nmb_name
*nmbname
, uint16 nb_type
);
700 void unbecome_local_master_browser(struct subnet_record
*subrec
, struct work_record
*work
,
701 BOOL force_new_election
);
702 void become_local_master_browser(struct subnet_record
*subrec
, struct work_record
*work
);
703 void set_workgroup_local_master_browser_name( struct work_record
*work
, char *newname
);
705 /*The following definitions come from nmbd/nmbd_browserdb.c */
707 void update_browser_death_time( struct browse_cache_record
*browc
);
708 struct browse_cache_record
*create_browser_in_lmb_cache( char *work_name
,
711 struct browse_cache_record
*find_browser_in_lmb_cache( char *browser_name
);
712 void expire_lmb_browsers( time_t t
);
714 /*The following definitions come from nmbd/nmbd_browsesync.c */
716 void dmb_expire_and_sync_browser_lists(time_t t
);
717 void announce_and_sync_with_domain_master_browser( struct subnet_record
*subrec
,
718 struct work_record
*work
);
719 void collect_all_workgroup_names_from_wins_server(time_t t
);
720 void sync_all_dmbs(time_t t
);
722 /*The following definitions come from nmbd/nmbd_elections.c */
724 void check_master_browser_exists(time_t t
);
725 void run_elections(time_t t
);
726 void process_election(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
727 BOOL
check_elections(void);
729 /*The following definitions come from nmbd/nmbd_incomingdgrams.c */
731 void tell_become_backup(void);
732 void process_host_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
733 void process_workgroup_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
734 void process_local_master_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
735 void process_master_browser_announce(struct subnet_record
*subrec
,
736 struct packet_struct
*p
,char *buf
);
737 void process_lm_host_announce(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
738 void process_get_backup_list_request(struct subnet_record
*subrec
,
739 struct packet_struct
*p
,char *buf
);
740 void process_reset_browser(struct subnet_record
*subrec
,
741 struct packet_struct
*p
,char *buf
);
742 void process_announce_request(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
743 void process_lm_announce_request(struct subnet_record
*subrec
, struct packet_struct
*p
, char *buf
);
745 /*The following definitions come from nmbd/nmbd_incomingrequests.c */
747 void process_name_release_request(struct subnet_record
*subrec
,
748 struct packet_struct
*p
);
749 void process_name_refresh_request(struct subnet_record
*subrec
,
750 struct packet_struct
*p
);
751 void process_name_registration_request(struct subnet_record
*subrec
,
752 struct packet_struct
*p
);
753 void process_node_status_request(struct subnet_record
*subrec
, struct packet_struct
*p
);
754 void process_name_query_request(struct subnet_record
*subrec
, struct packet_struct
*p
);
756 /*The following definitions come from nmbd/nmbd_lmhosts.c */
758 void load_lmhosts_file(char *fname
);
759 BOOL
find_name_in_lmhosts(struct nmb_name
*nmbname
, struct name_record
**namerecp
);
761 /*The following definitions come from nmbd/nmbd_logonnames.c */
763 void add_logon_names(void);
765 /*The following definitions come from nmbd/nmbd_mynames.c */
767 void register_my_workgroup_one_subnet(struct subnet_record
*subrec
);
768 BOOL
register_my_workgroup_and_names(void);
769 void release_my_names(void);
770 void refresh_my_names(time_t t
);
772 /*The following definitions come from nmbd/nmbd_namelistdb.c */
774 void set_samba_nb_type(void);
775 void remove_name_from_namelist( struct subnet_record
*subrec
,
776 struct name_record
*namerec
);
777 struct name_record
*find_name_on_subnet( struct subnet_record
*subrec
,
778 struct nmb_name
*nmbname
,
780 struct name_record
*find_name_for_remote_broadcast_subnet(
781 struct nmb_name
*nmbname
,
783 void update_name_ttl( struct name_record
*namerec
, int ttl
);
784 struct name_record
*add_name_to_subnet( struct subnet_record
*subrec
,
789 enum name_source source
,
791 struct in_addr
*iplist
);
792 void standard_success_register(struct subnet_record
*subrec
,
793 struct userdata_struct
*userdata
,
794 struct nmb_name
*nmbname
, uint16 nb_flags
, int ttl
,
795 struct in_addr registered_ip
);
796 void standard_fail_register( struct subnet_record
*subrec
,
797 struct response_record
*rrec
,
798 struct nmb_name
*nmbname
);
799 BOOL
find_ip_in_name_record( struct name_record
*namerec
, struct in_addr ip
);
800 void add_ip_to_name_record( struct name_record
*namerec
, struct in_addr new_ip
);
801 void remove_ip_from_name_record( struct name_record
*namerec
,
802 struct in_addr remove_ip
);
803 void standard_success_release( struct subnet_record
*subrec
,
804 struct userdata_struct
*userdata
,
805 struct nmb_name
*nmbname
,
806 struct in_addr released_ip
);
807 void expire_names_on_subnet(struct subnet_record
*subrec
, time_t t
);
808 void expire_names(time_t t
);
809 void add_samba_names_to_subnet( struct subnet_record
*subrec
);
810 void dump_all_namelists(void);
812 /*The following definitions come from nmbd/nmbd_namequery.c */
814 BOOL
query_name(struct subnet_record
*subrec
, char *name
, int type
,
815 query_name_success_function success_fn
,
816 query_name_fail_function fail_fn
,
817 struct userdata_struct
*userdata
);
818 BOOL
query_name_from_wins_server(struct in_addr ip_to
,
819 char *name
, int type
,
820 query_name_success_function success_fn
,
821 query_name_fail_function fail_fn
,
822 struct userdata_struct
*userdata
);
824 /*The following definitions come from nmbd/nmbd_nameregister.c */
826 BOOL
register_name(struct subnet_record
*subrec
,
827 char *name
, int type
, uint16 nb_flags
,
828 register_name_success_function success_fn
,
829 register_name_fail_function fail_fn
,
830 struct userdata_struct
*userdata
);
831 BOOL
refresh_name(struct subnet_record
*subrec
, struct name_record
*namerec
,
832 refresh_name_success_function success_fn
,
833 refresh_name_fail_function fail_fn
,
834 struct userdata_struct
*userdata
);
836 /*The following definitions come from nmbd/nmbd_namerelease.c */
838 BOOL
release_name(struct subnet_record
*subrec
, struct name_record
*namerec
,
839 release_name_success_function success_fn
,
840 release_name_fail_function fail_fn
,
841 struct userdata_struct
*userdata
);
843 /*The following definitions come from nmbd/nmbd_nodestatus.c */
845 BOOL
node_status(struct subnet_record
*subrec
, struct nmb_name
*nmbname
,
846 struct in_addr send_ip
, node_status_success_function success_fn
,
847 node_status_fail_function fail_fn
, struct userdata_struct
*userdata
);
849 /*The following definitions come from nmbd/nmbd_packets.c */
851 uint16
get_nb_flags(char *buf
);
852 void set_nb_flags(char *buf
, uint16 nb_flags
);
853 struct response_record
*queue_register_name( struct subnet_record
*subrec
,
854 response_function resp_fn
,
855 timeout_response_function timeout_fn
,
856 register_name_success_function success_fn
,
857 register_name_fail_function fail_fn
,
858 struct userdata_struct
*userdata
,
859 struct nmb_name
*nmbname
,
861 struct response_record
*queue_register_multihomed_name( struct subnet_record
*subrec
,
862 response_function resp_fn
,
863 timeout_response_function timeout_fn
,
864 register_name_success_function success_fn
,
865 register_name_fail_function fail_fn
,
866 struct userdata_struct
*userdata
,
867 struct nmb_name
*nmbname
,
869 struct in_addr register_ip
);
870 struct response_record
*queue_release_name( struct subnet_record
*subrec
,
871 response_function resp_fn
,
872 timeout_response_function timeout_fn
,
873 release_name_success_function success_fn
,
874 release_name_fail_function fail_fn
,
875 struct userdata_struct
*userdata
,
876 struct nmb_name
*nmbname
,
878 struct in_addr release_ip
);
879 struct response_record
*queue_refresh_name( struct subnet_record
*subrec
,
880 response_function resp_fn
,
881 timeout_response_function timeout_fn
,
882 refresh_name_success_function success_fn
,
883 refresh_name_fail_function fail_fn
,
884 struct userdata_struct
*userdata
,
885 struct name_record
*namerec
,
886 struct in_addr refresh_ip
);
887 struct response_record
*queue_query_name( struct subnet_record
*subrec
,
888 response_function resp_fn
,
889 timeout_response_function timeout_fn
,
890 query_name_success_function success_fn
,
891 query_name_fail_function fail_fn
,
892 struct userdata_struct
*userdata
,
893 struct nmb_name
*nmbname
);
894 struct response_record
*queue_query_name_from_wins_server( struct in_addr to_ip
,
895 response_function resp_fn
,
896 timeout_response_function timeout_fn
,
897 query_name_success_function success_fn
,
898 query_name_fail_function fail_fn
,
899 struct userdata_struct
*userdata
,
900 struct nmb_name
*nmbname
);
901 struct response_record
*queue_node_status( struct subnet_record
*subrec
,
902 response_function resp_fn
,
903 timeout_response_function timeout_fn
,
904 node_status_success_function success_fn
,
905 node_status_fail_function fail_fn
,
906 struct userdata_struct
*userdata
,
907 struct nmb_name
*nmbname
,
908 struct in_addr send_ip
);
909 void reply_netbios_packet(struct packet_struct
*orig_packet
,
910 int rcode
, enum netbios_reply_type_code rcv_code
, int opcode
,
911 int ttl
, char *data
,int len
);
912 void run_packet_queue(void);
913 void retransmit_or_expire_response_records(time_t t
);
914 BOOL
listen_for_packets(BOOL run_election
);
915 BOOL
send_mailslot(BOOL unique
, char *mailslot
,char *buf
,int len
,
916 char *srcname
, int src_type
,
917 char *dstname
, int dest_type
,
918 struct in_addr dest_ip
,struct in_addr src_ip
,
921 /*The following definitions come from nmbd/nmbd_processlogon.c */
923 void process_logon_packet(struct packet_struct
*p
,char *buf
,int len
,
926 /*The following definitions come from nmbd/nmbd_responserecordsdb.c */
928 void remove_response_record(struct subnet_record
*subrec
,
929 struct response_record
*rrec
);
930 struct response_record
*make_response_record( struct subnet_record
*subrec
,
931 struct packet_struct
*p
,
932 response_function resp_fn
,
933 timeout_response_function timeout_fn
,
934 success_function success_fn
,
935 fail_function fail_fn
,
936 struct userdata_struct
*userdata
);
937 struct response_record
*find_response_record(struct subnet_record
**ppsubrec
,
939 BOOL
is_refresh_already_queued(struct subnet_record
*subrec
, struct name_record
*namerec
);
941 /*The following definitions come from nmbd/nmbd_sendannounce.c */
943 void send_browser_reset(int reset_type
, char *to_name
, int to_type
, struct in_addr to_ip
);
944 void broadcast_announce_request(struct subnet_record
*subrec
, struct work_record
*work
);
945 void announce_my_server_names(time_t t
);
946 void announce_my_lm_server_names(time_t t
);
947 void reset_announce_timer(void);
948 void announce_myself_to_domain_master_browser(time_t t
);
949 void announce_my_servers_removed(void);
950 void announce_remote(time_t t
);
951 void browse_sync_remote(time_t t
);
953 /*The following definitions come from nmbd/nmbd_serverlistdb.c */
955 void remove_all_servers(struct work_record
*work
);
956 struct server_record
*find_server_in_workgroup(struct work_record
*work
, char *name
);
957 void remove_server_from_workgroup(struct work_record
*work
, struct server_record
*servrec
);
958 struct server_record
*create_server_on_workgroup(struct work_record
*work
,
959 char *name
,int servertype
,
960 int ttl
,char *comment
);
961 void update_server_ttl(struct server_record
*servrec
, int ttl
);
962 void expire_servers(struct work_record
*work
, time_t t
);
963 void write_browse_list(time_t t
, BOOL force_write
);
965 /*The following definitions come from nmbd/nmbd_subnetdb.c */
967 void close_subnet(struct subnet_record
*subrec
);
968 struct subnet_record
*make_normal_subnet(struct interface
*iface
);
969 BOOL
create_subnets(void);
970 BOOL
we_are_a_wins_client(void);
971 struct subnet_record
*get_next_subnet_maybe_unicast(struct subnet_record
*subrec
);
972 struct subnet_record
*get_next_subnet_maybe_unicast_or_wins_server(struct subnet_record
*subrec
);
974 /*The following definitions come from nmbd/nmbd_synclists.c */
976 void sync_browse_lists(struct work_record
*work
,
977 char *name
, int nm_type
,
978 struct in_addr ip
, BOOL local
, BOOL servers
);
979 void sync_check_completion(void);
981 /*The following definitions come from nmbd/nmbd_winsproxy.c */
983 void make_wins_proxy_name_query_request( struct subnet_record
*subrec
,
984 struct packet_struct
*incoming_packet
,
985 struct nmb_name
*question_name
);
987 /*The following definitions come from nmbd/nmbd_winsserver.c */
989 BOOL
packet_is_for_wins_server(struct packet_struct
*packet
);
990 BOOL
initialise_wins(void);
991 void wins_process_name_refresh_request(struct subnet_record
*subrec
,
992 struct packet_struct
*p
);
993 void wins_process_name_registration_request(struct subnet_record
*subrec
,
994 struct packet_struct
*p
);
995 void wins_process_multihomed_name_registration_request( struct subnet_record
*subrec
,
996 struct packet_struct
*p
);
997 void send_wins_name_query_response(int rcode
, struct packet_struct
*p
,
998 struct name_record
*namerec
);
999 void wins_process_name_query_request(struct subnet_record
*subrec
,
1000 struct packet_struct
*p
);
1001 void wins_process_name_release_request(struct subnet_record
*subrec
,
1002 struct packet_struct
*p
);
1003 void initiate_wins_processing(time_t t
);
1004 void wins_write_database(BOOL background
);
1006 /*The following definitions come from nmbd/nmbd_workgroupdb.c */
1008 struct work_record
*find_workgroup_on_subnet(struct subnet_record
*subrec
,
1010 struct work_record
*create_workgroup_on_subnet(struct subnet_record
*subrec
,
1011 fstring name
, int ttl
);
1012 void update_workgroup_ttl(struct work_record
*work
, int ttl
);
1013 void initiate_myworkgroup_startup(struct subnet_record
*subrec
, struct work_record
*work
);
1014 void dump_workgroups(BOOL force_write
);
1015 void expire_workgroups_and_servers(time_t t
);
1017 /*The following definitions come from param/loadparm.c */
1019 void lp_talloc_free(void);
1020 char *lp_logfile(void);
1021 char *lp_smbrun(void);
1022 char *lp_configfile(void);
1023 char *lp_smb_passwd_file(void);
1024 char *lp_serverstring(void);
1025 char *lp_printcapname(void);
1026 char *lp_lockdir(void);
1027 char *lp_utmpdir(void);
1028 char *lp_wtmpdir(void);
1029 char *lp_utmp_hostname(void);
1030 BOOL
lp_utmp_consolidate(void);
1031 char *lp_rootdir(void);
1032 char *lp_source_environment(void);
1033 char *lp_defaultservice(void);
1034 char *lp_msg_command(void);
1035 char *lp_dfree_command(void);
1036 char *lp_hosts_equiv(void);
1037 char *lp_auto_services(void);
1038 char *lp_passwd_program(void);
1039 char *lp_passwd_chat(void);
1040 char *lp_passwordserver(void);
1041 char *lp_name_resolve_order(void);
1042 char *lp_workgroup(void);
1043 char *lp_username_map(void);
1044 char *lp_groupname_map(void);
1045 char *lp_logon_script(void);
1046 char *lp_logon_path(void);
1047 char *lp_logon_drive(void);
1048 char *lp_logon_home(void);
1049 char *lp_remote_announce(void);
1050 char *lp_remote_browse_sync(void);
1051 char *lp_wins_server(void);
1052 char *lp_interfaces(void);
1053 char *lp_socket_address(void);
1054 char *lp_nis_home_map_name(void);
1055 char *lp_netbios_aliases(void);
1056 char *lp_driverfile(void);
1057 char *lp_panic_action(void);
1058 char *lp_adduser_script(void);
1059 char *lp_deluser_script(void);
1060 char *lp_wins_hook(void);
1061 char *lp_domain_groups(void);
1062 char *lp_domain_admin_group(void);
1063 char *lp_domain_guest_group(void);
1064 char *lp_domain_admin_users(void);
1065 char *lp_domain_guest_users(void);
1066 char *lp_ldap_server(void);
1067 char *lp_ldap_suffix(void);
1068 char *lp_ldap_filter(void);
1069 char *lp_ldap_root(void);
1070 char *lp_ldap_rootpasswd(void);
1071 int lp_ssl_version(void);
1072 char *lp_ssl_hosts(void);
1073 char *lp_ssl_hosts_resign(void);
1074 char *lp_ssl_cacertdir(void);
1075 char *lp_ssl_cacertfile(void);
1076 char *lp_ssl_cert(void);
1077 char *lp_ssl_privkey(void);
1078 char *lp_ssl_client_cert(void);
1079 char *lp_ssl_client_privkey(void);
1080 char *lp_ssl_ciphers(void);
1081 BOOL
lp_ssl_enabled(void);
1082 BOOL
lp_ssl_reqClientCert(void);
1083 BOOL
lp_ssl_reqServerCert(void);
1084 BOOL
lp_ssl_compatibility(void);
1085 BOOL
lp_dns_proxy(void);
1086 BOOL
lp_wins_support(void);
1087 BOOL
lp_we_are_a_wins_server(void);
1088 BOOL
lp_wins_proxy(void);
1089 BOOL
lp_local_master(void);
1090 BOOL
lp_domain_master(void);
1091 BOOL
lp_domain_logons(void);
1092 BOOL
lp_preferred_master(void);
1093 BOOL
lp_load_printers(void);
1094 BOOL
lp_use_rhosts(void);
1095 BOOL
lp_readprediction(void);
1096 BOOL
lp_readbmpx(void);
1097 BOOL
lp_readraw(void);
1098 BOOL
lp_writeraw(void);
1099 BOOL
lp_null_passwords(void);
1100 BOOL
lp_strip_dot(void);
1101 BOOL
lp_encrypted_passwords(void);
1102 BOOL
lp_update_encrypted(void);
1103 BOOL
lp_syslog_only(void);
1104 BOOL
lp_timestamp_logs(void);
1105 BOOL
lp_debug_hires_timestamp(void);
1106 BOOL
lp_debug_pid(void);
1107 BOOL
lp_debug_uid(void);
1108 BOOL
lp_browse_list(void);
1109 BOOL
lp_unix_realname(void);
1110 BOOL
lp_nis_home_map(void);
1111 BOOL
lp_bind_interfaces_only(void);
1112 BOOL
lp_unix_password_sync(void);
1113 BOOL
lp_passwd_chat_debug(void);
1114 BOOL
lp_ole_locking_compat(void);
1115 BOOL
lp_nt_smb_support(void);
1116 BOOL
lp_nt_pipe_support(void);
1117 BOOL
lp_nt_acl_support(void);
1118 BOOL
lp_stat_cache(void);
1119 BOOL
lp_allow_trusted_domains(void);
1120 BOOL
lp_restrict_anonymous(void);
1121 int lp_os_level(void);
1122 int lp_max_ttl(void);
1123 int lp_max_wins_ttl(void);
1124 int lp_min_wins_ttl(void);
1125 int lp_max_log_size(void);
1126 int lp_max_open_files(void);
1127 int lp_maxxmit(void);
1128 int lp_maxmux(void);
1129 int lp_passwordlevel(void);
1130 int lp_usernamelevel(void);
1131 int lp_readsize(void);
1132 int lp_shmem_size(void);
1133 int lp_deadtime(void);
1134 int lp_maxprotocol(void);
1135 int lp_security(void);
1136 int lp_maxdisksize(void);
1137 int lp_lpqcachetime(void);
1138 int lp_syslog(void);
1139 int lp_client_code_page(void);
1140 int lp_lm_announce(void);
1141 int lp_lm_interval(void);
1142 int lp_machine_password_timeout(void);
1143 int lp_change_notify_timeout(void);
1144 int lp_stat_cache_size(void);
1145 int lp_map_to_guest(void);
1146 int lp_min_passwd_length(void);
1147 int lp_oplock_break_wait_time(void);
1148 int lp_ldap_port(void);
1149 char *lp_preexec(int );
1150 char *lp_postexec(int );
1151 char *lp_rootpreexec(int );
1152 char *lp_rootpostexec(int );
1153 char *lp_servicename(int );
1154 char *lp_pathname(int );
1155 char *lp_dontdescend(int );
1156 char *lp_username(int );
1157 char *lp_guestaccount(int );
1158 char *lp_invalid_users(int );
1159 char *lp_valid_users(int );
1160 char *lp_admin_users(int );
1161 char *lp_printcommand(int );
1162 char *lp_lpqcommand(int );
1163 char *lp_lprmcommand(int );
1164 char *lp_lppausecommand(int );
1165 char *lp_lpresumecommand(int );
1166 char *lp_queuepausecommand(int );
1167 char *lp_queueresumecommand(int );
1168 char *lp_printername(int );
1169 char *lp_printerdriver(int );
1170 char *lp_hostsallow(int );
1171 char *lp_hostsdeny(int );
1172 char *lp_magicscript(int );
1173 char *lp_magicoutput(int );
1174 char *lp_comment(int );
1175 char *lp_force_user(int );
1176 char *lp_force_group(int );
1177 char *lp_readlist(int );
1178 char *lp_writelist(int );
1179 char *lp_fstype(int );
1180 char *lp_mangled_map(int );
1181 char *lp_veto_files(int );
1182 char *lp_hide_files(int );
1183 char *lp_veto_oplocks(int );
1184 char *lp_driverlocation(int );
1185 BOOL
lp_preexec_close(int );
1186 BOOL
lp_rootpreexec_close(int );
1187 BOOL
lp_revalidate(int );
1188 BOOL
lp_casesensitive(int );
1189 BOOL
lp_preservecase(int );
1190 BOOL
lp_shortpreservecase(int );
1191 BOOL
lp_casemangle(int );
1192 BOOL
lp_status(int );
1193 BOOL
lp_hide_dot_files(int );
1194 BOOL
lp_browseable(int );
1195 BOOL
lp_readonly(int );
1196 BOOL
lp_no_set_dir(int );
1197 BOOL
lp_guest_ok(int );
1198 BOOL
lp_guest_only(int );
1199 BOOL
lp_print_ok(int );
1200 BOOL
lp_postscript(int );
1201 BOOL
lp_map_hidden(int );
1202 BOOL
lp_map_archive(int );
1203 BOOL
lp_locking(int );
1204 BOOL
lp_strict_locking(int );
1206 BOOL
lp_share_modes(int );
1207 BOOL
lp_oplocks(int );
1208 BOOL
lp_level2_oplocks(int );
1209 BOOL
lp_onlyuser(int );
1210 BOOL
lp_manglednames(int );
1211 BOOL
lp_widelinks(int );
1212 BOOL
lp_symlinks(int );
1213 BOOL
lp_syncalways(int );
1214 BOOL
lp_strict_sync(int );
1215 BOOL
lp_map_system(int );
1216 BOOL
lp_delete_readonly(int );
1217 BOOL
lp_fake_oplocks(int );
1218 BOOL
lp_recursive_veto_delete(int );
1219 BOOL
lp_dos_filetimes(int );
1220 BOOL
lp_dos_filetime_resolution(int );
1221 BOOL
lp_fake_dir_create_times(int );
1222 BOOL
lp_blocking_locks(int );
1223 BOOL
lp_inherit_perms(int );
1224 int lp_create_mask(int );
1225 int lp_force_create_mode(int );
1226 int _lp_security_mask(int );
1227 int _lp_force_security_mode(int );
1228 int lp_dir_mask(int );
1229 int lp_force_dir_mode(int );
1230 int _lp_dir_security_mask(int );
1231 int _lp_force_dir_security_mode(int );
1232 int lp_max_connections(int );
1233 int lp_defaultcase(int );
1234 int lp_minprintspace(int );
1235 int lp_printing(int );
1236 int lp_oplock_contention_limit(int );
1237 int lp_write_cache_size(int );
1238 char lp_magicchar(int );
1239 BOOL
lp_add_home(char *pszHomename
, int iDefaultService
, char *pszHomedir
);
1240 int lp_add_service(char *pszService
, int iDefaultService
);
1241 BOOL
lp_add_printer(char *pszPrintername
, int iDefaultService
);
1242 BOOL
lp_file_list_changed(void);
1243 void *lp_local_ptr(int snum
, void *ptr
);
1244 BOOL
lp_do_parameter(int snum
, char *pszParmName
, char *pszParmValue
);
1245 BOOL
lp_is_default(int snum
, struct parm_struct
*parm
);
1246 struct parm_struct
*lp_next_parameter(int snum
, int *i
, int allparameters
);
1247 BOOL
lp_snum_ok(int iService
);
1248 void lp_add_one_printer(char *name
,char *comment
);
1249 BOOL
lp_loaded(void);
1250 void lp_killunused(BOOL (*snumused
)(int ));
1251 BOOL
lp_load(char *pszFname
,BOOL global_only
, BOOL save_defaults
, BOOL add_ipc
);
1252 void lp_resetnumservices(void);
1253 int lp_numservices(void);
1254 void lp_dump(FILE *f
, BOOL show_defaults
, int maxtoprint
);
1255 void lp_dump_one(FILE *f
, BOOL show_defaults
, int snum
);
1256 int lp_servicenumber(char *pszServiceName
);
1257 char *volume_label(int snum
);
1258 void lp_remove_service(int snum
);
1259 void lp_copy_service(int snum
, char *new_name
);
1260 int lp_default_server_announce(void);
1261 int lp_major_announce_version(void);
1262 int lp_minor_announce_version(void);
1263 void lp_set_name_resolve_order(char *new_order
);
1264 void lp_set_kernel_oplocks(BOOL val
);
1265 BOOL
lp_kernel_oplocks(void);
1266 int lp_security_mask(int snum
);
1267 int lp_force_security_mode(int snum
);
1268 int lp_dir_security_mask(int snum
);
1269 int lp_force_dir_security_mode(int snum
);
1271 /*The following definitions come from param/params.c */
1273 BOOL
pm_process( char *FileName
,
1274 BOOL (*sfunc
)(char *),
1275 BOOL (*pfunc
)(char *, char *) );
1277 /*The following definitions come from passdb/ldap.c */
1279 struct passdb_ops
*ldap_initialize_password_db(void);
1281 /*The following definitions come from passdb/nispass.c */
1283 struct passdb_ops
*nisplus_initialize_password_db(void);
1285 /*The following definitions come from passdb/pass_check.c */
1287 void dfs_unlogin(void);
1288 BOOL
pass_check(char *user
,char *password
, int pwlen
, struct passwd
*pwd
,
1289 BOOL (*fn
)(char *, char *));
1291 /*The following definitions come from passdb/passdb.c */
1293 BOOL
initialize_password_db(void);
1294 struct smb_passwd
*iterate_getsmbpwrid(uint32 user_rid
);
1295 struct smb_passwd
*iterate_getsmbpwuid(uid_t smb_userid
);
1296 struct smb_passwd
*iterate_getsmbpwnam(char *name
);
1297 void *startsmbpwent(BOOL update
);
1298 void endsmbpwent(void *vp
);
1299 struct smb_passwd
*getsmbpwent(void *vp
);
1300 BOOL
add_smbpwd_entry(struct smb_passwd
*newpwd
);
1301 BOOL
mod_smbpwd_entry(struct smb_passwd
* pwd
, BOOL override
);
1302 BOOL
del_smbpwd_entry(const char *name
);
1303 struct smb_passwd
*getsmbpwnam(char *name
);
1304 struct smb_passwd
*getsmbpwrid(uint32 user_rid
);
1305 struct smb_passwd
*getsmbpwuid(uid_t smb_userid
);
1306 struct sam_passwd
*iterate_getsam21pwnam(char *name
);
1307 struct sam_passwd
*iterate_getsam21pwrid(uint32 rid
);
1308 struct sam_passwd
*iterate_getsam21pwuid(uid_t uid
);
1309 struct sam_disp_info
*getsamdisprid(uint32 rid
);
1310 struct sam_passwd
*getsam21pwent(void *vp
);
1311 struct sam_passwd
*getsam21pwnam(char *name
);
1312 struct sam_passwd
*getsam21pwrid(uint32 rid
);
1313 void pdb_init_smb(struct smb_passwd
*user
);
1314 void pdb_init_sam(struct sam_passwd
*user
);
1315 struct sam_disp_info
*pdb_sam_to_dispinfo(struct sam_passwd
*user
);
1316 struct smb_passwd
*pdb_sam_to_smb(struct sam_passwd
*user
);
1317 struct sam_passwd
*pdb_smb_to_sam(struct smb_passwd
*user
);
1318 char *pdb_encode_acct_ctrl(uint16 acct_ctrl
, size_t length
);
1319 uint16
pdb_decode_acct_ctrl(const char *p
);
1320 time_t pdb_get_last_set_time(const char *p
);
1321 void pdb_set_logon_time(char *p
, int max_len
, time_t t
);
1322 void pdb_set_logoff_time(char *p
, int max_len
, time_t t
);
1323 void pdb_set_kickoff_time(char *p
, int max_len
, time_t t
);
1324 void pdb_set_can_change_time(char *p
, int max_len
, time_t t
);
1325 void pdb_set_must_change_time(char *p
, int max_len
, time_t t
);
1326 void pdb_set_last_set_time(char *p
, int max_len
, time_t t
);
1327 void pdb_sethexpwd(char *p
, unsigned char *pwd
, uint16 acct_ctrl
);
1328 BOOL
pdb_gethexpwd(char *p
, unsigned char *pwd
);
1329 BOOL
pdb_name_to_rid(char *user_name
, uint32
*u_rid
, uint32
*g_rid
);
1330 BOOL
pdb_generate_sam_sid(void);
1331 uid_t
pdb_user_rid_to_uid(uint32 user_rid
);
1332 gid_t
pdb_user_rid_to_gid(uint32 user_rid
);
1333 uint32
pdb_uid_to_user_rid(uid_t uid
);
1334 uint32
pdb_gid_to_group_rid(gid_t gid
);
1335 BOOL
pdb_rid_is_user(uint32 rid
);
1336 BOOL
lookup_local_rid(uint32 rid
, char *name
, uint8
*psid_name_use
);
1337 BOOL
lookup_local_name(char *domain
, char *user
, DOM_SID
*psid
, uint8
*psid_name_use
);
1339 /*The following definitions come from passdb/smbpass.c */
1341 char *format_new_smbpasswd_entry(struct smb_passwd
*newpwd
);
1342 struct passdb_ops
*file_initialize_password_db(void);
1344 /*The following definitions come from passdb/smbpasschange.c */
1346 BOOL
local_password_change(char *user_name
, int local_flags
,
1348 char *err_str
, size_t err_str_len
,
1349 char *msg_str
, size_t msg_str_len
);
1351 /*The following definitions come from passdb/smbpassfile.c */
1353 BOOL
pw_file_lock(int fd
, int type
, int secs
, int *plock_depth
);
1354 BOOL
pw_file_unlock(int fd
, int *plock_depth
);
1355 BOOL
trust_password_lock( char *domain
, char *name
, BOOL update
);
1356 BOOL
trust_password_unlock(void);
1357 BOOL
trust_password_delete( char *domain
, char *name
);
1358 BOOL
get_trust_account_password( unsigned char *ret_pwd
, time_t *pass_last_set_time
);
1359 BOOL
set_trust_account_password( unsigned char *md4_new_pwd
);
1360 BOOL
trust_get_passwd( unsigned char trust_passwd
[16], char *domain
, char *myname
);
1362 /*The following definitions come from printing/pcap.c */
1364 BOOL
pcap_printername_ok(char *pszPrintername
, char *pszPrintcapname
);
1365 void pcap_printer_fn(void (*fn
)(char *, char *));
1367 /*The following definitions come from printing/print_cups.c */
1369 void cups_printer_fn(void (*fn
)(char *, char *));
1370 int cups_printername_ok(char *name
);
1372 /*The following definitions come from printing/print_svid.c */
1374 void sysv_printer_fn(void (*fn
)(char *, char *));
1375 int sysv_printername_ok(char *name
);
1377 /*The following definitions come from printing/printing.c */
1379 void lpq_reset(int snum
);
1380 void print_file(connection_struct
*conn
, files_struct
*file
);
1381 int get_printqueue(int snum
,
1382 connection_struct
*conn
,print_queue_struct
**queue
,
1383 print_status_struct
*status
);
1384 void del_printqueue(connection_struct
*conn
,int snum
,int jobid
);
1385 void status_printjob(connection_struct
*conn
,int snum
,int jobid
,int status
);
1386 int printjob_encode(int snum
, int job
);
1387 void printjob_decode(int jobid
, int *snum
, int *job
);
1388 void status_printqueue(connection_struct
*conn
,int snum
,int status
);
1389 void load_printers(void);
1391 /*The following definitions come from profile/profile.c */
1393 BOOL
profile_setup(BOOL rdonly
);
1395 /*The following definitions come from rpc_client/cli_login.c */
1397 BOOL
cli_nt_setup_creds(struct cli_state
*cli
, unsigned char mach_pwd
[16]);
1398 BOOL
cli_nt_srv_pwset(struct cli_state
*cli
, unsigned char *new_hashof_mach_pwd
);
1399 BOOL
cli_nt_login_interactive(struct cli_state
*cli
, char *domain
, char *username
,
1400 uint32 smb_userid_low
, char *password
,
1401 NET_ID_INFO_CTR
*ctr
, NET_USER_INFO_3
*user_info3
);
1402 BOOL
cli_nt_login_network(struct cli_state
*cli
, char *domain
, char *username
,
1403 uint32 smb_userid_low
, char lm_chal
[8], char lm_chal_resp
[24],
1404 char nt_chal_resp
[24],
1405 NET_ID_INFO_CTR
*ctr
, NET_USER_INFO_3
*user_info3
);
1406 BOOL
cli_nt_logoff(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
);
1408 /*The following definitions come from rpc_client/cli_lsarpc.c */
1410 BOOL
do_lsa_open_policy(struct cli_state
*cli
,
1411 char *server_name
, POLICY_HND
*hnd
,
1413 BOOL
do_lsa_lookup_sids(struct cli_state
*cli
,
1419 BOOL
do_lsa_query_info_pol(struct cli_state
*cli
,
1420 POLICY_HND
*hnd
, uint16 info_class
,
1421 fstring domain_name
, DOM_SID
*domain_sid
);
1422 BOOL
do_lsa_close(struct cli_state
*cli
, POLICY_HND
*hnd
);
1424 /*The following definitions come from rpc_client/cli_netlogon.c */
1426 BOOL
cli_net_logon_ctrl2(struct cli_state
*cli
, uint32 status_level
);
1427 BOOL
cli_net_auth2(struct cli_state
*cli
, uint16 sec_chan
,
1428 uint32 neg_flags
, DOM_CHAL
*srv_chal
);
1429 BOOL
cli_net_req_chal(struct cli_state
*cli
, DOM_CHAL
*clnt_chal
, DOM_CHAL
*srv_chal
);
1430 BOOL
cli_net_srv_pwset(struct cli_state
*cli
, uint8 hashed_mach_pwd
[16]);
1431 BOOL
cli_net_sam_logon(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
,
1432 NET_USER_INFO_3
*user_info3
);
1433 BOOL
cli_net_sam_logoff(struct cli_state
*cli
, NET_ID_INFO_CTR
*ctr
);
1434 BOOL
change_trust_account_password( char *domain
, char *remote_machine_list
);
1436 /*The following definitions come from rpc_client/cli_pipe.c */
1438 BOOL
rpc_api_pipe_req(struct cli_state
*cli
, uint8 op_num
,
1439 prs_struct
*data
, prs_struct
*rdata
);
1440 void cli_nt_set_ntlmssp_flgs(struct cli_state
*cli
, uint32 ntlmssp_flgs
);
1441 BOOL
cli_nt_session_open(struct cli_state
*cli
, char *pipe_name
);
1442 void cli_nt_session_close(struct cli_state
*cli
);
1444 /*The following definitions come from rpc_client/cli_reg.c */
1446 BOOL
do_reg_connect(struct cli_state
*cli
, char *full_keyname
, char *key_name
,
1447 POLICY_HND
*reg_hnd
);
1448 BOOL
do_reg_open_hklm(struct cli_state
*cli
, uint16 unknown_0
, uint32 level
,
1450 BOOL
do_reg_open_hku(struct cli_state
*cli
, uint16 unknown_0
, uint32 level
,
1452 BOOL
do_reg_flush_key(struct cli_state
*cli
, POLICY_HND
*hnd
);
1453 BOOL
do_reg_query_key(struct cli_state
*cli
, POLICY_HND
*hnd
,
1454 char *class, uint32
*class_len
,
1455 uint32
*num_subkeys
, uint32
*max_subkeylen
,
1456 uint32
*max_subkeysize
, uint32
*num_values
,
1457 uint32
*max_valnamelen
, uint32
*max_valbufsize
,
1458 uint32
*sec_desc
, NTTIME
*mod_time
);
1459 BOOL
do_reg_unknown_1a(struct cli_state
*cli
, POLICY_HND
*hnd
, uint32
*unk
);
1460 BOOL
do_reg_query_info(struct cli_state
*cli
, POLICY_HND
*hnd
,
1461 char *type
, uint32
*unk_0
, uint32
*unk_1
);
1462 BOOL
do_reg_set_key_sec(struct cli_state
*cli
, POLICY_HND
*hnd
, SEC_DESC_BUF
*sec_desc_buf
);
1463 BOOL
do_reg_get_key_sec(struct cli_state
*cli
, POLICY_HND
*hnd
, uint32
*sec_buf_size
, SEC_DESC_BUF
**ppsec_desc_buf
);
1464 BOOL
do_reg_delete_val(struct cli_state
*cli
, POLICY_HND
*hnd
, char *val_name
);
1465 BOOL
do_reg_delete_key(struct cli_state
*cli
, POLICY_HND
*hnd
, char *key_name
);
1466 BOOL
do_reg_create_key(struct cli_state
*cli
, POLICY_HND
*hnd
,
1467 char *key_name
, char *key_class
,
1468 SEC_ACCESS
*sam_access
,
1470 BOOL
do_reg_enum_key(struct cli_state
*cli
, POLICY_HND
*hnd
,
1471 int key_index
, char *key_name
,
1472 uint32
*unk_1
, uint32
*unk_2
,
1474 BOOL
do_reg_create_val(struct cli_state
*cli
, POLICY_HND
*hnd
,
1475 char *val_name
, uint32 type
, BUFFER3
*data
);
1476 BOOL
do_reg_enum_val(struct cli_state
*cli
, POLICY_HND
*hnd
,
1477 int val_index
, int max_valnamelen
, int max_valbufsize
,
1479 uint32
*val_type
, BUFFER2
*value
);
1480 BOOL
do_reg_open_entry(struct cli_state
*cli
, POLICY_HND
*hnd
,
1481 char *key_name
, uint32 unk_0
,
1482 POLICY_HND
*key_hnd
);
1483 BOOL
do_reg_close(struct cli_state
*cli
, POLICY_HND
*hnd
);
1485 /*The following definitions come from rpc_client/cli_samr.c */
1487 BOOL
get_samr_query_usergroups(struct cli_state
*cli
,
1488 POLICY_HND
*pol_open_domain
, uint32 user_rid
,
1489 uint32
*num_groups
, DOM_GID
*gid
);
1490 BOOL
get_samr_query_userinfo(struct cli_state
*cli
,
1491 POLICY_HND
*pol_open_domain
,
1493 uint32 user_rid
, SAM_USER_INFO_21
*usr
);
1494 BOOL
do_samr_chgpasswd_user(struct cli_state
*cli
,
1495 char *srv_name
, char *user_name
,
1496 char nt_newpass
[516], uchar nt_oldhash
[16],
1497 char lm_newpass
[516], uchar lm_oldhash
[16]);
1498 BOOL
do_samr_unknown_38(struct cli_state
*cli
, char *srv_name
);
1499 BOOL
do_samr_query_dom_info(struct cli_state
*cli
,
1500 POLICY_HND
*domain_pol
, uint16 switch_value
);
1501 BOOL
do_samr_enum_dom_users(struct cli_state
*cli
,
1502 POLICY_HND
*pol
, uint16 num_entries
, uint16 unk_0
,
1503 uint16 acb_mask
, uint16 unk_1
, uint32 size
,
1504 struct acct_info
**sam
,
1505 int *num_sam_users
);
1506 BOOL
do_samr_connect(struct cli_state
*cli
,
1507 char *srv_name
, uint32 unknown_0
,
1508 POLICY_HND
*connect_pol
);
1509 BOOL
do_samr_open_user(struct cli_state
*cli
,
1510 POLICY_HND
*pol
, uint32 unk_0
, uint32 rid
,
1511 POLICY_HND
*user_pol
);
1512 BOOL
do_samr_open_domain(struct cli_state
*cli
,
1513 POLICY_HND
*connect_pol
, uint32 rid
, DOM_SID
*sid
,
1514 POLICY_HND
*domain_pol
);
1515 BOOL
do_samr_query_unknown_12(struct cli_state
*cli
,
1516 POLICY_HND
*pol
, uint32 rid
, uint32 num_gids
, uint32
*gids
,
1517 uint32
*num_aliases
,
1518 fstring als_names
[MAX_LOOKUP_SIDS
],
1519 uint32 num_als_users
[MAX_LOOKUP_SIDS
]);
1520 BOOL
do_samr_query_usergroups(struct cli_state
*cli
,
1521 POLICY_HND
*pol
, uint32
*num_groups
, DOM_GID
*gid
);
1522 BOOL
do_samr_query_userinfo(struct cli_state
*cli
,
1523 POLICY_HND
*pol
, uint16 switch_value
, void* usr
);
1524 BOOL
do_samr_close(struct cli_state
*cli
, POLICY_HND
*hnd
);
1526 /*The following definitions come from rpc_client/cli_srvsvc.c */
1528 BOOL
do_srv_net_srv_conn_enum(struct cli_state
*cli
,
1529 char *server_name
, char *qual_name
,
1530 uint32 switch_value
, SRV_CONN_INFO_CTR
*ctr
,
1531 uint32 preferred_len
,
1533 BOOL
do_srv_net_srv_sess_enum(struct cli_state
*cli
,
1534 char *server_name
, char *qual_name
,
1535 uint32 switch_value
, SRV_SESS_INFO_CTR
*ctr
,
1536 uint32 preferred_len
,
1538 BOOL
do_srv_net_srv_share_enum(struct cli_state
*cli
,
1540 uint32 switch_value
, SRV_R_NET_SHARE_ENUM
*r_o
,
1541 uint32 preferred_len
, ENUM_HND
*hnd
);
1542 BOOL
do_srv_net_srv_file_enum(struct cli_state
*cli
,
1543 char *server_name
, char *qual_name
,
1544 uint32 switch_value
, SRV_FILE_INFO_CTR
*ctr
,
1545 uint32 preferred_len
,
1547 BOOL
do_srv_net_srv_get_info(struct cli_state
*cli
,
1548 char *server_name
, uint32 switch_value
, SRV_INFO_CTR
*ctr
);
1550 /*The following definitions come from rpc_client/cli_wkssvc.c */
1552 BOOL
do_wks_query_info(struct cli_state
*cli
,
1553 char *server_name
, uint32 switch_value
,
1554 WKS_INFO_100
*wks100
);
1556 /*The following definitions come from rpc_parse/parse_lsa.c */
1558 void init_lsa_trans_name(LSA_TRANS_NAME
*trn
, UNISTR2
*uni_name
,
1559 uint32 sid_name_use
, char *name
, uint32 idx
);
1560 void init_lsa_sec_qos(LSA_SEC_QOS
*qos
, uint16 imp_lev
, uint8 ctxt
, uint8 eff
,
1562 void init_lsa_obj_attr(LSA_OBJ_ATTR
*attr
, uint32 attributes
, LSA_SEC_QOS
*qos
);
1563 void init_q_open_pol(LSA_Q_OPEN_POL
*r_q
, uint16 system_name
,
1565 uint32 desired_access
,
1567 BOOL
lsa_io_q_open_pol(char *desc
, LSA_Q_OPEN_POL
*r_q
, prs_struct
*ps
, int depth
);
1568 BOOL
lsa_io_r_open_pol(char *desc
, LSA_R_OPEN_POL
*r_p
, prs_struct
*ps
, int depth
);
1569 void init_q_open_pol2(LSA_Q_OPEN_POL2
*r_q
, char *server_name
,
1571 uint32 desired_access
,
1573 BOOL
lsa_io_q_open_pol2(char *desc
, LSA_Q_OPEN_POL2
*r_q
, prs_struct
*ps
, int depth
);
1574 BOOL
lsa_io_r_open_pol2(char *desc
, LSA_R_OPEN_POL2
*r_p
, prs_struct
*ps
, int depth
);
1575 void init_q_query(LSA_Q_QUERY_INFO
*q_q
, POLICY_HND
*hnd
, uint16 info_class
);
1576 BOOL
lsa_io_q_query(char *desc
, LSA_Q_QUERY_INFO
*q_q
, prs_struct
*ps
, int depth
);
1577 BOOL
lsa_io_q_enum_trust_dom(char *desc
, LSA_Q_ENUM_TRUST_DOM
*q_e
, prs_struct
*ps
, int depth
);
1578 void init_r_enum_trust_dom(LSA_R_ENUM_TRUST_DOM
*r_e
,
1579 uint32 enum_context
, char *domain_name
, DOM_SID
*domain_sid
,
1581 BOOL
lsa_io_r_enum_trust_dom(char *desc
, LSA_R_ENUM_TRUST_DOM
*r_e
, prs_struct
*ps
, int depth
);
1582 BOOL
lsa_io_r_query(char *desc
, LSA_R_QUERY_INFO
*r_q
, prs_struct
*ps
, int depth
);
1583 void init_lsa_sid_enum(LSA_SID_ENUM
*sen
, int num_entries
, DOM_SID
**sids
);
1584 void init_q_lookup_sids(LSA_Q_LOOKUP_SIDS
*q_l
, POLICY_HND
*hnd
,
1585 int num_sids
, DOM_SID
**sids
,
1587 BOOL
lsa_io_q_lookup_sids(char *desc
, LSA_Q_LOOKUP_SIDS
*q_s
, prs_struct
*ps
, int depth
);
1588 BOOL
lsa_io_r_lookup_sids(char *desc
, LSA_R_LOOKUP_SIDS
*r_s
, prs_struct
*ps
, int depth
);
1589 void init_q_lookup_names(LSA_Q_LOOKUP_NAMES
*q_l
, POLICY_HND
*hnd
,
1590 int num_names
, char **names
);
1591 BOOL
lsa_io_q_lookup_names(char *desc
, LSA_Q_LOOKUP_NAMES
*q_r
, prs_struct
*ps
, int depth
);
1592 BOOL
lsa_io_r_lookup_names(char *desc
, LSA_R_LOOKUP_NAMES
*r_r
, prs_struct
*ps
, int depth
);
1593 void init_lsa_q_close(LSA_Q_CLOSE
*q_c
, POLICY_HND
*hnd
);
1594 BOOL
lsa_io_q_close(char *desc
, LSA_Q_CLOSE
*q_c
, prs_struct
*ps
, int depth
);
1595 BOOL
lsa_io_r_close(char *desc
, LSA_R_CLOSE
*r_c
, prs_struct
*ps
, int depth
);
1597 /*The following definitions come from rpc_parse/parse_misc.c */
1599 BOOL
smb_io_time(char *desc
, NTTIME
*nttime
, prs_struct
*ps
, int depth
);
1600 BOOL
smb_io_lookup_level(char *desc
, LOOKUP_LEVEL
*level
, prs_struct
*ps
, int depth
);
1601 uint32
get_enum_hnd(ENUM_HND
*enh
);
1602 void init_enum_hnd(ENUM_HND
*enh
, uint32 hnd
);
1603 BOOL
smb_io_enum_hnd(char *desc
, ENUM_HND
*hnd
, prs_struct
*ps
, int depth
);
1604 BOOL
smb_io_dom_sid(char *desc
, DOM_SID
*sid
, prs_struct
*ps
, int depth
);
1605 void init_dom_sid(DOM_SID
*sid
, char *str_sid
);
1606 void init_dom_sid2(DOM_SID2
*sid2
, DOM_SID
*sid
);
1607 BOOL
smb_io_dom_sid2(char *desc
, DOM_SID2
*sid
, prs_struct
*ps
, int depth
);
1608 void init_str_hdr(STRHDR
*hdr
, int max_len
, int len
, uint32 buffer
);
1609 BOOL
smb_io_strhdr(char *desc
, STRHDR
*hdr
, prs_struct
*ps
, int depth
);
1610 void init_uni_hdr(UNIHDR
*hdr
, int len
);
1611 BOOL
smb_io_unihdr(char *desc
, UNIHDR
*hdr
, prs_struct
*ps
, int depth
);
1612 void init_buf_hdr(BUFHDR
*hdr
, int max_len
, int len
);
1613 BOOL
smb_io_hdrbuf_pre(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
, uint32
*offset
);
1614 BOOL
smb_io_hdrbuf_post(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
,
1615 uint32 ptr_hdrbuf
, uint32 max_len
, uint32 len
);
1616 BOOL
smb_io_hdrbuf(char *desc
, BUFHDR
*hdr
, prs_struct
*ps
, int depth
);
1617 void init_uni_hdr2(UNIHDR2
*hdr
, int len
);
1618 BOOL
smb_io_unihdr2(char *desc
, UNIHDR2
*hdr2
, prs_struct
*ps
, int depth
);
1619 void init_unistr(UNISTR
*str
, char *buf
);
1620 BOOL
smb_io_unistr(char *desc
, UNISTR
*uni
, prs_struct
*ps
, int depth
);
1621 void init_buffer3_uint32(BUFFER3
*str
, uint32 val
);
1622 void init_buffer3_str(BUFFER3
*str
, char *buf
, int len
);
1623 void init_buffer3_hex(BUFFER3
*str
, char *buf
);
1624 void init_buffer3_bytes(BUFFER3
*str
, uint8
*buf
, int len
);
1625 BOOL
smb_io_buffer3(char *desc
, BUFFER3
*buf3
, prs_struct
*ps
, int depth
);
1626 void init_buffer2(BUFFER2
*str
, uint8
*buf
, int len
);
1627 BOOL
smb_io_buffer2(char *desc
, BUFFER2
*buf2
, uint32 buffer
, prs_struct
*ps
, int depth
);
1628 void init_buf_unistr2(UNISTR2
*str
, uint32
*ptr
, char *buf
);
1629 void copy_unistr2(UNISTR2
*str
, UNISTR2
*from
);
1630 void init_string2(STRING2
*str
, char *buf
, int len
);
1631 BOOL
smb_io_string2(char *desc
, STRING2
*str2
, uint32 buffer
, prs_struct
*ps
, int depth
);
1632 void init_unistr2(UNISTR2
*str
, char *buf
, int len
);
1633 BOOL
smb_io_unistr2(char *desc
, UNISTR2
*uni2
, uint32 buffer
, prs_struct
*ps
, int depth
);
1634 void init_dom_rid2(DOM_RID2
*rid2
, uint32 rid
, uint8 type
, uint32 idx
);
1635 BOOL
smb_io_dom_rid2(char *desc
, DOM_RID2
*rid2
, prs_struct
*ps
, int depth
);
1636 void init_dom_rid3(DOM_RID3
*rid3
, uint32 rid
, uint8 type
);
1637 BOOL
smb_io_dom_rid3(char *desc
, DOM_RID3
*rid3
, prs_struct
*ps
, int depth
);
1638 void init_dom_rid4(DOM_RID4
*rid4
, uint16 unknown
, uint16 attr
, uint32 rid
);
1639 void init_log_info(DOM_LOG_INFO
*log
, char *logon_srv
, char *acct_name
,
1640 uint16 sec_chan
, char *comp_name
);
1641 BOOL
smb_io_log_info(char *desc
, DOM_LOG_INFO
*log
, prs_struct
*ps
, int depth
);
1642 BOOL
smb_io_chal(char *desc
, DOM_CHAL
*chal
, prs_struct
*ps
, int depth
);
1643 BOOL
smb_io_cred(char *desc
, DOM_CRED
*cred
, prs_struct
*ps
, int depth
);
1644 void init_clnt_info2(DOM_CLNT_INFO2
*clnt
,
1645 char *logon_srv
, char *comp_name
,
1646 DOM_CRED
*clnt_cred
);
1647 BOOL
smb_io_clnt_info2(char *desc
, DOM_CLNT_INFO2
*clnt
, prs_struct
*ps
, int depth
);
1648 void init_clnt_info(DOM_CLNT_INFO
*clnt
,
1649 char *logon_srv
, char *acct_name
,
1650 uint16 sec_chan
, char *comp_name
,
1652 BOOL
smb_io_clnt_info(char *desc
, DOM_CLNT_INFO
*clnt
, prs_struct
*ps
, int depth
);
1653 void init_logon_id(DOM_LOGON_ID
*log
, uint32 log_id_low
, uint32 log_id_high
);
1654 BOOL
smb_io_logon_id(char *desc
, DOM_LOGON_ID
*log
, prs_struct
*ps
, int depth
);
1655 void init_owf_info(OWF_INFO
*hash
, uint8 data
[16]);
1656 BOOL
smb_io_owf_info(char *desc
, OWF_INFO
*hash
, prs_struct
*ps
, int depth
);
1657 BOOL
smb_io_gid(char *desc
, DOM_GID
*gid
, prs_struct
*ps
, int depth
);
1658 BOOL
smb_io_pol_hnd(char *desc
, POLICY_HND
*pol
, prs_struct
*ps
, int depth
);
1659 BOOL
smb_io_dom_query_3(char *desc
, DOM_QUERY_3
*d_q
, prs_struct
*ps
, int depth
);
1660 BOOL
smb_io_dom_query_5(char *desc
, DOM_QUERY_3
*d_q
, prs_struct
*ps
, int depth
);
1661 BOOL
smb_io_unistr3(char *desc
, UNISTR3
*name
, prs_struct
*ps
, int depth
);
1663 /*The following definitions come from rpc_parse/parse_net.c */
1665 BOOL
net_io_q_logon_ctrl2(char *desc
, NET_Q_LOGON_CTRL2
*q_l
, prs_struct
*ps
, int depth
);
1666 void init_r_logon_ctrl2(NET_R_LOGON_CTRL2
*r_l
, uint32 query_level
,
1667 uint32 flags
, uint32 pdc_status
, uint32 logon_attempts
,
1668 uint32 tc_status
, char *trusted_domain_name
);
1669 BOOL
net_io_r_logon_ctrl2(char *desc
, NET_R_LOGON_CTRL2
*r_l
, prs_struct
*ps
, int depth
);
1670 void init_r_trust_dom(NET_R_TRUST_DOM_LIST
*r_t
,
1671 uint32 num_doms
, char *dom_name
);
1672 BOOL
net_io_r_trust_dom(char *desc
, NET_R_TRUST_DOM_LIST
*r_t
, prs_struct
*ps
, int depth
);
1673 BOOL
net_io_q_trust_dom(char *desc
, NET_Q_TRUST_DOM_LIST
*q_l
, prs_struct
*ps
, int depth
);
1674 void init_q_req_chal(NET_Q_REQ_CHAL
*q_c
,
1675 char *logon_srv
, char *logon_clnt
,
1676 DOM_CHAL
*clnt_chal
);
1677 BOOL
net_io_q_req_chal(char *desc
, NET_Q_REQ_CHAL
*q_c
, prs_struct
*ps
, int depth
);
1678 BOOL
net_io_r_req_chal(char *desc
, NET_R_REQ_CHAL
*r_c
, prs_struct
*ps
, int depth
);
1679 void init_q_auth_2(NET_Q_AUTH_2
*q_a
,
1680 char *logon_srv
, char *acct_name
, uint16 sec_chan
, char *comp_name
,
1681 DOM_CHAL
*clnt_chal
, uint32 clnt_flgs
);
1682 BOOL
net_io_q_auth_2(char *desc
, NET_Q_AUTH_2
*q_a
, prs_struct
*ps
, int depth
);
1683 BOOL
net_io_r_auth_2(char *desc
, NET_R_AUTH_2
*r_a
, prs_struct
*ps
, int depth
);
1684 void init_q_srv_pwset(NET_Q_SRV_PWSET
*q_s
, char *logon_srv
, char *acct_name
,
1685 uint16 sec_chan
, char *comp_name
, DOM_CRED
*cred
, char nt_cypher
[16]);
1686 BOOL
net_io_q_srv_pwset(char *desc
, NET_Q_SRV_PWSET
*q_s
, prs_struct
*ps
, int depth
);
1687 BOOL
net_io_r_srv_pwset(char *desc
, NET_R_SRV_PWSET
*r_s
, prs_struct
*ps
, int depth
);
1688 void init_id_info1(NET_ID_INFO_1
*id
, char *domain_name
,
1689 uint32 param_ctrl
, uint32 log_id_low
, uint32 log_id_high
,
1690 char *user_name
, char *wksta_name
,
1692 unsigned char lm_cypher
[16], unsigned char nt_cypher
[16]);
1693 void init_id_info2(NET_ID_INFO_2
*id
, char *domain_name
,
1694 uint32 param_ctrl
, uint32 log_id_low
, uint32 log_id_high
,
1695 char *user_name
, char *wksta_name
,
1696 unsigned char lm_challenge
[8],
1697 unsigned char lm_chal_resp
[24],
1698 unsigned char nt_chal_resp
[24]);
1699 void init_sam_info(DOM_SAM_INFO
*sam
,
1700 char *logon_srv
, char *comp_name
, DOM_CRED
*clnt_cred
,
1701 DOM_CRED
*rtn_cred
, uint16 logon_level
,
1702 NET_ID_INFO_CTR
*ctr
);
1703 void init_net_user_info3(NET_USER_INFO_3
*usr
,
1706 NTTIME
*logoff_time
,
1707 NTTIME
*kickoff_time
,
1708 NTTIME
*pass_last_set_time
,
1709 NTTIME
*pass_can_change_time
,
1710 NTTIME
*pass_must_change_time
,
1720 uint16 bad_pw_count
,
1735 BOOL
net_io_q_sam_logon(char *desc
, NET_Q_SAM_LOGON
*q_l
, prs_struct
*ps
, int depth
);
1736 BOOL
net_io_r_sam_logon(char *desc
, NET_R_SAM_LOGON
*r_l
, prs_struct
*ps
, int depth
);
1737 BOOL
net_io_q_sam_logoff(char *desc
, NET_Q_SAM_LOGOFF
*q_l
, prs_struct
*ps
, int depth
);
1738 BOOL
net_io_r_sam_logoff(char *desc
, NET_R_SAM_LOGOFF
*r_l
, prs_struct
*ps
, int depth
);
1740 /*The following definitions come from rpc_parse/parse_prs.c */
1742 void prs_debug(prs_struct
*ps
, int depth
, char *desc
, char *fn_name
);
1743 BOOL
prs_init(prs_struct
*ps
, uint32 size
, uint8 align
, BOOL io
);
1744 void prs_mem_free(prs_struct
*ps
);
1745 void prs_give_memory(prs_struct
*ps
, char *buf
, uint32 size
, BOOL is_dynamic
);
1746 char *prs_take_memory(prs_struct
*ps
, uint32
*psize
);
1747 BOOL
prs_grow(prs_struct
*ps
, uint32 extra_space
);
1748 BOOL
prs_force_grow(prs_struct
*ps
, uint32 extra_space
);
1749 char *prs_data_p(prs_struct
*ps
);
1750 uint32
prs_data_size(prs_struct
*ps
);
1751 uint32
prs_offset(prs_struct
*ps
);
1752 BOOL
prs_set_offset(prs_struct
*ps
, uint32 offset
);
1753 BOOL
prs_append_prs_data(prs_struct
*dst
, prs_struct
*src
);
1754 BOOL
prs_append_data(prs_struct
*dst
, char *src
, uint32 len
);
1755 void prs_set_bigendian_data(prs_struct
*ps
);
1756 BOOL
prs_align(prs_struct
*ps
);
1757 char *prs_mem_get(prs_struct
*ps
, uint32 extra_size
);
1758 void prs_switch_type(prs_struct
*ps
, BOOL io
);
1759 void prs_force_dynamic(prs_struct
*ps
);
1760 BOOL
prs_uint8(char *name
, prs_struct
*ps
, int depth
, uint8
*data8
);
1761 BOOL
prs_uint16(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
);
1762 BOOL
prs_uint32(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
);
1763 BOOL
prs_uint8s(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint8
*data8s
, int len
);
1764 BOOL
prs_uint32s(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, uint32
*data32s
, int len
);
1765 BOOL
prs_buffer2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, BUFFER2
*str
);
1766 BOOL
prs_string2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, STRING2
*str
);
1767 BOOL
prs_unistr2(BOOL charmode
, char *name
, prs_struct
*ps
, int depth
, UNISTR2
*str
);
1768 BOOL
prs_unistr3(BOOL charmode
, char *name
, UNISTR3
*str
, prs_struct
*ps
, int depth
);
1769 BOOL
prs_unistr(char *name
, prs_struct
*ps
, int depth
, UNISTR
*str
);
1770 BOOL
prs_string(char *name
, prs_struct
*ps
, int depth
, char *str
, int len
, int max_buf_size
);
1771 BOOL
prs_uint16_pre(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
, uint32
*offset
);
1772 BOOL
prs_uint16_post(char *name
, prs_struct
*ps
, int depth
, uint16
*data16
,
1773 uint32 ptr_uint16
, uint32 start_offset
);
1774 BOOL
prs_uint32_pre(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
, uint32
*offset
);
1775 BOOL
prs_uint32_post(char *name
, prs_struct
*ps
, int depth
, uint32
*data32
,
1776 uint32 ptr_uint32
, uint32 data_size
);
1778 /*The following definitions come from rpc_parse/parse_reg.c */
1780 void init_reg_q_open_hklm(REG_Q_OPEN_HKLM
*q_o
,
1781 uint16 unknown_0
, uint32 level
);
1782 BOOL
reg_io_q_open_hklm(char *desc
, REG_Q_OPEN_HKLM
*r_q
, prs_struct
*ps
, int depth
);
1783 BOOL
reg_io_r_open_hklm(char *desc
, REG_R_OPEN_HKLM
*r_r
, prs_struct
*ps
, int depth
);
1784 void init_reg_q_flush_key(REG_Q_FLUSH_KEY
*q_u
, POLICY_HND
*pol
);
1785 BOOL
reg_io_q_flush_key(char *desc
, REG_Q_FLUSH_KEY
*r_q
, prs_struct
*ps
, int depth
);
1786 BOOL
reg_io_r_flush_key(char *desc
, REG_R_FLUSH_KEY
*r_r
, prs_struct
*ps
, int depth
);
1787 void init_reg_q_create_key(REG_Q_CREATE_KEY
*q_c
, POLICY_HND
*hnd
,
1788 char *name
, char *class, SEC_ACCESS
*sam_access
,
1789 SEC_DESC_BUF
*sec_buf
);
1790 BOOL
reg_io_q_create_key(char *desc
, REG_Q_CREATE_KEY
*r_q
, prs_struct
*ps
, int depth
);
1791 BOOL
reg_io_r_create_key(char *desc
, REG_R_CREATE_KEY
*r_r
, prs_struct
*ps
, int depth
);
1792 void init_reg_q_delete_val(REG_Q_DELETE_VALUE
*q_c
, POLICY_HND
*hnd
,
1794 BOOL
reg_io_q_delete_val(char *desc
, REG_Q_DELETE_VALUE
*r_q
, prs_struct
*ps
, int depth
);
1795 BOOL
reg_io_r_delete_val(char *desc
, REG_R_DELETE_VALUE
*r_r
, prs_struct
*ps
, int depth
);
1796 void init_reg_q_delete_key(REG_Q_DELETE_KEY
*q_c
, POLICY_HND
*hnd
,
1798 BOOL
reg_io_q_delete_key(char *desc
, REG_Q_DELETE_KEY
*r_q
, prs_struct
*ps
, int depth
);
1799 BOOL
reg_io_r_delete_key(char *desc
, REG_R_DELETE_KEY
*r_r
, prs_struct
*ps
, int depth
);
1800 void init_reg_q_query_key(REG_Q_QUERY_KEY
*q_o
, POLICY_HND
*hnd
,
1801 uint32 max_class_len
);
1802 BOOL
reg_io_q_query_key(char *desc
, REG_Q_QUERY_KEY
*r_q
, prs_struct
*ps
, int depth
);
1803 BOOL
reg_io_r_query_key(char *desc
, REG_R_QUERY_KEY
*r_r
, prs_struct
*ps
, int depth
);
1804 void init_reg_q_unk_1a(REG_Q_UNK_1A
*q_o
, POLICY_HND
*hnd
);
1805 BOOL
reg_io_q_unk_1a(char *desc
, REG_Q_UNK_1A
*r_q
, prs_struct
*ps
, int depth
);
1806 BOOL
reg_io_r_unk_1a(char *desc
, REG_R_UNK_1A
*r_r
, prs_struct
*ps
, int depth
);
1807 void init_reg_q_open_hku(REG_Q_OPEN_HKU
*q_o
,
1808 uint16 unknown_0
, uint32 level
);
1809 BOOL
reg_io_q_open_hku(char *desc
, REG_Q_OPEN_HKU
*r_q
, prs_struct
*ps
, int depth
);
1810 BOOL
reg_io_r_open_hku(char *desc
, REG_R_OPEN_HKU
*r_r
, prs_struct
*ps
, int depth
);
1811 void init_reg_q_close(REG_Q_CLOSE
*q_c
, POLICY_HND
*hnd
);
1812 BOOL
reg_io_q_close(char *desc
, REG_Q_CLOSE
*q_u
, prs_struct
*ps
, int depth
);
1813 BOOL
reg_io_r_close(char *desc
, REG_R_CLOSE
*r_u
, prs_struct
*ps
, int depth
);
1814 void init_reg_q_set_key_sec(REG_Q_SET_KEY_SEC
*q_i
, POLICY_HND
*pol
, SEC_DESC_BUF
*sec_desc_buf
);
1815 BOOL
reg_io_q_set_key_sec(char *desc
, REG_Q_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
1816 BOOL
reg_io_r_set_key_sec(char *desc
, REG_R_SET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
1817 void init_reg_q_get_key_sec(REG_Q_GET_KEY_SEC
*q_i
, POLICY_HND
*pol
,
1818 uint32 sec_buf_size
, SEC_DESC_BUF
*psdb
);
1819 BOOL
reg_io_q_get_key_sec(char *desc
, REG_Q_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
1820 BOOL
reg_io_r_get_key_sec(char *desc
, REG_R_GET_KEY_SEC
*r_q
, prs_struct
*ps
, int depth
);
1821 void init_reg_q_info(REG_Q_INFO
*q_i
, POLICY_HND
*pol
, char *product_type
,
1822 time_t unix_time
, uint8 major
, uint8 minor
);
1823 BOOL
reg_io_q_info(char *desc
, REG_Q_INFO
*r_q
, prs_struct
*ps
, int depth
);
1824 void init_reg_r_info(REG_R_INFO
*r_r
,
1825 uint32 level
, char *os_type
,
1826 uint32 unknown_0
, uint32 unknown_1
,
1828 BOOL
reg_io_r_info(char *desc
, REG_R_INFO
*r_r
, prs_struct
*ps
, int depth
);
1829 void init_reg_q_enum_val(REG_Q_ENUM_VALUE
*q_i
, POLICY_HND
*pol
,
1830 uint32 val_idx
, uint32 max_val_len
,
1831 uint32 max_buf_len
);
1832 BOOL
reg_io_q_enum_val(char *desc
, REG_Q_ENUM_VALUE
*q_q
, prs_struct
*ps
, int depth
);
1833 BOOL
reg_io_r_enum_val(char *desc
, REG_R_ENUM_VALUE
*r_q
, prs_struct
*ps
, int depth
);
1834 void init_reg_q_create_val(REG_Q_CREATE_VALUE
*q_i
, POLICY_HND
*pol
,
1835 char *val_name
, uint32 type
,
1837 BOOL
reg_io_q_create_val(char *desc
, REG_Q_CREATE_VALUE
*q_q
, prs_struct
*ps
, int depth
);
1838 BOOL
reg_io_r_create_val(char *desc
, REG_R_CREATE_VALUE
*r_q
, prs_struct
*ps
, int depth
);
1839 void init_reg_q_enum_key(REG_Q_ENUM_KEY
*q_i
, POLICY_HND
*pol
, uint32 key_idx
);
1840 BOOL
reg_io_q_enum_key(char *desc
, REG_Q_ENUM_KEY
*q_q
, prs_struct
*ps
, int depth
);
1841 BOOL
reg_io_r_enum_key(char *desc
, REG_R_ENUM_KEY
*r_q
, prs_struct
*ps
, int depth
);
1842 void init_reg_q_open_entry(REG_Q_OPEN_ENTRY
*r_q
, POLICY_HND
*pol
,
1843 char *key_name
, uint32 unk
);
1844 BOOL
reg_io_q_open_entry(char *desc
, REG_Q_OPEN_ENTRY
*r_q
, prs_struct
*ps
, int depth
);
1845 void init_reg_r_open_entry(REG_R_OPEN_ENTRY
*r_r
,
1846 POLICY_HND
*pol
, uint32 status
);
1847 BOOL
reg_io_r_open_entry(char *desc
, REG_R_OPEN_ENTRY
*r_r
, prs_struct
*ps
, int depth
);
1849 /*The following definitions come from rpc_parse/parse_rpc.c */
1851 void init_rpc_hdr(RPC_HDR
*hdr
, enum RPC_PKT_TYPE pkt_type
, uint8 flags
,
1852 uint32 call_id
, int data_len
, int auth_len
);
1853 BOOL
smb_io_rpc_hdr(char *desc
, RPC_HDR
*rpc
, prs_struct
*ps
, int depth
);
1854 void init_rpc_hdr_rb(RPC_HDR_RB
*rpc
,
1855 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
1856 uint32 num_elements
, uint16 context_id
, uint8 num_syntaxes
,
1857 RPC_IFACE
*abstract
, RPC_IFACE
*transfer
);
1858 BOOL
smb_io_rpc_hdr_rb(char *desc
, RPC_HDR_RB
*rpc
, prs_struct
*ps
, int depth
);
1859 void init_rpc_hdr_ba(RPC_HDR_BA
*rpc
,
1860 uint16 max_tsize
, uint16 max_rsize
, uint32 assoc_gid
,
1862 uint8 num_results
, uint16 result
, uint16 reason
,
1863 RPC_IFACE
*transfer
);
1864 BOOL
smb_io_rpc_hdr_ba(char *desc
, RPC_HDR_BA
*rpc
, prs_struct
*ps
, int depth
);
1865 void init_rpc_hdr_req(RPC_HDR_REQ
*hdr
, uint32 alloc_hint
, uint16 opnum
);
1866 BOOL
smb_io_rpc_hdr_req(char *desc
, RPC_HDR_REQ
*rpc
, prs_struct
*ps
, int depth
);
1867 BOOL
smb_io_rpc_hdr_resp(char *desc
, RPC_HDR_RESP
*rpc
, prs_struct
*ps
, int depth
);
1868 BOOL
smb_io_rpc_hdr_fault(char *desc
, RPC_HDR_FAULT
*rpc
, prs_struct
*ps
, int depth
);
1869 void init_rpc_hdr_autha(RPC_HDR_AUTHA
*rai
,
1870 uint16 max_tsize
, uint16 max_rsize
,
1871 uint8 auth_type
, uint8 auth_level
,
1872 uint8 stub_type_len
);
1873 BOOL
smb_io_rpc_hdr_autha(char *desc
, RPC_HDR_AUTHA
*rai
, prs_struct
*ps
, int depth
);
1874 BOOL
rpc_hdr_auth_chk(RPC_HDR_AUTH
*rai
);
1875 void init_rpc_hdr_auth(RPC_HDR_AUTH
*rai
,
1876 uint8 auth_type
, uint8 auth_level
,
1877 uint8 stub_type_len
,
1879 BOOL
smb_io_rpc_hdr_auth(char *desc
, RPC_HDR_AUTH
*rai
, prs_struct
*ps
, int depth
);
1880 BOOL
rpc_auth_verifier_chk(RPC_AUTH_VERIFIER
*rav
,
1881 char *signature
, uint32 msg_type
);
1882 void init_rpc_auth_verifier(RPC_AUTH_VERIFIER
*rav
,
1883 char *signature
, uint32 msg_type
);
1884 BOOL
smb_io_rpc_auth_verifier(char *desc
, RPC_AUTH_VERIFIER
*rav
, prs_struct
*ps
, int depth
);
1885 void init_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG
*neg
,
1887 fstring myname
, fstring domain
);
1888 BOOL
smb_io_rpc_auth_ntlmssp_neg(char *desc
, RPC_AUTH_NTLMSSP_NEG
*neg
, prs_struct
*ps
, int depth
);
1889 void init_rpc_auth_ntlmssp_chal(RPC_AUTH_NTLMSSP_CHAL
*chl
,
1891 uint8 challenge
[8]);
1892 BOOL
smb_io_rpc_auth_ntlmssp_chal(char *desc
, RPC_AUTH_NTLMSSP_CHAL
*chl
, prs_struct
*ps
, int depth
);
1893 void init_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP
*rsp
,
1894 uchar lm_resp
[24], uchar nt_resp
[24],
1895 char *domain
, char *user
, char *wks
,
1897 BOOL
smb_io_rpc_auth_ntlmssp_resp(char *desc
, RPC_AUTH_NTLMSSP_RESP
*rsp
, prs_struct
*ps
, int depth
);
1898 BOOL
rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
, uint32 crc32
, uint32 seq_num
);
1899 void init_rpc_auth_ntlmssp_chk(RPC_AUTH_NTLMSSP_CHK
*chk
,
1900 uint32 ver
, uint32 crc32
, uint32 seq_num
);
1901 BOOL
smb_io_rpc_auth_ntlmssp_chk(char *desc
, RPC_AUTH_NTLMSSP_CHK
*chk
, prs_struct
*ps
, int depth
);
1903 /*The following definitions come from rpc_parse/parse_samr.c */
1905 void init_samr_q_close_hnd(SAMR_Q_CLOSE_HND
*q_c
, POLICY_HND
*hnd
);
1906 BOOL
samr_io_q_close_hnd(char *desc
, SAMR_Q_CLOSE_HND
*q_u
, prs_struct
*ps
, int depth
);
1907 BOOL
samr_io_r_close_hnd(char *desc
, SAMR_R_CLOSE_HND
*r_u
, prs_struct
*ps
, int depth
);
1908 void init_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN
*q_u
,
1909 POLICY_HND
*connect_pol
, uint32 rid
,
1911 BOOL
samr_io_q_open_domain(char *desc
, SAMR_Q_OPEN_DOMAIN
*q_u
, prs_struct
*ps
, int depth
);
1912 BOOL
samr_io_r_open_domain(char *desc
, SAMR_R_OPEN_DOMAIN
*r_u
, prs_struct
*ps
, int depth
);
1913 void init_samr_q_unknown_2c(SAMR_Q_UNKNOWN_2C
*q_u
, POLICY_HND
*user_pol
);
1914 BOOL
samr_io_q_unknown_2c(char *desc
, SAMR_Q_UNKNOWN_2C
*q_u
, prs_struct
*ps
, int depth
);
1915 void init_samr_r_unknown_2c(SAMR_R_UNKNOWN_2C
*q_u
, uint32 status
);
1916 BOOL
samr_io_r_unknown_2c(char *desc
, SAMR_R_UNKNOWN_2C
*r_u
, prs_struct
*ps
, int depth
);
1917 void init_samr_q_unknown_3(SAMR_Q_UNKNOWN_3
*q_u
,
1918 POLICY_HND
*user_pol
, uint16 switch_value
);
1919 BOOL
samr_io_q_unknown_3(char *desc
, SAMR_Q_UNKNOWN_3
*q_u
, prs_struct
*ps
, int depth
);
1920 void init_samr_q_query_dom_info(SAMR_Q_QUERY_DOMAIN_INFO
*q_u
,
1921 POLICY_HND
*domain_pol
, uint16 switch_value
);
1922 BOOL
samr_io_q_query_dom_info(char *desc
, SAMR_Q_QUERY_DOMAIN_INFO
*q_u
, prs_struct
*ps
, int depth
);
1923 void init_unk_info2(SAM_UNK_INFO_2
*u_2
, char *domain
, char *server
);
1924 BOOL
sam_io_unk_info2(char *desc
, SAM_UNK_INFO_2
*u_2
, prs_struct
*ps
, int depth
);
1925 void init_samr_r_query_dom_info(SAMR_R_QUERY_DOMAIN_INFO
*r_u
,
1926 uint16 switch_value
, SAM_UNK_CTR
*ctr
,
1928 BOOL
samr_io_r_query_dom_info(char *desc
, SAMR_R_QUERY_DOMAIN_INFO
*r_u
, prs_struct
*ps
, int depth
);
1929 void init_dom_sid3(DOM_SID3
*sid3
, uint16 unk_0
, uint16 unk_1
, DOM_SID
*sid
);
1930 void init_samr_r_unknown_3(SAMR_R_UNKNOWN_3
*r_u
,
1931 uint16 unknown_2
, uint16 unknown_3
,
1932 uint32 unknown_4
, uint16 unknown_6
, uint16 unknown_7
,
1933 int num_sid3s
, DOM_SID3 sid3
[MAX_SAM_SIDS
],
1935 BOOL
samr_io_r_unknown_3(char *desc
, SAMR_R_UNKNOWN_3
*r_u
, prs_struct
*ps
, int depth
);
1936 void init_samr_q_enum_dom_users(SAMR_Q_ENUM_DOM_USERS
*q_e
, POLICY_HND
*pol
,
1937 uint16 req_num_entries
, uint16 unk_0
,
1938 uint16 acb_mask
, uint16 unk_1
, uint32 size
);
1939 BOOL
samr_io_q_enum_dom_users(char *desc
, SAMR_Q_ENUM_DOM_USERS
*q_e
, prs_struct
*ps
, int depth
);
1940 void init_samr_r_enum_dom_users(SAMR_R_ENUM_DOM_USERS
*r_u
,
1941 uint16 total_num_entries
, uint16 unk_0
,
1942 uint32 num_sam_entries
, SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
], uint32 status
);
1943 BOOL
samr_io_r_enum_dom_users(char *desc
, SAMR_R_ENUM_DOM_USERS
*r_u
, prs_struct
*ps
, int depth
);
1944 void init_samr_q_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES
*q_e
, POLICY_HND
*pol
, uint32 size
);
1945 BOOL
samr_io_q_enum_dom_aliases(char *desc
, SAMR_Q_ENUM_DOM_ALIASES
*q_e
, prs_struct
*ps
, int depth
);
1946 void init_samr_r_enum_dom_aliases(SAMR_R_ENUM_DOM_ALIASES
*r_u
,
1947 uint32 num_sam_entries
, SAM_USER_INFO_21 grps
[MAX_SAM_ENTRIES
],
1949 BOOL
samr_io_r_enum_dom_aliases(char *desc
, SAMR_R_ENUM_DOM_ALIASES
*r_u
, prs_struct
*ps
, int depth
);
1950 void init_samr_q_query_dispinfo(SAMR_Q_QUERY_DISPINFO
*q_e
, POLICY_HND
*pol
,
1951 uint16 switch_level
, uint32 start_idx
, uint32 size
);
1952 BOOL
samr_io_q_query_dispinfo(char *desc
, SAMR_Q_QUERY_DISPINFO
*q_e
, prs_struct
*ps
, int depth
);
1953 void init_sam_info_2(SAM_INFO_2
*sam
, uint32 acb_mask
,
1954 uint32 start_idx
, uint32 num_sam_entries
,
1955 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
1956 void init_sam_info_1(SAM_INFO_1
*sam
, uint32 acb_mask
,
1957 uint32 start_idx
, uint32 num_sam_entries
,
1958 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
]);
1959 void init_samr_r_query_dispinfo(SAMR_R_QUERY_DISPINFO
*r_u
,
1960 uint16 switch_level
, SAM_INFO_CTR
*ctr
, uint32 status
);
1961 BOOL
samr_io_r_query_dispinfo(char *desc
, SAMR_R_QUERY_DISPINFO
*r_u
, prs_struct
*ps
, int depth
);
1962 void init_samr_q_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS
*q_e
, POLICY_HND
*pol
,
1963 uint16 switch_level
, uint32 start_idx
, uint32 size
);
1964 BOOL
samr_io_q_enum_dom_groups(char *desc
, SAMR_Q_ENUM_DOM_GROUPS
*q_e
, prs_struct
*ps
, int depth
);
1965 void init_samr_r_enum_dom_groups(SAMR_R_ENUM_DOM_GROUPS
*r_u
,
1966 uint32 start_idx
, uint32 num_sam_entries
,
1967 SAM_USER_INFO_21 pass
[MAX_SAM_ENTRIES
],
1969 BOOL
samr_io_r_enum_dom_groups(char *desc
, SAMR_R_ENUM_DOM_GROUPS
*r_u
, prs_struct
*ps
, int depth
);
1970 void init_samr_q_query_aliasinfo(SAMR_Q_QUERY_ALIASINFO
*q_e
,
1972 uint16 switch_level
);
1973 BOOL
samr_io_q_query_aliasinfo(char *desc
, SAMR_Q_QUERY_ALIASINFO
*q_e
, prs_struct
*ps
, int depth
);
1974 void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO
*r_u
,
1975 uint16 switch_value
, char *acct_desc
,
1977 BOOL
samr_io_r_query_aliasinfo(char *desc
, SAMR_R_QUERY_ALIASINFO
*r_u
, prs_struct
*ps
, int depth
);
1978 BOOL
samr_io_q_lookup_ids(char *desc
, SAMR_Q_LOOKUP_IDS
*q_u
, prs_struct
*ps
, int depth
);
1979 void init_samr_r_lookup_ids(SAMR_R_LOOKUP_IDS
*r_u
,
1980 uint32 num_rids
, uint32
*rid
, uint32 status
);
1981 BOOL
samr_io_r_lookup_ids(char *desc
, SAMR_R_LOOKUP_IDS
*r_u
, prs_struct
*ps
, int depth
);
1982 BOOL
samr_io_q_lookup_names(char *desc
, SAMR_Q_LOOKUP_NAMES
*q_u
, prs_struct
*ps
, int depth
);
1983 void init_samr_r_lookup_names(SAMR_R_LOOKUP_NAMES
*r_u
,
1984 uint32 num_rids
, uint32
*rid
, uint8
*type
, uint32 status
);
1985 BOOL
samr_io_r_lookup_names(char *desc
, SAMR_R_LOOKUP_NAMES
*r_u
, prs_struct
*ps
, int depth
);
1986 BOOL
samr_io_q_unknown_12(char *desc
, SAMR_Q_UNKNOWN_12
*q_u
, prs_struct
*ps
, int depth
);
1987 void init_samr_r_unknown_12(SAMR_R_UNKNOWN_12
*r_u
,
1988 uint32 num_aliases
, fstring
*als_name
, uint32
*num_als_usrs
,
1990 BOOL
samr_io_r_unknown_12(char *desc
, SAMR_R_UNKNOWN_12
*r_u
, prs_struct
*ps
, int depth
);
1991 void init_samr_q_open_user(SAMR_Q_OPEN_USER
*q_u
,
1993 uint32 unk_0
, uint32 rid
);
1994 BOOL
samr_io_q_open_user(char *desc
, SAMR_Q_OPEN_USER
*q_u
, prs_struct
*ps
, int depth
);
1995 BOOL
samr_io_r_open_user(char *desc
, SAMR_R_OPEN_USER
*r_u
, prs_struct
*ps
, int depth
);
1996 void init_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS
*q_u
,
1998 BOOL
samr_io_q_query_usergroups(char *desc
, SAMR_Q_QUERY_USERGROUPS
*q_u
, prs_struct
*ps
, int depth
);
1999 void init_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS
*r_u
,
2000 uint32 num_gids
, DOM_GID
*gid
, uint32 status
);
2001 BOOL
samr_io_r_query_usergroups(char *desc
, SAMR_R_QUERY_USERGROUPS
*r_u
, prs_struct
*ps
, int depth
);
2002 void init_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO
*q_u
,
2003 POLICY_HND
*hnd
, uint16 switch_value
);
2004 BOOL
samr_io_q_query_userinfo(char *desc
, SAMR_Q_QUERY_USERINFO
*q_u
, prs_struct
*ps
, int depth
);
2005 void init_sam_user_info10(SAM_USER_INFO_10
*usr
,
2007 BOOL
sam_io_user_info10(char *desc
, SAM_USER_INFO_10
*usr
, prs_struct
*ps
, int depth
);
2008 void init_sam_user_info11(SAM_USER_INFO_11
*usr
,
2014 BOOL
sam_io_user_info11(char *desc
, SAM_USER_INFO_11
*usr
, prs_struct
*ps
, int depth
);
2015 void init_sam_user_info21(SAM_USER_INFO_21
*usr
,
2017 NTTIME
*logoff_time
,
2018 NTTIME
*kickoff_time
,
2019 NTTIME
*pass_last_set_time
,
2020 NTTIME
*pass_can_change_time
,
2021 NTTIME
*pass_must_change_time
,
2043 void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO
*r_u
,
2044 uint16 switch_value
, void *info
, uint32 status
);
2045 BOOL
samr_io_r_query_userinfo(char *desc
, SAMR_R_QUERY_USERINFO
*r_u
, prs_struct
*ps
, int depth
);
2046 BOOL
samr_io_q_unknown_32(char *desc
, SAMR_Q_UNKNOWN_32
*q_u
, prs_struct
*ps
, int depth
);
2047 BOOL
samr_io_r_unknown_32(char *desc
, SAMR_R_UNKNOWN_32
*r_u
, prs_struct
*ps
, int depth
);
2048 void init_samr_q_connect(SAMR_Q_CONNECT
*q_u
,
2049 char *srv_name
, uint32 unknown_0
);
2050 BOOL
samr_io_q_connect(char *desc
, SAMR_Q_CONNECT
*q_u
, prs_struct
*ps
, int depth
);
2051 BOOL
samr_io_r_connect(char *desc
, SAMR_R_CONNECT
*r_u
, prs_struct
*ps
, int depth
);
2052 void init_samr_q_connect_anon(SAMR_Q_CONNECT_ANON
*q_u
);
2053 BOOL
samr_io_q_connect_anon(char *desc
, SAMR_Q_CONNECT_ANON
*q_u
, prs_struct
*ps
, int depth
);
2054 BOOL
samr_io_r_connect_anon(char *desc
, SAMR_R_CONNECT_ANON
*r_u
, prs_struct
*ps
, int depth
);
2055 void init_samr_q_open_alias(SAMR_Q_OPEN_ALIAS
*q_u
,
2056 uint32 unknown_0
, uint32 rid
);
2057 BOOL
samr_io_q_open_alias(char *desc
, SAMR_Q_OPEN_ALIAS
*q_u
, prs_struct
*ps
, int depth
);
2058 BOOL
samr_io_r_open_alias(char *desc
, SAMR_R_OPEN_ALIAS
*r_u
, prs_struct
*ps
, int depth
);
2059 void init_samr_q_unknown_12(SAMR_Q_UNKNOWN_12
*q_u
,
2060 POLICY_HND
*pol
, uint32 rid
,
2061 uint32 num_gids
, uint32
*gid
);
2062 void init_samr_q_unknown_21(SAMR_Q_UNKNOWN_21
*q_c
,
2063 POLICY_HND
*hnd
, uint16 unk_1
, uint16 unk_2
);
2064 void init_samr_q_unknown_13(SAMR_Q_UNKNOWN_13
*q_c
,
2065 POLICY_HND
*hnd
, uint16 unk_1
, uint16 unk_2
);
2066 void init_samr_q_unknown_38(SAMR_Q_UNKNOWN_38
*q_u
, char *srv_name
);
2067 BOOL
samr_io_q_unknown_38(char *desc
, SAMR_Q_UNKNOWN_38
*q_u
, prs_struct
*ps
, int depth
);
2068 void init_samr_r_unknown_38(SAMR_R_UNKNOWN_38
*r_u
);
2069 BOOL
samr_io_r_unknown_38(char *desc
, SAMR_R_UNKNOWN_38
*r_u
, prs_struct
*ps
, int depth
);
2070 void init_enc_passwd(SAMR_ENC_PASSWD
*pwd
, char pass
[512]);
2071 BOOL
samr_io_enc_passwd(char *desc
, SAMR_ENC_PASSWD
*pwd
, prs_struct
*ps
, int depth
);
2072 void init_enc_hash(SAMR_ENC_HASH
*hsh
, uchar hash
[16]);
2073 BOOL
samr_io_enc_hash(char *desc
, SAMR_ENC_HASH
*hsh
, prs_struct
*ps
, int depth
);
2074 void init_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER
*q_u
,
2075 char *dest_host
, char *user_name
,
2076 char nt_newpass
[516], uchar nt_oldhash
[16],
2077 char lm_newpass
[516], uchar lm_oldhash
[16]);
2078 BOOL
samr_io_q_chgpasswd_user(char *desc
, SAMR_Q_CHGPASSWD_USER
*q_u
, prs_struct
*ps
, int depth
);
2079 void init_samr_r_chgpasswd_user(SAMR_R_CHGPASSWD_USER
*r_u
, uint32 status
);
2080 BOOL
samr_io_r_chgpasswd_user(char *desc
, SAMR_R_CHGPASSWD_USER
*r_u
, prs_struct
*ps
, int depth
);
2082 /*The following definitions come from rpc_parse/parse_sec.c */
2084 void init_sec_access(SEC_ACCESS
*t
, uint32 mask
);
2085 BOOL
sec_io_access(char *desc
, SEC_ACCESS
*t
, prs_struct
*ps
, int depth
);
2086 void init_sec_ace(SEC_ACE
*t
, DOM_SID
*sid
, uint8 type
, SEC_ACCESS mask
, uint8 flag
);
2087 BOOL
sec_io_ace(char *desc
, SEC_ACE
*psa
, prs_struct
*ps
, int depth
);
2088 SEC_ACL
*make_sec_acl(uint16 revision
, int num_aces
, SEC_ACE
*ace_list
);
2089 SEC_ACL
*dup_sec_acl( SEC_ACL
*src
);
2090 void free_sec_acl(SEC_ACL
**ppsa
);
2091 BOOL
sec_io_acl(char *desc
, SEC_ACL
**ppsa
, prs_struct
*ps
, int depth
);
2092 SEC_DESC
*make_sec_desc(uint16 revision
, uint16 type
,
2093 DOM_SID
*owner_sid
, DOM_SID
*grp_sid
,
2094 SEC_ACL
*sacl
, SEC_ACL
*dacl
, size_t *sec_desc_size
);
2095 SEC_DESC
*dup_sec_desc( SEC_DESC
*src
);
2096 void free_sec_desc(SEC_DESC
**ppsd
);
2097 SEC_DESC
*make_standard_sec_desc(DOM_SID
*owner_sid
, DOM_SID
*grp_sid
,
2098 SEC_ACL
*dacl
, size_t *sec_desc_size
);
2099 BOOL
sec_io_desc(char *desc
, SEC_DESC
**ppsd
, prs_struct
*ps
, int depth
);
2100 SEC_DESC_BUF
*make_sec_desc_buf(int len
, SEC_DESC
*sec_desc
);
2101 SEC_DESC_BUF
*dup_sec_desc_buf(SEC_DESC_BUF
*src
);
2102 void free_sec_desc_buf(SEC_DESC_BUF
**ppsdb
);
2103 BOOL
sec_io_desc_buf(char *desc
, SEC_DESC_BUF
**ppsdb
, prs_struct
*ps
, int depth
);
2105 /*The following definitions come from rpc_parse/parse_srv.c */
2107 void init_srv_share_info1_str(SH_INFO_1_STR
*sh1
, char *net_name
, char *remark
);
2108 void init_srv_share_info1(SH_INFO_1
*sh1
, char *net_name
, uint32 type
, char *remark
);
2109 void init_srv_share_info2_str(SH_INFO_2_STR
*sh2
,
2110 char *net_name
, char *remark
,
2111 char *path
, char *passwd
);
2112 void init_srv_share_info2(SH_INFO_2
*sh2
,
2113 char *net_name
, uint32 type
, char *remark
,
2114 uint32 perms
, uint32 max_uses
, uint32 num_uses
,
2115 char *path
, char *passwd
);
2116 void free_srv_share_info_ctr(SRV_SHARE_INFO_CTR
*ctr
);
2117 void free_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM
*q_n
);
2118 void free_srv_r_net_share_enum(SRV_R_NET_SHARE_ENUM
*r_n
);
2119 void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM
*q_n
,
2120 char *srv_name
, uint32 info_level
,
2121 uint32 preferred_len
, ENUM_HND
*hnd
);
2122 BOOL
srv_io_q_net_share_enum(char *desc
, SRV_Q_NET_SHARE_ENUM
*q_n
, prs_struct
*ps
, int depth
);
2123 BOOL
srv_io_r_net_share_enum(char *desc
, SRV_R_NET_SHARE_ENUM
*r_n
, prs_struct
*ps
, int depth
);
2124 void free_srv_q_net_share_get_info(SRV_Q_NET_SHARE_GET_INFO
*q_n
);
2125 void free_srv_r_net_share_get_info(SRV_R_NET_SHARE_GET_INFO
*r_n
);
2126 BOOL
srv_io_q_net_share_get_info(char *desc
, SRV_Q_NET_SHARE_GET_INFO
*q_n
, prs_struct
*ps
, int depth
);
2127 BOOL
srv_io_r_net_share_get_info(char *desc
, SRV_R_NET_SHARE_GET_INFO
*r_n
, prs_struct
*ps
, int depth
);
2128 void init_srv_sess_info0_str(SESS_INFO_0_STR
*ss0
, char *name
);
2129 void init_srv_sess_info0(SESS_INFO_0
*ss0
, char *name
);
2130 void init_srv_sess_info1_str(SESS_INFO_1_STR
*ss1
, char *name
, char *user
);
2131 void init_srv_sess_info1(SESS_INFO_1
*ss1
,
2132 char *name
, char *user
,
2133 uint32 num_opens
, uint32 open_time
, uint32 idle_time
,
2135 void init_srv_q_net_sess_enum(SRV_Q_NET_SESS_ENUM
*q_n
,
2136 char *srv_name
, char *qual_name
,
2137 uint32 sess_level
, SRV_SESS_INFO_CTR
*ctr
,
2138 uint32 preferred_len
,
2140 BOOL
srv_io_q_net_sess_enum(char *desc
, SRV_Q_NET_SESS_ENUM
*q_n
, prs_struct
*ps
, int depth
);
2141 BOOL
srv_io_r_net_sess_enum(char *desc
, SRV_R_NET_SESS_ENUM
*r_n
, prs_struct
*ps
, int depth
);
2142 void init_srv_conn_info0(CONN_INFO_0
*ss0
, uint32 id
);
2143 void init_srv_conn_info1_str(CONN_INFO_1_STR
*ss1
, char *usr_name
, char *net_name
);
2144 void init_srv_conn_info1(CONN_INFO_1
*ss1
,
2145 uint32 id
, uint32 type
,
2146 uint32 num_opens
, uint32 num_users
, uint32 open_time
,
2147 char *usr_name
, char *net_name
);
2148 void init_srv_q_net_conn_enum(SRV_Q_NET_CONN_ENUM
*q_n
,
2149 char *srv_name
, char *qual_name
,
2150 uint32 conn_level
, SRV_CONN_INFO_CTR
*ctr
,
2151 uint32 preferred_len
,
2153 BOOL
srv_io_q_net_conn_enum(char *desc
, SRV_Q_NET_CONN_ENUM
*q_n
, prs_struct
*ps
, int depth
);
2154 BOOL
srv_io_r_net_conn_enum(char *desc
, SRV_R_NET_CONN_ENUM
*r_n
, prs_struct
*ps
, int depth
);
2155 void init_srv_file_info3_str(FILE_INFO_3_STR
*fi3
, char *user_name
, char *path_name
);
2156 void init_srv_file_info3(FILE_INFO_3
*fl3
,
2157 uint32 id
, uint32 perms
, uint32 num_locks
,
2158 char *path_name
, char *user_name
);
2159 void init_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM
*q_n
,
2160 char *srv_name
, char *qual_name
,
2161 uint32 file_level
, SRV_FILE_INFO_CTR
*ctr
,
2162 uint32 preferred_len
,
2164 BOOL
srv_io_q_net_file_enum(char *desc
, SRV_Q_NET_FILE_ENUM
*q_n
, prs_struct
*ps
, int depth
);
2165 BOOL
srv_io_r_net_file_enum(char *desc
, SRV_R_NET_FILE_ENUM
*r_n
, prs_struct
*ps
, int depth
);
2166 void init_srv_info_101(SRV_INFO_101
*sv101
, uint32 platform_id
, char *name
,
2167 uint32 ver_major
, uint32 ver_minor
,
2168 uint32 srv_type
, char *comment
);
2169 void init_srv_info_102(SRV_INFO_102
*sv102
, uint32 platform_id
, char *name
,
2170 char *comment
, uint32 ver_major
, uint32 ver_minor
,
2171 uint32 srv_type
, uint32 users
, uint32 disc
, uint32 hidden
,
2172 uint32 announce
, uint32 ann_delta
, uint32 licenses
,
2174 void init_srv_q_net_srv_get_info(SRV_Q_NET_SRV_GET_INFO
*srv
,
2175 char *server_name
, uint32 switch_value
);
2176 BOOL
srv_io_q_net_srv_get_info(char *desc
, SRV_Q_NET_SRV_GET_INFO
*q_n
, prs_struct
*ps
, int depth
);
2177 void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO
*srv
,
2178 uint32 switch_value
, SRV_INFO_CTR
*ctr
, uint32 status
);
2179 BOOL
srv_io_r_net_srv_get_info(char *desc
, SRV_R_NET_SRV_GET_INFO
*r_n
, prs_struct
*ps
, int depth
);
2180 BOOL
srv_io_q_net_remote_tod(char *desc
, SRV_Q_NET_REMOTE_TOD
*q_n
, prs_struct
*ps
, int depth
);
2181 void init_time_of_day_info(TIME_OF_DAY_INFO
*tod
, uint32 elapsedt
, uint32 msecs
,
2182 uint32 hours
, uint32 mins
, uint32 secs
, uint32 hunds
,
2183 uint32 zone
, uint32 tintervals
, uint32 day
,
2184 uint32 month
, uint32 year
, uint32 weekday
);
2185 BOOL
srv_io_r_net_remote_tod(char *desc
, SRV_R_NET_REMOTE_TOD
*r_n
, prs_struct
*ps
, int depth
);
2187 /*The following definitions come from rpc_parse/parse_wks.c */
2189 void init_wks_q_query_info(WKS_Q_QUERY_INFO
*q_u
,
2190 char *server
, uint16 switch_value
) ;
2191 BOOL
wks_io_q_query_info(char *desc
, WKS_Q_QUERY_INFO
*q_u
, prs_struct
*ps
, int depth
);
2192 void init_wks_info_100(WKS_INFO_100
*inf
,
2193 uint32 platform_id
, uint32 ver_major
, uint32 ver_minor
,
2194 char *my_name
, char *domain_name
);
2195 void init_wks_r_query_info(WKS_R_QUERY_INFO
*r_u
,
2196 uint32 switch_value
, WKS_INFO_100
*wks100
,
2198 BOOL
wks_io_r_query_info(char *desc
, WKS_R_QUERY_INFO
*r_u
, prs_struct
*ps
, int depth
);
2200 /*The following definitions come from rpc_server/srv_lsa.c */
2202 BOOL
api_ntlsa_rpc(pipes_struct
*p
, prs_struct
*data
);
2204 /*The following definitions come from rpc_server/srv_lsa_hnd.c */
2206 void init_lsa_policy_hnd(void);
2207 BOOL
open_lsa_policy_hnd(POLICY_HND
*hnd
);
2208 int find_lsa_policy_by_hnd(POLICY_HND
*hnd
);
2209 BOOL
set_lsa_policy_samr_rid(POLICY_HND
*hnd
, uint32 rid
);
2210 BOOL
set_lsa_policy_samr_pol_status(POLICY_HND
*hnd
, uint32 pol_status
);
2211 BOOL
set_lsa_policy_samr_sid(POLICY_HND
*hnd
, DOM_SID
*sid
);
2212 BOOL
get_lsa_policy_samr_sid(POLICY_HND
*hnd
, DOM_SID
*sid
);
2213 uint32
get_lsa_policy_samr_rid(POLICY_HND
*hnd
);
2214 BOOL
set_lsa_policy_reg_name(POLICY_HND
*hnd
, fstring name
);
2215 BOOL
close_lsa_policy_hnd(POLICY_HND
*hnd
);
2217 /*The following definitions come from rpc_server/srv_netlog.c */
2219 BOOL
api_netlog_rpc(pipes_struct
*p
, prs_struct
*data
);
2221 /*The following definitions come from rpc_server/srv_pipe.c */
2223 BOOL
create_next_pdu(pipes_struct
*p
);
2224 BOOL
api_pipe_bind_auth_resp(pipes_struct
*p
, prs_struct
*rpc_in_p
);
2225 BOOL
setup_fault_pdu(pipes_struct
*p
);
2226 BOOL
api_pipe_bind_req(pipes_struct
*p
, prs_struct
*rpc_in_p
);
2227 BOOL
api_pipe_auth_process(pipes_struct
*p
, prs_struct
*rpc_in
);
2228 BOOL
api_pipe_request(pipes_struct
*p
);
2229 BOOL
api_rpcTNP(pipes_struct
*p
, char *rpc_name
, struct api_struct
*api_rpc_cmds
,
2230 prs_struct
*rpc_in
);
2232 /*The following definitions come from rpc_server/srv_pipe_hnd.c */
2234 void set_pipe_handle_offset(int max_open_files
);
2235 void reset_chain_p(void);
2236 void init_rpc_pipe_hnd(void);
2237 pipes_struct
*open_rpc_pipe_p(char *pipe_name
,
2238 connection_struct
*conn
, uint16 vuid
);
2239 ssize_t
write_to_pipe(pipes_struct
*p
, char *data
, size_t n
);
2240 ssize_t
read_from_pipe(pipes_struct
*p
, char *data
, size_t n
);
2241 BOOL
wait_rpc_pipe_hnd_state(pipes_struct
*p
, uint16 priority
);
2242 BOOL
set_rpc_pipe_hnd_state(pipes_struct
*p
, uint16 device_state
);
2243 BOOL
close_rpc_pipe_hnd(pipes_struct
*p
, connection_struct
*conn
);
2244 pipes_struct
*get_rpc_pipe_p(char *buf
, int where
);
2245 pipes_struct
*get_rpc_pipe(int pnum
);
2247 /*The following definitions come from rpc_server/srv_reg.c */
2249 BOOL
api_reg_rpc(pipes_struct
*p
, prs_struct
*data
);
2251 /*The following definitions come from rpc_server/srv_samr.c */
2253 BOOL
api_samr_rpc(pipes_struct
*p
, prs_struct
*data
);
2255 /*The following definitions come from rpc_server/srv_srvsvc.c */
2257 BOOL
api_srvsvc_rpc(pipes_struct
*p
, prs_struct
*data
);
2259 /*The following definitions come from rpc_server/srv_util.c */
2261 int make_dom_gids(char *gids_str
, DOM_GID
**ppgids
);
2262 void get_domain_user_groups(char *domain_groups
, char *user
);
2263 uint32
lookup_group_name(uint32 rid
, char *group_name
, uint32
*type
);
2264 uint32
lookup_alias_name(uint32 rid
, char *alias_name
, uint32
*type
);
2265 uint32
lookup_user_name(uint32 rid
, char *user_name
, uint32
*type
);
2266 uint32
lookup_group_rid(char *group_name
, uint32
*rid
);
2267 uint32
lookup_alias_rid(char *alias_name
, uint32
*rid
);
2268 uint32
lookup_user_rid(char *user_name
, uint32
*rid
);
2270 /*The following definitions come from rpc_server/srv_wkssvc.c */
2272 BOOL
api_wkssvc_rpc(pipes_struct
*p
, prs_struct
*data
);
2274 /*The following definitions come from rpcclient/cmd_lsarpc.c */
2276 void cmd_lsa_query_info(struct client_info
*info
);
2277 void cmd_lsa_lookup_sids(struct client_info
*info
);
2279 /*The following definitions come from rpcclient/cmd_netlogon.c */
2281 void cmd_netlogon_login_test(struct client_info
*info
);
2283 /*The following definitions come from rpcclient/cmd_reg.c */
2285 void cmd_reg_enum(struct client_info
*info
);
2286 void cmd_reg_query_key(struct client_info
*info
);
2287 void cmd_reg_create_val(struct client_info
*info
);
2288 void cmd_reg_delete_val(struct client_info
*info
);
2289 void cmd_reg_delete_key(struct client_info
*info
);
2290 void cmd_reg_create_key(struct client_info
*info
);
2291 void cmd_reg_test_key_sec(struct client_info
*info
);
2292 void cmd_reg_get_key_sec(struct client_info
*info
);
2294 /*The following definitions come from rpcclient/cmd_samr.c */
2296 void cmd_sam_ntchange_pwd(struct client_info
*info
);
2297 void cmd_sam_test(struct client_info
*info
);
2298 void cmd_sam_enum_users(struct client_info
*info
);
2299 void cmd_sam_query_user(struct client_info
*info
);
2300 void cmd_sam_query_groups(struct client_info
*info
);
2301 void cmd_sam_enum_aliases(struct client_info
*info
);
2303 /*The following definitions come from rpcclient/cmd_srvsvc.c */
2305 void cmd_srv_query_info(struct client_info
*info
);
2306 void cmd_srv_enum_conn(struct client_info
*info
);
2307 void cmd_srv_enum_shares(struct client_info
*info
);
2308 void cmd_srv_enum_sess(struct client_info
*info
);
2309 void cmd_srv_enum_files(struct client_info
*info
);
2311 /*The following definitions come from rpcclient/cmd_wkssvc.c */
2313 void cmd_wks_query_info(struct client_info
*info
);
2315 /*The following definitions come from rpcclient/display.c */
2317 char *get_file_mode_str(uint32 share_mode
);
2318 char *get_file_oplock_str(uint32 op_type
);
2319 char *get_share_type_str(uint32 type
);
2320 char *get_server_type_str(uint32 type
);
2321 void display_srv_info_101(FILE *out_hnd
, enum action_type action
,
2322 SRV_INFO_101
*sv101
);
2323 void display_srv_info_102(FILE *out_hnd
, enum action_type action
,SRV_INFO_102
*sv102
);
2324 void display_srv_info_ctr(FILE *out_hnd
, enum action_type action
,SRV_INFO_CTR
*ctr
);
2325 void display_conn_info_0(FILE *out_hnd
, enum action_type action
,
2326 CONN_INFO_0
*info0
);
2327 void display_conn_info_1(FILE *out_hnd
, enum action_type action
,
2328 CONN_INFO_1
*info1
, CONN_INFO_1_STR
*str1
);
2329 void display_srv_conn_info_0_ctr(FILE *out_hnd
, enum action_type action
,
2330 SRV_CONN_INFO_0
*ctr
);
2331 void display_srv_conn_info_1_ctr(FILE *out_hnd
, enum action_type action
,
2332 SRV_CONN_INFO_1
*ctr
);
2333 void display_srv_conn_info_ctr(FILE *out_hnd
, enum action_type action
,
2334 SRV_CONN_INFO_CTR
*ctr
);
2335 void display_share_info_1(FILE *out_hnd
, enum action_type action
,
2336 SRV_SHARE_INFO_1
*info1
);
2337 void display_share_info_2(FILE *out_hnd
, enum action_type action
,
2338 SRV_SHARE_INFO_2
*info2
);
2339 void display_srv_share_info_ctr(FILE *out_hnd
, enum action_type action
,
2340 SRV_SHARE_INFO_CTR
*ctr
);
2341 void display_file_info_3(FILE *out_hnd
, enum action_type action
,
2342 FILE_INFO_3
*info3
, FILE_INFO_3_STR
*str3
);
2343 void display_srv_file_info_3_ctr(FILE *out_hnd
, enum action_type action
,
2344 SRV_FILE_INFO_3
*ctr
);
2345 void display_srv_file_info_ctr(FILE *out_hnd
, enum action_type action
,
2346 SRV_FILE_INFO_CTR
*ctr
);
2347 void display_server(FILE *out_hnd
, enum action_type action
,
2348 char *sname
, uint32 type
, char *comment
);
2349 void display_share(FILE *out_hnd
, enum action_type action
,
2350 char *sname
, uint32 type
, char *comment
);
2351 void display_share2(FILE *out_hnd
, enum action_type action
,
2352 char *sname
, uint32 type
, char *comment
,
2353 uint32 perms
, uint32 max_uses
, uint32 num_uses
,
2354 char *path
, char *passwd
);
2355 void display_name(FILE *out_hnd
, enum action_type action
,
2357 void display_group_rid_info(FILE *out_hnd
, enum action_type action
,
2358 uint32 num_gids
, DOM_GID
*gid
);
2359 void display_alias_name_info(FILE *out_hnd
, enum action_type action
,
2360 uint32 num_aliases
, fstring
*alias_name
, uint32
*num_als_usrs
);
2361 void display_sam_user_info_21(FILE *out_hnd
, enum action_type action
, SAM_USER_INFO_21
*usr
);
2362 char *get_sec_mask_str(uint32 type
);
2363 void display_sec_access(FILE *out_hnd
, enum action_type action
, SEC_ACCESS
*info
);
2364 void display_sec_ace(FILE *out_hnd
, enum action_type action
, SEC_ACE
*ace
);
2365 void display_sec_acl(FILE *out_hnd
, enum action_type action
, SEC_ACL
*sec_acl
);
2366 void display_sec_desc(FILE *out_hnd
, enum action_type action
, SEC_DESC
*sec
);
2367 char *get_reg_val_type_str(uint32 type
);
2368 void display_reg_value_info(FILE *out_hnd
, enum action_type action
,
2369 char *val_name
, uint32 val_type
, BUFFER2
*value
);
2370 void display_reg_key_info(FILE *out_hnd
, enum action_type action
,
2371 char *key_name
, time_t key_mod_time
);
2373 /*The following definitions come from rpcclient/rpcclient.c */
2375 void rpcclient_init(void);
2377 /*The following definitions come from smbd/blocking.c */
2379 BOOL
push_blocking_lock_request( char *inbuf
, int length
, int lock_timeout
, int lock_num
);
2380 void remove_pending_lock_requests_by_fid(files_struct
*fsp
);
2381 void remove_pending_lock_requests_by_mid(int mid
);
2382 BOOL
blocking_locks_pending(void);
2383 void process_blocking_lock_queue(time_t t
);
2385 /*The following definitions come from smbd/chgpasswd.c */
2387 BOOL
chgpasswd(char *name
,char *oldpass
,char *newpass
, BOOL as_root
);
2388 BOOL
chgpasswd(char *name
,char *oldpass
,char *newpass
, BOOL as_root
);
2389 BOOL
check_lanman_password(char *user
, uchar
*pass1
,
2390 uchar
*pass2
, struct smb_passwd
**psmbpw
);
2391 BOOL
change_lanman_password(struct smb_passwd
*smbpw
, uchar
*pass1
, uchar
*pass2
);
2392 BOOL
pass_oem_change(char *user
,
2393 uchar
*lmdata
, uchar
*lmhash
,
2394 uchar
*ntdata
, uchar
*nthash
);
2395 BOOL
check_oem_password(char *user
,
2396 uchar
*lmdata
, uchar
*lmhash
,
2397 uchar
*ntdata
, uchar
*nthash
,
2398 struct smb_passwd
**psmbpw
, char *new_passwd
,
2399 int new_passwd_size
);
2400 BOOL
change_oem_password(struct smb_passwd
*smbpw
, char *new_passwd
, BOOL override
);
2401 BOOL
check_plaintext_password(char *user
,char *old_passwd
,
2402 int old_passwd_size
, struct smb_passwd
**psmbpw
);
2404 /*The following definitions come from smbd/close.c */
2406 void close_filestruct(files_struct
*fsp
);
2407 int close_file(files_struct
*fsp
, BOOL normal_close
);
2409 /*The following definitions come from smbd/conn.c */
2411 void conn_init(void);
2412 int conn_num_open(void);
2413 BOOL
conn_snum_used(int snum
);
2414 connection_struct
*conn_find(int cnum
);
2415 connection_struct
*conn_new(void);
2416 void conn_close_all(void);
2417 BOOL
conn_idle_all(time_t t
, int deadtime
);
2418 void conn_free(connection_struct
*conn
);
2420 /*The following definitions come from smbd/connection.c */
2422 BOOL
yield_connection(connection_struct
*conn
,char *name
,int max_connections
);
2423 BOOL
claim_connection(connection_struct
*conn
,char *name
,int max_connections
,BOOL Clear
);
2425 /*The following definitions come from smbd/dfree.c */
2427 SMB_BIG_UINT
sys_disk_free(char *path
, BOOL small_query
,
2428 SMB_BIG_UINT
*bsize
,SMB_BIG_UINT
*dfree
,SMB_BIG_UINT
*dsize
);
2430 /*The following definitions come from smbd/dir.c */
2432 void init_dptrs(void);
2433 char *dptr_path(int key
);
2434 char *dptr_wcard(int key
);
2435 BOOL
dptr_set_wcard(int key
, char *wcard
);
2436 BOOL
dptr_set_attr(int key
, uint16 attr
);
2437 uint16
dptr_attr(int key
);
2438 void dptr_close(int *key
);
2439 void dptr_closecnum(connection_struct
*conn
);
2440 void dptr_idlecnum(connection_struct
*conn
);
2441 void dptr_closepath(char *path
,uint16 spid
);
2442 int dptr_create(connection_struct
*conn
,char *path
, BOOL old_handle
, BOOL expect_close
,uint16 spid
);
2443 BOOL
dptr_fill(char *buf1
,unsigned int key
);
2444 void *dptr_fetch(char *buf
,int *num
);
2445 void *dptr_fetch_lanman2(int dptr_num
);
2446 BOOL
dir_check_ftype(connection_struct
*conn
,int mode
,SMB_STRUCT_STAT
*st
,int dirtype
);
2447 BOOL
get_dir_entry(connection_struct
*conn
,char *mask
,int dirtype
,char *fname
,
2448 SMB_OFF_T
*size
,int *mode
,time_t *date
,BOOL check_descend
);
2449 void *OpenDir(connection_struct
*conn
, char *name
, BOOL use_veto
);
2450 void CloseDir(void *p
);
2451 char *ReadDirName(void *p
);
2452 BOOL
SeekDir(void *p
,int pos
);
2453 int TellDir(void *p
);
2454 void DirCacheAdd( char *path
, char *name
, char *dname
, int snum
);
2455 char *DirCacheCheck( char *path
, char *name
, int snum
);
2456 void DirCacheFlush(int snum
);
2458 /*The following definitions come from smbd/dosmode.c */
2460 mode_t
unix_mode(connection_struct
*conn
,int dosmode
,const char *fname
);
2461 int dos_mode(connection_struct
*conn
,char *path
,SMB_STRUCT_STAT
*sbuf
);
2462 int file_chmod(connection_struct
*conn
,char *fname
,int dosmode
,SMB_STRUCT_STAT
*st
);
2463 int file_utime(connection_struct
*conn
, char *fname
, struct utimbuf
*times
);
2464 BOOL
set_filetime(connection_struct
*conn
, char *fname
, time_t mtime
);
2466 /*The following definitions come from smbd/error.c */
2468 int cached_error_packet(char *inbuf
,char *outbuf
,files_struct
*fsp
,int line
);
2469 int unix_error_packet(char *inbuf
,char *outbuf
,int def_class
,uint32 def_code
,int line
);
2470 int error_packet(char *inbuf
,char *outbuf
,int error_class
,uint32 error_code
,int line
);
2472 /*The following definitions come from smbd/fileio.c */
2474 SMB_OFF_T
seek_file(files_struct
*fsp
,SMB_OFF_T pos
);
2475 BOOL
read_from_write_cache(files_struct
*fsp
,char *data
,SMB_OFF_T pos
,size_t n
);
2476 ssize_t
read_file(files_struct
*fsp
,char *data
,SMB_OFF_T pos
,size_t n
);
2477 ssize_t
write_file(files_struct
*fsp
, char *data
, SMB_OFF_T pos
, size_t n
);
2478 void delete_write_cache(files_struct
*fsp
);
2479 void set_filelen_write_cache(files_struct
*fsp
, SMB_OFF_T file_size
);
2480 ssize_t
flush_write_cache(files_struct
*fsp
, enum flush_reason_enum reason
);
2481 void sync_file(connection_struct
*conn
, files_struct
*fsp
);
2483 /*The following definitions come from smbd/filename.c */
2485 void print_stat_cache_statistics(void);
2486 BOOL
unix_convert(char *name
,connection_struct
*conn
,char *saved_last_component
,
2487 BOOL
*bad_path
, SMB_STRUCT_STAT
*pst
);
2488 BOOL
check_name(char *name
,connection_struct
*conn
);
2489 BOOL
reset_stat_cache( void );
2491 /*The following definitions come from smbd/files.c */
2493 files_struct
*file_new(void );
2494 file_fd_struct
*fd_get_already_open(SMB_STRUCT_STAT
*sbuf
);
2495 file_fd_struct
*fd_get_new(void);
2496 void file_close_conn(connection_struct
*conn
);
2497 void file_init(void);
2498 void file_close_user(int vuid
);
2499 files_struct
*file_find_dit(SMB_DEV_T dev
, SMB_INO_T inode
, struct timeval
*tval
);
2500 files_struct
*file_find_fsp(files_struct
*orig_fsp
);
2501 files_struct
*file_find_di_first(SMB_DEV_T dev
, SMB_INO_T inode
);
2502 files_struct
*file_find_di_next(files_struct
*start_fsp
);
2503 files_struct
*file_find_print(void);
2504 void file_sync_all(connection_struct
*conn
);
2505 void fd_ptr_free(file_fd_struct
*fd_ptr
);
2506 void file_free(files_struct
*fsp
);
2507 files_struct
*file_fsp(char *buf
, int where
);
2508 void file_chain_reset(void);
2509 void file_chain_save(void);
2510 void file_chain_restore(void);
2512 /*The following definitions come from smbd/ipc.c */
2514 int reply_trans(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int bufsize
);
2516 /*The following definitions come from smbd/mangle.c */
2518 BOOL
is_mangled( char *s
);
2519 BOOL
is_8_3( char *fname
, BOOL check_case
);
2520 void reset_mangled_cache( void );
2521 BOOL
check_mangled_cache( char *s
);
2522 void mangle_name_83( char *s
);
2523 BOOL
name_map_mangle(char *OutName
, BOOL need83
, BOOL cache83
, int snum
);
2525 /*The following definitions come from smbd/message.c */
2527 int reply_sends(connection_struct
*conn
,
2528 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2529 int reply_sendstrt(connection_struct
*conn
,
2530 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2531 int reply_sendtxt(connection_struct
*conn
,
2532 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2533 int reply_sendend(connection_struct
*conn
,
2534 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2536 /*The following definitions come from smbd/negprot.c */
2538 int reply_negprot(connection_struct
*conn
,
2539 char *inbuf
,char *outbuf
, int dum_size
,
2542 /*The following definitions come from smbd/noquotas.c */
2544 BOOL
disk_quotas(char *path
,SMB_BIG_UINT
*bsize
,SMB_BIG_UINT
*dfree
,SMB_BIG_UINT
*dsize
);
2546 /*The following definitions come from smbd/nttrans.c */
2548 void fail_next_srvsvc_open(void);
2549 BOOL
should_fail_next_srvsvc_open(const char *pipename
);
2550 int reply_ntcreate_and_X(connection_struct
*conn
,
2551 char *inbuf
,char *outbuf
,int length
,int bufsize
);
2552 int reply_ntcancel(connection_struct
*conn
,
2553 char *inbuf
,char *outbuf
,int length
,int bufsize
);
2554 int reply_nttranss(connection_struct
*conn
,
2555 char *inbuf
,char *outbuf
,int length
,int bufsize
);
2556 void remove_pending_change_notify_requests_by_fid(files_struct
*fsp
);
2557 void remove_pending_change_notify_requests_by_filename(files_struct
*fsp
);
2558 BOOL
process_pending_change_notify_queue(time_t t
);
2559 BOOL
change_notifies_pending(void);
2560 int reply_nttrans(connection_struct
*conn
,
2561 char *inbuf
,char *outbuf
,int length
,int bufsize
);
2563 /*The following definitions come from smbd/open.c */
2565 void fd_add_to_uid_cache(file_fd_struct
*fd_ptr
, uid_t u
);
2566 uint16
fd_attempt_close(file_fd_struct
*fd_ptr
, int *err_ret
);
2567 void open_file_shared(files_struct
*fsp
,connection_struct
*conn
,char *fname
,int share_mode
,int ofun
,
2568 mode_t mode
,int oplock_request
, int *Access
,int *action
);
2569 int open_file_stat(files_struct
*fsp
,connection_struct
*conn
,
2570 char *fname
, int smb_ofun
, SMB_STRUCT_STAT
*pst
, int *action
);
2571 int open_directory(files_struct
*fsp
,connection_struct
*conn
,
2572 char *fname
, int smb_ofun
, mode_t unixmode
, int *action
);
2573 BOOL
check_file_sharing(connection_struct
*conn
,char *fname
, BOOL rename_op
);
2575 /*The following definitions come from smbd/oplock.c */
2577 int32
get_number_of_exclusive_open_oplocks(void);
2578 BOOL
setup_kernel_oplock_pipe(void);
2579 BOOL
open_oplock_ipc(void);
2580 BOOL
receive_local_message(fd_set
*fds
, char *buffer
, int buffer_len
, int timeout
);
2581 BOOL
set_file_oplock(files_struct
*fsp
, int oplock_type
);
2582 void release_file_oplock(files_struct
*fsp
);
2583 BOOL
remove_oplock(files_struct
*fsp
);
2584 int setup_oplock_select_set( fd_set
*fds
);
2585 BOOL
process_local_message(char *buffer
, int buf_size
);
2586 BOOL
oplock_break_level2(files_struct
*fsp
, BOOL local_request
, int token
);
2587 BOOL
request_oplock_break(share_mode_entry
*share_entry
,
2588 SMB_DEV_T dev
, SMB_INO_T inode
);
2589 BOOL
attempt_close_oplocked_file(files_struct
*fsp
);
2590 void check_kernel_oplocks(void);
2592 /*The following definitions come from smbd/password.c */
2594 void generate_next_challenge(char *challenge
);
2595 BOOL
set_challenge(unsigned char *challenge
);
2596 user_struct
*get_valid_user_struct(uint16 vuid
);
2597 void invalidate_vuid(uint16 vuid
);
2598 char *validated_username(uint16 vuid
);
2599 int setup_groups(char *user
, uid_t uid
, gid_t gid
, int *p_ngroups
, gid_t
**p_groups
);
2600 uint16
register_vuid(uid_t uid
,gid_t gid
, char *unix_name
, char *requested_name
, BOOL guest
);
2601 void add_session_user(char *user
);
2602 BOOL
smb_password_check(char *password
, unsigned char *part_passwd
, unsigned char *c8
);
2603 BOOL
smb_password_ok(struct smb_passwd
*smb_pass
, uchar chal
[8],
2604 uchar lm_pass
[24], uchar nt_pass
[24]);
2605 BOOL
pass_check_smb(char *user
, char *domain
,
2606 uchar
*chal
, uchar
*lm_pwd
, uchar
*nt_pwd
,
2607 struct passwd
*pwd
);
2608 BOOL
password_ok(char *user
, char *password
, int pwlen
, struct passwd
*pwd
);
2609 BOOL
user_ok(char *user
,int snum
);
2610 BOOL
authorise_login(int snum
,char *user
,char *password
, int pwlen
,
2611 BOOL
*guest
,BOOL
*force
,uint16 vuid
);
2612 BOOL
check_hosts_equiv(char *user
);
2613 struct cli_state
*server_client(void);
2614 struct cli_state
*server_cryptkey(void);
2615 BOOL
server_validate(char *user
, char *domain
,
2616 char *pass
, int passlen
,
2617 char *ntpass
, int ntpasslen
);
2618 BOOL
domain_client_validate( char *user
, char *domain
,
2619 char *smb_apasswd
, int smb_apasslen
,
2620 char *smb_ntpasswd
, int smb_ntpasslen
,
2623 /*The following definitions come from smbd/pipes.c */
2625 int reply_open_pipe_and_X(connection_struct
*conn
,
2626 char *inbuf
,char *outbuf
,int length
,int bufsize
);
2627 int reply_pipe_write(char *inbuf
,char *outbuf
,int length
,int dum_bufsize
);
2628 int reply_pipe_write_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
2629 int reply_pipe_read_and_X(char *inbuf
,char *outbuf
,int length
,int bufsize
);
2630 int reply_pipe_close(connection_struct
*conn
, char *inbuf
,char *outbuf
);
2632 /*The following definitions come from smbd/predict.c */
2634 ssize_t
read_predict(int fd
,SMB_OFF_T offset
,char *buf
,char **ptr
,size_t num
);
2635 void do_read_prediction(void);
2636 void invalidate_read_prediction(int fd
);
2638 /*The following definitions come from smbd/process.c */
2640 BOOL
push_oplock_pending_smb_message(char *buf
, int msg_len
);
2641 BOOL
receive_next_smb(char *inbuf
, int bufsize
, int timeout
);
2642 void respond_to_all_remaining_local_messages(void);
2643 void process_smb(char *inbuf
, char *outbuf
);
2644 char *smb_fn_name(int type
);
2645 void construct_reply_common(char *inbuf
,char *outbuf
);
2646 int chain_reply(char *inbuf
,char *outbuf
,int size
,int bufsize
);
2647 void check_reload(int t
);
2648 void smbd_process(void);
2650 /*The following definitions come from smbd/reply.c */
2652 int reply_special(char *inbuf
,char *outbuf
);
2653 int reply_tcon(connection_struct
*conn
,
2654 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2655 int reply_tcon_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
2656 int reply_unknown(char *inbuf
,char *outbuf
);
2657 int reply_ioctl(connection_struct
*conn
,
2658 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2659 int reply_sesssetup_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
2660 int reply_chkpth(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2661 int reply_getatr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2662 int reply_setatr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2663 int reply_dskattr(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2664 int reply_search(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2665 int reply_fclose(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2666 int reply_open(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2667 int reply_open_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
2668 int reply_ulogoffX(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
2669 int reply_mknew(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2670 int reply_ctemp(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2671 int reply_unlink(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2672 int reply_readbraw(connection_struct
*conn
, char *inbuf
, char *outbuf
, int dum_size
, int dum_buffsize
);
2673 int reply_lockread(connection_struct
*conn
, char *inbuf
,char *outbuf
, int length
, int dum_buffsiz
);
2674 int reply_read(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
2675 int reply_read_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
2676 int reply_writebraw(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
2677 int reply_writeunlock(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
2678 int reply_write(connection_struct
*conn
, char *inbuf
,char *outbuf
,int size
,int dum_buffsize
);
2679 int reply_write_and_X(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
2680 int reply_lseek(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
2681 int reply_flush(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
2682 int reply_exit(connection_struct
*conn
,
2683 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2684 int reply_close(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
,
2686 int reply_writeclose(connection_struct
*conn
,
2687 char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
2688 int reply_lock(connection_struct
*conn
,
2689 char *inbuf
,char *outbuf
, int length
, int dum_buffsize
);
2690 int reply_unlock(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
2691 int reply_tdis(connection_struct
*conn
,
2692 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2693 int reply_echo(connection_struct
*conn
,
2694 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2695 int reply_printopen(connection_struct
*conn
,
2696 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2697 int reply_printclose(connection_struct
*conn
,
2698 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2699 int reply_printqueue(connection_struct
*conn
,
2700 char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2701 int reply_printwrite(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2702 int reply_mkdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2703 BOOL
rmdir_internals(connection_struct
*conn
, char *directory
);
2704 int reply_rmdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2705 int rename_internals(connection_struct
*conn
,
2706 char *inbuf
, char *outbuf
, char *name
,
2707 char *newname
, BOOL replace_if_exists
);
2708 int reply_mv(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2709 int reply_copy(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2710 int reply_setdir(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2711 SMB_OFF_T
get_lock_count( char *data
, int data_offset
, BOOL large_file_format
, BOOL
*err
);
2712 SMB_OFF_T
get_lock_offset( char *data
, int data_offset
, BOOL large_file_format
, BOOL
*err
);
2713 int reply_lockingX(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
2714 int reply_readbmpx(connection_struct
*conn
, char *inbuf
,char *outbuf
,int length
,int bufsize
);
2715 int reply_writebmpx(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
2716 int reply_writebs(connection_struct
*conn
, char *inbuf
,char *outbuf
, int dum_size
, int dum_buffsize
);
2717 int reply_setattrE(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
2718 int reply_getattrE(connection_struct
*conn
, char *inbuf
,char *outbuf
, int size
, int dum_buffsize
);
2720 /*The following definitions come from smbd/server.c */
2722 BOOL
reload_services(BOOL test
);
2723 void exit_server(char *reason
);
2725 /*The following definitions come from smbd/service.c */
2727 BOOL
become_service(connection_struct
*conn
,BOOL do_chdir
);
2728 int find_service(char *service
);
2729 connection_struct
*make_connection(char *service
,char *user
,char *password
, int pwlen
, char *dev
,uint16 vuid
, int *ecode
);
2730 void close_cnum(connection_struct
*conn
, uint16 vuid
);
2732 /*The following definitions come from smbd/ssl.c */
2734 int sslutil_init(int isServer
);
2735 int sslutil_accept(int fd
);
2736 int sslutil_fd_is_ssl(int fd
);
2737 int sslutil_connect(int fd
);
2738 int sslutil_disconnect(int fd
);
2739 int sslutil_negotiate_ssl(int fd
, int msg_type
);
2741 /*The following definitions come from smbd/trans2.c */
2743 void mask_convert( char *mask
);
2744 int reply_findclose(connection_struct
*conn
,
2745 char *inbuf
,char *outbuf
,int length
,int bufsize
);
2746 int reply_findnclose(connection_struct
*conn
,
2747 char *inbuf
,char *outbuf
,int length
,int bufsize
);
2748 int reply_transs2(connection_struct
*conn
,
2749 char *inbuf
,char *outbuf
,int length
,int bufsize
);
2750 int reply_trans2(connection_struct
*conn
,
2751 char *inbuf
,char *outbuf
,int length
,int bufsize
);
2753 /*The following definitions come from smbd/uid.c */
2755 void init_uid(void);
2756 BOOL
become_guest(void);
2757 BOOL
become_user(connection_struct
*conn
, uint16 vuid
);
2758 BOOL
unbecome_user(void );
2759 BOOL
become_authenticated_pipe_user(pipes_struct
*p
);
2760 BOOL
unbecome_authenticated_pipe_user(pipes_struct
*p
);
2761 void become_root(BOOL save_dir
) ;
2762 void unbecome_root(BOOL restore_dir
);
2764 /*The following definitions come from smbwrapper/realcalls.c */
2766 int real_utime(const char *name
, struct utimbuf
*buf
);
2767 int real_utimes(const char *name
, struct timeval tv
[2]);
2769 /*The following definitions come from smbwrapper/shared.c */
2771 void smbw_setup_shared(void);
2772 char *smbw_getshared(const char *name
);
2773 void smbw_setshared(const char *name
, const char *val
);
2774 int smbw_setenv(const char *name
, const char *value
);
2775 int smbw_shared_fd(int fd
);
2777 /*The following definitions come from smbwrapper/smbw.c */
2779 void smbw_init(void);
2780 int smbw_fd(int fd
);
2781 int smbw_local_fd(int fd
);
2782 ino_t
smbw_inode(const char *name
);
2783 void clean_fname(char *name
);
2784 char *smbw_parse_path(const char *fname
, char *server
, char *share
, char *path
);
2785 int smbw_path(const char *path
);
2786 int smbw_errno(struct cli_state
*c
);
2787 struct smbw_server
*smbw_server(char *server
, char *share
);
2788 struct smbw_file
*smbw_file(int fd
);
2789 int smbw_open(const char *fname
, int flags
, mode_t mode
);
2790 ssize_t
smbw_pread(int fd
, void *buf
, size_t count
, off_t ofs
);
2791 ssize_t
smbw_read(int fd
, void *buf
, size_t count
);
2792 ssize_t
smbw_write(int fd
, void *buf
, size_t count
);
2793 ssize_t
smbw_pwrite(int fd
, void *buf
, size_t count
, off_t ofs
);
2794 int smbw_close(int fd
);
2795 int smbw_fcntl(int fd
, int cmd
, long arg
);
2796 int smbw_access(const char *name
, int mode
);
2797 int smbw_readlink(const char *path
, char *buf
, size_t bufsize
);
2798 int smbw_unlink(const char *fname
);
2799 int smbw_rename(const char *oldname
, const char *newname
);
2800 int smbw_utime(const char *fname
, void *buf
);
2801 int smbw_utimes(const char *fname
, void *buf
);
2802 int smbw_chown(const char *fname
, uid_t owner
, gid_t group
);
2803 int smbw_chmod(const char *fname
, mode_t newmode
);
2804 off_t
smbw_lseek(int fd
, off_t offset
, int whence
);
2805 int smbw_dup(int fd
);
2806 int smbw_dup2(int fd
, int fd2
);
2807 int smbw_fork(void);
2809 /*The following definitions come from smbwrapper/smbw_dir.c */
2811 struct smbw_dir
*smbw_dir(int fd
);
2812 int smbw_dirp(DIR *dirp
);
2813 int smbw_dir_open(const char *fname
);
2814 int smbw_dir_fstat(int fd
, struct stat
*st
);
2815 int smbw_dir_close(int fd
);
2816 int smbw_getdents(unsigned int fd
, struct dirent
*dirp
, int count
);
2817 int smbw_chdir(const char *name
);
2818 off_t
smbw_dir_lseek(int fd
, off_t offset
, int whence
);
2819 int smbw_mkdir(const char *fname
, mode_t mode
);
2820 int smbw_rmdir(const char *fname
);
2821 char *smbw_getcwd(char *buf
, size_t size
);
2822 int smbw_fchdir(unsigned int fd
);
2823 DIR *smbw_opendir(const char *fname
);
2824 struct dirent
*smbw_readdir(DIR *dirp
);
2825 int smbw_closedir(DIR *dirp
);
2826 void smbw_seekdir(DIR *dirp
, off_t offset
);
2827 off_t
smbw_telldir(DIR *dirp
);
2829 /*The following definitions come from smbwrapper/smbw_stat.c */
2831 void smbw_setup_stat(struct stat
*st
, char *fname
, size_t size
, int mode
);
2832 BOOL
smbw_getatr(struct smbw_server
*srv
, char *path
,
2833 uint16
*mode
, size_t *size
,
2834 time_t *c_time
, time_t *a_time
, time_t *m_time
,
2836 int smbw_stat_printjob(struct smbw_server
*srv
,char *path
,
2837 size_t *size
, time_t *m_time
);
2838 int smbw_fstat(int fd
, struct stat
*st
);
2839 int smbw_stat(const char *fname
, struct stat
*st
);
2841 /*The following definitions come from utils/nbio.c */
2843 void nb_setup(struct cli_state
*cli
);
2844 void nb_unlink(char *fname
);
2845 void nb_open(char *fname
, int handle
, int size
);
2846 void nb_write(int handle
, int size
, int offset
);
2847 void nb_read(int handle
, int size
, int offset
);
2848 void nb_close(int handle
);
2849 void nb_mkdir(char *fname
);
2850 void nb_rmdir(char *fname
);
2851 void nb_rename(char *old
, char *new);
2852 void nb_stat(char *fname
, int size
);
2853 void nb_create(char *fname
, int size
);
2855 /*The following definitions come from utils/torture.c */
2858 /*The following definitions come from web/cgi.c */
2860 void cgi_load_variables(FILE *f1
);
2861 char *cgi_variable(char *name
);
2863 char *cgi_user_name(void);
2864 void cgi_setup(char *rootdir
, int auth_required
);
2865 char *cgi_baseurl(void);
2866 char *cgi_pathinfo(void);
2867 char *cgi_remote_host(void);
2868 char *cgi_remote_addr(void);
2869 BOOL
cgi_waspost(void);
2871 /*The following definitions come from web/diagnose.c */
2873 BOOL
nmbd_running(void);
2874 BOOL
smbd_running(void);
2876 /*The following definitions come from web/startstop.c */
2878 void start_smbd(void);
2879 void start_nmbd(void);
2880 void stop_smbd(void);
2881 void stop_nmbd(void);
2882 void kill_pid(pid_t pid
);
2884 /*The following definitions come from web/statuspage.c */
2886 void status_page(void);
2888 /*The following definitions come from web/swat.c */
2890 #endif /* _PROTO_H_ */