s3:include: make smb_setlen() a macro
[rusty/samba.git] / source3 / include / proto.h
index f64c4d15e83e206f33bd53e60f951d9a3721439b..3002fc33daeb0b25da0f6693de4d35d77972c7bb 100644 (file)
@@ -185,16 +185,6 @@ void init_ldap_debugging(void);
 char *escape_ldap_string(TALLOC_CTX *mem_ctx, const char *s);
 char *escape_rdn_val_string_alloc(const char *s);
 
-/* The following definitions come from lib/module.c  */
-
-NTSTATUS smb_load_module(const char *module_name);
-int smb_load_modules(const char **modules);
-NTSTATUS smb_probe_module(const char *subsystem, const char *module);
-NTSTATUS smb_load_module(const char *module_name);
-int smb_load_modules(const char **modules);
-NTSTATUS smb_probe_module(const char *subsystem, const char *module);
-void init_modules(void);
-
 /* The following definitions come from lib/ms_fnmatch.c  */
 
 int ms_fnmatch(const char *pattern, const char *string, bool translate_pattern,
@@ -463,22 +453,12 @@ time_t make_unix_date3(const void *date_ptr, int zone_offset);
 time_t srv_make_unix_date(const void *date_ptr);
 time_t srv_make_unix_date2(const void *date_ptr);
 time_t srv_make_unix_date3(const void *date_ptr);
-struct timespec convert_time_t_to_timespec(time_t t);
-struct timespec convert_timeval_to_timespec(const struct timeval tv);
-struct timeval convert_timespec_to_timeval(const struct timespec ts);
-struct timespec timespec_current(void);
-struct timespec timespec_min(const struct timespec *ts1,
-                          const struct timespec *ts2);
-int timespec_compare(const struct timespec *ts1, const struct timespec *ts2);
-void round_timespec_to_sec(struct timespec *ts);
-void round_timespec_to_usec(struct timespec *ts);
 struct timespec interpret_long_date(const char *p);
 void TimeInit(void);
 void get_process_uptime(struct timeval *ret_time);
 void get_startup_time(struct timeval *ret_time);
 time_t nt_time_to_unix_abs(const NTTIME *nt);
 time_t uint64s_nt_time_to_unix_abs(const uint64_t *src);
-void unix_timespec_to_nt_time(NTTIME *nt, struct timespec ts);
 void unix_to_nt_time_abs(NTTIME *nt, time_t t);
 const char *time_to_asc(const time_t t);
 const char *display_time(NTTIME nttime);
@@ -509,8 +489,6 @@ bool socket_exist(const char *fname);
 uint64_t get_file_size_stat(const SMB_STRUCT_STAT *sbuf);
 SMB_OFF_T get_file_size(char *file_name);
 void show_msg(const char *buf);
-void smb_set_enclen(char *buf,int len,uint16 enc_ctx_num);
-void smb_setlen(char *buf,int len);
 int set_message_bcc(char *buf,int num_bytes);
 ssize_t message_push_blob(uint8 **outbuf, DATA_BLOB blob);
 char *unix_clean_name(TALLOC_CTX *ctx, const char *s);
@@ -606,6 +584,15 @@ bool tevent_req_poll_ntstatus(struct tevent_req *req,
 bool any_nt_status_not_ok(NTSTATUS err1, NTSTATUS err2, NTSTATUS *result);
 int timeval_to_msec(struct timeval t);
 char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname);
+bool is_executable(const char *fname);
+bool map_open_params_to_ntcreate(const char *smb_base_fname,
+                                int deny_mode, int open_func,
+                                uint32 *paccess_mask,
+                                uint32 *pshare_mode,
+                                uint32 *pcreate_disposition,
+                                uint32 *pcreate_options,
+                                uint32_t *pprivate_flags);
+void init_modules(void);
 
 /* The following definitions come from lib/util_cmdline.c  */
 
@@ -785,6 +772,7 @@ int get_remote_hostname(const struct tsocket_address *remote_address,
 int create_pipe_sock(const char *socket_dir,
                     const char *socket_name,
                     mode_t dir_perms);
+int create_tcpip_socket(const struct sockaddr_storage *ifss, uint16_t *port);
 const char *get_mydnsfullname(void);
 bool is_myname_or_ipaddr(const char *s);
 struct tevent_req *getaddrinfo_send(TALLOC_CTX *mem_ctx,
@@ -884,7 +872,6 @@ bool validate_net_name( const char *name,
                int max_len);
 char *escape_shell_string(const char *src);
 char **str_list_make_v3(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
-char *sanitize_username(TALLOC_CTX *mem_ctx, const char *username);
 
 /* The following definitions come from lib/version.c  */
 
@@ -1465,6 +1452,7 @@ bool lp_oplocks(int );
 bool lp_level2_oplocks(int );
 bool lp_onlyuser(int );
 bool lp_manglednames(const struct share_params *p );
+bool lp_allow_insecure_widelinks(void);
 bool lp_widelinks(int );
 bool lp_symlinks(int );
 bool lp_syncalways(int );
@@ -1610,7 +1598,6 @@ enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
 int load_usershare_service(const char *servicename);
 int load_usershare_shares(struct smbd_server_connection *sconn);
 void gfree_loadparm(void);
-void lp_set_in_client(bool b);
 bool lp_load(const char *pszFname,
             bool global_only,
             bool save_defaults,
@@ -1619,6 +1606,8 @@ bool lp_load(const char *pszFname,
 bool lp_load_initial_only(const char *pszFname);
 bool lp_load_global(const char *file_name);
 bool lp_load_client(const char *file_name);
+bool lp_load_global_no_reinit(const char *file_name);
+bool lp_load_client_no_reinit(const char *file_name);
 bool lp_load_with_registry_shares(const char *pszFname,
                                  bool global_only,
                                  bool save_defaults,
@@ -1684,14 +1673,14 @@ void server_messaging_context_free(void);
 struct sessionid;
 bool sessionid_init(void);
 struct db_record *sessionid_fetch_record(TALLOC_CTX *mem_ctx, const char *key);
-int sessionid_traverse(int (*fn)(struct db_record *rec, const char *key,
-                                struct sessionid *session,
-                                void *private_data),
-                      void *private_data);
-int sessionid_traverse_read(int (*fn)(const char *key,
+NTSTATUS sessionid_traverse(int (*fn)(struct db_record *rec, const char *key,
                                      struct sessionid *session,
                                      void *private_data),
                            void *private_data);
+NTSTATUS sessionid_traverse_read(int (*fn)(const char *key,
+                                          struct sessionid *session,
+                                          void *private_data),
+                                void *private_data);
 
 /* The following definitions come from utils/passwd_util.c  */