#define _LIBSMB_INTERNAL_H_
#include "../include/libsmbclient.h"
+#include "libsmb/clirap.h"
#define SMBC_MAX_NAME 1023
#define SMBC_FILE_MODE (S_IFREG | 0444)
*/
typedef struct DOS_ATTR_DESC {
int mode;
- SMB_OFF_T size;
+ off_t size;
time_t create_time;
time_t access_time;
time_t write_time;
SMB_INO_T inode;
} DOS_ATTR_DESC;
+/*
+ * Extension of libsmbclient.h's #defines
+ */
+#define SMB_CTX_FLAG_USE_NT_HASH (1 << 4)
/*
* Internal flags for extended attributes
bool no_pathinfo;
bool no_pathinfo2;
bool no_nt_session;
- POLICY_HND pol;
+ struct policy_handle pol;
SMBCSRV *next, *prev;
struct _SMBCFILE {
int cli_fd;
char *fname;
- SMB_OFF_T offset;
+ off_t offset;
struct _SMBCSRV *srv;
bool file;
struct smbc_dir_list *dir_list, *dir_end, *dir_next;
*/
SMBCFILE * files;
- /*
- * Log to standard error instead of the more typical standard output
- */
- bool debug_stderr;
-
/*
* Support "Create Time" in get/set with the *xattr() functions, if
* true. This replaces the dos attribute strings C_TIME, A_TIME and
*/
smbc_smb_encrypt_level smb_encryption_level;
+ /*
+ * Should we request case sensitivity of file names?
+ */
+ bool case_sensitive;
+
+ /*
+ * Auth info needed for DFS traversal.
+ */
+
+ struct user_auth_info *auth_info;
+
struct smbc_server_cache * server_cache;
/* POSIX emulation functions */
smbc_stat_fn stat_fn;
smbc_fstat_fn fstat_fn;
#endif
+ smbc_statvfs_fn statvfs_fn;
+ smbc_fstatvfs_fn fstatvfs_fn;
smbc_ftruncate_fn ftruncate_fn;
#if 0 /* Left in libsmbclient.h for backward compatibility */
smbc_close_fn close_fn;
bool
SMBC_getatr(SMBCCTX * context,
SMBCSRV *srv,
- char *path,
+ const char *path,
uint16 *mode,
- SMB_OFF_T *size,
+ off_t *size,
struct timespec *create_time_ts,
struct timespec *access_time_ts,
struct timespec *write_time_ts,
/* Functions in libsmb_path.c */
-int
-SMBC_urldecode(char *dest,
- char *src,
- size_t max_dest_len);
-
-int
-SMBC_urlencode(char *dest,
- char *src,
- int max_dest_len);
-
int
SMBC_parse_path(TALLOC_CTX *ctx,
SMBCCTX *context,
SMBC_remove_unused_server(SMBCCTX * context,
SMBCSRV * srv);
-void
-SMBC_call_auth_fn(TALLOC_CTX *ctx,
- SMBCCTX *context,
- const char *server,
- const char *share,
- char **pp_workgroup,
- char **pp_username,
- char **pp_password);
-
void
SMBC_get_auth_data(const char *server, const char *share,
char *workgroup_buf, int workgroup_buf_len,
struct stat *st);
+int
+SMBC_statvfs_ctx(SMBCCTX *context,
+ char *path,
+ struct statvfs *st);
+
+
+int
+SMBC_fstatvfs_ctx(SMBCCTX *context,
+ SMBCFILE *file,
+ struct statvfs *st);
+
+
/* Functions in libsmb_xattr.c */
int
SMBC_setxattr_ctx(SMBCCTX *context,