s3-libsmb: Remove obsolete smb_krb5_locate_kdc.
[kai/samba.git] / source3 / include / libsmb_internal.h
index 6930812b29a0b94ba7feeaf34b4c63dad2d3623c..7f16ab6859b10421fdd6b43bf76c728a6226699c 100644 (file)
@@ -29,6 +29,7 @@
 #define _LIBSMB_INTERNAL_H_
 
 #include "../include/libsmbclient.h"
+#include "libsmb/clirap.h"
 
 #define SMBC_MAX_NAME  1023
 #define SMBC_FILE_MODE (S_IFREG | 0444)
@@ -74,7 +75,7 @@ struct _SMBCSRV {
        bool no_pathinfo;
        bool no_pathinfo2;
         bool no_nt_session;
-        POLICY_HND pol;
+        struct policy_handle pol;
 
        SMBCSRV *next, *prev;
        
@@ -113,18 +114,19 @@ struct SMBC_internal_data {
        /* True when this handle is initialized */
        bool                                    initialized;
 
-        /* dirent pointer location
-         *
+        /* dirent pointer location */
+       struct smbc_dirent                      dirent;
+       /*
          * Leave room for any urlencoded filename and the comment field.
          *
-         * We really should use sizeof(struct smbc_dirent) plus (NAME_MAX * 3)
-         * plus whatever the max length of a comment is, plus a couple of null
-         * terminators (one after the filename, one after the comment).
+        * We use (NAME_MAX * 3) plus whatever the max length of a comment is,
+        * plus a couple of null terminators (one after the filename,
+        * one after the comment).
          *
          * According to <linux/limits.h>, NAME_MAX is 255.  Is it longer
          * anyplace else?
          */
-       char                                    dirent[1024];
+       char                                    _dirent_name[1024];
 
        /*
          * server connection list
@@ -136,11 +138,6 @@ struct SMBC_internal_data {
         */
        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
@@ -175,6 +172,17 @@ struct SMBC_internal_data {
          */
         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 */
@@ -191,6 +199,8 @@ struct SMBC_internal_data {
                 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;
@@ -346,7 +356,7 @@ SMBC_read_ctx(SMBCCTX *context,
 ssize_t
 SMBC_write_ctx(SMBCCTX *context,
                SMBCFILE *file,
-               void *buf,
+               const void *buf,
                size_t count);
 
 int
@@ -356,7 +366,7 @@ SMBC_close_ctx(SMBCCTX *context,
 bool
 SMBC_getatr(SMBCCTX * context,
             SMBCSRV *srv,
-            char *path,
+            const char *path,
             uint16 *mode,
             SMB_OFF_T *size,
             struct timespec *create_time_ts,
@@ -395,16 +405,6 @@ SMBC_errno(SMBCCTX *context,
 
 
 /* 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,
@@ -505,6 +505,18 @@ SMBC_fstat_ctx(SMBCCTX *context,
                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,