vfs: Remove type parameter from sys_acl_blob_get_{fd,file}
authorAndrew Bartlett <abartlet@samba.org>
Wed, 10 Oct 2012 05:44:41 +0000 (16:44 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 11 Oct 2012 01:25:11 +0000 (12:25 +1100)
This interface actually needs to match the get_nt_acl interface in
that the system ACL implmenetation may not be posix ACLs, and the blob
is not meant to be enforced to be of a particular system ACL
structure.

Andrew Bartlett

examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/vfs_full_audit.c
source3/modules/vfs_time_audit.c
source3/smbd/vfs.c

index 6dd83bb584c4588b6cee4a659587a533f5207d8c..e66d7aa5cb45c52617d837fb05d257d4edc694b1 100644 (file)
@@ -595,7 +595,7 @@ static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
        return (SMB_ACL_T)NULL;
 }
 
-static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,  const char *path_p, SMB_ACL_TYPE_T type, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob)
+static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,  const char *path_p, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob)
 {
        errno = ENOSYS;
        return -1;
index f8a743e06e7b1248771b845cbb5ea8f3a41ee28c..0c84e19fcd117031442484e10ff6b3ff2407a9ef 100644 (file)
@@ -708,12 +708,12 @@ static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
        return SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp, mem_ctx);
 }
 
-static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,  const char *path_p, SMB_ACL_TYPE_T type,
+static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,  const char *path_p,
                                      TALLOC_CTX *mem_ctx,
                                      char **blob_description, 
                                      DATA_BLOB *blob)
 {
-       return SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, type, mem_ctx, blob_description, blob);
+       return SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, mem_ctx, blob_description, blob);
 }
 
 static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle, files_struct *fsp,
index 2d18265aac1341642a20cbfa69bc757f9be13f2c..2992c1db32167f0db182960b1968d67a51b06eb2 100644 (file)
 /* 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
 
 /*
@@ -701,10 +702,12 @@ struct vfs_fn_pointers {
        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, SMB_ACL_TYPE_T type,      
-                                       TALLOC_CTX *mem_ctx, char **blob_description,
+       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,       
+       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);
@@ -1110,7 +1113,6 @@ SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle,
                                      TALLOC_CTX *mem_ctx);
 int smb_vfs_call_sys_acl_blob_get_file(struct vfs_handle_struct *handle,
                                       const char *path_p,
-                                      SMB_ACL_TYPE_T type,     
                                       TALLOC_CTX *mem_ctx,
                                       char **blob_description,
                                       DATA_BLOB *blob);
index a5ff90bc9d9449229058dd4201c989f40af7a120..331fe001be67e05120b127a16a0f1fdc4d6bd832 100644 (file)
 #define SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp, mem_ctx) \
        smb_vfs_call_sys_acl_get_fd((handle)->next, (fsp), (mem_ctx))
 
-#define SMB_VFS_SYS_ACL_BLOB_GET_FILE(conn, path_p, type, mem_ctx, blob_description, blob)     \
-       smb_vfs_call_sys_acl_blob_get_file((conn)->vfs_handles, (path_p), (type), (mem_ctx), (blob_description), (blob))
-#define SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, type, mem_ctx, blob_description, blob) \
-       smb_vfs_call_sys_acl_blob_get_file((handle)->next, (path_p), (type), (mem_ctx), (blob_description), (blob))
+#define SMB_VFS_SYS_ACL_BLOB_GET_FILE(conn, path_p, mem_ctx, blob_description, blob)   \
+       smb_vfs_call_sys_acl_blob_get_file((conn)->vfs_handles, (path_p), (mem_ctx), (blob_description), (blob))
+#define SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, mem_ctx, blob_description, blob) \
+       smb_vfs_call_sys_acl_blob_get_file((handle)->next, (path_p), (mem_ctx), (blob_description), (blob))
 
 #define SMB_VFS_SYS_ACL_BLOB_GET_FD(fsp, mem_ctx, blob_description, blob)                      \
        smb_vfs_call_sys_acl_blob_get_fd((fsp)->conn->vfs_handles, (fsp), (mem_ctx), (blob_description), (blob))
index be8989cdb52a6cd1c87dcdb23065d38bbf6f836d..b1fb090dc670a24094327e4e5344b8e12773cdf4 100644 (file)
@@ -1835,14 +1835,13 @@ static SMB_ACL_T smb_full_audit_sys_acl_get_fd(vfs_handle_struct *handle,
 
 static int smb_full_audit_sys_acl_blob_get_file(vfs_handle_struct *handle,
                                                const char *path_p,
-                                               SMB_ACL_TYPE_T type,
                                                TALLOC_CTX *mem_ctx,
                                                char **blob_description,
                                                DATA_BLOB *blob)
 {
        int result;
 
-       result = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, type, mem_ctx, blob_description, blob);
+       result = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, mem_ctx, blob_description, blob);
 
        do_log(SMB_VFS_OP_SYS_ACL_BLOB_GET_FILE, (result >= 0), handle,
               "%s", path_p);
index 6ff1a5571d9b321f159e96c6b3212adca99ed2ff..95b4148232b369878c62a599d44d5b70358bddff 100644 (file)
@@ -1818,7 +1818,6 @@ static SMB_ACL_T smb_time_audit_sys_acl_get_fd(vfs_handle_struct *handle,
 
 static int smb_time_audit_sys_acl_blob_get_file(vfs_handle_struct *handle,
                                                const char *path_p,
-                                               SMB_ACL_TYPE_T type,    
                                                TALLOC_CTX *mem_ctx, 
                                                char **blob_description,
                                                DATA_BLOB *blob)
@@ -1828,7 +1827,7 @@ static int smb_time_audit_sys_acl_blob_get_file(vfs_handle_struct *handle,
        double timediff;
 
        clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, type, mem_ctx, blob_description, blob);
+       result = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, mem_ctx, blob_description, blob);
        clock_gettime_mono(&ts2);
        timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
 
index 3a95c588c557c56740f8d59c8d6660f1a8fdd5c6..581a02567ec09342b7c0056b197ebe39afe1b57e 100644 (file)
@@ -2240,13 +2240,12 @@ SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle,
 
 int smb_vfs_call_sys_acl_blob_get_file(struct vfs_handle_struct *handle,
                                       const char *path_p,
-                                      SMB_ACL_TYPE_T type,
                                       TALLOC_CTX *mem_ctx, 
                                       char **blob_description,
                                       DATA_BLOB *blob)
 {
        VFS_FIND(sys_acl_blob_get_file);
-       return handle->fns->sys_acl_blob_get_file_fn(handle, path_p, type, mem_ctx, blob_description, blob);
+       return handle->fns->sys_acl_blob_get_file_fn(handle, path_p, mem_ctx, blob_description, blob);
 }
 
 int smb_vfs_call_sys_acl_blob_get_fd(struct vfs_handle_struct *handle,