Remove fstring from map_username. Create a more sane interface than the called-parame...
[kai/samba.git] / source3 / include / proto.h
index 0c05e6ecc58a2ba79073968a301ec203a083dfb1..3cae5ec94b6c76e2809a96c1b81aeae8320f4647 100644 (file)
@@ -153,7 +153,7 @@ NTSTATUS make_server_info_system(TALLOC_CTX *mem_ctx,
 const struct auth_serversupplied_info *get_server_info_system(void);
 bool copy_current_user(struct current_user *dst, struct current_user *src);
 struct passwd *smb_getpwnam( TALLOC_CTX *mem_ctx, const char *domuser,
-                            fstring save_username, bool create );
+                            char **p_save_username, bool create );
 NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, 
                                const char *sent_nt_username,
                                const char *domain,
@@ -480,6 +480,8 @@ 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  */
@@ -1431,6 +1433,10 @@ 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);
@@ -1768,6 +1774,15 @@ bool cli_state_is_connected(struct cli_state *cli);
 
 /* The following definitions come from libsmb/clifile.c  */
 
+struct tevent_req *cli_setpathinfo_send(TALLOC_CTX *mem_ctx,
+                                       struct tevent_context *ev,
+                                       struct cli_state *cli,
+                                       uint16_t level,
+                                       const char *path,
+                                       uint8_t *data,
+                                       size_t data_len);
+NTSTATUS cli_setpathinfo_recv(struct tevent_req *req);
+
 struct tevent_req *cli_posix_symlink_send(TALLOC_CTX *mem_ctx,
                                        struct event_context *ev,
                                        struct cli_state *cli,
@@ -2143,12 +2158,12 @@ NTSTATUS cli_get_fs_attr_info_recv(struct tevent_req *req, uint32_t *fs_attr);
 NTSTATUS cli_get_fs_attr_info(struct cli_state *cli, uint32_t *fs_attr);
 NTSTATUS cli_get_fs_volume_info(struct cli_state *cli, fstring volume_name,
                                uint32 *pserial_number, time_t *pdate);
-bool cli_get_fs_full_size_info(struct cli_state *cli,
-                               uint64_t *total_allocation_units,
-                               uint64_t *caller_allocation_units,
-                               uint64_t *actual_allocation_units,
-                               uint64_t *sectors_per_allocation_unit,
-                               uint64_t *bytes_per_sector);
+NTSTATUS cli_get_fs_full_size_info(struct cli_state *cli,
+                                  uint64_t *total_allocation_units,
+                                  uint64_t *caller_allocation_units,
+                                  uint64_t *actual_allocation_units,
+                                  uint64_t *sectors_per_allocation_unit,
+                                  uint64_t *bytes_per_sector);
 bool cli_get_posix_fs_info(struct cli_state *cli,
                            uint32 *optimal_transfer_size,
                            uint32 *block_size,
@@ -2178,11 +2193,11 @@ bool unwrap_pac(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, DATA_BLOB *unwrapped_
 /* The following definitions come from libsmb/clilist.c  */
 
 NTSTATUS cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
-                     void (*fn)(const char *, struct file_info *,
+                     NTSTATUS (*fn)(const char *, struct file_info *,
                                 const char *, void *), void *state);
 NTSTATUS cli_list_trans(struct cli_state *cli, const char *mask,
                        uint16_t attribute, int info_level,
-                       void (*fn)(const char *mnt, struct file_info *finfo,
+                       NTSTATUS (*fn)(const char *mnt, struct file_info *finfo,
                                   const char *mask, void *private_data),
                        void *private_data);
 struct tevent_req *cli_list_send(TALLOC_CTX *mem_ctx,
@@ -2194,7 +2209,7 @@ struct tevent_req *cli_list_send(TALLOC_CTX *mem_ctx,
 NTSTATUS cli_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
                       struct file_info **finfo, size_t *num_finfo);
 NTSTATUS cli_list(struct cli_state *cli,const char *Mask,uint16 attribute,
-                 void (*fn)(const char *, struct file_info *, const char *,
+                 NTSTATUS (*fn)(const char *, struct file_info *, const char *,
                             void *), void *state);
 
 /* The following definitions come from libsmb/climessage.c  */
@@ -3404,6 +3419,7 @@ 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 );
@@ -4761,7 +4777,7 @@ const struct mangle_fns *posix_mangle_init(void);
 
 /* The following definitions come from auth/user_util.c  */
 
-bool map_username(fstring user);
+bool map_username(TALLOC_CTX *ctx, const char *user_in, char **p_user_out);
 
 /* The following definitions come from auth/user_krb5.c  */
 struct PAC_LOGON_INFO;
@@ -5065,8 +5081,8 @@ void add_session_user(struct smbd_server_connection *sconn, const char *user);
 void add_session_workgroup(struct smbd_server_connection *sconn,
                           const char *workgroup);
 const char *get_session_workgroup(struct smbd_server_connection *sconn);
-bool user_in_netgroup(const char *user, const char *ngname);
-bool user_in_list(const char *user,const char **list);
+bool user_in_netgroup(TALLOC_CTX *ctx, const char *user, const char *ngname);
+bool user_in_list(TALLOC_CTX *ctx, const char *user,const char **list);
 bool authorise_login(struct smbd_server_connection *sconn,
                     int snum, fstring user, DATA_BLOB password,
                     bool *guest);