s3-passdb: move passdb headers to passdb/proto.h.
[abartlet/samba.git/.git] / source3 / include / proto.h
index 9edbfc5902e6494e16e3c68bf900c6030e935879..cf15a41f676d95a40aaadbec25d563da1ec72766 100644 (file)
@@ -159,6 +159,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
                                const char *domain,
                                struct auth_serversupplied_info **server_info,
                                struct netr_SamInfo3 *info3);
+struct wbcAuthUserInfo;
 NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
                                          const char *sent_nt_username,
                                          const char *domain,
@@ -249,8 +250,6 @@ bool nt_token_check_domain_rid( struct security_token *token, uint32 rid );
 struct security_token *get_root_nt_token( void );
 NTSTATUS add_aliases(const struct dom_sid *domain_sid,
                     struct security_token *token);
-NTSTATUS create_builtin_users(const struct dom_sid *sid);
-NTSTATUS create_builtin_administrators(const struct dom_sid *sid);
 struct security_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
                                            const struct dom_sid *user_sid,
                                            bool is_guest,
@@ -264,80 +263,6 @@ NTSTATUS create_local_nt_token_from_info3(TALLOC_CTX *mem_ctx,
 void debug_unix_user_token(int dbg_class, int dbg_lev, uid_t uid, gid_t gid,
                           int n_groups, gid_t *groups);
 
-/* The following definitions come from groupdb/mapping.c  */
-
-NTSTATUS add_initial_entry(gid_t gid, const char *sid, enum lsa_SidType sid_name_use, const char *nt_name, const char *comment);
-bool get_domain_group_from_sid(struct dom_sid sid, GROUP_MAP *map);
-int smb_create_group(const char *unix_group, gid_t *new_gid);
-int smb_delete_group(const char *unix_group);
-int smb_set_primary_group(const char *unix_group, const char* unix_user);
-int smb_add_user_group(const char *unix_group, const char *unix_user);
-int smb_delete_user_group(const char *unix_group, const char *unix_user);
-NTSTATUS pdb_default_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
-                                struct dom_sid sid);
-NTSTATUS pdb_default_getgrgid(struct pdb_methods *methods, GROUP_MAP *map,
-                                gid_t gid);
-NTSTATUS pdb_default_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
-                                const char *name);
-NTSTATUS pdb_default_add_group_mapping_entry(struct pdb_methods *methods,
-                                               GROUP_MAP *map);
-NTSTATUS pdb_default_update_group_mapping_entry(struct pdb_methods *methods,
-                                                  GROUP_MAP *map);
-NTSTATUS pdb_default_delete_group_mapping_entry(struct pdb_methods *methods,
-                                                  struct dom_sid sid);
-NTSTATUS pdb_default_enum_group_mapping(struct pdb_methods *methods,
-                                          const struct dom_sid *sid, enum lsa_SidType sid_name_use,
-                                          GROUP_MAP **pp_rmap, size_t *p_num_entries,
-                                          bool unix_only);
-NTSTATUS pdb_default_create_alias(struct pdb_methods *methods,
-                                 const char *name, uint32 *rid);
-NTSTATUS pdb_default_delete_alias(struct pdb_methods *methods,
-                                 const struct dom_sid *sid);
-NTSTATUS pdb_default_get_aliasinfo(struct pdb_methods *methods,
-                                  const struct dom_sid *sid,
-                                  struct acct_info *info);
-NTSTATUS pdb_default_set_aliasinfo(struct pdb_methods *methods,
-                                  const struct dom_sid *sid,
-                                  struct acct_info *info);
-NTSTATUS pdb_default_add_aliasmem(struct pdb_methods *methods,
-                                 const struct dom_sid *alias, const struct dom_sid *member);
-NTSTATUS pdb_default_del_aliasmem(struct pdb_methods *methods,
-                                 const struct dom_sid *alias, const struct dom_sid *member);
-NTSTATUS pdb_default_enum_aliasmem(struct pdb_methods *methods,
-                                  const struct dom_sid *alias, TALLOC_CTX *mem_ctx,
-                                  struct dom_sid **pp_members,
-                                  size_t *p_num_members);
-NTSTATUS pdb_default_alias_memberships(struct pdb_methods *methods,
-                                      TALLOC_CTX *mem_ctx,
-                                      const struct dom_sid *domain_sid,
-                                      const struct dom_sid *members,
-                                      size_t num_members,
-                                      uint32 **pp_alias_rids,
-                                      size_t *p_num_alias_rids);
-NTSTATUS pdb_nop_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
-                                struct dom_sid sid);
-NTSTATUS pdb_nop_getgrgid(struct pdb_methods *methods, GROUP_MAP *map,
-                                gid_t gid);
-NTSTATUS pdb_nop_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
-                                const char *name);
-NTSTATUS pdb_nop_add_group_mapping_entry(struct pdb_methods *methods,
-                                               GROUP_MAP *map);
-NTSTATUS pdb_nop_update_group_mapping_entry(struct pdb_methods *methods,
-                                                  GROUP_MAP *map);
-NTSTATUS pdb_nop_delete_group_mapping_entry(struct pdb_methods *methods,
-                                                  struct dom_sid sid);
-NTSTATUS pdb_nop_enum_group_mapping(struct pdb_methods *methods,
-                                          enum lsa_SidType sid_name_use,
-                                          GROUP_MAP **rmap, size_t *num_entries,
-                                          bool unix_only);
-bool pdb_get_dom_grp_info(const struct dom_sid *sid, struct acct_info *info);
-bool pdb_set_dom_grp_info(const struct dom_sid *sid, const struct acct_info *info);
-NTSTATUS pdb_create_builtin_alias(uint32 rid);
-
-/* The following definitions come from groupdb/mapping_tdb.c  */
-
-const struct mapping_backend *groupdb_tdb_init(void);
-
 /* The following definitions come from intl/lang_tdb.c  */
 
 bool lang_tdb_init(const char *lang);
