s3:lib/afs move afs.c to common lib dir
[samba.git] / source3 / include / proto.h
index 6dbdf4eae1049f25cd573a1e2ef0a2676e9408e5..14af2ad6030ec3a82b0f21f32119e05bb41a3c47 100644 (file)
@@ -35,22 +35,9 @@ bool allow_access(const char **deny_list,
 
 /* The following definitions come from lib/adt_tree.c  */
 
-
-/* The following definitions come from lib/afs.c  */
-
-char *afs_createtoken_str(const char *username, const char *cell);
-bool afs_login(connection_struct *conn);
-bool afs_login(connection_struct *conn);
-char *afs_createtoken_str(const char *username, const char *cell);
-
 /* The following definitions come from lib/afs_settoken.c  */
 
-int afs_syscall( int subcall,
-         const char * path,
-         int cmd,
-         char * cmarg,
-         int follow);
-bool afs_settoken_str(const char *token_string);
+int afs_syscall(int subcall, const char *path, int cmd, char *cmarg, int follow);
 bool afs_settoken_str(const char *token_string);
 
 /* The following definitions come from lib/audit.c  */
@@ -107,12 +94,14 @@ struct file_id vfs_file_id_from_sbuf(connection_struct *conn, const SMB_STRUCT_S
 
 bool gencache_set(const char *keystr, const char *value, time_t timeout);
 bool gencache_del(const char *keystr);
-bool gencache_get(const char *keystr, char **valstr, time_t *timeout);
+bool gencache_get(const char *keystr, TALLOC_CTX *mem_ctx, char **value,
+                 time_t *ptimeout);
 bool gencache_parse(const char *keystr,
                    void (*parser)(time_t timeout, DATA_BLOB blob,
                                   void *private_data),
                    void *private_data);
-bool gencache_get_data_blob(const char *keystr, DATA_BLOB *blob,
+bool gencache_get_data_blob(const char *keystr, TALLOC_CTX *mem_ctx,
+                           DATA_BLOB *blob,
                            time_t *timeout, bool *was_expired);
 bool gencache_stabilize(void);
 bool gencache_set_data_blob(const char *keystr, const DATA_BLOB *blob, time_t timeout);
@@ -222,6 +211,7 @@ char *talloc_sub_basic(TALLOC_CTX *mem_ctx, const char *smb_name,
 char *talloc_sub_specified(TALLOC_CTX *mem_ctx,
                        const char *input_string,
                        const char *username,
+                       const char *grpname,
                        const char *domain,
                        uid_t uid,
                        gid_t gid);
@@ -392,7 +382,7 @@ ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, off_t pos);
 int set_blocking(int fd, bool set);
 NTSTATUS init_before_fork(void);
 NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
-                          struct event_context *ev_ctx,
+                          struct tevent_context *ev_ctx,
                           bool parent_longlived);
 void *malloc_(size_t size);
 void *Realloc(void *p, size_t size, bool free_old_on_error);
@@ -401,7 +391,6 @@ void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size,
                        ssize_t *array_size);
 char *get_myname(TALLOC_CTX *ctx);
 char *get_mydnsdomname(TALLOC_CTX *ctx);
-int interpret_protocol(const char *str,int def);
 char *automount_lookup(TALLOC_CTX *ctx, const char *user_name);
 char *automount_lookup(TALLOC_CTX *ctx, const char *user_name);
 bool process_exists(const struct server_id pid);
@@ -452,7 +441,6 @@ uint32 get_my_vnn(void);
 void set_my_unique_id(uint64_t unique_id);
 struct server_id pid_to_procid(pid_t pid);
 struct server_id procid_self(void);
-struct server_id *new_server_id_task(TALLOC_CTX *mem_ctx);
 #define serverid_equal(p1, p2) server_id_equal(p1,p2)
 bool procid_is_me(const struct server_id *pid);
 struct server_id interpret_pid(const char *pid_string);
@@ -481,6 +469,7 @@ bool map_open_params_to_ntcreate(const char *smb_base_fname,
                                 uint32 *pcreate_options,
                                 uint32_t *pprivate_flags);
 struct security_unix_token *copy_unix_token(TALLOC_CTX *ctx, const struct security_unix_token *tok);
+bool dir_check_ftype(uint32_t mode, uint32_t dirtype);
 void init_modules(void);
 
 /* The following definitions come from lib/util_builtin.c  */
@@ -516,6 +505,7 @@ bool token_sid_in_ace(const struct security_token *token, const struct security_
 void sec_init(void);
 uid_t sec_initial_uid(void);
 gid_t sec_initial_gid(void);
+bool root_mode(void);
 bool non_root_mode(void);
 void gain_root_privilege(void);
 void gain_root_group_privilege(void);
@@ -571,7 +561,6 @@ char *print_sockaddr(char *dest,
                        const struct sockaddr_storage *psa);
 char *print_canonical_sockaddr(TALLOC_CTX *ctx,
                        const struct sockaddr_storage *pss);
-const char *client_name(int fd);
 int get_socket_port(int fd);
 const char *client_addr(int fd, char *addr, size_t addrlen);
 const char *client_socket_addr(int fd, char *addr, size_t addr_len);
@@ -588,6 +577,8 @@ NTSTATUS read_fd_with_timeout(int fd, char *buf,
                                  size_t *size_ret);
 NTSTATUS read_data(int fd, char *buffer, size_t N);
 ssize_t write_data(int fd, const char *buffer, size_t N);
+ssize_t iov_buflen(const struct iovec *iov, int iovlen);
+uint8_t *iov_buf(TALLOC_CTX *mem_ctx, const struct iovec *iov, int iovcnt);
 ssize_t write_data_iov(int fd, const struct iovec *orig_iov, int iovcnt);
 bool send_keepalive(int client);
 NTSTATUS read_smb_length_return_keepalive(int fd, char *inbuf,
@@ -607,20 +598,19 @@ int open_socket_in(int type,
 NTSTATUS open_socket_out(const struct sockaddr_storage *pss, uint16_t port,
                         int timeout, int *pfd);
 struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx,
-                                       struct event_context *ev,
+                                       struct tevent_context *ev,
                                        const struct sockaddr_storage *pss,
                                        uint16_t port,
                                        int timeout);
 NTSTATUS open_socket_out_recv(struct tevent_req *req, int *pfd);
 struct tevent_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
-                                             struct event_context *ev,
+                                             struct tevent_context *ev,
                                              struct timeval wait_time,
                                              const struct sockaddr_storage *pss,
                                              uint16_t port,
                                              int timeout);
 NTSTATUS open_socket_out_defer_recv(struct tevent_req *req, int *pfd);
 int open_udp_socket(const char *host, int port);
-const char *get_peer_name(int fd, bool force_lookup);
 const char *get_peer_addr(int fd, char *addr, size_t addr_len);
 
 struct tsocket_address;
@@ -729,7 +719,9 @@ bool validate_net_name( const char *name,
                const char *invalid_chars,
                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);
+ssize_t full_path_tos(const char *dir, const char *name,
+                     char *tmpbuf, size_t tmpbuf_len,
+                     char **pdst, char **to_free);
 
 /* The following definitions come from lib/version.c  */
 
@@ -768,7 +760,7 @@ int spnego_gen_krb5_negTokenInit(TALLOC_CTX *ctx,
                            const char *principal, int time_offset,
                            DATA_BLOB *targ,
                            DATA_BLOB *session_key_krb5, uint32 extra_ap_opts,
-                           time_t *expire_time);
+                           const char *ccname, time_t *expire_time);
 bool spnego_parse_challenge(TALLOC_CTX *ctx, const DATA_BLOB blob,
                            DATA_BLOB *chal1, DATA_BLOB *chal2);
 DATA_BLOB spnego_gen_auth(TALLOC_CTX *ctx, DATA_BLOB blob);
@@ -826,7 +818,7 @@ bool namecache_status_fetch(const char *keyname,
 bool saf_store( const char *domain, const char *servername );
 bool saf_join_store( const char *domain, const char *servername );
 bool saf_delete( const char *domain );
-char *saf_fetch( const char *domain );
+char *saf_fetch(TALLOC_CTX *mem_ctx, const char *domain );
 struct tevent_req *node_status_query_send(TALLOC_CTX *mem_ctx,
                                          struct tevent_context *ev,
                                          struct nmb_name *name,
@@ -980,392 +972,38 @@ void update_trustdom_cache( void );
 
 /* The following definitions come from libsmb/trusts_util.c  */
 
-NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
-                                     const char *domain,
-                                     const char *account_name,
-                                     unsigned char orig_trust_passwd_hash[16],
-                                     enum netr_SchannelType sec_channel_type);
-NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli, 
-                                          TALLOC_CTX *mem_ctx, 
-                                          const char *domain) ;
-NTSTATUS change_trust_account_password( const char *domain, const char *remote_machine);
+struct netlogon_creds_cli_context;
+struct messaging_context;
+struct dcerpc_binding_handle;
+NTSTATUS trust_pw_change(struct netlogon_creds_cli_context *context,
+                        struct messaging_context *msg_ctx,
+                        struct dcerpc_binding_handle *b,
+                        const char *domain,
+                        bool force);
 
 /* The following definitions come from param/loadparm.c  */
 
-const char **lp_smb_ports(void);
-const char *lp_dos_charset(void);
-const char *lp_unix_charset(void);
-char *lp_logfile(TALLOC_CTX *ctx);
-char *lp_configfile(TALLOC_CTX *ctx);
-const char *lp_smb_passwd_file(void);
-const char *lp_private_dir(void);
-char *lp_serverstring(TALLOC_CTX *ctx);
-int lp_printcap_cache_time(void);
-char *lp_addport_cmd(TALLOC_CTX *ctx);
-char *lp_enumports_cmd(TALLOC_CTX *ctx);
-char *lp_addprinter_cmd(TALLOC_CTX *ctx);
-char *lp_deleteprinter_cmd(TALLOC_CTX *ctx);
-char *lp_os2_driver_map(TALLOC_CTX *ctx);
-const char *lp_lockdir(void);
-const char *lp_statedir(void);
-const char *lp_cachedir(void);
-const char *lp_piddir(void);
-char *lp_mangling_method(TALLOC_CTX *ctx);
-int lp_mangle_prefix(void);
-const char *lp_utmpdir(void);
-const char *lp_wtmpdir(void);
-bool lp_utmp(void);
-char *lp_rootdir(TALLOC_CTX *ctx);
-char *lp_defaultservice(TALLOC_CTX *ctx);
-char *lp_msg_command(TALLOC_CTX *ctx);
-char *lp_get_quota_command(TALLOC_CTX *ctx);
-char *lp_set_quota_command(TALLOC_CTX *ctx);
-char *lp_auto_services(TALLOC_CTX *ctx);
-char *lp_passwd_program(TALLOC_CTX *ctx);
-char *lp_passwd_chat(TALLOC_CTX *ctx);
-const char *lp_passwordserver(void);
-const char **lp_name_resolve_order(void);
-const char *lp_netbios_scope(void);
-const char *lp_netbios_name(void);
-const char *lp_workgroup(void);
-const char *lp_realm(void);
+#include "source3/param/param_proto.h"
+
+char *lp_servicename(TALLOC_CTX *ctx, int);
+const char *lp_const_servicename(int);
+bool lp_autoloaded(int);
 const char *lp_dnsdomain(void);
-const char *lp_afs_username_map(void);
-int lp_afs_token_lifetime(void);
-char *lp_log_nt_token_command(TALLOC_CTX *ctx);
-char *lp_username_map(TALLOC_CTX *ctx);
-const char *lp_logon_script(void);
-const char *lp_logon_path(void);
-const char *lp_logon_drive(void);
-const char *lp_logon_home(void);
-char *lp_remote_announce(TALLOC_CTX *ctx);
-char *lp_remote_browse_sync(TALLOC_CTX *ctx);
-bool lp_nmbd_bind_explicit_broadcast(void);
-const char **lp_wins_server_list(void);
-const char **lp_interfaces(void);
-const char *lp_nbt_client_socket_address(void);
-char *lp_nis_home_map_name(TALLOC_CTX *ctx);
-const char **lp_netbios_aliases(void);
-const char *lp_passdb_backend(void);
-const char **lp_preload_modules(void);
-char *lp_panic_action(TALLOC_CTX *ctx);
-char *lp_adduser_script(TALLOC_CTX *ctx);
-char *lp_renameuser_script(TALLOC_CTX *ctx);
-char *lp_deluser_script(TALLOC_CTX *ctx);
-const char *lp_guestaccount(void);
-char *lp_addgroup_script(TALLOC_CTX *ctx);
-char *lp_delgroup_script(TALLOC_CTX *ctx);
-char *lp_addusertogroup_script(TALLOC_CTX *ctx);
-char *lp_deluserfromgroup_script(TALLOC_CTX *ctx);
-char *lp_setprimarygroup_script(TALLOC_CTX *ctx);
-char *lp_addmachine_script(TALLOC_CTX *ctx);
-char *lp_shutdown_script(TALLOC_CTX *ctx);
-char *lp_abort_shutdown_script(TALLOC_CTX *ctx);
-char *lp_username_map_script(TALLOC_CTX *ctx);
-int lp_username_map_cache_time(void);
-char *lp_check_password_script(TALLOC_CTX *ctx);
-char *lp_wins_hook(TALLOC_CTX *ctx);
-const char *lp_template_homedir(void);
-const char *lp_template_shell(void);
-const char *lp_winbind_separator(void);
-int lp_acl_compatibility(void);
-bool lp_winbind_enum_users(void);
-bool lp_winbind_enum_groups(void);
-bool lp_winbind_use_default_domain(void);
-bool lp_winbind_trusted_domains_only(void);
-bool lp_winbind_nested_groups(void);
-int lp_winbind_expand_groups(void);
-bool lp_winbind_refresh_tickets(void);
-bool lp_winbind_offline_logon(void);
-bool lp_winbind_normalize_names(void);
-bool lp_winbind_rpc_only(void);
-bool lp_create_krb5_conf(void);
 int lp_winbind_max_domain_connections(void);
-const char *lp_idmap_backend(void);
-int lp_idmap_cache_time(void);
-int lp_idmap_negative_cache_time(void);
-int lp_keepalive(void);
-bool lp_passdb_expand_explicit(void);
-char *lp_ldap_suffix(TALLOC_CTX *ctx);
-char *lp_ldap_admin_dn(TALLOC_CTX *ctx);
-int lp_ldap_ssl(void);
-bool lp_ldap_ssl_ads(void);
-int lp_ldap_deref(void);
-int lp_ldap_follow_referral(void);
-int lp_ldap_passwd_sync(void);
-bool lp_ldap_delete_dn(void);
-int lp_ldap_replication_sleep(void);
-int lp_ldap_timeout(void);
-int lp_ldap_connection_timeout(void);
-int lp_ldap_page_size(void);
-int lp_ldap_debug_level(void);
-int lp_ldap_debug_threshold(void);
-char *lp_add_share_cmd(TALLOC_CTX *ctx);
-char *lp_change_share_cmd(TALLOC_CTX *ctx);
-char *lp_delete_share_cmd(TALLOC_CTX *ctx);
-char *lp_usershare_path(TALLOC_CTX *ctx);
-const char **lp_usershare_prefix_allow_list(void);
-const char **lp_usershare_prefix_deny_list(void);
-const char **lp_eventlog_list(void);
-bool lp_registry_shares(void);
-bool lp_usershare_allow_guests(void);
-bool lp_usershare_owner_only(void);
-bool lp_disable_netbios(void);
-bool lp_reset_on_zero_vc(void);
-bool lp_log_writeable_files_on_exit(void);
-bool lp_ms_add_printer_wizard(void);
-bool lp_wins_dns_proxy(void);
-bool lp_we_are_a_wins_server(void);
-bool lp_wins_proxy(void);
-bool lp_local_master(void);
-const char **lp_init_logon_delayed_hosts(void);
-int lp_init_logon_delay(void);
-bool lp_load_printers(void);
-bool lp_readraw(void);
-bool lp_large_readwrite(void);
-bool lp_writeraw(void);
-bool lp_null_passwords(void);
-bool lp_obey_pam_restrictions(void);
-bool lp_encrypted_passwords(void);
-int lp_client_schannel(void);
-int lp_server_schannel(void);
-bool lp_syslog_only(void);
-bool lp_timestamp_logs(void);
-bool lp_debug_prefix_timestamp(void);
-bool lp_debug_hires_timestamp(void);
-bool lp_debug_pid(void);
-bool lp_debug_uid(void);
-bool lp_debug_class(void);
-bool lp_enable_core_files(void);
-bool lp_browse_list(void);
-bool lp_nis_home_map(void);
-bool lp_bind_interfaces_only(void);
-bool lp_pam_password_change(void);
-bool lp_unix_password_sync(void);
-bool lp_passwd_chat_debug(void);
-int lp_passwd_chat_timeout(void);
-bool lp_nt_pipe_support(void);
-bool lp_nt_status_support(void);
-bool lp_stat_cache(void);
-int lp_max_stat_cache_size(void);
-bool lp_allow_trusted_domains(void);
-bool lp_map_untrusted_to_domain(void);
-int lp_restrict_anonymous(void);
-bool lp_lanman_auth(void);
-bool lp_ntlm_auth(void);
-bool lp_client_plaintext_auth(void);
-bool lp_client_lanman_auth(void);
-bool lp_client_ntlmv2_auth(void);
-bool lp_host_msdfs(void);
-bool lp_enhanced_browsing(void);
-bool lp_use_mmap(void);
-bool lp_unix_extensions(void);
-bool lp_unicode(void);
-bool lp_use_spnego(void);
-bool lp_client_use_spnego(void);
-bool lp_client_use_spnego_principal(void);
-bool lp_hostname_lookups(void);
-bool lp_change_notify(const struct share_params *p );
-bool lp_kernel_change_notify(const struct share_params *p );
-const char * lp_dedicated_keytab_file(void);
-int lp_kerberos_method(void);
-bool lp_defer_sharing_violations(void);
-bool lp_enable_privileges(void);
-bool lp_enable_asu_support(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_log_size(void);
-int lp_max_open_files(void);
-int lp_open_files_db_hash_size(void);
-int lp_max_xmit(void);
-int lp_maxmux(void);
-int lp_passwordlevel(void);
-int lp_usernamelevel(void);
-int lp_deadtime(void);
-bool lp_getwd_cache(void);
-int lp_srv_maxprotocol(void);
-int lp_srv_minprotocol(void);
+bool lp_idmap_range(const char *domain_name, uint32_t *low, uint32_t *high);
+bool lp_idmap_default_range(uint32_t *low, uint32_t *high);
+const char *lp_idmap_backend(const char *domain_name);
+const char *lp_idmap_default_backend (void);
 int lp_security(void);
-int lp__server_role(void);
-int lp__security(void);
-int lp__domain_master(void);
-bool lp__domain_logons(void);
-const char **lp_auth_methods(void);
-bool lp_paranoid_server_security(void);
-int lp_maxdisksize(void);
-int lp_lpqcachetime(void);
-int lp_max_smbd_processes(void);
-bool lp__disable_spoolss(void);
-int lp_syslog(void);
-int lp_lm_announce(void);
-int lp_lm_interval(void);
-int lp_machine_password_timeout(void);
-int lp_map_to_guest(void);
-int lp_oplock_break_wait_time(void);
-int lp_lock_spin_time(void);
-int lp_usershare_max_shares(void);
-const char *lp_socket_options(void);
-int lp_config_backend(void);
-int lp_smb2_max_read(void);
-int lp_smb2_max_write(void);
-int lp_smb2_max_trans(void);
 int lp_smb2_max_credits(void);
-char *lp_preexec(TALLOC_CTX *ctx, int );
-char *lp_postexec(TALLOC_CTX *ctx, int );
-char *lp_rootpreexec(TALLOC_CTX *ctx, int );
-char *lp_rootpostexec(TALLOC_CTX *ctx, int );
-char *lp_servicename(TALLOC_CTX *ctx, int );
-const char *lp_const_servicename(int );
-char *lp_pathname(TALLOC_CTX *ctx, int );
-char *lp_dontdescend(TALLOC_CTX *ctx, int );
-char *lp_username(TALLOC_CTX *ctx, int );
-const char **lp_invalid_users(int );
-const char **lp_valid_users(int );
-const char **lp_admin_users(int );
-const char **lp_svcctl_list(void);
-char *lp_cups_options(TALLOC_CTX *ctx, int );
-char *lp_cups_server(TALLOC_CTX *ctx);
 int lp_cups_encrypt(void);
-char *lp_iprint_server(TALLOC_CTX *ctx);
-int lp_cups_connection_timeout(void);
-const char *lp_ctdbd_socket(void);
-const char *_lp_ctdbd_socket(void);
-const char **lp_cluster_addresses(void);
-bool lp_clustering(void);
-int lp_ctdb_timeout(void);
-int lp_ctdb_locktime_warn_threshold(void);
-char *lp_printcommand(TALLOC_CTX *ctx, int );
-char *lp_lpqcommand(TALLOC_CTX *ctx, int );
-char *lp_lprmcommand(TALLOC_CTX *ctx, int );
-char *lp_lppausecommand(TALLOC_CTX *ctx, int );
-char *lp_lpresumecommand(TALLOC_CTX *ctx, int );
-char *lp_queuepausecommand(TALLOC_CTX *ctx, int );
-char *lp_queueresumecommand(TALLOC_CTX *ctx, int );
-const char *lp_printjob_username(int );
-const char **lp_hostsallow(int );
-const char **lp_hostsdeny(int );
-char *lp_magicscript(TALLOC_CTX *ctx, int );
-char *lp_magicoutput(TALLOC_CTX *ctx, int );
-char *lp_comment(TALLOC_CTX *ctx, int );
-char *lp_force_user(TALLOC_CTX *ctx, int );
-char *lp_force_group(TALLOC_CTX *ctx, int );
-const char **lp_readlist(int );
-const char **lp_writelist(int );
-char *lp_fstype(TALLOC_CTX *ctx, int );
-const char **lp_vfs_objects(int );
-char *lp_msdfs_proxy(TALLOC_CTX *ctx, int );
-char *lp_veto_files(TALLOC_CTX *ctx, int );
-char *lp_hide_files(TALLOC_CTX *ctx, int );
-char *lp_veto_oplocks(TALLOC_CTX *ctx, int );
-bool lp_msdfs_root(int );
-char *lp_aio_write_behind(TALLOC_CTX *ctx, int );
-char *lp_dfree_command(TALLOC_CTX *ctx, int );
-bool lp_autoloaded(int );
-bool lp_preexec_close(int );
-bool lp_rootpreexec_close(int );
-int lp_casesensitive(int );
-bool lp_preservecase(int );
-bool lp_shortpreservecase(int );
-bool lp_hide_dot_files(int );
-bool lp_hide_special_files(int );
-bool lp_hideunreadable(int );
-bool lp_hideunwriteable_files(int );
-bool lp_browseable(int );
-bool lp_access_based_share_enum(int );
-bool lp_readonly(int );
-bool lp_no_set_dir(int );
-bool lp_guest_ok(int );
-bool lp_guest_only(int );
-bool lp_administrative_share(int );
-bool lp_print_ok(int );
-bool lp_print_notify_backchannel(int );
-bool lp_map_hidden(int );
-bool lp_map_archive(int );
-bool lp_store_dos_attributes(int );
-bool lp_dmapi_support(int );
-bool lp_locking(const struct share_params *p );
-int lp_strict_locking(const struct share_params *p );
-bool lp_posix_locking(const struct share_params *p );
-bool lp_oplocks(int );
-bool lp_kernel_oplocks(int );
-bool lp_level2_oplocks(int );
-bool lp_kernel_share_modes(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 );
-bool lp_strict_allocate(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_filemode(int );
-bool lp_dos_filetimes(int );
-bool lp_dos_filetime_resolution(int );
-bool lp_fake_dir_create_times(int);
-bool lp_async_smb_echo_handler(void);
-bool lp_multicast_dns_register(void);
-bool lp_blocking_locks(int );
-bool lp_inherit_perms(int );
-bool lp_inherit_acls(int );
-bool lp_inherit_owner(int );
-bool lp_use_client_driver(int );
-bool lp_default_devmode(int );
-bool lp_force_printername(int );
-bool lp_nt_acl_support(int );
-bool lp_force_unknown_acl_user(int );
-bool lp_ea_support(int );
-bool lp__use_sendfile(int );
-bool lp_profile_acls(int );
-bool lp_map_acl_inherit(int );
-bool lp_afs_share(int );
-bool lp_acl_check_permissions(int );
-bool lp_acl_group_control(int );
-bool lp_acl_map_full_control(int );
-bool lp_durable_handles(int);
-int lp_create_mask(int );
-int lp_force_create_mode(int );
-int lp_security_mask(int );
-int lp_force_security_mode(int );
-int lp_dir_mask(int );
-int lp_force_dir_mode(int );
-int lp_dir_security_mask(int );
-int lp_force_dir_security_mode(int );
-int lp_max_connections(int );
-int lp_defaultcase(int );
-int lp_minprintspace(int );
-int lp_printing(int );
-int lp_max_reported_jobs(int );
-int lp_oplock_contention_limit(int );
-int lp_csc_policy(int );
-int lp_write_cache_size(int );
-int lp_block_size(int );
-int lp_dfree_cache_time(int );
-int lp_allocation_roundup_size(int );
-int lp_aio_read_size(int );
-int lp_aio_write_size(int );
-int lp_map_readonly(int );
-int lp_directory_name_cache_size(int );
-int lp_smb_encrypt(int );
-char lp_magicchar(const struct share_params *p );
-int lp_winbind_cache_time(void);
-int lp_winbind_reconnect_delay(void);
-int lp_winbind_max_clients(void);
-const char **lp_winbind_nss_info(void);
-int lp_algorithmic_rid_base(void);
-int lp_name_cache_timeout(void);
-int lp_client_signing(void);
-int lp_server_signing(void);
-int lp_client_ldap_sasl_wrapping(void);
+
 char *lp_parm_talloc_string(TALLOC_CTX *ctx, int snum, const char *type, const char *option, const char *def);
 const char *lp_parm_const_string(int snum, const char *type, const char *option, const char *def);
 struct loadparm_service;
-const char *lp_parm_const_string_service(struct loadparm_service *service, const char *type, const char *option);
+const char *lp_parm_const_string_service(struct loadparm_service *service, const char *type,
+                                        const char *option, const char *def);
 const char **lp_parm_string_list(int snum, const char *type, const char *option, const char **def);
 int lp_parm_int(int snum, const char *type, const char *option, int def);
 unsigned long lp_parm_ulong(int snum, const char *type, const char *option, unsigned long def);
@@ -1388,7 +1026,6 @@ bool lp_canonicalize_parameter_with_value(const char *parm_name,
                                          const char **canon_parm,
                                          const char **canon_val);
 void show_parameter_list(void);
-bool lp_string_is_valid_boolean(const char *parm_value);
 bool lp_invert_boolean(const char *str, const char **inverse_str);
 bool lp_canonicalize_boolean(const char *str, const char**canon_str);
 bool service_ok(int iService);
@@ -1397,8 +1034,6 @@ bool process_registry_shares(void);
 bool lp_config_backend_is_registry(void);
 bool lp_config_backend_is_file(void);
 bool lp_file_list_changed(void);
-bool lp_idmap_uid(uid_t *low, uid_t *high);
-bool lp_idmap_gid(gid_t *low, gid_t *high);
 const char *lp_ldap_machine_suffix(TALLOC_CTX *ctx);
 const char *lp_ldap_user_suffix(TALLOC_CTX *ctx);
 const char *lp_ldap_group_suffix(TALLOC_CTX *ctx);
@@ -1412,12 +1047,8 @@ void *lp_parm_ptr(struct loadparm_service *service, struct parm_struct *parm);
 void *lp_local_ptr_by_snum(int snum, struct parm_struct *parm);
 bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue);
 bool lp_set_cmdline(const char *pszParmName, const char *pszParmValue);
-bool lp_set_option(const char *option);
-void init_locals(void);
-bool lp_is_default(int snum, struct parm_struct *parm);
 bool dump_a_parameter(int snum, char *parm_name, FILE * f, bool isGlobal);
 struct parm_struct *lp_get_parameter(const char *param_name);
-struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters);
 bool lp_snum_ok(int iService);
 void lp_add_one_printer(const char *name, const char *comment,
                        const char *location, void *pdata);
@@ -1513,12 +1144,6 @@ void server_messaging_context_free(void);
 
 /* The following definitions come from lib/sessionid_tdb.c  */
 struct sessionid;
-bool sessionid_init(void);
-struct db_record *sessionid_fetch_record(TALLOC_CTX *mem_ctx, 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),
@@ -1608,29 +1233,29 @@ bool lookup_unix_group_name(const char *name, struct dom_sid *sid);
 
 NTSTATUS get_full_smb_filename(TALLOC_CTX *ctx, const struct smb_filename *smb_fname,
                              char **full_name);
-NTSTATUS create_synthetic_smb_fname(TALLOC_CTX *ctx, const char *base_name,
-                                   const char *stream_name,
-                                   const SMB_STRUCT_STAT *psbuf,
-                                   struct smb_filename **smb_fname_out);
-NTSTATUS create_synthetic_smb_fname_split(TALLOC_CTX *ctx,
-                                         const char *fname,
-                                         const SMB_STRUCT_STAT *psbuf,
-                                         struct smb_filename **smb_fname_out);
+struct smb_filename *synthetic_smb_fname(TALLOC_CTX *mem_ctx,
+                                        const char *base_name,
+                                        const char *stream_name,
+                                        const SMB_STRUCT_STAT *psbuf);
+struct smb_filename *synthetic_smb_fname_split(TALLOC_CTX *ctx,
+                                              const char *fname,
+                                              const SMB_STRUCT_STAT *psbuf);
 const char *smb_fname_str_dbg(const struct smb_filename *smb_fname);
 const char *fsp_str_dbg(const struct files_struct *fsp);
 const char *fsp_fnum_dbg(const struct files_struct *fsp);
-NTSTATUS copy_smb_filename(TALLOC_CTX *ctx,
-                          const struct smb_filename *smb_fname_in,
-                          struct smb_filename **smb_fname_out);
+struct smb_filename *cp_smb_filename(TALLOC_CTX *mem_ctx,
+                                    const struct smb_filename *in);
 bool is_ntfs_stream_smb_fname(const struct smb_filename *smb_fname);
 bool is_ntfs_default_stream_smb_fname(const struct smb_filename *smb_fname);
+bool is_invalid_windows_ea_name(const char *name);
+bool ea_list_has_invalid_name(struct ea_list *ea_list);
 
 /* The following definitions come from lib/dummyroot.c */
 
 void become_root(void);
 void unbecome_root(void);
 
-/* The following definitions come from lib/dummysmbd.c */
+/* The following definitions come from lib/smbd_shim.c */
 
 int find_service(TALLOC_CTX *ctx, const char *service_in, char **p_service_out);
 void cancel_pending_lock_requests_by_fid(files_struct *fsp,
@@ -1638,9 +1263,11 @@ void cancel_pending_lock_requests_by_fid(files_struct *fsp,
                        enum file_close_type close_type);
 void send_stat_cache_delete_message(struct messaging_context *msg_ctx,
                                    const char *name);
-NTSTATUS can_delete_directory(struct connection_struct *conn,
-                               const char *dirname);
+NTSTATUS can_delete_directory_fsp(files_struct *fsp);
 bool change_to_root_user(void);
+bool become_authenticated_pipe_user(struct auth_session_info *session_info);
+bool unbecome_authenticated_pipe_user(void);
+
 void contend_level2_oplocks_begin(files_struct *fsp,
                                  enum level2_contention_type type);
 void contend_level2_oplocks_end(files_struct *fsp,