CVE-2016-2115: docs-xml: add "client ipc signing" option
[samba.git] / source3 / include / proto.h
index 82b2fb5b31005c26b8a07495422973c77d86abc0..a6573fbf4ec4c025ae1f4dfd5d1df5275b08279c 100644 (file)
@@ -23,6 +23,9 @@
 #ifndef _PROTO_H_
 #define _PROTO_H_
 
+#include <sys/types.h>
+#include <regex.h>
+
 /* The following definitions come from lib/access.c  */
 
 bool client_match(const char *tok, const void *item);
@@ -37,11 +40,11 @@ bool allow_access(const char **deny_list,
 
 /* The following definitions come from lib/audit.c  */
 
-const char *audit_category_str(uint32 category);
-const char *audit_param_str(uint32 category);
-const char *audit_description_str(uint32 category);
-bool get_audit_category_from_param(const char *param, uint32 *audit_category);
-const char *audit_policy_str(TALLOC_CTX *mem_ctx, uint32 policy);
+const char *audit_category_str(uint32_t category);
+const char *audit_param_str(uint32_t category);
+const char *audit_description_str(uint32_t category);
+bool get_audit_category_from_param(const char *param, uint32_t *audit_category);
+const char *audit_policy_str(TALLOC_CTX *mem_ctx, uint32_t policy);
 
 /* The following definitions come from lib/charcnv.c  */
 
@@ -55,12 +58,12 @@ size_t pull_ascii_fstring(char *dest, const void *src);
 size_t pull_ascii_nstring(char *dest, size_t dest_len, const void *src);
 size_t push_string_check_fn(void *dest, const char *src,
                            size_t dest_len, int flags);
-size_t push_string_base(const char *base, uint16 flags2,
+size_t push_string_base(const char *base, uint16_t flags2,
                        void *dest, const char *src,
                        size_t dest_len, int flags);
 size_t pull_string_talloc(TALLOC_CTX *ctx,
                        const void *base_ptr,
-                       uint16 smb_flags2,
+                       uint16_t smb_flags2,
                        char **ppdest,
                        const void *src,
                        size_t src_len,
@@ -85,26 +88,7 @@ int map_errno_from_nt_status(NTSTATUS status);
 
 struct file_id vfs_file_id_from_sbuf(connection_struct *conn, const SMB_STRUCT_STAT *sbuf);
 
-/* The following definitions come from lib/gencache.c  */
-
-bool gencache_set(const char *keystr, const char *value, time_t timeout);
-bool gencache_del(const char *keystr);
-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, 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);
-void gencache_iterate_blobs(void (*fn)(const char *key, DATA_BLOB value,
-                                      time_t timeout, void *private_data),
-                           void *private_data, const char *pattern);
-void gencache_iterate(void (*fn)(const char* key, const char *value, time_t timeout, void* dptr),
-                      void* data, const char* keystr_pattern);
+#include "lib/gencache.h"
 
 /* The following definitions come from lib/interface.c  */
 
@@ -165,14 +149,14 @@ struct named_mutex *grab_named_mutex(TALLOC_CTX *mem_ctx, const char *name,
 /* The following definitions come from lib/sharesec.c  */
 
 bool share_info_db_init(void);
-struct security_descriptor *get_share_security_default( TALLOC_CTX *ctx, size_t *psize, uint32 def_access);
+struct security_descriptor *get_share_security_default( TALLOC_CTX *ctx, size_t *psize, uint32_t def_access);
 struct security_descriptor *get_share_security( TALLOC_CTX *ctx, const char *servicename,
                              size_t *psize);
 bool set_share_security(const char *share_name, struct security_descriptor *psd);
 bool delete_share_security(const char *servicename);
 bool share_access_check(const struct security_token *token,
                        const char *sharename,
-                       uint32 desired_access,
+                       uint32_t desired_access,
                        uint32_t *pgranted);
 bool parse_usershare_acl(TALLOC_CTX *ctx, const char *acl_str, struct security_descriptor **ppsd);
 
@@ -255,11 +239,10 @@ int sys_fstat(int fd, SMB_STRUCT_STAT *sbuf,
 int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
              bool fake_dir_create_times);
 int sys_posix_fallocate(int fd, off_t offset, off_t len);
-int sys_fallocate(int fd, enum vfs_fallocate_mode mode, off_t offset, off_t len);
-void kernel_flock(int fd, uint32 share_mode, uint32 access_mask);
+int sys_fallocate(int fd, uint32_t mode, off_t offset, off_t len);
+void kernel_flock(int fd, uint32_t share_mode, uint32_t access_mask);
 DIR *sys_fdopendir(int fd);
 int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev);
-int sys_waitpid(pid_t pid,int *status,int options);
 char *sys_getwd(void);
 void set_effective_capability(enum smbd_capability capability);
 void drop_effective_capability(enum smbd_capability capability);
@@ -268,8 +251,6 @@ void sys_srandom(unsigned int seed);
 int groups_max(void);
 int sys_getgroups(int setlen, gid_t *gidset);
 int sys_setgroups(gid_t UNUSED(primary_gid), int setlen, gid_t *gidset);
-int sys_popen(const char *command);
-int sys_pclose(int fd);
 ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t size);
 ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size);
 ssize_t sys_listxattr (const char *path, char *list, size_t size);
