/* 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);
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);
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,
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 */
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 );
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);
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);
/* 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);
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);
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);
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);
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,
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,
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,
/* 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 */
/* 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);
/* The following definitions come from libsmb/namecache.c */
-bool namecache_enable(void);
bool namecache_store(const char *name,
int name_type,
int num_names,
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,
/* 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 */
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 */
/* 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);