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