@@ -278,8 +259,9 @@ int sys_removexattr (const char *path, const char *name);
 int sys_fremovexattr (int filedes, const char *name);
 int sys_setxattr (const char *path, const char *name, const void *value, size_t size, int flags);
 int sys_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags);
-uint32 unix_dev_major(SMB_DEV_T dev);
-uint32 unix_dev_minor(SMB_DEV_T dev);
+uint32_t unix_dev_major(SMB_DEV_T dev);
+uint32_t unix_dev_minor(SMB_DEV_T dev);
+char *sys_realpath(const char *path);
 #if 0
 int sys_get_number_of_cores(void);
 #endif
@@ -344,6 +326,7 @@ struct passwd *Get_Pwnam_alloc(TALLOC_CTX *mem_ctx, const char *user);
 
 /* The following definitions come from lib/util_names.c  */
 const char *get_global_sam_name(void);
+const char *my_sam_name(void);
 
 /* The following definitions come from lib/util.c  */
 
@@ -365,7 +348,7 @@ bool check_same_stat(const SMB_STRUCT_STAT *sbuf1,
                        const SMB_STRUCT_STAT *sbuf2);
 void show_msg(const char *buf);
 int set_message_bcc(char *buf,int num_bytes);
-ssize_t message_push_blob(uint8 **outbuf, DATA_BLOB blob);
+ssize_t message_push_blob(uint8_t **outbuf, DATA_BLOB blob);
 char *unix_clean_name(TALLOC_CTX *ctx, const char *s);
 char *clean_name(TALLOC_CTX *ctx, const char *s);
 ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, off_t pos);
@@ -373,11 +356,16 @@ int set_blocking(int fd, bool set);
 NTSTATUS init_before_fork(void);
 NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
                           struct tevent_context *ev_ctx,
-                          bool parent_longlived);
+                          bool parent_longlived,
+                          const char *comment);
+NTSTATUS smbd_reinit_after_fork(struct messaging_context *msg_ctx,
+                               struct tevent_context *ev_ctx,
+                               bool parent_longlived,
+                               const char *comment);
 void *malloc_(size_t size);
 void *Realloc(void *p, size_t size, bool free_old_on_error);
 void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size,
-                       void *element, void *_array, uint32 *num_elements,
+                       void *element, void *_array, uint32_t *num_elements,
                        ssize_t *array_size);
 char *get_myname(TALLOC_CTX *ctx);
 char *get_mydnsdomname(TALLOC_CTX *ctx);
@@ -411,9 +399,7 @@ int smb_mkstemp(char *name_template);
 void *smb_xmalloc_array(size_t size, unsigned int count);
 char *myhostname(void);
 char *myhostname_upper(void);
