vfs: Remove type parameter from sys_acl_blob_get_{fd,file}
[kai/samba.git] / source3 / include / vfs.h
index 3e4eefef775bae11907192913cd1993647694d27..2992c1db32167f0db182960b1968d67a51b06eb2 100644 (file)
 /* Leave at 29 - not yet released. Remove sys_acl functions other than set and get - abartlet */
 /* Leave at 29 - not yet released. Added backup_intent bool to files_struct - JRA */
 /* Leave at 29 - not yet released. Add durable handle functions - metze/obnox */
-#define SMB_VFS_INTERFACE_VERSION 29
+/* Leave at 29 - not yet released. Added sys_acl_blob_get_file and sys_acl_blob_get_fd */
+/* Bump to version 30 - Samba 4.0.0 will ship with interface version 30 */
+/* Leave at 30 - not yet released. Added conn->cwd to save vfs_GetWd() calls. */
+/* Leave at 30 - not yet released. Changed sys_acl_blob_get_file interface to remove type */
+#define SMB_VFS_INTERFACE_VERSION 30
 
 /*
     All intercepted VFS operations must be declared as static functions inside module source
@@ -313,6 +317,7 @@ typedef struct connection_struct {
        enum timestamp_set_resolution ts_res;
        char *connectpath;
        char *origpath;
+       char *cwd; /* Working directory. */
 
        struct vfs_handle_struct *vfs_handles;          /* for the new plugins */
 
@@ -667,10 +672,12 @@ struct vfs_fn_pointers {
        NTSTATUS (*fget_nt_acl_fn)(struct vfs_handle_struct *handle,
                                   struct files_struct *fsp,
                                   uint32 security_info,
+                                  TALLOC_CTX *mem_ctx,
                                   struct security_descriptor **ppdesc);
        NTSTATUS (*get_nt_acl_fn)(struct vfs_handle_struct *handle,
                                  const char *name,
                                  uint32 security_info,
+                                  TALLOC_CTX *mem_ctx,
                                  struct security_descriptor **ppdesc);
        NTSTATUS (*fset_nt_acl_fn)(struct vfs_handle_struct *handle,
                                   struct files_struct *fsp,
@@ -688,8 +695,21 @@ struct vfs_fn_pointers {
        int (*chmod_acl_fn)(struct vfs_handle_struct *handle, const char *name, mode_t mode);
        int (*fchmod_acl_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode);
 
-       SMB_ACL_T (*sys_acl_get_file_fn)(struct vfs_handle_struct *handle, const char *path_p, SMB_ACL_TYPE_T type);
-       SMB_ACL_T (*sys_acl_get_fd_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp);
+       SMB_ACL_T (*sys_acl_get_file_fn)(struct vfs_handle_struct *handle,
+                                        const char *path_p,
+                                        SMB_ACL_TYPE_T type,
+                                        TALLOC_CTX *mem_ctx);
+       SMB_ACL_T (*sys_acl_get_fd_fn)(struct vfs_handle_struct *handle,
+                                      struct files_struct *fsp,
+                                      TALLOC_CTX *mem_ctx);
+       int (*sys_acl_blob_get_file_fn)(struct vfs_handle_struct *handle,
+                                       const char *path_p,
+                                       TALLOC_CTX *mem_ctx,
+                                       char **blob_description,
+                                       DATA_BLOB *blob);
+       int (*sys_acl_blob_get_fd_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp,
+                                     TALLOC_CTX *mem_ctx, char **blob_description,
+                                     DATA_BLOB *blob);
        int (*sys_acl_set_file_fn)(struct vfs_handle_struct *handle, const char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
        int (*sys_acl_set_fd_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_T theacl);
        int (*sys_acl_delete_def_file_fn)(struct vfs_handle_struct *handle, const char *path);
@@ -1064,10 +1084,12 @@ NTSTATUS smb_vfs_call_fsctl(struct vfs_handle_struct *handle,
 NTSTATUS smb_vfs_call_fget_nt_acl(struct vfs_handle_struct *handle,
                                  struct files_struct *fsp,
                                  uint32 security_info,
+                                 TALLOC_CTX *mem_ctx,
                                  struct security_descriptor **ppdesc);
 NTSTATUS smb_vfs_call_get_nt_acl(struct vfs_handle_struct *handle,
                                 const char *name,
                                 uint32 security_info,
+                                TALLOC_CTX *mem_ctx,
                                 struct security_descriptor **ppdesc);
 NTSTATUS smb_vfs_call_fset_nt_acl(struct vfs_handle_struct *handle,
                                  struct files_struct *fsp,
@@ -1084,9 +1106,21 @@ int smb_vfs_call_fchmod_acl(struct vfs_handle_struct *handle,
                            struct files_struct *fsp, mode_t mode);
 SMB_ACL_T smb_vfs_call_sys_acl_get_file(struct vfs_handle_struct *handle,
                                        const char *path_p,
-                                       SMB_ACL_TYPE_T type);
+                                       SMB_ACL_TYPE_T type,
+                                       TALLOC_CTX *mem_ctx);
 SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle,
-                                     struct files_struct *fsp);
+                                     struct files_struct *fsp,
+                                     TALLOC_CTX *mem_ctx);
+int smb_vfs_call_sys_acl_blob_get_file(struct vfs_handle_struct *handle,
+                                      const char *path_p,
+                                      TALLOC_CTX *mem_ctx,
+                                      char **blob_description,
+                                      DATA_BLOB *blob);
+int smb_vfs_call_sys_acl_blob_get_fd(struct vfs_handle_struct *handle,
+                                    struct files_struct *fsp,  
+                                    TALLOC_CTX *mem_ctx,
+                                    char **blob_description,
+                                    DATA_BLOB *blob);
 int smb_vfs_call_sys_acl_set_file(struct vfs_handle_struct *handle,
                                  const char *name, SMB_ACL_TYPE_T acltype,
                                  SMB_ACL_T theacl);