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