-char *lock_path(const char *name);
-char *state_path(const char *name);
-char *cache_path(const char *name);
+#include "lib/util_path.h"
 bool parent_dirname(TALLOC_CTX *mem_ctx, const char *dir, char **parent,
                    const char **name);
 bool ms_has_wild(const char *s);
@@ -423,20 +409,12 @@ bool mask_match_search(const char *string, const char *pattern, bool is_case_sen
 bool mask_match_list(const char *string, char **list, int listLen, bool is_case_sensitive);
 bool unix_wild_match(const char *pattern, const char *string);
 bool name_to_fqdn(fstring fqdn, const char *name);
-void *talloc_append_blob(TALLOC_CTX *mem_ctx, void *buf, DATA_BLOB blob);
-uint32 map_share_mode_to_deny_mode(uint32 share_access, uint32 private_options);
-pid_t procid_to_pid(const struct server_id *proc);
-void set_my_vnn(uint32 vnn);
-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);
+uint32_t map_share_mode_to_deny_mode(uint32_t share_access, uint32_t private_options);
+
+#include "lib/util_procid.h"
+
 #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);
-char *procid_str_static(const struct server_id *pid);
-bool procid_valid(const struct server_id *pid);
-bool procid_is_local(const struct server_id *pid);
 bool is_offset_safe(const char *buf_base, size_t buf_len, char *ptr, size_t off);
 char *get_safe_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off);
 char *get_safe_str_ptr(const char *buf_base, size_t buf_len, char *ptr, size_t off);
@@ -453,10 +431,10 @@ 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 *paccess_mask,
+                                uint32_t *pshare_mode,
+                                uint32_t *pcreate_disposition,
+                                uint32_t *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);
@@ -464,18 +442,13 @@ void init_modules(void);
 
 /* The following definitions come from lib/util_builtin.c  */
 
-bool lookup_builtin_rid(TALLOC_CTX *mem_ctx, uint32 rid, const char **name);
-bool lookup_builtin_name(const char *name, uint32 *rid);
+bool lookup_builtin_rid(TALLOC_CTX *mem_ctx, uint32_t rid, const char **name);
+bool lookup_builtin_name(const char *name, uint32_t *rid);
 const char *builtin_domain_name(void);
 bool sid_check_is_builtin(const struct dom_sid *sid);
 bool sid_check_is_in_builtin(const struct dom_sid *sid);
 bool sid_check_is_wellknown_builtin(const struct dom_sid *sid);
 
-/* The following definitions come from lib/util_file.c  */
-
-char **file_lines_pload(const char *syscmd, int *numlines);
-void file_lines_free(char **lines);
-
 /* The following definitions come from lib/util_nscd.c  */
 
 void smb_nscd_flush_user_cache(void);