@@ -355,21 +280,6 @@ bool allow_access(const char **deny_list,
                const char *cname,
                const char *caddr);
 
-/* The following definitions come from passdb/account_pol.c  */
-
-void account_policy_names_list(const char ***names, int *num_names);
-const char *decode_account_policy_name(enum pdb_policy_type type);
-const char *get_account_policy_attr(enum pdb_policy_type type);
-const char *account_policy_get_desc(enum pdb_policy_type type);
-enum pdb_policy_type account_policy_name_to_typenum(const char *name);
-bool account_policy_get_default(enum pdb_policy_type type, uint32_t *val);
-bool init_account_policy(void);
-bool account_policy_get(enum pdb_policy_type type, uint32_t *value);
-bool account_policy_set(enum pdb_policy_type type, uint32_t value);
-bool cache_account_policy_set(enum pdb_policy_type type, uint32_t value);
-bool cache_account_policy_get(enum pdb_policy_type type, uint32_t *value);
-struct db_context *get_account_pol_db( void );
-
 /* The following definitions come from lib/adt_tree.c  */
 
 
@@ -409,13 +319,16 @@ int bitmap_find(struct bitmap *bm, unsigned ofs);
 
 /* The following definitions come from lib/charcnv.c  */
 
-char lp_failed_convert_char(void);
 void lazy_initialize_conv(void);
 void gfree_charcnv(void);
 void init_iconv(void);
 size_t convert_string(charset_t from, charset_t to,
                      void const *src, size_t srclen, 
-                     void *dest, size_t destlen, bool allow_bad_conv);
+                     void *dest, size_t destlen);
+size_t convert_string_error(charset_t from, charset_t to,
+                           void const *src, size_t srclen,
+                           void *dest, size_t destlen,
+                           size_t *converted_size);
 size_t unix_strupper(const char *src, size_t srclen, char *dest, size_t destlen);
 char *talloc_strdup_upper(TALLOC_CTX *ctx, const char *s);
 char *strupper_talloc(TALLOC_CTX *ctx, const char *s);
@@ -434,12 +347,6 @@ size_t push_utf8_fstring(void *dest, const char *src);
 bool push_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
                      size_t *converted_size);
 size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_len, size_t src_len, int flags);
-size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx,
-                       const void *base_ptr,
-                       char **ppdest,
-                       const void *src,
-                       size_t src_len,
-                       int flags);
 size_t pull_ucs2_fstring(char *dest, const void *src);
 bool push_ucs2_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src,
                      size_t *converted_size);
@@ -449,25 +356,19 @@ bool pull_ucs2_talloc(TALLOC_CTX *ctx, char **dest, const smb_ucs2_t *src,
                      size_t *converted_size);
 bool pull_ascii_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
                       size_t *converted_size);
-size_t push_string_check_fn(const char *function, unsigned int line,
-                           void *dest, const char *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 *function, unsigned int line,
-                       const char *base, uint16 flags2, 
+size_t push_string_base(const char *base, uint16 flags2,
                        void *dest, const char *src,
                        size_t dest_len, int flags);
-size_t pull_string_fn(const char *function,
-                       unsigned int line,
-                       const void *base_ptr,
+size_t pull_string_fn(const void *base_ptr,
                        uint16 smb_flags2,
                        char *dest,
                        const void *src,
                        size_t dest_len,
                        size_t src_len,
                        int flags);
-size_t pull_string_talloc_fn(const char *function,
-                       unsigned int line,
-                       TALLOC_CTX *ctx,
+size_t pull_string_talloc(TALLOC_CTX *ctx,
                        const void *base_ptr,
                        uint16 smb_flags2,
                        char **ppdest,
@@ -475,13 +376,6 @@ size_t pull_string_talloc_fn(const char *function,
                        size_t src_len,
                        int flags);
 size_t align_string(const void *base_ptr, const char *p, int flags);
-codepoint_t next_codepoint_ext(const char *str, charset_t src_charset,
-                              size_t *bytes_consumed);
-codepoint_t next_codepoint(const char *str, size_t *size);
-
-/* The following definitions come from lib/clobber.c  */
-
-void clobber_region(const char *fn, unsigned int line, char *dest, size_t len);
 
 /* The following definitions come from lib/conn_tdb.c  */
 
@@ -515,10 +409,6 @@ void display_set_stderr(void);
 NTSTATUS map_nt_error_from_unix(int unix_error);
 int map_errno_from_nt_status(NTSTATUS status);
 
-/* The following definitions come from lib/fault.c  */
-void fault_setup(void (*fn)(void *));
-void dump_core_setup(const char *progname);
-
 /* The following definitions come from lib/file_id.c  */
 
 struct file_id vfs_file_id_from_sbuf(connection_struct *conn, const SMB_STRUCT_STAT *sbuf);
@@ -613,9 +503,6 @@ bool revoke_privilege_set(const struct dom_sid *sid, struct lsa_PrivilegeSet *se
 bool revoke_privilege_by_name(const struct dom_sid *sid, const char *name);
 NTSTATUS privilege_create_account(const struct dom_sid *sid );
 NTSTATUS privilege_delete_account(const struct dom_sid *sid);
-NTSTATUS privilege_set_init(PRIVILEGE_SET *priv_set);
-NTSTATUS privilege_set_init_by_ctx(TALLOC_CTX *mem_ctx, PRIVILEGE_SET *priv_set);
-void privilege_set_free(PRIVILEGE_SET *priv_set);
 bool is_privileged_sid( const struct dom_sid *sid );
 bool grant_all_privileges( const struct dom_sid *sid );
 
@@ -891,13 +778,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);
-void sys_setpwent(void);
-struct passwd *sys_getpwent(void);
-void sys_endpwent(void);
-struct passwd *sys_getpwnam(const char *name);
-struct passwd *sys_getpwuid(uid_t uid);
-struct group *sys_getgrnam(const char *name);
-struct group *sys_getgrgid(gid_t gid);
 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);
@@ -953,9 +833,6 @@ void register_msg_pool_usage(struct messaging_context *msg_ctx);
 void push_dos_date(uint8_t *buf, int offset, time_t unixdate, int zone_offset);
 void push_dos_date2(uint8_t *buf,int offset,time_t unixdate, int zone_offset);
 void push_dos_date3(uint8_t *buf,int offset,time_t unixdate, int zone_offset);
-time_t pull_dos_date(const uint8_t *date_ptr, int zone_offset);
-time_t pull_dos_date2(const uint8_t *date_ptr, int zone_offset);
-time_t pull_dos_date3(const uint8_t *date_ptr, int zone_offset);
 uint32_t convert_time_t_to_uint32_t(time_t t);
 time_t convert_uint32_t_to_time_t(uint32_t u);
 bool nt_time_is_zero(const NTTIME *nt);
@@ -977,7 +854,6 @@ 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);
-time_t convert_timespec_to_time_t(struct timespec ts);
 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);
@@ -1001,9 +877,7 @@ bool nt_time_is_set(const NTTIME *nt);
 
 /* The following definitions come from lib/username.c  */
 
-struct passwd *tcopy_passwd(TALLOC_CTX *mem_ctx, const struct passwd *from) ;
 void flush_pwnam_cache(void);
-struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid) ;
 char *get_user_home_dir(TALLOC_CTX *mem_ctx, const char *user);
 struct passwd *Get_Pwnam_alloc(TALLOC_CTX *mem_ctx, const char *user);
 
