From 0e77501e9c9ae63cf02e2805f46f2bd1197f2c56 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Wed, 3 Sep 2003 19:21:41 +0000 Subject: [PATCH] * samba/include/charset.h: Remove declaration already present in proto.h. * samba/include/proto.h: Run through uniq. --- vfs/ChangeLog | 6 + vfs/samba/include/charset.h | 2 - vfs/samba/include/proto.h | 1206 +++++++++++++++++------------------ 3 files changed, 580 insertions(+), 634 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 442b89148..318886413 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,9 @@ +2003-09-03 Pavel Roskin + + * samba/include/charset.h: Remove declaration already present in + proto.h. + * samba/include/proto.h: Run through uniq. + 2003-08-30 Pavel Roskin * samba/tests/summary.c: Remove. The test is now included ... diff --git a/vfs/samba/include/charset.h b/vfs/samba/include/charset.h index 843ca87fb..5d3bf2111 100644 --- a/vfs/samba/include/charset.h +++ b/vfs/samba/include/charset.h @@ -19,8 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -extern void charset_initialise(void); - #ifndef CHARSET_C extern char *dos_char_map; diff --git a/vfs/samba/include/proto.h b/vfs/samba/include/proto.h index 4cc49bce2..97e28a1a7 100644 --- a/vfs/samba/include/proto.h +++ b/vfs/samba/include/proto.h @@ -1,666 +1,608 @@ -#ifndef _PROTO_H_ -#define _PROTO_H_ -/* This file is automatically generated with "make proto". DO NOT EDIT */ - -/* The following definitions come from lib/charcnv.c */ - -char *unix2dos_format(char *str,BOOL overwrite); -char *dos2unix_format(char *str, BOOL overwrite); -void interpret_character_set(char *str); - -/* The following definitions come from lib/charset.c */ - -void charset_initialise(void); -void codepage_initialise(int client_codepage); -void add_char_string(char *s); - -/* The following definitions come from lib/debug.c */ - -void setup_logging( char *pname, BOOL interactive ); -void dbgflush( void ); -BOOL dbghdr( int level, char *file, char *func, int line ); - -/* The following definitions come from lib/doscalls.c */ - -int dos_unlink(char *fname); -int dos_open(char *fname,int flags,mode_t mode); -DIR *dos_opendir(char *dname); -char *dos_readdirname(DIR *p); -int dos_chown(char *fname, uid_t uid, gid_t gid); -int dos_stat(char *fname,SMB_STRUCT_STAT *sbuf); -int dos_lstat(char *fname,SMB_STRUCT_STAT *sbuf); -int dos_mkdir(char *dname,mode_t mode); -int dos_rmdir(char *dname); -int dos_chdir(char *dname); -int dos_utime(char *fname,struct utimbuf *times); -int dos_rename(char *from, char *to); -int dos_chmod(char *fname,mode_t mode); -char *dos_getwd(char *unix_path); -BOOL dos_file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -BOOL dos_directory_exist(char *dname,SMB_STRUCT_STAT *st); -time_t dos_file_modtime(char *fname); -SMB_OFF_T dos_file_size(char *file_name); -int dos_ChDir(char *path); -char *dos_GetWd(char *path); - -/* The following definitions come from lib/genrand.c */ - -void generate_random_buffer( unsigned char *out, int len, BOOL re_seed); - -/* The following definitions come from lib/interface.c */ - -void load_interfaces(void); -void iface_set_default(char *ip,char *bcast,char *nmask); -BOOL ismyip(struct in_addr ip); -BOOL is_local_net(struct in_addr from); -int iface_count(void); -BOOL we_are_multihomed(void); -struct interface *get_interface(int n); -struct in_addr *iface_n_ip(int n); -unsigned iface_hash(void); -struct in_addr *iface_bcast(struct in_addr ip); -struct in_addr *iface_ip(struct in_addr ip); - -/* The following definitions come from lib/kanji.c */ - -void interpret_coding_system(char *str); -BOOL is_multibyte_codepage(void); -void initialize_multibyte_vectors( int client_codepage); - -/* The following definitions come from lib/md4.c */ - -void mdfour(unsigned char *out, unsigned char *in, int n); - -/* The following definitions come from lib/netmask.c */ - -int get_netmask(struct in_addr *ipaddr, struct in_addr *nmask); - -/* The following definitions come from lib/slprintf.c */ - -int vslprintf(char *str, int n, char *format, va_list ap); - -/* The following definitions come from lib/system.c */ - -int sys_select(int maxfd, fd_set *fds,struct timeval *tval); -int sys_select(int maxfd, fd_set *fds,struct timeval *tval); -int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); -int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); -SMB_OFF_T sys_ftell(FILE *fp); -int sys_open(const char *path, int oflag, mode_t mode); -FILE *sys_fopen(const char *path, const char *type); -SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); -char *sys_getwd(char *s); -int sys_chown(const char *fname,uid_t uid,gid_t gid); -struct hostent *sys_gethostbyname(const char *name); -long sys_random(void); -void sys_srandom(unsigned int seed); - -/* The following definitions come from lib/time.c */ - -void GetTimeOfDay(struct timeval *tval); -void TimeInit(void); -int TimeDiff(time_t t); -struct tm *LocalTime(time_t *t); -time_t nt_time_to_unix(NTTIME *nt); -time_t interpret_long_date(char *p); -void unix_to_nt_time(NTTIME *nt, time_t t); -void put_long_date(char *p,time_t t); -BOOL null_mtime(time_t mtime); -void put_dos_date(char *buf,int offset,time_t unixdate); -void put_dos_date2(char *buf,int offset,time_t unixdate); -void put_dos_date3(char *buf,int offset,time_t unixdate); -time_t make_unix_date(void *date_ptr); -time_t make_unix_date2(void *date_ptr); -time_t make_unix_date3(void *date_ptr); -char *http_timestring(time_t t); -char *timestring(void ); -time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); - -/* The following definitions come from lib/username.c */ - -char *get_home_dir(char *user); -BOOL map_username(char *user); -struct passwd *Get_Pwnam(char *user,BOOL allow_change); -BOOL user_in_list(char *user,char *list); - -/* The following definitions come from lib/util.c */ - -char *tmpdir(void); -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); -char *Atoic(char *p, int *n, char *c); -char *get_numlist(char *p, uint32 **num, int *count); -void putip(void *dest,void *src); -char *dns_to_netbios_name(char *dns_name); -int name_mangle( char *In, char *Out, char name_type ); -BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); -time_t file_modtime(char *fname); -BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); -SMB_OFF_T file_size(char *file_name); -char *attrib_string(uint16 mode); -void unix_format(char *fname); -void dos_format(char *fname); -void show_msg(char *buf); -int smb_len(char *buf); -void _smb_setlen(char *buf,int len); -void smb_setlen(char *buf,int len); -int set_message(char *buf,int num_words,int num_bytes,BOOL zero); -int smb_buflen(char *buf); -char *smb_buf(char *buf); -int smb_offset(char *p,char *buf); -void dos_clean_name(char *s); -void unix_clean_name(char *s); -BOOL reduce_name(char *s,char *dir,BOOL widelinks); -void expand_mask(char *Mask,BOOL doext); -void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); -void close_low_fds(void); -int set_blocking(int fd, BOOL set); -int TvalDiff(struct timeval *tvalold,struct timeval *tvalnew); -SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n,char *header,int headlen,int align); -int name_extract(char *buf,int ofs,char *name); -int name_len(char *s1); -void msleep(int t); -BOOL do_match(char *str, char *regexp, int case_sig); -BOOL mask_match(char *str, char *regexp, int case_sig,BOOL trans2); -int set_filelen(int fd, SMB_OFF_T len); -void *Realloc(void *p,size_t size); -BOOL get_myname(char *my_name,struct in_addr *ip); -BOOL ip_equal(struct in_addr ip1,struct in_addr ip2); -int interpret_protocol(char *str,int def); -uint32 interpret_addr(char *str); -struct in_addr *interpret_addr2(char *str); -BOOL zero_ip(struct in_addr ip); -BOOL matchname(char *remotehost,struct in_addr addr); -void standard_sub_basic(char *str); -void standard_sub(connection_struct *conn,char *str); -BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); -struct hostent *Get_Hostbyname(const char *name); -char *uidtoname(uid_t uid); -char *gidtoname(gid_t gid); -uid_t nametouid(const char *name); -void smb_panic(char *why); -char *readdirname(DIR *p); -BOOL is_in_path(char *name, name_compare_entry *namelist); -void set_namearray(name_compare_entry **ppname_array, char *namelist); -void free_namearray(name_compare_entry *name_array); -BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); -BOOL is_myname(char *s); -void set_remote_arch(enum remote_arch_types type); -enum remote_arch_types get_remote_arch(void); -char *align2(char *q, char *base); -void out_ascii(FILE *f, unsigned char *buf,int len); -void out_data(FILE *f,char *buf1,int len, int per_line); -void print_asc(int level, unsigned char *buf,int len); -void dump_data(int level,char *buf1,int len); -char *tab_depth(int depth); -int str_checksum(const char *s); -void zero_free(void *p, size_t size); -int set_maxfiles(int requested_max); -void reg_get_subkey(char *full_keyname, char *key_name, char *subkey_name); -BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); - -/* The following definitions come from lib/util_file.c */ - -BOOL do_file_lock(int fd, int waitsecs, int type); -BOOL file_lock(int fd, int type, int secs, int *plock_depth); -BOOL file_unlock(int fd, int *plock_depth); -void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, + BOOL do_shutdown, BOOL do_tcon); + char *dest_host, struct in_addr *dest_ip, + char *service, char *service_type, int *file_lock_depth, BOOL update); -void endfilepwent(void *vp, int *file_lock_depth); -SMB_BIG_UINT getfilepwpos(void *vp); -BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); -int getfileline(void *vp, char *linebuf, int linebuf_size); -char *fgets_slash(char *s2,int maxlen,FILE *f); - -/* The following definitions come from lib/util_sock.c */ - -BOOL is_a_socket(int fd); -void set_socket_options(int fd, char *options); -void close_sockets(void ); -ssize_t write_socket(int fd,char *buf,size_t len); -ssize_t read_udp_socket(int fd,char *buf,size_t len); -ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); -BOOL send_keepalive(int client); -ssize_t read_data(int fd,char *buffer,size_t N); -ssize_t write_data(int fd,char *buffer,size_t N); -ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); -BOOL receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); -BOOL send_null_session_msg(int fd); -BOOL send_smb(int fd,char *buffer); -BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); -int open_socket_in(int type, int port, int dlevel,uint32 socket_addr, BOOL rebind); -int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); -void reset_globals_after_fork(void); -char *client_name(int fd); -char *client_addr(int fd); - -/* The following definitions come from lib/util_str.c */ - -void set_first_token(char *ptr); -BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); -char **toktocliplist(int *ctok, char *sep); -int StrCaseCmp(const char *s, const char *t); -int StrnCaseCmp(const char *s, const char *t, size_t n); -BOOL strequal(const char *s1, const char *s2); -BOOL strnequal(const char *s1,const char *s2,size_t n); -BOOL strcsequal(const char *s1,const char *s2); -void strlower(char *s); -void strupper(char *s); -void strnorm(char *s); -BOOL strisnormal(char *s); -void string_replace(char *s,char oldc,char newc); -char *skip_string(char *buf,size_t n); -size_t str_charnum(const char *s); -BOOL trim_string(char *s,const char *front,const char *back); -BOOL strhasupper(const char *s); -BOOL strhaslower(const char *s); -size_t count_chars(const char *s,char c); -char *safe_strcpy(char *dest,const char *src, size_t maxlength); -char *safe_strcat(char *dest, const char *src, size_t maxlength); -char *StrCpy(char *dest,const char *src); -char *StrnCpy(char *dest,const char *src,size_t n); -char *strncpyn(char *dest, const char *src,size_t n, char c); -size_t strhex_to_str(char *p, size_t len, const char *strhex); -BOOL in_list(char *s,char *list,BOOL casesensitive); -BOOL string_init(char **dest,const char *src); -void string_free(char **s); -BOOL string_set(char **dest,const char *src); -void string_sub(char *s,const char *pattern,const char *insert); -void all_string_sub(char *s,const char *pattern,const char *insert); -void split_at_last_component(char *path, char *front, char sep, char *back); - -/* The following definitions come from lib/util_unistr.c */ - -int struni2(char *dst, const char *src); - -/* The following definitions come from libsmb/clientgen.c */ - -int cli_set_port(struct cli_state *cli, int port); -char *cli_errstr(struct cli_state *cli); -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, int pipe_name_len, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void * state); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *, void *), void *state); -BOOL cli_session_setup(struct cli_state *cli, - char *user, - char *pass, int passlen, + struct nmb_name *calling, struct nmb_name *called, + int *grp); + struct nmb_name *calling, struct nmb_name *called); char *ntpass, int ntpasslen, + char *pass, int passlen, + char *user, char *workgroup); -BOOL cli_ulogoff(struct cli_state *cli); -BOOL cli_send_tconX(struct cli_state *cli, - char *share, char *dev, char *pass, int passlen); -BOOL cli_tdis(struct cli_state *cli); -BOOL cli_rename(struct cli_state *cli, char *fname_src, char *fname_dst); -BOOL cli_unlink(struct cli_state *cli, char *fname); -BOOL cli_mkdir(struct cli_state *cli, char *dname); -BOOL cli_rmdir(struct cli_state *cli, char *dname); -int cli_nt_create(struct cli_state *cli, char *fname); -int cli_open(struct cli_state *cli, char *fname, int flags, int share_mode); -BOOL cli_close(struct cli_state *cli, int fnum); -BOOL cli_lock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout); -BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout); -size_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, + void (*fn)(const char *, uint32, const char *, void *), void *state); int fnum, char *buf, off_t offset, size_t size); -BOOL cli_getattrE(struct cli_state *cli, int fd, - uint16 *attr, size_t *size, - time_t *c_time, time_t *a_time, time_t *m_time); -BOOL cli_getatr(struct cli_state *cli, char *fname, - uint16 *attr, size_t *size, time_t *t); -BOOL cli_setatr(struct cli_state *cli, char *fname, uint16 attr, time_t t); -BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, - time_t *c_time, time_t *a_time, time_t *m_time, - size_t *size, uint16 *mode); -BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, + SMB_INO_T *ino); + char *share, char *dev, char *pass, int passlen); time_t *c_time, time_t *a_time, time_t *m_time, time_t *w_time, size_t *size, uint16 *mode, - SMB_INO_T *ino); -BOOL cli_qfileinfo(struct cli_state *cli, int fnum, - uint16 *mode, size_t *size, + void (*fn)(struct print_job_info *)); + size_t *size, uint16 *mode); time_t *c_time, time_t *a_time, time_t *m_time, time_t *w_time, SMB_INO_T *ino); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + uint16 *mode, size_t *size, + char *buf, off_t offset, size_t size); + int fnum, uint16 write_mode, + time_t *c_time, time_t *a_time, time_t *m_time); + uint16 *attr, size_t *size, + uint16 *attr, size_t *size, time_t *t); + char **rdata, int *rdrcnt); + char **rparam, int *rprcnt, + char *data, int drcnt, int mdrcnt, + char *param, int prcnt, int mprcnt, void (*fn)(file_info *, const char *, void *), void *state); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, const char *old_password); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -int cli_error(struct cli_state *cli, uint8 *eclass, uint32 *num, uint32 *nt_rpc_error); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); -BOOL cli_reestablish_connection(struct cli_state *cli); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -int cli_printjob_del(struct cli_state *cli, int job); -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -BOOL cli_chkpath(struct cli_state *cli, char *path); -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); - -/* The following definitions come from libsmb/namequery.c */ - -struct in_addr *name_query(int fd,const char *name,int name_type, BOOL bcast,BOOL recurse, + char **rdata, uint32 *rdata_count); + char **rparam, uint32 *rparam_count, + char *data, uint32 data_count, uint32 max_data_count, + char *params, uint32 param_count, uint32 max_param_count, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + BOOL (*pfunc)(char *, char *) ); + BOOL (*sfunc)(char *), struct in_addr to_ip, int *count, void (*fn)(struct packet_struct *)); -FILE *startlmhosts(char *fname); -BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); -void endlmhosts(FILE *fp); -BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); -BOOL find_master_ip(char *group, struct in_addr *master_ip); - +#define _PROTO_H_ +#endif /* _PROTO_H_ */ +#ifndef _PROTO_H_ +/* The following definitions come from lib/charcnv.c */ +/* The following definitions come from lib/charset.c */ +/* The following definitions come from lib/debug.c */ +/* The following definitions come from lib/doscalls.c */ +/* The following definitions come from lib/genrand.c */ +/* The following definitions come from lib/interface.c */ +/* The following definitions come from lib/kanji.c */ +/* The following definitions come from lib/md4.c */ +/* The following definitions come from lib/netmask.c */ +/* The following definitions come from lib/slprintf.c */ +/* The following definitions come from lib/system.c */ +/* The following definitions come from lib/time.c */ +/* The following definitions come from lib/username.c */ +/* The following definitions come from lib/util.c */ +/* The following definitions come from lib/util_file.c */ +/* The following definitions come from lib/util_sock.c */ +/* The following definitions come from lib/util_str.c */ +/* The following definitions come from lib/util_unistr.c */ +/* The following definitions come from libsmb/clientgen.c */ +/* The following definitions come from libsmb/namequery.c */ /* The following definitions come from libsmb/nmblib.c */ - -void debug_nmb_packet(struct packet_struct *p); -char *nmb_namestr(struct nmb_name *n); -struct packet_struct *copy_packet(struct packet_struct *packet); -void free_packet(struct packet_struct *packet); -struct packet_struct *read_packet(int fd,enum packet_type packet_type); -void make_nmb_name( struct nmb_name *n, const char *name, int type ); -BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); -BOOL send_packet(struct packet_struct *p); -struct packet_struct *receive_packet(int fd,enum packet_type type,int t); -void sort_query_replies(char *data, int n, struct in_addr ip); - /* The following definitions come from libsmb/nterr.c */ - -const char *get_nt_error_msg(uint32 nt_code); - /* The following definitions come from libsmb/pwd_cache.c */ - -void pwd_init(struct pwd_info *pwd); -void pwd_obfuscate_key(struct pwd_info *pwd, uint32 int_key, char *str_key); -void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); -void pwd_set_nullpwd(struct pwd_info *pwd); -void pwd_set_cleartext(struct pwd_info *pwd, char *clr); -void pwd_get_cleartext(struct pwd_info *pwd, char *clr); -void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); -void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); -void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); -void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); - /* The following definitions come from libsmb/smbdes.c */ - -void E_P16(unsigned char *p14,unsigned char *p16); -void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24); -void D_P16(unsigned char *p14, unsigned char *in, unsigned char *out); -void E_old_pw_hash( unsigned char *p14, unsigned char *in, unsigned char *out); -void cred_hash1(unsigned char *out,unsigned char *in,unsigned char *key); -void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key); -void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); -void SamOEMhash( unsigned char *data, unsigned char *key, int val); - /* The following definitions come from libsmb/smbencrypt.c */ - -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); -void E_md4hash(uchar *passwd, uchar *p16); -void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); -void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); -void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); -BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); - /* The following definitions come from libsmb/smberr.c */ - -char *smb_errstr(char *inbuf); - /* The following definitions come from param/loadparm.c */ - -char *lp_logfile(void); -char *lp_configfile(void); -char *lp_smb_passwd_file(void); -char *lp_serverstring(void); -char *lp_printcapname(void); -char *lp_lockdir(void); -char *lp_rootdir(void); -char *lp_defaultservice(void); -char *lp_msg_command(void); -char *lp_hosts_equiv(void); -char *lp_auto_services(void); -char *lp_passwd_program(void); -char *lp_passwd_chat(void); -char *lp_passwordserver(void); -char *lp_name_resolve_order(void); -char *lp_workgroup(void); -char *lp_username_map(void); -char *lp_groupname_map(void); -char *lp_logon_script(void); -char *lp_logon_path(void); -char *lp_logon_drive(void); -char *lp_logon_home(void); -char *lp_remote_announce(void); -char *lp_remote_browse_sync(void); -char *lp_wins_server(void); -char *lp_interfaces(void); -char *lp_socket_address(void); -char *lp_nis_home_map_name(void); -char *lp_netbios_aliases(void); -char *lp_driverfile(void); -char *lp_panic_action(void); -char *lp_adduser_script(void); -char *lp_deluser_script(void); -char *lp_domain_groups(void); -char *lp_domain_admin_group(void); -char *lp_domain_guest_group(void); -char *lp_domain_admin_users(void); -char *lp_domain_guest_users(void); -char *lp_ldap_server(void); -char *lp_ldap_suffix(void); -char *lp_ldap_filter(void); -char *lp_ldap_root(void); -char *lp_ldap_rootpasswd(void); -int lp_ssl_version(void); -char *lp_ssl_hosts(void); -char *lp_ssl_hosts_resign(void); -char *lp_ssl_cacertdir(void); -char *lp_ssl_cacertfile(void); -char *lp_ssl_cert(void); -char *lp_ssl_privkey(void); -char *lp_ssl_client_cert(void); -char *lp_ssl_client_privkey(void); -char *lp_ssl_ciphers(void); +/* The following definitions come from param/params.c */ +/* This file is automatically generated with "make proto". DO NOT EDIT */ +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +BOOL cli_api(struct cli_state *cli, +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, int pipe_name_len, +BOOL cli_chkpath(struct cli_state *cli, char *path); +BOOL cli_close(struct cli_state *cli, int fnum); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); +BOOL cli_establish_connection(struct cli_state *cli, +BOOL cli_getatr(struct cli_state *cli, char *fname, +BOOL cli_getattrE(struct cli_state *cli, int fd, +BOOL cli_lock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout); +BOOL cli_message_end(struct cli_state *cli, int grp); +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_mkdir(struct cli_state *cli, char *dname); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, +BOOL cli_qfileinfo(struct cli_state *cli, int fnum, +BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, +BOOL cli_qpathinfo2(struct cli_state *cli, const char *fname, +BOOL cli_reestablish_connection(struct cli_state *cli); +BOOL cli_rename(struct cli_state *cli, char *fname_src, char *fname_dst); +BOOL cli_rmdir(struct cli_state *cli, char *dname); +BOOL cli_send_tconX(struct cli_state *cli, +BOOL cli_session_request(struct cli_state *cli, +BOOL cli_session_setup(struct cli_state *cli, +BOOL cli_setatr(struct cli_state *cli, char *fname, uint16 attr, time_t t); +BOOL cli_tdis(struct cli_state *cli); +BOOL cli_ulogoff(struct cli_state *cli); +BOOL cli_unlink(struct cli_state *cli, char *fname); +BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout); +BOOL client_receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL dbghdr( int level, char *file, char *func, int line ); +BOOL directory_exist(char *dname,SMB_STRUCT_STAT *st); +BOOL do_file_lock(int fd, int waitsecs, int type); +BOOL do_match(char *str, char *regexp, int case_sig); +BOOL dos_directory_exist(char *dname,SMB_STRUCT_STAT *st); +BOOL dos_file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); +BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf); +BOOL file_lock(int fd, int type, int secs, int *plock_depth); +BOOL file_unlock(int fd, int *plock_depth); +BOOL find_master_ip(char *group, struct in_addr *master_ip); +BOOL get_myname(char *my_name,struct in_addr *ip); +BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr); +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups); +BOOL in_list(char *s,char *list,BOOL casesensitive); +BOOL ip_equal(struct in_addr ip1,struct in_addr ip2); +BOOL is_a_socket(int fd); +BOOL is_in_path(char *name, name_compare_entry *namelist); +BOOL is_local_net(struct in_addr from); +BOOL is_multibyte_codepage(void); +BOOL is_myname(char *s); +BOOL ismyip(struct in_addr ip); +BOOL lp_add_home(char *pszHomename, int iDefaultService, char *pszHomedir); +BOOL lp_add_printer(char *pszPrintername, int iDefaultService); +BOOL lp_allow_trusted_domains(void); +BOOL lp_bind_interfaces_only(void); +BOOL lp_blocking_locks(int ); +BOOL lp_browse_list(void); +BOOL lp_browseable(int ); +BOOL lp_casemangle(int ); +BOOL lp_casesensitive(int ); +BOOL lp_delete_readonly(int ); +BOOL lp_dns_proxy(void); +BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue); +BOOL lp_domain_logons(void); +BOOL lp_domain_master(void); +BOOL lp_dos_filetime_resolution(int ); +BOOL lp_dos_filetimes(int ); +BOOL lp_encrypted_passwords(void); +BOOL lp_fake_dir_create_times(int ); +BOOL lp_fake_oplocks(int ); +BOOL lp_file_list_changed(void); +BOOL lp_guest_ok(int ); +BOOL lp_guest_only(int ); +BOOL lp_hide_dot_files(int ); +BOOL lp_is_default(int snum, struct parm_struct *parm); +BOOL lp_kernel_oplocks(void); +BOOL lp_load(char *pszFname,BOOL global_only, BOOL save_defaults, BOOL add_ipc); +BOOL lp_load_printers(void); +BOOL lp_loaded(void); +BOOL lp_local_master(void); +BOOL lp_locking(int ); +BOOL lp_mangle_locks(int ); +BOOL lp_manglednames(int ); +BOOL lp_map_archive(int ); +BOOL lp_map_hidden(int ); +BOOL lp_map_system(int ); +BOOL lp_nis_home_map(void); +BOOL lp_no_set_dir(int ); +BOOL lp_nt_acl_support(void); +BOOL lp_nt_pipe_support(void); +BOOL lp_nt_smb_support(void); +BOOL lp_null_passwords(void); +BOOL lp_ole_locking_compat(void); +BOOL lp_onlyuser(int ); +BOOL lp_oplocks(int ); +BOOL lp_passwd_chat_debug(void); +BOOL lp_postscript(int ); +BOOL lp_preferred_master(void); +BOOL lp_preservecase(int ); +BOOL lp_print_ok(int ); +BOOL lp_readbmpx(void); +BOOL lp_readonly(int ); +BOOL lp_readprediction(void); +BOOL lp_readraw(void); +BOOL lp_recursive_veto_delete(int ); +BOOL lp_restrict_anonymous(void); +BOOL lp_revalidate(int ); +BOOL lp_share_modes(int ); +BOOL lp_shortpreservecase(int ); +BOOL lp_snum_ok(int iService); +BOOL lp_ssl_compatibility(void); BOOL lp_ssl_enabled(void); BOOL lp_ssl_reqClientCert(void); BOOL lp_ssl_reqServerCert(void); -BOOL lp_ssl_compatibility(void); -BOOL lp_dns_proxy(void); -BOOL lp_wins_support(void); -BOOL lp_we_are_a_wins_server(void); -BOOL lp_wins_proxy(void); -BOOL lp_local_master(void); -BOOL lp_domain_master(void); -BOOL lp_domain_logons(void); -BOOL lp_preferred_master(void); -BOOL lp_load_printers(void); -BOOL lp_use_rhosts(void); -BOOL lp_readprediction(void); -BOOL lp_readbmpx(void); -BOOL lp_readraw(void); -BOOL lp_writeraw(void); -BOOL lp_null_passwords(void); -BOOL lp_strip_dot(void); -BOOL lp_encrypted_passwords(void); -BOOL lp_update_encrypted(void); -BOOL lp_syslog_only(void); -BOOL lp_timestamp_logs(void); -BOOL lp_browse_list(void); -BOOL lp_unix_realname(void); -BOOL lp_nis_home_map(void); -BOOL lp_bind_interfaces_only(void); -BOOL lp_unix_password_sync(void); -BOOL lp_passwd_chat_debug(void); -BOOL lp_ole_locking_compat(void); -BOOL lp_nt_smb_support(void); -BOOL lp_nt_pipe_support(void); -BOOL lp_nt_acl_support(void); BOOL lp_stat_cache(void); -BOOL lp_allow_trusted_domains(void); -BOOL lp_restrict_anonymous(void); -int lp_os_level(void); -int lp_max_ttl(void); -int lp_max_wins_ttl(void); -int lp_min_wins_ttl(void); -int lp_max_open_files(void); -int lp_maxxmit(void); -int lp_maxmux(void); -int lp_passwordlevel(void); -int lp_usernamelevel(void); -int lp_readsize(void); -int lp_shmem_size(void); -int lp_deadtime(void); -int lp_maxprotocol(void); -int lp_security(void); -int lp_maxdisksize(void); -int lp_lpqcachetime(void); -int lp_syslog(void); -int lp_client_code_page(void); -int lp_lm_announce(void); -int lp_lm_interval(void); -int lp_machine_password_timeout(void); -int lp_change_notify_timeout(void); -int lp_stat_cache_size(void); -int lp_map_to_guest(void); -int lp_min_passwd_length(void); -int lp_oplock_break_wait_time(void); -int lp_ldap_port(void); -char *lp_preexec(int ); -char *lp_postexec(int ); -char *lp_rootpreexec(int ); -char *lp_rootpostexec(int ); -char *lp_servicename(int ); -char *lp_pathname(int ); -char *lp_dontdescend(int ); -char *lp_username(int ); -char *lp_guestaccount(int ); -char *lp_invalid_users(int ); -char *lp_valid_users(int ); -char *lp_admin_users(int ); -char *lp_printcommand(int ); -char *lp_lpqcommand(int ); -char *lp_lprmcommand(int ); -char *lp_lppausecommand(int ); -char *lp_lpresumecommand(int ); -char *lp_queuepausecommand(int ); -char *lp_queueresumecommand(int ); -char *lp_printername(int ); -char *lp_printerdriver(int ); -char *lp_hostsallow(int ); -char *lp_hostsdeny(int ); -char *lp_magicscript(int ); -char *lp_magicoutput(int ); -char *lp_comment(int ); -char *lp_force_user(int ); -char *lp_force_group(int ); -char *lp_readlist(int ); -char *lp_writelist(int ); -char *lp_fstype(int ); -char *lp_mangled_map(int ); -char *lp_veto_files(int ); -char *lp_hide_files(int ); -char *lp_veto_oplocks(int ); -char *lp_driverlocation(int ); -BOOL lp_revalidate(int ); -BOOL lp_casesensitive(int ); -BOOL lp_preservecase(int ); -BOOL lp_shortpreservecase(int ); -BOOL lp_casemangle(int ); BOOL lp_status(int ); -BOOL lp_hide_dot_files(int ); -BOOL lp_browseable(int ); -BOOL lp_readonly(int ); -BOOL lp_no_set_dir(int ); -BOOL lp_guest_ok(int ); -BOOL lp_guest_only(int ); -BOOL lp_print_ok(int ); -BOOL lp_postscript(int ); -BOOL lp_map_hidden(int ); -BOOL lp_map_archive(int ); -BOOL lp_locking(int ); BOOL lp_strict_locking(int ); -BOOL lp_share_modes(int ); -BOOL lp_oplocks(int ); -BOOL lp_onlyuser(int ); -BOOL lp_manglednames(int ); -BOOL lp_widelinks(int ); +BOOL lp_strict_sync(int ); +BOOL lp_strip_dot(void); BOOL lp_symlinks(int ); BOOL lp_syncalways(int ); -BOOL lp_strict_sync(int ); -BOOL lp_map_system(int ); -BOOL lp_delete_readonly(int ); -BOOL lp_fake_oplocks(int ); -BOOL lp_recursive_veto_delete(int ); -BOOL lp_dos_filetimes(int ); -BOOL lp_dos_filetime_resolution(int ); -BOOL lp_fake_dir_create_times(int ); -BOOL lp_blocking_locks(int ); -BOOL lp_mangle_locks(int ); -int lp_create_mode(int ); -int lp_force_create_mode(int ); -int lp_dir_mode(int ); -int lp_force_dir_mode(int ); -int lp_max_connections(int ); -int lp_defaultcase(int ); -int lp_minprintspace(int ); -int lp_printing(int ); -int lp_oplock_contention_limit(int ); +BOOL lp_syslog_only(void); +BOOL lp_timestamp_logs(void); +BOOL lp_unix_password_sync(void); +BOOL lp_unix_realname(void); +BOOL lp_update_encrypted(void); +BOOL lp_use_rhosts(void); +BOOL lp_we_are_a_wins_server(void); +BOOL lp_widelinks(int ); +BOOL lp_wins_proxy(void); +BOOL lp_wins_support(void); +BOOL lp_writeraw(void); +BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode); +BOOL map_username(char *user); +BOOL mask_match(char *str, char *regexp, int case_sig,BOOL trans2); +BOOL matchname(char *remotehost,struct in_addr addr); +BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize); +BOOL nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2); +BOOL null_mtime(time_t mtime); +BOOL pm_process( char *FileName, +BOOL receive_smb(int fd,char *buffer, unsigned int timeout); +BOOL reduce_name(char *s,char *dir,BOOL widelinks); +BOOL reg_split_key(char *full_keyname, uint32 *reg_type, char *key_name); +BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type); +BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask); +BOOL send_keepalive(int client); +BOOL send_null_session_msg(int fd); +BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type); +BOOL send_packet(struct packet_struct *p); +BOOL send_smb(int fd,char *buffer); +BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok); +BOOL strcsequal(const char *s1,const char *s2); +BOOL strequal(const char *s1, const char *s2); +BOOL strhaslower(const char *s); +BOOL strhasupper(const char *s); +BOOL string_init(char **dest,const char *src); +BOOL string_set(char **dest,const char *src); +BOOL strisnormal(char *s); +BOOL strnequal(const char *s1,const char *s2,size_t n); +BOOL trim_string(char *s,const char *front,const char *back); +BOOL user_in_list(char *user,char *list); +BOOL we_are_multihomed(void); +BOOL zero_ip(struct in_addr ip); +DIR *dos_opendir(char *dname); +FILE *startlmhosts(char *fname); +FILE *sys_fopen(const char *path, const char *type); +SMB_BIG_UINT getfilepwpos(void *vp); +SMB_OFF_T dos_file_size(char *file_name); +SMB_OFF_T file_size(char *file_name); +SMB_OFF_T sys_ftell(FILE *fp); +SMB_OFF_T transfer_file(int infd,int outfd,SMB_OFF_T n,char *header,int headlen,int align); +SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp); +char **toktocliplist(int *ctok, char *sep); +char *Atoic(char *p, int *n, char *c); +char *StrCpy(char *dest,const char *src); +char *StrnCpy(char *dest,const char *src,size_t n); +char *align2(char *q, char *base); +char *attrib_string(uint16 mode); +char *cli_errstr(struct cli_state *cli); +char *client_addr(int fd); +char *client_name(int fd); +char *dns_to_netbios_name(char *dns_name); +char *dos2unix_format(char *str, BOOL overwrite); +char *dos_GetWd(char *path); +char *dos_getwd(char *unix_path); +char *dos_readdirname(DIR *p); +char *fgets_slash(char *s2,int maxlen,FILE *f); +char *get_home_dir(char *user); +char *get_numlist(char *p, uint32 **num, int *count); +char *gidtoname(gid_t gid); +char *http_timestring(time_t t); +char *lp_adduser_script(void); +char *lp_admin_users(int ); +char *lp_auto_services(void); +char *lp_comment(int ); +char *lp_configfile(void); +char *lp_defaultservice(void); +char *lp_deluser_script(void); +char *lp_domain_admin_group(void); +char *lp_domain_admin_users(void); +char *lp_domain_groups(void); +char *lp_domain_guest_group(void); +char *lp_domain_guest_users(void); +char *lp_dontdescend(int ); +char *lp_driverfile(void); +char *lp_driverlocation(int ); +char *lp_force_group(int ); +char *lp_force_user(int ); +char *lp_fstype(int ); +char *lp_groupname_map(void); +char *lp_guestaccount(int ); +char *lp_hide_files(int ); +char *lp_hosts_equiv(void); +char *lp_hostsallow(int ); +char *lp_hostsdeny(int ); +char *lp_interfaces(void); +char *lp_invalid_users(int ); +char *lp_ldap_filter(void); +char *lp_ldap_root(void); +char *lp_ldap_rootpasswd(void); +char *lp_ldap_server(void); +char *lp_ldap_suffix(void); +char *lp_lockdir(void); +char *lp_logfile(void); +char *lp_logon_drive(void); +char *lp_logon_home(void); +char *lp_logon_path(void); +char *lp_logon_script(void); +char *lp_lppausecommand(int ); +char *lp_lpqcommand(int ); +char *lp_lpresumecommand(int ); +char *lp_lprmcommand(int ); +char *lp_magicoutput(int ); +char *lp_magicscript(int ); +char *lp_mangled_map(int ); +char *lp_msg_command(void); +char *lp_name_resolve_order(void); +char *lp_netbios_aliases(void); +char *lp_nis_home_map_name(void); +char *lp_panic_action(void); +char *lp_passwd_chat(void); +char *lp_passwd_program(void); +char *lp_passwordserver(void); +char *lp_pathname(int ); +char *lp_postexec(int ); +char *lp_preexec(int ); +char *lp_printcapname(void); +char *lp_printcommand(int ); +char *lp_printerdriver(int ); +char *lp_printername(int ); +char *lp_queuepausecommand(int ); +char *lp_queueresumecommand(int ); +char *lp_readlist(int ); +char *lp_remote_announce(void); +char *lp_remote_browse_sync(void); +char *lp_rootdir(void); +char *lp_rootpostexec(int ); +char *lp_rootpreexec(int ); +char *lp_serverstring(void); +char *lp_servicename(int ); +char *lp_smb_passwd_file(void); +char *lp_socket_address(void); +char *lp_ssl_cacertdir(void); +char *lp_ssl_cacertfile(void); +char *lp_ssl_cert(void); +char *lp_ssl_ciphers(void); +char *lp_ssl_client_cert(void); +char *lp_ssl_client_privkey(void); +char *lp_ssl_hosts(void); +char *lp_ssl_hosts_resign(void); +char *lp_ssl_privkey(void); +char *lp_username(int ); +char *lp_username_map(void); +char *lp_valid_users(int ); +char *lp_veto_files(int ); +char *lp_veto_oplocks(int ); +char *lp_wins_server(void); +char *lp_workgroup(void); +char *lp_writelist(int ); +char *nmb_namestr(struct nmb_name *n); +char *readdirname(DIR *p); +char *safe_strcat(char *dest, const char *src, size_t maxlength); +char *safe_strcpy(char *dest,const char *src, size_t maxlength); +char *skip_string(char *buf,size_t n); +char *smb_buf(char *buf); +char *smb_errstr(char *inbuf); +char *strncpyn(char *dest, const char *src,size_t n, char c); +char *sys_getwd(char *s); +char *tab_depth(int depth); +char *timestring(void ); +char *tmpdir(void); +char *uidtoname(uid_t uid); +char *unix2dos_format(char *str,BOOL overwrite); +char *volume_label(int snum); char lp_magicchar(int ); -BOOL lp_add_home(char *pszHomename, int iDefaultService, char *pszHomedir); +const char *get_nt_error_msg(uint32 nt_code); +enum remote_arch_types get_remote_arch(void); +int StrCaseCmp(const char *s, const char *t); +int StrnCaseCmp(const char *s, const char *t, size_t n); +int TimeDiff(time_t t); +int TvalDiff(struct timeval *tvalold,struct timeval *tvalnew); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void * state); +int cli_error(struct cli_state *cli, uint8 *eclass, uint32 *num, uint32 *nt_rpc_error); +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, +int cli_nt_create(struct cli_state *cli, char *fname); +int cli_open(struct cli_state *cli, char *fname, int flags, int share_mode); +int cli_print_queue(struct cli_state *cli, +int cli_printjob_del(struct cli_state *cli, int job); +int cli_set_port(struct cli_state *cli, int port); +int dos_ChDir(char *path); +int dos_chdir(char *dname); +int dos_chmod(char *fname,mode_t mode); +int dos_chown(char *fname, uid_t uid, gid_t gid); +int dos_lstat(char *fname,SMB_STRUCT_STAT *sbuf); +int dos_mkdir(char *dname,mode_t mode); +int dos_open(char *fname,int flags,mode_t mode); +int dos_rename(char *from, char *to); +int dos_rmdir(char *dname); +int dos_stat(char *fname,SMB_STRUCT_STAT *sbuf); +int dos_unlink(char *fname); +int dos_utime(char *fname,struct utimbuf *times); +int get_netmask(struct in_addr *ipaddr, struct in_addr *nmask); +int getfileline(void *vp, char *linebuf, int linebuf_size); +int iface_count(void); +int interpret_protocol(char *str,int def); int lp_add_service(char *pszService, int iDefaultService); -BOOL lp_add_printer(char *pszPrintername, int iDefaultService); -BOOL lp_file_list_changed(void); -void *lp_local_ptr(int snum, void *ptr); -BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue); -BOOL lp_is_default(int snum, struct parm_struct *parm); -struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters); -BOOL lp_snum_ok(int iService); -void lp_add_one_printer(char *name,char *comment); -BOOL lp_loaded(void); -void lp_killunused(BOOL (*snumused)(int )); -BOOL lp_load(char *pszFname,BOOL global_only, BOOL save_defaults, BOOL add_ipc); -void lp_resetnumservices(void); +int lp_change_notify_timeout(void); +int lp_client_code_page(void); +int lp_create_mode(int ); +int lp_deadtime(void); +int lp_default_server_announce(void); +int lp_defaultcase(int ); +int lp_dir_mode(int ); +int lp_force_create_mode(int ); +int lp_force_dir_mode(int ); +int lp_ldap_port(void); +int lp_lm_announce(void); +int lp_lm_interval(void); +int lp_lpqcachetime(void); +int lp_machine_password_timeout(void); +int lp_major_announce_version(void); +int lp_map_to_guest(void); +int lp_max_connections(int ); +int lp_max_open_files(void); +int lp_max_ttl(void); +int lp_max_wins_ttl(void); +int lp_maxdisksize(void); +int lp_maxmux(void); +int lp_maxprotocol(void); +int lp_maxxmit(void); +int lp_min_passwd_length(void); +int lp_min_wins_ttl(void); +int lp_minor_announce_version(void); +int lp_minprintspace(int ); int lp_numservices(void); +int lp_oplock_break_wait_time(void); +int lp_oplock_contention_limit(int ); +int lp_os_level(void); +int lp_passwordlevel(void); +int lp_printing(int ); +int lp_readsize(void); +int lp_security(void); +int lp_servicenumber(char *pszServiceName); +int lp_shmem_size(void); +int lp_ssl_version(void); +int lp_stat_cache_size(void); +int lp_syslog(void); +int lp_usernamelevel(void); +int name_extract(char *buf,int ofs,char *name); +int name_len(char *s1); +int name_mangle( char *In, char *Out, char name_type ); +int open_socket_in(int type, int port, int dlevel,uint32 socket_addr, BOOL rebind); +int open_socket_out(int type, struct in_addr *addr, int port ,int timeout); +int set_blocking(int fd, BOOL set); +int set_filelen(int fd, SMB_OFF_T len); +int set_maxfiles(int requested_max); +int set_message(char *buf,int num_words,int num_bytes,BOOL zero); +int smb_buflen(char *buf); +int smb_len(char *buf); +int smb_offset(char *p,char *buf); +int str_checksum(const char *s); +int struni2(char *dst, const char *src); +int sys_chown(const char *fname,uid_t uid,gid_t gid); +int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence); +int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf); +int sys_open(const char *path, int oflag, mode_t mode); +int sys_select(int maxfd, fd_set *fds,struct timeval *tval); +int sys_stat(const char *fname,SMB_STRUCT_STAT *sbuf); +int vslprintf(char *str, int n, char *format, va_list ap); +long sys_random(void); +size_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +size_t count_chars(const char *s,char c); +size_t str_charnum(const char *s); +size_t strhex_to_str(char *p, size_t len, const char *strhex); +ssize_t cli_smbwrite(struct cli_state *cli, +ssize_t cli_write(struct cli_state *cli, +ssize_t read_data(int fd,char *buffer,size_t N); +ssize_t read_smb_length(int fd,char *inbuf,unsigned int timeout); +ssize_t read_udp_socket(int fd,char *buf,size_t len); +ssize_t read_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out); +ssize_t write_data(int fd,char *buffer,size_t N); +ssize_t write_socket(int fd,char *buf,size_t len); +struct cli_state *cli_initialise(struct cli_state *cli); +struct hostent *Get_Hostbyname(const char *name); +struct hostent *sys_gethostbyname(const char *name); +struct in_addr *iface_bcast(struct in_addr ip); +struct in_addr *iface_ip(struct in_addr ip); +struct in_addr *iface_n_ip(int n); +struct in_addr *interpret_addr2(char *str); +struct in_addr *name_query(int fd,const char *name,int name_type, BOOL bcast,BOOL recurse, +struct interface *get_interface(int n); +struct packet_struct *copy_packet(struct packet_struct *packet); +struct packet_struct *read_packet(int fd,enum packet_type packet_type); +struct packet_struct *receive_packet(int fd,enum packet_type type,int t); +struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters); +struct passwd *Get_Pwnam(char *user,BOOL allow_change); +struct tm *LocalTime(time_t *t); +time_t dos_file_modtime(char *fname); +time_t file_modtime(char *fname); +time_t get_create_time(SMB_STRUCT_STAT *st,BOOL fake_dirs); +time_t interpret_long_date(char *p); +time_t make_unix_date(void *date_ptr); +time_t make_unix_date2(void *date_ptr); +time_t make_unix_date3(void *date_ptr); +time_t nt_time_to_unix(NTTIME *nt); +uid_t nametouid(const char *name); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); +uint32 interpret_addr(char *str); +unsigned iface_hash(void); +void *Realloc(void *p,size_t size); +void *lp_local_ptr(int snum, void *ptr); +void *startfilepwent(char *pfile, char *s_readbuf, int bufsize, +void D_P16(unsigned char *p14, unsigned char *in, unsigned char *out); +void E_P16(unsigned char *p14,unsigned char *p16); +void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24); +void E_md4hash(uchar *passwd, uchar *p16); +void E_old_pw_hash( unsigned char *p14, unsigned char *in, unsigned char *out); +void GetTimeOfDay(struct timeval *tval); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); +void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); +void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); +void SamOEMhash( unsigned char *data, unsigned char *key, int val); +void TimeInit(void); +void _smb_setlen(char *buf,int len); +void add_char_string(char *s); +void all_string_sub(char *s,const char *pattern,const char *insert); +void charset_initialise(void); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +void close_low_fds(void); +void close_sockets(void ); +void codepage_initialise(int client_codepage); +void cred_hash1(unsigned char *out,unsigned char *in,unsigned char *key); +void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key); +void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); +void dbgflush( void ); +void debug_nmb_packet(struct packet_struct *p); +void dos_clean_name(char *s); +void dos_format(char *fname); +void dump_data(int level,char *buf1,int len); +void endfilepwent(void *vp, int *file_lock_depth); +void endlmhosts(FILE *fp); +void expand_mask(char *Mask,BOOL doext); +void free_namearray(name_compare_entry *name_array); +void free_packet(struct packet_struct *packet); +void generate_random_buffer( unsigned char *out, int len, BOOL re_seed); +void iface_set_default(char *ip,char *bcast,char *nmask); +void initialize_multibyte_vectors( int client_codepage); +void interpret_character_set(char *str); +void interpret_coding_system(char *str); +void load_interfaces(void); +void lp_add_one_printer(char *name,char *comment); +void lp_copy_service(int snum, char *new_name); void lp_dump(FILE *f, BOOL show_defaults, int maxtoprint); void lp_dump_one(FILE *f, BOOL show_defaults, int snum); -int lp_servicenumber(char *pszServiceName); -char *volume_label(int snum); +void lp_killunused(BOOL (*snumused)(int )); void lp_remove_service(int snum); -void lp_copy_service(int snum, char *new_name); -int lp_default_server_announce(void); -int lp_major_announce_version(void); -int lp_minor_announce_version(void); -void lp_set_name_resolve_order(char *new_order); +void lp_resetnumservices(void); void lp_set_kernel_oplocks(BOOL val); -BOOL lp_kernel_oplocks(void); - -/* The following definitions come from param/params.c */ - -BOOL pm_process( char *FileName, - BOOL (*sfunc)(char *), - BOOL (*pfunc)(char *, char *) ); -#endif /* _PROTO_H_ */ +void lp_set_name_resolve_order(char *new_order); +void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,time_t date); +void make_nmb_name( struct nmb_name *n, const char *name, int type ); +void mdfour(unsigned char *out, unsigned char *in, int n); +void msleep(int t); +void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); +void out_ascii(FILE *f, unsigned char *buf,int len); +void out_data(FILE *f,char *buf1,int len, int per_line); +void print_asc(int level, unsigned char *buf,int len); +void put_dos_date(char *buf,int offset,time_t unixdate); +void put_dos_date2(char *buf,int offset,time_t unixdate); +void put_dos_date3(char *buf,int offset,time_t unixdate); +void put_long_date(char *p,time_t t); +void putip(void *dest,void *src); +void pwd_get_cleartext(struct pwd_info *pwd, char *clr); +void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24]); +void pwd_init(struct pwd_info *pwd); +void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr); +void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8]); +void pwd_obfuscate_key(struct pwd_info *pwd, uint32 int_key, char *str_key); +void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt); +void pwd_set_cleartext(struct pwd_info *pwd, char *clr); +void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16]); +void pwd_set_nullpwd(struct pwd_info *pwd); +void reg_get_subkey(char *full_keyname, char *key_name, char *subkey_name); +void reset_globals_after_fork(void); +void set_first_token(char *ptr); +void set_namearray(name_compare_entry **ppname_array, char *namelist); +void set_remote_arch(enum remote_arch_types type); +void set_socket_options(int fd, char *options); +void setup_logging( char *pname, BOOL interactive ); +void show_msg(char *buf); +void smb_panic(char *why); +void smb_setlen(char *buf,int len); +void sort_query_replies(char *data, int n, struct in_addr ip); +void split_at_last_component(char *path, char *front, char sep, char *back); +void standard_sub(connection_struct *conn,char *str); +void standard_sub_basic(char *str); +void string_free(char **s); +void string_replace(char *s,char oldc,char newc); +void string_sub(char *s,const char *pattern,const char *insert); +void strlower(char *s); +void strnorm(char *s); +void strupper(char *s); +void sys_srandom(unsigned int seed); +void unix_clean_name(char *s); +void unix_format(char *fname); +void unix_to_nt_time(NTTIME *nt, time_t t); +void zero_free(void *p, size_t size);