@@ -520,9 +493,9 @@ char *sid_to_fstring(fstring sidstr_out, const struct dom_sid *sid);
 char *sid_string_talloc(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
 char *sid_string_dbg(const struct dom_sid *sid);
 char *sid_string_tos(const struct dom_sid *sid);
-bool sid_linearize(char *outbuf, size_t len, const struct dom_sid *sid);
+bool sid_linearize(uint8_t *outbuf, size_t len, const struct dom_sid *sid);
 bool non_mappable_sid(struct dom_sid *sid);
-char *sid_binstring_hex(const struct dom_sid *sid);
+char *sid_binstring_hex_talloc(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
 struct netr_SamInfo3;
 NTSTATUS sid_array_from_info3(TALLOC_CTX *mem_ctx,
                              const struct netr_SamInfo3 *info3,
@@ -621,17 +594,6 @@ struct tevent_req *getaddrinfo_send(TALLOC_CTX *mem_ctx,
 int getaddrinfo_recv(struct tevent_req *req, struct addrinfo **res);
 int poll_one_fd(int fd, int events, int timeout, int *revents);
 int poll_intr_one_fd(int fd, int events, int timeout, int *revents);
-struct tstream_context;
-struct tevent_req *tstream_read_packet_send(TALLOC_CTX *mem_ctx,
-                                           struct tevent_context *ev,
-                                           struct tstream_context *stream,
-                                           size_t initial,
-                                           ssize_t (*more)(uint8_t *buf,
-                                                           size_t buflen,
-                                                           void *private_data),
-                                           void *private_data);
-ssize_t tstream_read_packet_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
-                                uint8_t **pbuf, int *perrno);
 
 /* The following definitions come from lib/util_str.c  */
 
@@ -724,13 +686,6 @@ bool wins_server_tag_ips(const char *tag, TALLOC_CTX *mem_ctx,
                         struct in_addr **pservers, int *pnum_servers);
 unsigned wins_srv_count_tag(const char *tag);
 
-/* The following definitions come from libsmb/clispnego.c  */
-
-DATA_BLOB spnego_gen_negTokenInit(TALLOC_CTX *ctx,
-                                 const char *OIDs[],
-                                 DATA_BLOB *psecblob,
-                                 const char *principal);
-
 #ifndef ASN1_MAX_OIDS
 #define ASN1_MAX_OIDS 20
 #endif
@@ -739,19 +694,7 @@ bool spnego_parse_negTokenInit(TALLOC_CTX *ctx,
                               char *OIDs[ASN1_MAX_OIDS],
                               char **principal,
                               DATA_BLOB *secblob);
-DATA_BLOB spnego_gen_krb5_wrap(TALLOC_CTX *ctx, const DATA_BLOB ticket, const uint8 tok_id[2]);
-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,
-                           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);
-bool spnego_parse_auth_response(TALLOC_CTX *ctx,
-                               DATA_BLOB blob, NTSTATUS nt_status,
-                               const char *mechOID,
-                               DATA_BLOB *auth);
+DATA_BLOB spnego_gen_krb5_wrap(TALLOC_CTX *ctx, const DATA_BLOB ticket, const uint8_t tok_id[2]);
 
 /* The following definitions come from libsmb/conncache.c  */
 
@@ -763,7 +706,6 @@ void flush_negative_conn_cache_for_domain(const char *domain);
 
 struct netr_DsRGetDCNameInfo;
 
-void debug_dsdcinfo_flags(int lvl, uint32_t flags);
 NTSTATUS dsgetdcname(TALLOC_CTX *mem_ctx,
                     struct messaging_context *msg_ctx,
                     const char *domain_name,
@@ -774,7 +716,7 @@ NTSTATUS dsgetdcname(TALLOC_CTX *mem_ctx,
 
 /* The following definitions come from libsmb/errormap.c  */
 
-NTSTATUS dos_to_ntstatus(uint8 eclass, uint32 ecode);
+NTSTATUS dos_to_ntstatus(uint8_t eclass, uint32_t ecode);
 
 /* The following definitions come from libsmb/namecache.c  */
 
@@ -821,7 +763,6 @@ bool name_status_find(const char *q_name,
                        int type,
                        const struct sockaddr_storage *to_ss,
                        fstring name);
-int ip_service_compare(struct ip_service *ss1, struct ip_service *ss2);
 int remove_duplicate_addrs2(struct ip_service *iplist, int count );
 struct tevent_req *name_query_send(TALLOC_CTX *mem_ctx,
                                   struct tevent_context *ev,
@@ -895,31 +836,6 @@ bool get_dc_name(const char *domain,
                fstring srv_name,
                struct sockaddr_storage *ss_out);
 
-/* The following definitions come from libsmb/ntlmssp.c  */
-struct ntlmssp_state;
-NTSTATUS ntlmssp_set_username(struct ntlmssp_state *ntlmssp_state, const char *user) ;
-NTSTATUS ntlmssp_set_password(struct ntlmssp_state *ntlmssp_state, const char *password) ;
-NTSTATUS ntlmssp_set_password_hash(struct ntlmssp_state *ntlmssp_state,
-                                  const char *hash);
-NTSTATUS ntlmssp_set_domain(struct ntlmssp_state *ntlmssp_state, const char *domain) ;
-void ntlmssp_want_feature_list(struct ntlmssp_state *ntlmssp_state, char *feature_list);
-void ntlmssp_want_feature(struct ntlmssp_state *ntlmssp_state, uint32_t feature);
-NTSTATUS ntlmssp_update(struct ntlmssp_state *ntlmssp_state,
-                       const DATA_BLOB in, DATA_BLOB *out) ;
-bool ntlmssp_is_anonymous(struct ntlmssp_state *ntlmssp_state);
-NTSTATUS ntlmssp_server_start(TALLOC_CTX *mem_ctx,
-                             bool is_standalone,
-                             const char *netbios_name,
-                             const char *netbios_domain,
-                             const char *dns_name,
-                             const char *dns_domain,
-                             struct ntlmssp_state **ntlmssp_state);
-NTSTATUS ntlmssp_client_start(TALLOC_CTX *mem_ctx,
-                             const char *netbios_name,
-                             const char *netbios_domain,
-                             bool use_ntlmv2,
-                             struct ntlmssp_state **_ntlmssp_state);
-
 /* The following definitions come from libsmb/passchange.c  */
 
 NTSTATUS remote_password_change(const char *remote_machine, const char *user_name, 
@@ -937,9 +853,9 @@ bool netsamlogon_cache_have(const struct dom_sid *user_sid);
 
 /* The following definitions come from libsmb/smberr.c  */
 
-const char *smb_dos_err_name(uint8 e_class, uint16 num);
+const char *smb_dos_err_name(uint8_t e_class, uint16_t num);
 const char *get_dos_error_msg(WERROR result);
-const char *smb_dos_err_class(uint8 e_class);
+const char *smb_dos_err_class(uint8_t e_class);
 WERROR map_werror_from_unix(int error);
 
 /* The following definitions come from libsmb/trustdom_cache.c  */
@@ -949,8 +865,8 @@ bool trustdom_cache_shutdown(void);
 bool trustdom_cache_store(const char *name, const char *alt_name,
                          const struct dom_sid *sid, time_t timeout);
 bool trustdom_cache_fetch(const char* name, struct dom_sid* sid);
-uint32 trustdom_cache_fetch_timestamp( void );
-bool trustdom_cache_store_timestamp( uint32 t, time_t timeout );
+uint32_t trustdom_cache_fetch_timestamp( void );
+bool trustdom_cache_store_timestamp( uint32_t t, time_t timeout );
 void trustdom_cache_flush(void);
 void update_trustdom_cache( void );
 
@@ -981,10 +897,19 @@ const char *lp_idmap_default_backend (void);
 int lp_security(void);
 int lp_client_max_protocol(void);
 int lp_winbindd_max_protocol(void);
+int lp_client_ipc_min_protocol(void);
+int lp_client_ipc_max_protocol(void);
+int lp_client_ipc_signing(void);
 int lp_smb2_max_credits(void);
 int lp_cups_encrypt(void);
 bool lp_widelinks(int );
 
+int lp_wi_scan_global_parametrics(
+       const char *regex, size_t max_matches,
+       bool (*cb)(const char *string, regmatch_t matches[],
+                  void *private_data),
+       void *private_data);
+
 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;
@@ -993,6 +918,9 @@ const char *lp_parm_const_string_service(struct loadparm_service *service, const
 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);
+unsigned long long lp_parm_ulonglong(int snum, const char *type,
+                                    const char *option,
+                                    unsigned long long def);
 bool lp_parm_bool(int snum, const char *type, const char *option, bool def);
 struct enum_list;
 int lp_parm_enum(int snum, const char *type, const char *option,
@@ -1004,7 +932,6 @@ int lp_add_service(const char *pszService, int iDefaultService);
 bool lp_add_printer(const char *pszPrintername, int iDefaultService);
 bool lp_parameter_is_valid(const char *pszParmName);
 bool lp_parameter_is_global(const char *pszParmName);
-bool lp_parameter_is_canonical(const char *parm_name);
 bool lp_canonicalize_parameter(const char *parm_name, const char **canon_parm,
                               bool *inverse);
 bool lp_canonicalize_parameter_with_value(const char *parm_name,
@@ -1041,7 +968,7 @@ void lp_killunused(struct smbd_server_connection *sconn,
                   bool (*snumused) (struct smbd_server_connection *, int));
 void lp_kill_all_services(void);
 void lp_killservice(int iServiceIn);
-const char* server_role_str(uint32 role);
+const char* server_role_str(uint32_t role);
 enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
                        SMB_STRUCT_STAT *psbuf,
                        const char *servicename,
@@ -1057,21 +984,14 @@ int load_usershare_service(const char *servicename);
 int load_usershare_shares(struct smbd_server_connection *sconn,
                          bool (*snumused) (struct smbd_server_connection *, int));
 void gfree_loadparm(void);
-bool lp_load(const char *pszFname,
-            bool global_only,
-            bool save_defaults,
-            bool add_ipc,
-            bool initialize_globals);
 bool lp_load_initial_only(const char *pszFname);
 bool lp_load_global(const char *file_name);
+bool lp_load_with_shares(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_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,
-                                 bool add_ipc,
-                                 bool initialize_globals);
+bool lp_load_with_registry_shares(const char *pszFname);
 int lp_numservices(void);
 void lp_dump(FILE *f, bool show_defaults, int maxtoprint);
 void lp_dump_one(FILE * f, bool show_defaults, int snum);
@@ -1087,12 +1007,11 @@ void lp_set_logfile(const char *name);
 int lp_maxprintjobs(int snum);
 const char *lp_printcapname(void);
 bool lp_disable_spoolss( void );
-void lp_set_spoolss_state( uint32 state );
-uint32 lp_get_spoolss_state( void );
+void lp_set_spoolss_state( uint32_t state );
+uint32_t lp_get_spoolss_state( void );
 struct smb_signing_state;
 bool lp_use_sendfile(int snum, struct smb_signing_state *signing_state);
 void set_use_sendfile(int snum, bool val);
-void set_store_dos_attributes(int snum, bool val);
 void lp_set_mangling_method(const char *new_method);
 bool lp_posix_pathnames(void);
 void lp_set_posix_pathnames(void);
@@ -1115,7 +1034,7 @@ void set_server_role(void);
 
 /* The following definitions come from param/util.c  */
 
-uint32 get_int_param( const char* param );
+uint32_t get_int_param( const char* param );
 char* get_string_param( const char* param );
 
 /* The following definitions come from lib/server_contexts.c  */
@@ -1211,6 +1130,11 @@ bool sid_check_is_in_unix_groups(const struct dom_sid *sid);
 const char *unix_groups_domain_name(void);
 bool lookup_unix_group_name(const char *name, struct dom_sid *sid);
 
+/* The following definitions come from lib/util_specialsids.c  */
+bool sid_check_is_asserted_identity(const struct dom_sid *sid);
+bool sid_check_is_in_asserted_identity(const struct dom_sid *sid);
+const char *asserted_identity_domain_name(void);
+
 /* The following definitions come from lib/filename_util.c */
 
 NTSTATUS get_full_smb_filename(TALLOC_CTX *ctx, const struct smb_filename *smb_fname,
@@ -1218,10 +1142,11 @@ NTSTATUS get_full_smb_filename(TALLOC_CTX *ctx, const struct smb_filename *smb_f
 struct smb_filename *synthetic_smb_fname(TALLOC_CTX *mem_ctx,
                                         const char *base_name,
                                         const char *stream_name,
-                                        const SMB_STRUCT_STAT *psbuf);
+                                        const SMB_STRUCT_STAT *psbuf,
+                                        uint32_t flags);
 struct smb_filename *synthetic_smb_fname_split(TALLOC_CTX *ctx,
-                                              const char *fname,
-                                              const SMB_STRUCT_STAT *psbuf);
+                                               const char *fname,
+                                               bool posix_path);
 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);
@@ -1231,6 +1156,10 @@ 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);
+bool split_stream_filename(TALLOC_CTX *ctx,
+                       const char *filename_in,
+                       char **filename_out,
+                       char **streamname_out);
 
 /* The following definitions come from lib/dummyroot.c */