@@ -1095,7 +969,7 @@ const char *uidtoname(uid_t uid);
 char *gidtoname(gid_t gid);
 uid_t nametouid(const char *name);
 gid_t nametogid(const char *name);
-void smb_panic(const char *const why);
+void smb_panic_s3(const char *why);
 void log_stack_trace(void);
 const char *readdirname(SMB_STRUCT_DIR *p);
 bool is_in_path(const char *name, name_compare_entry *namelist, bool case_sensitive);
@@ -1172,6 +1046,14 @@ 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);
 
+/* 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);
+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);
+
 /* The following definitions come from lib/util_file.c  */
 
 char **file_lines_pload(const char *syscmd, int *numlines);
@@ -1191,15 +1073,6 @@ NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx,
                        struct security_token **token_out);
 bool token_sid_in_ace(const struct security_token *token, const struct security_ace *ace);
 
-/* The following definitions come from ..libcli/registry/util_reg.c  */
-
-const char *str_regtype(int type);
-int regtype_by_string(const char *str);
-bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s);
-bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a);
-bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s);
-bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char ***a);
-
 /* The following definitions come from lib/util_sec.c  */
 
 void sec_init(void);
@@ -1339,14 +1212,6 @@ ssize_t tstream_read_packet_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
 /* The following definitions come from lib/util_str.c  */
 
 bool next_token(const char **ptr, char *buff, const char *sep, size_t bufsize);
-bool next_token_talloc(TALLOC_CTX *ctx,
-                       const char **ptr,
-                       char **pp_buff,
-                       const char *sep);
-bool next_token_no_ltrim_talloc(TALLOC_CTX *ctx,
-                       const char **ptr,
-                       char **pp_buff,
-                       const char *sep);
 int StrCaseCmp(const char *s, const char *t);
 int StrnCaseCmp(const char *s, const char *t, size_t len);
 bool strnequal(const char *s1,const char *s2,size_t n);
@@ -1360,23 +1225,17 @@ size_t str_ascii_charnum(const char *s);
 bool trim_char(char *s,char cfront,char cback);
 bool strhasupper(const char *s);
 bool strhaslower(const char *s);
-char *safe_strcpy_fn(const char *fn,
-               int line,
-               char *dest,
+char *safe_strcpy_fn(char *dest,
                const char *src,
                size_t maxlength);
-char *safe_strcat_fn(const char *fn,
-               int line,
-               char *dest,
+char *safe_strcat_fn(char *dest,
                const char *src,
                size_t maxlength);
-char *alpha_strcpy_fn(const char *fn,
-               int line,
-               char *dest,
+char *alpha_strcpy(char *dest,
                const char *src,
                const char *other_safe_chars,
                size_t maxlength);
-char *StrnCpy_fn(const char *fn, int line,char *dest,const char *src,size_t n);
+char *StrnCpy(char *dest,const char *src,size_t n);
 bool in_list(const char *s, const char *list, bool casesensitive);
 void string_free(char **s);
 bool string_set(char **dest,const char *src);
@@ -1418,10 +1277,6 @@ char *strnrchr_m(const char *s, char c, unsigned int n);
 char *strstr_m(const char *src, const char *findstr);
 void strlower_m(char *s);
 void strupper_m(char *s);
-size_t strlen_m_ext(const char *s, const charset_t src_charset,
-                   const charset_t dst_charset);
-size_t strlen_m_ext_term(const char *s, const charset_t src_charset,
-                        const charset_t dst_charset);
 size_t strlen_m(const char *s);
 size_t strlen_m_term(const char *s);
 size_t strlen_m_term_null(const char *s);
@@ -1429,15 +1284,12 @@ int fstr_sprintf(fstring s, const char *fmt, ...);
 bool str_list_sub_basic( char **list, const char *smb_name,
                         const char *domain_name );
 bool str_list_substitute(char **list, const char *pattern, const char *insert);
-bool str_list_check(const char **list, const char *s);
-bool str_list_check_ci(const char **list, const char *s);
 
 char *ipstr_list_make(char **ipstr_list,
                        const struct ip_service *ip_list,
                        int ip_count);
 int ipstr_list_parse(const char *ipstr_list, struct ip_service **ip_list);
 void ipstr_list_free(char* ipstr_list);
-void rfc1738_unescape(char *buf);
 DATA_BLOB base64_decode_data_blob(const char *s);
 void base64_decode_inplace(char *s);
 char *base64_encode_data_blob(TALLOC_CTX *mem_ctx, DATA_BLOB data);
@@ -1506,40 +1358,6 @@ int islower_ascii(int c);
 
 const char *samba_version_string(void);
 
-/* The following definitions come from lib/winbind_util.c  */
-
-bool winbind_lookup_name(const char *dom_name, const char *name, struct dom_sid *sid,
-                         enum lsa_SidType *name_type);
-bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
-                       const char **domain, const char **name,
-                        enum lsa_SidType *name_type);
-bool winbind_ping(void);
-bool winbind_sid_to_uid(uid_t *puid, const struct dom_sid *sid);
-bool winbind_uid_to_sid(struct dom_sid *sid, uid_t uid);
-bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid);
-bool winbind_gid_to_sid(struct dom_sid *sid, gid_t gid);
-struct passwd * winbind_getpwnam(const char * sname);
-struct passwd * winbind_getpwsid(const struct dom_sid *sid);
-wbcErr wb_is_trusted_domain(const char *domain);
-bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
-                        const struct dom_sid *domain_sid,
-                        int num_rids, uint32 *rids,
-                        const char **domain_name,
-                        const char ***names, enum lsa_SidType **types);
-bool winbind_allocate_uid(uid_t *uid);
-bool winbind_allocate_gid(gid_t *gid);
-bool winbind_get_groups(TALLOC_CTX *mem_ctx,
-                       const char *account,
-                       uint32_t *num_groups,
-                       gid_t ** _groups);
-bool winbind_get_sid_aliases(TALLOC_CTX *mem_ctx,
-                            const struct dom_sid *dom_sid,
-                            const struct dom_sid *members,
-                            size_t num_members,
-                            uint32_t **pp_alias_rids,
-                            size_t *p_num_alias_rids);
-
-
 /* The following definitions come from lib/wins_srv.c  */
 
 bool wins_srv_is_dead(struct in_addr wins_ip, struct in_addr src_ip);
