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