@@ -1594,7 +1412,6 @@ struct tevent_req *cli_tdis_send(TALLOC_CTX *mem_ctx,
                                  struct cli_state *cli);
 NTSTATUS cli_tdis_recv(struct tevent_req *req);
 NTSTATUS cli_tdis(struct cli_state *cli);
-void cli_negprot_sendsync(struct cli_state *cli);
 NTSTATUS cli_negprot(struct cli_state *cli);
 struct tevent_req *cli_negprot_send(TALLOC_CTX *mem_ctx,
                                    struct event_context *ev,
@@ -1687,7 +1504,6 @@ bool cli_state_seqnum_persistent(struct cli_state *cli,
 bool cli_state_seqnum_remove(struct cli_state *cli,
                             uint16_t mid);
 bool cli_receive_smb(struct cli_state *cli);
-bool cli_receive_smb_readX_header(struct cli_state *cli);
 bool cli_send_smb(struct cli_state *cli);
 bool cli_send_smb_direct_writeX(struct cli_state *cli,
                                const char *p,
@@ -2251,12 +2067,11 @@ NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum,
                  void *priv, SMB_OFF_T *received);
 ssize_t cli_read(struct cli_state *cli, uint16_t fnum, char *buf,
                 off_t offset, size_t size);
-ssize_t cli_readraw(struct cli_state *cli, uint16_t fnum, char *buf, off_t offset, size_t size);
 ssize_t cli_write(struct cli_state *cli,
                 uint16_t fnum, uint16 write_mode,
                 const char *buf, off_t offset, size_t size);
-ssize_t cli_smbwrite(struct cli_state *cli,
-                    uint16_t fnum, char *buf, off_t offset, size_t size1);
+NTSTATUS cli_smbwrite(struct cli_state *cli, uint16_t fnum, char *buf,
+                     off_t offset, size_t size1, size_t *ptotal);
 struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx,
                                         struct event_context *ev,
                                         struct cli_state *cli, uint16_t fnum,
@@ -2337,30 +2152,24 @@ bool spnego_mech_list_blob(TALLOC_CTX *mem_ctx,
 
 /* The following definitions come from libsmb/clistr.c  */
 
-size_t clistr_push_fn(const char *function,
-                       unsigned int line,
-                       struct cli_state *cli,
+size_t clistr_push_fn(struct cli_state *cli,
                        void *dest,
                        const char *src,
                        int dest_len,
                        int flags);
-size_t clistr_pull_fn(const char *function,
-                       unsigned int line,
-                       const char *inbuf,
+size_t clistr_pull_fn(const char *inbuf,
                        char *dest,
                        const void *src,
                        int dest_len,
                        int src_len,
                        int flags);
-size_t clistr_pull_talloc_fn(const char *function,
-                               unsigned int line,
-                               TALLOC_CTX *ctx,
-                               const char *base,
-                               uint16_t flags2,
-                               char **pp_dest,
-                               const void *src,
-                               int src_len,
-                               int flags);
+size_t clistr_pull_talloc(TALLOC_CTX *ctx,
+                         const char *base,
+                         uint16_t flags2,
+                         char **pp_dest,
+                         const void *src,
+                         int src_len,
+                         int flags);
 size_t clistr_align_out(struct cli_state *cli, const void *p, int flags);
 
 /* The following definitions come from libsmb/clitrans.c  */
@@ -2394,7 +2203,6 @@ NTSTATUS cli_trans(TALLOC_CTX *mem_ctx, struct cli_state *cli,
 
 /* The following definitions come from libsmb/conncache.c  */
 
-NTSTATUS check_negative_conn_cache_timeout( const char *domain, const char *server, unsigned int failed_cache_timeout );
 NTSTATUS check_negative_conn_cache( const char *domain, const char *server);
 void add_failed_connection_entry(const char *domain, const char *server, NTSTATUS result) ;
 void flush_negative_conn_cache_for_domain(const char *domain);
@@ -2422,7 +2230,6 @@ NTSTATUS map_nt_error_from_gss(uint32 gss_maj, uint32 minor);
 
 /* The following definitions come from libsmb/namecache.c  */
 
-bool namecache_enable(void);
 bool namecache_store(const char *name,
                        int name_type,
                        int num_names,
@@ -2567,7 +2374,6 @@ void ntlmssp_want_feature_list(struct ntlmssp_state *ntlmssp_state, char *featur
 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) ;
-DATA_BLOB ntlmssp_weaken_keys(struct ntlmssp_state *ntlmssp_state, TALLOC_CTX *mem_ctx);
 NTSTATUS ntlmssp_server_start(TALLOC_CTX *mem_ctx,
                              bool is_standalone,
                              const char *netbios_name,
@@ -2999,7 +2805,6 @@ 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);
-bool lp_idmap_read_only(void);
 int lp_idmap_cache_time(void);
 int lp_idmap_negative_cache_time(void);
 int lp_keepalive(void);
@@ -3411,359 +3216,6 @@ void set_server_role(void);
 uint32 get_int_param( const char* param );
 char* get_string_param( const char* param );
 
-/* The following definitions come from passdb/login_cache.c  */
-
-bool login_cache_init(void);
-bool login_cache_shutdown(void);
-bool login_cache_read(struct samu *sampass, struct login_cache *entry);
-bool login_cache_write(const struct samu *sampass,
-                      const struct login_cache *entry);
-bool login_cache_delentry(const struct samu *sampass);
-
-/* The following definitions come from passdb/lookup_sid.c  */
-
-bool lookup_name(TALLOC_CTX *mem_ctx,
-                const char *full_name, int flags,
-                const char **ret_domain, const char **ret_name,
-                struct dom_sid *ret_sid, enum lsa_SidType *ret_type);
-bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
-                const char *full_name, int flags,
-                const char **ret_domain, const char **ret_name,
-                struct dom_sid *ret_sid, enum lsa_SidType *ret_type);
-NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
-                    const struct dom_sid **sids, int level,
-                    struct lsa_dom_info **ret_domains,
-                    struct lsa_name_info **ret_names);
-bool lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
-               const char **ret_domain, const char **ret_name,
-               enum lsa_SidType *ret_type);
-void store_uid_sid_cache(const struct dom_sid *psid, uid_t uid);
-void store_gid_sid_cache(const struct dom_sid *psid, gid_t gid);
-void uid_to_sid(struct dom_sid *psid, uid_t uid);
-void gid_to_sid(struct dom_sid *psid, gid_t gid);
-bool sid_to_uid(const struct dom_sid *psid, uid_t *puid);
-bool sid_to_gid(const struct dom_sid *psid, gid_t *pgid);
-NTSTATUS get_primary_group_sid(TALLOC_CTX *mem_ctx,
-                               const char *username,
-                               struct passwd **_pwd,
-                               struct dom_sid **_group_sid);
-bool delete_uid_cache(uid_t uid);
-bool delete_gid_cache(gid_t gid);
-bool delete_sid_cache(const struct dom_sid* psid);
-void flush_uid_cache(void);
-void flush_gid_cache(void);
-
-/* The following definitions come from passdb/machine_sid.c  */
-
-struct dom_sid  *get_global_sam_sid(void);
-void reset_global_sam_sid(void) ;
-bool sid_check_is_domain(const struct dom_sid  *sid);
-bool sid_check_is_in_our_domain(const struct dom_sid  *sid);
-
-/* The following definitions come from passdb/passdb.c  */
-
-const char *my_sam_name(void);
-struct samu *samu_new( TALLOC_CTX *ctx );
-NTSTATUS samu_set_unix(struct samu *user, const struct passwd *pwd);
-NTSTATUS samu_alloc_rid_unix(struct samu *user, const struct passwd *pwd);
-char *pdb_encode_acct_ctrl(uint32_t acct_ctrl, size_t length);
-uint32_t pdb_decode_acct_ctrl(const char *p);
-void pdb_sethexpwd(char p[33], const unsigned char *pwd, uint32_t acct_ctrl);
-bool pdb_gethexpwd(const char *p, unsigned char *pwd);
-void pdb_sethexhours(char *p, const unsigned char *hours);
-bool pdb_gethexhours(const char *p, unsigned char *hours);
-int algorithmic_rid_base(void);
-uid_t algorithmic_pdb_user_rid_to_uid(uint32_t user_rid);
-uid_t max_algorithmic_uid(void);
-uint32_t algorithmic_pdb_uid_to_user_rid(uid_t uid);
-gid_t pdb_group_rid_to_gid(uint32_t group_rid);
-gid_t max_algorithmic_gid(void);
-uint32_t algorithmic_pdb_gid_to_group_rid(gid_t gid);
-bool algorithmic_pdb_rid_is_user(uint32_t rid);
-bool lookup_global_sam_name(const char *name, int flags, uint32_t *rid,
-                           enum lsa_SidType *type);
-NTSTATUS local_password_change(const char *user_name,
-                               int local_flags,
-                               const char *new_passwd, 
-                               char **pp_err_str,
-                               char **pp_msg_str);
-bool init_samu_from_buffer(struct samu *sampass, uint32_t level,
-                          uint8_t *buf, uint32_t buflen);
-uint32_t init_buffer_from_samu (uint8_t **buf, struct samu *sampass, bool size_only);
-bool pdb_copy_sam_account(struct samu *dst, struct samu *src );
-bool pdb_update_bad_password_count(struct samu *sampass, bool *updated);
-bool pdb_update_autolock_flag(struct samu *sampass, bool *updated);
-bool pdb_increment_bad_password_count(struct samu *sampass);
-bool is_dc_trusted_domain_situation(const char *domain_name);
-bool get_trust_pw_clear(const char *domain, char **ret_pwd,
-                       const char **account_name,
-                       enum netr_SchannelType *channel);
-bool get_trust_pw_hash(const char *domain, uint8_t ret_pwd[16],
-                      const char **account_name,
-                      enum netr_SchannelType *channel);
-
-/* The following definitions come from passdb/pdb_compat.c  */
-
-uint32_t pdb_get_user_rid (const struct samu *sampass);
-uint32_t pdb_get_group_rid (struct samu *sampass);
-bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32_t rid, enum pdb_value_state flag);
-bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32_t grid, enum pdb_value_state flag);
-
-/* The following definitions come from passdb/pdb_get_set.c  */
-
-uint32_t pdb_get_acct_ctrl(const struct samu *sampass);
-time_t pdb_get_logon_time(const struct samu *sampass);
-time_t pdb_get_logoff_time(const struct samu *sampass);
-time_t pdb_get_kickoff_time(const struct samu *sampass);
-time_t pdb_get_bad_password_time(const struct samu *sampass);
-time_t pdb_get_pass_last_set_time(const struct samu *sampass);
-time_t pdb_get_pass_can_change_time(const struct samu *sampass);
-time_t pdb_get_pass_can_change_time_noncalc(const struct samu *sampass);
-time_t pdb_get_pass_must_change_time(const struct samu *sampass);
-bool pdb_get_pass_can_change(const struct samu *sampass);
-uint16_t pdb_get_logon_divs(const struct samu *sampass);
-uint32_t pdb_get_hours_len(const struct samu *sampass);
-const uint8_t *pdb_get_hours(const struct samu *sampass);
-const uint8_t *pdb_get_nt_passwd(const struct samu *sampass);
-const uint8_t *pdb_get_lanman_passwd(const struct samu *sampass);
-const uint8_t *pdb_get_pw_history(const struct samu *sampass, uint32_t *current_hist_len);
-const char *pdb_get_plaintext_passwd(const struct samu *sampass);
-const struct dom_sid *pdb_get_user_sid(const struct samu *sampass);
-const struct dom_sid *pdb_get_group_sid(struct samu *sampass);
-enum pdb_value_state pdb_get_init_flags(const struct samu *sampass, enum pdb_elements element);
-const char *pdb_get_username(const struct samu *sampass);
-const char *pdb_get_domain(const struct samu *sampass);
-const char *pdb_get_nt_username(const struct samu *sampass);
-const char *pdb_get_fullname(const struct samu *sampass);
-const char *pdb_get_homedir(const struct samu *sampass);
-const char *pdb_get_dir_drive(const struct samu *sampass);
-const char *pdb_get_logon_script(const struct samu *sampass);
-const char *pdb_get_profile_path(const struct samu *sampass);
-const char *pdb_get_acct_desc(const struct samu *sampass);
-const char *pdb_get_workstations(const struct samu *sampass);
-const char *pdb_get_comment(const struct samu *sampass);
-const char *pdb_get_munged_dial(const struct samu *sampass);
-uint16_t pdb_get_bad_password_count(const struct samu *sampass);
-uint16_t pdb_get_logon_count(const struct samu *sampass);
-uint16_t pdb_get_country_code(const struct samu *sampass);
-uint16_t pdb_get_code_page(const struct samu *sampass);
-uint32_t pdb_get_unknown_6(const struct samu *sampass);
-void *pdb_get_backend_private_data(const struct samu *sampass, const struct pdb_methods *my_methods);
-bool pdb_set_acct_ctrl(struct samu *sampass, uint32_t acct_ctrl, enum pdb_value_state flag);
-bool pdb_set_logon_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
-bool pdb_set_logoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
-bool pdb_set_kickoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
-bool pdb_set_bad_password_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
-bool pdb_set_pass_can_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
-bool pdb_set_pass_must_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
-bool pdb_set_pass_last_set_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
-bool pdb_set_hours_len(struct samu *sampass, uint32_t len, enum pdb_value_state flag);
-bool pdb_set_logon_divs(struct samu *sampass, uint16_t hours, enum pdb_value_state flag);
-bool pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum pdb_value_state value_flag);
-bool pdb_set_user_sid(struct samu *sampass, const struct dom_sid *u_sid, enum pdb_value_state flag);
-bool pdb_set_user_sid_from_string(struct samu *sampass, fstring u_sid, enum pdb_value_state flag);
-bool pdb_set_group_sid(struct samu *sampass, const struct dom_sid *g_sid, enum pdb_value_state flag);
-bool pdb_set_username(struct samu *sampass, const char *username, enum pdb_value_state flag);
-bool pdb_set_domain(struct samu *sampass, const char *domain, enum pdb_value_state flag);
-bool pdb_set_nt_username(struct samu *sampass, const char *nt_username, enum pdb_value_state flag);
-bool pdb_set_fullname(struct samu *sampass, const char *full_name, enum pdb_value_state flag);
-bool pdb_set_logon_script(struct samu *sampass, const char *logon_script, enum pdb_value_state flag);
-bool pdb_set_profile_path(struct samu *sampass, const char *profile_path, enum pdb_value_state flag);
-bool pdb_set_dir_drive(struct samu *sampass, const char *dir_drive, enum pdb_value_state flag);
-bool pdb_set_homedir(struct samu *sampass, const char *home_dir, enum pdb_value_state flag);
-bool pdb_set_acct_desc(struct samu *sampass, const char *acct_desc, enum pdb_value_state flag);
-bool pdb_set_workstations(struct samu *sampass, const char *workstations, enum pdb_value_state flag);
-bool pdb_set_comment(struct samu *sampass, const char *comment, enum pdb_value_state flag);
-bool pdb_set_munged_dial(struct samu *sampass, const char *munged_dial, enum pdb_value_state flag);
-bool pdb_set_nt_passwd(struct samu *sampass, const uint8_t pwd[NT_HASH_LEN], enum pdb_value_state flag);
-bool pdb_set_lanman_passwd(struct samu *sampass, const uint8_t pwd[LM_HASH_LEN], enum pdb_value_state flag);
-bool pdb_set_pw_history(struct samu *sampass, const uint8_t *pwd, uint32_t historyLen, enum pdb_value_state flag);
-bool pdb_set_plaintext_pw_only(struct samu *sampass, const char *password, enum pdb_value_state flag);
-bool pdb_set_bad_password_count(struct samu *sampass, uint16_t bad_password_count, enum pdb_value_state flag);
-bool pdb_set_logon_count(struct samu *sampass, uint16_t logon_count, enum pdb_value_state flag);
-bool pdb_set_country_code(struct samu *sampass, uint16_t country_code,
-                         enum pdb_value_state flag);
-bool pdb_set_code_page(struct samu *sampass, uint16_t code_page,
-                      enum pdb_value_state flag);
-bool pdb_set_unknown_6(struct samu *sampass, uint32_t unkn, enum pdb_value_state flag);
-bool pdb_set_hours(struct samu *sampass, const uint8 *hours, int hours_len,
-                  enum pdb_value_state flag);
-bool pdb_set_backend_private_data(struct samu *sampass, void *private_data, 
-                                  void (*free_fn)(void **), 
-                                  const struct pdb_methods *my_methods, 
-                                  enum pdb_value_state flag);
-bool pdb_set_pass_can_change(struct samu *sampass, bool canchange);
-bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext);
-uint32_t pdb_build_fields_present(struct samu *sampass);
-
-/* The following definitions come from passdb/pdb_interface.c  */
-
-NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function init) ;
-struct pdb_init_function_entry *pdb_find_backend_entry(const char *name);
-struct event_context *pdb_get_event_context(void);
-NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected);
-struct pdb_domain_info *pdb_get_domain_info(TALLOC_CTX *mem_ctx);
-bool pdb_getsampwnam(struct samu *sam_acct, const char *username) ;
-bool pdb_getsampwsid(struct samu *sam_acct, const struct dom_sid *sid) ;
-NTSTATUS pdb_create_user(TALLOC_CTX *mem_ctx, const char *name, uint32_t flags,
-                        uint32_t *rid);
-NTSTATUS pdb_delete_user(TALLOC_CTX *mem_ctx, struct samu *sam_acct);
-NTSTATUS pdb_add_sam_account(struct samu *sam_acct) ;
-NTSTATUS pdb_update_sam_account(struct samu *sam_acct) ;
-NTSTATUS pdb_delete_sam_account(struct samu *sam_acct) ;
-NTSTATUS pdb_rename_sam_account(struct samu *oldname, const char *newname);
-NTSTATUS pdb_update_login_attempts(struct samu *sam_acct, bool success);
-bool pdb_getgrsid(GROUP_MAP *map, struct dom_sid sid);
-bool pdb_getgrgid(GROUP_MAP *map, gid_t gid);
-bool pdb_getgrnam(GROUP_MAP *map, const char *name);
-NTSTATUS pdb_create_dom_group(TALLOC_CTX *mem_ctx, const char *name,
-                             uint32_t *rid);
-NTSTATUS pdb_delete_dom_group(TALLOC_CTX *mem_ctx, uint32_t rid);
-NTSTATUS pdb_add_group_mapping_entry(GROUP_MAP *map);
-NTSTATUS pdb_update_group_mapping_entry(GROUP_MAP *map);
-NTSTATUS pdb_delete_group_mapping_entry(struct dom_sid sid);
-bool pdb_enum_group_mapping(const struct dom_sid *sid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
-                           size_t *p_num_entries, bool unix_only);
-NTSTATUS pdb_enum_group_members(TALLOC_CTX *mem_ctx,
-                               const struct dom_sid *sid,
-                               uint32_t **pp_member_rids,
-                               size_t *p_num_members);
-NTSTATUS pdb_enum_group_memberships(TALLOC_CTX *mem_ctx, struct samu *user,
-                                   struct dom_sid **pp_sids, gid_t **pp_gids,
-                                   uint32_t *p_num_groups);
-NTSTATUS pdb_set_unix_primary_group(TALLOC_CTX *mem_ctx, struct samu *user);
-NTSTATUS pdb_add_groupmem(TALLOC_CTX *mem_ctx, uint32_t group_rid,
-                         uint32_t member_rid);
-NTSTATUS pdb_del_groupmem(TALLOC_CTX *mem_ctx, uint32_t group_rid,
-                         uint32_t member_rid);
-NTSTATUS pdb_create_alias(const char *name, uint32_t *rid);
-NTSTATUS pdb_delete_alias(const struct dom_sid *sid);
-NTSTATUS pdb_get_aliasinfo(const struct dom_sid *sid, struct acct_info *info);
-NTSTATUS pdb_set_aliasinfo(const struct dom_sid *sid, struct acct_info *info);
-NTSTATUS pdb_add_aliasmem(const struct dom_sid *alias, const struct dom_sid *member);
-NTSTATUS pdb_del_aliasmem(const struct dom_sid *alias, const struct dom_sid *member);
-NTSTATUS pdb_enum_aliasmem(const struct dom_sid *alias, TALLOC_CTX *mem_ctx,
-                          struct dom_sid **pp_members, size_t *p_num_members);
-NTSTATUS pdb_enum_alias_memberships(TALLOC_CTX *mem_ctx,
-                                   const struct dom_sid *domain_sid,
-                                   const struct dom_sid *members, size_t num_members,
-                                   uint32_t **pp_alias_rids,
-                                   size_t *p_num_alias_rids);
-NTSTATUS pdb_lookup_rids(const struct dom_sid *domain_sid,
-                        int num_rids,
-                        uint32_t *rids,
-                        const char **names,
-                        enum lsa_SidType *attrs);
-NTSTATUS pdb_lookup_names(const struct dom_sid *domain_sid,
-                         int num_names,
-                         const char **names,
-                         uint32_t *rids,
-                         enum lsa_SidType *attrs);
-bool pdb_get_account_policy(enum pdb_policy_type type, uint32_t *value);
-bool pdb_set_account_policy(enum pdb_policy_type type, uint32_t value);
-bool pdb_get_seq_num(time_t *seq_num);
-bool pdb_uid_to_sid(uid_t uid, struct dom_sid *sid);
-bool pdb_gid_to_sid(gid_t gid, struct dom_sid *sid);
-bool pdb_sid_to_id(const struct dom_sid *sid, union unid_t *id,
-                  enum lsa_SidType *type);
-uint32_t pdb_capabilities(void);
-bool pdb_new_rid(uint32_t *rid);
-bool initialize_password_db(bool reload, struct event_context *event_ctx);
-struct pdb_search *pdb_search_init(TALLOC_CTX *mem_ctx,
-                                  enum pdb_search_type type);
-struct pdb_search *pdb_search_users(TALLOC_CTX *mem_ctx, uint32_t acct_flags);
-struct pdb_search *pdb_search_groups(TALLOC_CTX *mem_ctx);
-struct pdb_search *pdb_search_aliases(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
-uint32_t pdb_search_entries(struct pdb_search *search,
-                         uint32_t start_idx, uint32_t max_entries,
-                         struct samr_displayentry **result);
-bool pdb_get_trusteddom_pw(const char *domain, char** pwd, struct dom_sid *sid,
-                          time_t *pass_last_set_time);
-bool pdb_set_trusteddom_pw(const char* domain, const char* pwd,
-                          const struct dom_sid *sid);
-bool pdb_del_trusteddom_pw(const char *domain);
-NTSTATUS pdb_enum_trusteddoms(TALLOC_CTX *mem_ctx, uint32_t *num_domains,
-                             struct trustdom_info ***domains);
-NTSTATUS pdb_get_trusted_domain(TALLOC_CTX *mem_ctx, const char *domain,
-                               struct pdb_trusted_domain **td);
-NTSTATUS pdb_get_trusted_domain_by_sid(TALLOC_CTX *mem_ctx, struct dom_sid *sid,
-                               struct pdb_trusted_domain **td);
-NTSTATUS pdb_set_trusted_domain(const char* domain,
-                               const struct pdb_trusted_domain *td);
-NTSTATUS pdb_del_trusted_domain(const char *domain);
-NTSTATUS pdb_enum_trusted_domains(TALLOC_CTX *mem_ctx, uint32_t *num_domains,
-                                 struct pdb_trusted_domain ***domains);
-NTSTATUS make_pdb_method( struct pdb_methods **methods ) ;
-
-/* The following definitions come from passdb/pdb_ldap.c  */
-
-const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver );
-NTSTATUS pdb_init_ldapsam_compat(struct pdb_methods **pdb_method, const char *location);
-NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location);
-NTSTATUS pdb_ldap_init(void);
-
-/* The following definitions come from passdb/pdb_nds.c  */
-
-struct smbldap_state;
-
-int pdb_nds_get_password(
-       struct smbldap_state *ldap_state,
-       char *object_dn,
-       size_t *pwd_len,
-       char *pwd );
-int pdb_nds_set_password(
-       struct smbldap_state *ldap_state,
-       char *object_dn,
-       const char *pwd );
-NTSTATUS pdb_nds_init(void);
-
-/* The following definitions come from passdb/pdb_nds.c  */
-
-NTSTATUS pdb_ipa_init(void);
-
-/* The following definitions come from passdb/pdb_smbpasswd.c  */
-
-NTSTATUS pdb_smbpasswd_init(void) ;
-
-/* The following definitions come from passdb/pdb_wbc_sam.c  */
-
-NTSTATUS pdb_wbc_sam_init(void);
-
-/* The following definitions come from passdb/pdb_tdb.c  */
-
-bool init_sam_from_buffer_v2(struct samu *sampass, uint8_t *buf, uint32_t buflen);
-NTSTATUS pdb_tdbsam_init(void);
-
-/* The following definitions come from passdb/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);
-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);
-
-/* The following definitions come from passdb/util_unixsids.c  */
-
-bool sid_check_is_unix_users(const struct dom_sid *sid);
-bool sid_check_is_in_unix_users(const struct dom_sid *sid);
-void uid_to_unix_users_sid(uid_t uid, struct dom_sid *sid);
-void gid_to_unix_groups_sid(gid_t gid, struct dom_sid *sid);
-const char *unix_users_domain_name(void);
-bool lookup_unix_user_name(const char *name, struct dom_sid *sid);
-bool sid_check_is_unix_groups(const struct dom_sid *sid);
-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 passdb/util_wellknown.c  */
-
-bool sid_check_is_wellknown_domain(const struct dom_sid *sid, const char **name);
-bool sid_check_is_in_wellknown_domain(const struct dom_sid *sid);
-bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
-                         const char **domain, const char **name);
-bool lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name,
-                          struct dom_sid *sid, const char **domain);
-
 /* The following definitions come from profile/profile.c  */
 
 void set_profile_level(int level, struct server_id src);
@@ -4700,7 +4152,6 @@ void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req);
 void reply_pipe_write(struct smb_request *req);
 void reply_pipe_write_and_X(struct smb_request *req);
 void reply_pipe_read_and_X(struct smb_request *req);
-void reply_pipe_close(connection_struct *conn, struct smb_request *req);
 
 /* The following definitions come from smbd/posix_acls.c  */
 
@@ -5029,8 +4480,7 @@ bool is_share_read_only_for_token(const char *username,
 
 /* The following definitions come from smbd/srvstr.c  */
 
-size_t srvstr_push_fn(const char *function, unsigned int line,
-                     const char *base_ptr, uint16 smb_flags2, void *dest,
+size_t srvstr_push_fn(const char *base_ptr, uint16 smb_flags2, void *dest,
                      const char *src, int dest_len, int flags);
 ssize_t message_push_string(uint8 **outbuf, const char *str, int flags);