s3: VFS: Change SMB_VFS_SYS_ACL_BLOB_GET_FILE to use const struct smb_filename *...
authorJeremy Allison <jra@samba.org>
Wed, 24 May 2017 00:35:59 +0000 (17:35 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 31 May 2017 20:50:22 +0000 (22:50 +0200)
We need to migrate all pathname based VFS calls to use a struct
to finish modernising the VFS with extra timestamp and flags parameters.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
18 files changed:
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/non_posix_acls.c
source3/modules/non_posix_acls.h
source3/modules/vfs_acl_common.c
source3/modules/vfs_afsacl.c
source3/modules/vfs_aixacl2.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_gpfs.c
source3/modules/vfs_nfs4acl_xattr.c
source3/modules/vfs_time_audit.c
source3/modules/vfs_zfsacl.c
source3/smbd/posix_acls.c
source3/smbd/proto.h
source3/smbd/vfs.c
source3/torture/cmd_vfs.c

index b0be73c9c06c68eaa363698d57a416f51a7265f8..8ecd0bef473a819128a7d5c219eefb9198a5048f 100644 (file)
@@ -757,8 +757,10 @@ static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
 }
 
 static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,
 }
 
 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)
+                               const struct smb_filename *smb_fname,
+                               TALLOC_CTX *mem_ctx,
+                               char **blob_description,
+                               DATA_BLOB *blob)
 {
        errno = ENOSYS;
        return -1;
 {
        errno = ENOSYS;
        return -1;
index d103695eebf98e4bbd96c8ba98695ab6adddfe90..82d3c37408c544724a9a4c6fcab694fedcadec7e 100644 (file)
@@ -895,10 +895,12 @@ static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
 }
 
 static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,
 }
 
 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)
+                               const struct smb_filename *smb_fname,
+                               TALLOC_CTX *mem_ctx,
+                               char **blob_description,
+                               DATA_BLOB *blob)
 {
 {
-       return SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, mem_ctx,
+       return SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, smb_fname, mem_ctx,
                                                  blob_description, blob);
 }
 
                                                  blob_description, blob);
 }
 
index 330a819a98ae011eb7e65bec4a73cb5def0a3a1e..e32952a582a20cd371b0cdd90a1463eb7c0ecf42 100644 (file)
                to const struct smb_filename * */
 /* Version 37 - Change sys_acl_get_file from const char *
                to const struct smb_filename * */
                to const struct smb_filename * */
 /* Version 37 - Change sys_acl_get_file from const char *
                to const struct smb_filename * */
+/* Version 37 - Change sys_acl_blob_get_file from const char *
+               to const struct smb_filename * */
 
 #define SMB_VFS_INTERFACE_VERSION 37
 
 
 #define SMB_VFS_INTERFACE_VERSION 37
 
@@ -867,7 +869,7 @@ struct vfs_fn_pointers {
                                       struct files_struct *fsp,
                                       TALLOC_CTX *mem_ctx);
        int (*sys_acl_blob_get_file_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,
+                                       const struct smb_filename *smb_fname,
                                        TALLOC_CTX *mem_ctx,
                                        char **blob_description,
                                        DATA_BLOB *blob);
                                        TALLOC_CTX *mem_ctx,
                                        char **blob_description,
                                        DATA_BLOB *blob);
@@ -1323,7 +1325,7 @@ SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle,
                                      struct files_struct *fsp,
                                      TALLOC_CTX *mem_ctx);
 int smb_vfs_call_sys_acl_blob_get_file(struct vfs_handle_struct *handle,
                                      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,
+                                      const struct smb_filename *smb_fname,
                                       TALLOC_CTX *mem_ctx,
                                       char **blob_description,
                                       DATA_BLOB *blob);
                                       TALLOC_CTX *mem_ctx,
                                       char **blob_description,
                                       DATA_BLOB *blob);
index 68581818d7b8c02f46fb9dcc05d01662c6a63446..0ca601a89ab0f1b6e89841fe8ffa1e854ad1a93d 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_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, 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_FILE(conn, smb_fname, mem_ctx, blob_description, blob)        \
+       smb_vfs_call_sys_acl_blob_get_file((conn)->vfs_handles, (smb_fname), (mem_ctx), (blob_description), (blob))
+#define SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, smb_fname, mem_ctx, blob_description, blob) \
+       smb_vfs_call_sys_acl_blob_get_file((handle)->next, (smb_fname), (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))
 
 #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 8d3be72223d91a3abc1e99fe626f9b649652a92c..45378796caf70b1010f2287396813186faeb10ab 100644 (file)
 #include "modules/non_posix_acls.h"
 
 int non_posix_sys_acl_blob_get_file_helper(vfs_handle_struct *handle,
 #include "modules/non_posix_acls.h"
 
 int non_posix_sys_acl_blob_get_file_helper(vfs_handle_struct *handle,
-                                          const char *path_p,
-                                          DATA_BLOB acl_as_blob,
-                                          TALLOC_CTX *mem_ctx,
-                                          DATA_BLOB *blob)
+                                  const struct smb_filename *smb_fname_in,
+                                  DATA_BLOB acl_as_blob,
+                                  TALLOC_CTX *mem_ctx,
+                                  DATA_BLOB *blob)
 {
        int ret;
        TALLOC_CTX *frame = talloc_stackframe();
        struct xattr_sys_acl_hash_wrapper acl_wrapper = {};
 {
        int ret;
        TALLOC_CTX *frame = talloc_stackframe();
        struct xattr_sys_acl_hash_wrapper acl_wrapper = {};
-       struct smb_filename *smb_fname;
+       struct smb_filename *smb_fname = cp_smb_filename_nostream(frame,
+                                               smb_fname_in);
 
 
-       smb_fname = synthetic_smb_fname(frame, path_p, NULL, NULL, 0);
        if (smb_fname == NULL) {
                TALLOC_FREE(frame);
        if (smb_fname == NULL) {
                TALLOC_FREE(frame);
-               errno = ENOMEM;
                return -1;
        }
 
                return -1;
        }
 
index 6567a317ff79a7631ffa3fa4a9eb1374708db81d..8924810c04d09375d89ac05af2495e215b7b315a 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 int non_posix_sys_acl_blob_get_file_helper(vfs_handle_struct *handle,
 */
 
 int non_posix_sys_acl_blob_get_file_helper(vfs_handle_struct *handle,
-                                          const char *path_p,
+                                          const struct smb_filename *smb_fname,
                                           DATA_BLOB acl_as_blob,
                                           TALLOC_CTX *mem_ctx,
                                           DATA_BLOB *blob);
                                           DATA_BLOB acl_as_blob,
                                           TALLOC_CTX *mem_ctx,
                                           DATA_BLOB *blob);
index fa65fd19cfda4bd6c44172d428bcaa2a2dfc206e..bd1d755c91fc582a635bb13425bb12719a0f41c0 100644 (file)
@@ -711,7 +711,7 @@ static NTSTATUS validate_nt_acl_blob(TALLOC_CTX *mem_ctx,
                } else {
                        /* Get the full underlying sd, then hash. */
                        ret = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle,
                } else {
                        /* Get the full underlying sd, then hash. */
                        ret = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle,
-                                                smb_fname->base_name,
+                                                smb_fname,
                                                 mem_ctx,
                                                 &sys_acl_blob_description,
                                                 &sys_acl_blob);
                                                 mem_ctx,
                                                 &sys_acl_blob_description,
                                                 &sys_acl_blob);
index f34495b87bcd4a80c311a4776f2ea287ccd1dbca..ce789f01375cb6d86b25828e8054542686b4fb96 100644 (file)
@@ -1085,7 +1085,11 @@ static int afsacl_connect(vfs_handle_struct *handle,
 }
 
 /* We don't have a linear form of the AFS ACL yet */
 }
 
 /* We don't have a linear form of the AFS ACL yet */
-static int afsacl_sys_acl_blob_get_file(vfs_handle_struct *handle, const char *path_p, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob)
+static int afsacl_sys_acl_blob_get_file(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       TALLOC_CTX *mem_ctx,
+                       char **blob_description,
+                       DATA_BLOB *blob)
 {
        errno = ENOSYS;
        return -1;
 {
        errno = ENOSYS;
        return -1;
index de5b333423b0f88c36aaff5bf20bb109409f96b7..8613b59ccc6166903d85416c6a43bbd9e5ee0e6b 100644 (file)
@@ -221,16 +221,21 @@ static NTSTATUS aixjfs2_get_nt_acl(vfs_handle_struct *handle,
                                pacl);
 }
 
                                pacl);
 }
 
-static int aixjfs2_sys_acl_blob_get_file(vfs_handle_struct *handle, const char *path_p, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob)
+static int aixjfs2_sys_acl_blob_get_file(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       TALLOC_CTX *mem_ctx,
+                       char **blob_description,
+                       DATA_BLOB *blob)
 {
        struct SMB4ACL_T *pacl = NULL;
 {
        struct SMB4ACL_T *pacl = NULL;
+       const char *path_p = smb_fname->base_name;
        bool    result;
        bool    retryPosix = False;
 
        result = aixjfs2_get_nfs4_acl(mem_ctx, path_p, &pacl, &retryPosix);
        if (retryPosix)
        {
        bool    result;
        bool    retryPosix = False;
 
        result = aixjfs2_get_nfs4_acl(mem_ctx, path_p, &pacl, &retryPosix);
        if (retryPosix)
        {
-               return posix_sys_acl_blob_get_file(handle, path_p, mem_ctx,
+               return posix_sys_acl_blob_get_file(handle, smb_fname, mem_ctx,
                                                   blob_description, blob);
        }
        /* Now way to linarlise NFS4 ACLs at the moment, but the NT ACL is pretty close in this case */
                                                   blob_description, blob);
        }
        /* Now way to linarlise NFS4 ACLs at the moment, but the NT ACL is pretty close in this case */
index 932dbf803a622ede1502ff0383278529fd56751d..6d281d88c901fbf497885bd63ba1bcbd4494e48c 100644 (file)
@@ -2181,17 +2181,18 @@ 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,
 }
 
 static int smb_full_audit_sys_acl_blob_get_file(vfs_handle_struct *handle,
-                                               const char *path_p,
-                                               TALLOC_CTX *mem_ctx,
-                                               char **blob_description,
-                                               DATA_BLOB *blob)
+                               const struct smb_filename *smb_fname,
+                               TALLOC_CTX *mem_ctx,
+                               char **blob_description,
+                               DATA_BLOB *blob)
 {
        int result;
 
 {
        int result;
 
-       result = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, mem_ctx, blob_description, blob);
+       result = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, smb_fname,
+                       mem_ctx, blob_description, blob);
 
        do_log(SMB_VFS_OP_SYS_ACL_BLOB_GET_FILE, (result >= 0), handle,
 
        do_log(SMB_VFS_OP_SYS_ACL_BLOB_GET_FILE, (result >= 0), handle,
-              "%s", path_p);
+              "%s", smb_fname->base_name);
 
        return result;
 }
 
        return result;
 }
index 37568ab6efeecc75621a89c5f035cad48d884c60..87ddf5de4138873d6d2274dfb989fe44861c7538 100644 (file)
@@ -1011,7 +1011,7 @@ static SMB_ACL_T gpfsacl_sys_acl_get_fd(vfs_handle_struct *handle,
 }
 
 static int gpfsacl_sys_acl_blob_get_file(vfs_handle_struct *handle,
 }
 
 static int gpfsacl_sys_acl_blob_get_file(vfs_handle_struct *handle,
-                                     const char *path_p,
+                                     const struct smb_filename *smb_fname,
                                      TALLOC_CTX *mem_ctx,
                                      char **blob_description,
                                      DATA_BLOB *blob)
                                      TALLOC_CTX *mem_ctx,
                                      char **blob_description,
                                      DATA_BLOB *blob)
@@ -1020,13 +1020,14 @@ static int gpfsacl_sys_acl_blob_get_file(vfs_handle_struct *handle,
        struct gpfs_opaque_acl *acl = NULL;
        DATA_BLOB aclblob;
        int result;
        struct gpfs_opaque_acl *acl = NULL;
        DATA_BLOB aclblob;
        int result;
+       const char *path_p = smb_fname->base_name;
 
        SMB_VFS_HANDLE_GET_DATA(handle, config,
                                struct gpfs_config_data,
                                return -1);
 
        if (!config->acl) {
 
        SMB_VFS_HANDLE_GET_DATA(handle, config,
                                struct gpfs_config_data,
                                return -1);
 
        if (!config->acl) {
-               return SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p,
+               return SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, smb_fname,
                                                          mem_ctx,
                                                          blob_description,
                                                          blob);
                                                          mem_ctx,
                                                          blob_description,
                                                          blob);
@@ -1068,7 +1069,7 @@ static int gpfsacl_sys_acl_blob_get_file(vfs_handle_struct *handle,
                        return -1;
                }
 
                        return -1;
                }
 
-               result = non_posix_sys_acl_blob_get_file_helper(handle, path_p,
+               result = non_posix_sys_acl_blob_get_file_helper(handle, smb_fname,
                                                                aclblob,
                                                                mem_ctx, blob);
 
                                                                aclblob,
                                                                mem_ctx, blob);
 
@@ -1077,7 +1078,7 @@ static int gpfsacl_sys_acl_blob_get_file(vfs_handle_struct *handle,
        }
 
        /* fall back to POSIX ACL */
        }
 
        /* fall back to POSIX ACL */
-       return posix_sys_acl_blob_get_file(handle, path_p, mem_ctx,
+       return posix_sys_acl_blob_get_file(handle, smb_fname, mem_ctx,
                                           blob_description, blob);
 }
 
                                           blob_description, blob);
 }
 
index 3975f80a9416ad6e0a906f92648ef9834ea685c4..a0c4af7ec6b418c93f4a8bc9a66a4d556b960e83 100644 (file)
@@ -620,7 +620,11 @@ static int nfs4acl_xattr_fail__sys_acl_delete_def_file(vfs_handle_struct *handle
        return -1;
 }
 
        return -1;
 }
 
-static int nfs4acl_xattr_fail__sys_acl_blob_get_file(vfs_handle_struct *handle, const char *path_p, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob)
+static int nfs4acl_xattr_fail__sys_acl_blob_get_file(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       TALLOC_CTX *mem_ctx,
+                       char **blob_description,
+                       DATA_BLOB *blob)
 {
        return -1;
 }
 {
        return -1;
 }
index 033dabe46712e15f9402fa603d50a0a37dcaaedb..d62df373269df6be765f80dd561e1fcfecdbd354 100644 (file)
@@ -2213,17 +2213,18 @@ 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,
 
 
 static int smb_time_audit_sys_acl_blob_get_file(vfs_handle_struct *handle,
-                                               const char *path_p,
-                                               TALLOC_CTX *mem_ctx, 
-                                               char **blob_description,
-                                               DATA_BLOB *blob)
+                               const struct smb_filename *smb_fname,
+                               TALLOC_CTX *mem_ctx,
+                               char **blob_description,
+                               DATA_BLOB *blob)
 {
        int result;
        struct timespec ts1,ts2;
        double timediff;
 
        clock_gettime_mono(&ts1);
 {
        int result;
        struct timespec ts1,ts2;
        double timediff;
 
        clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, path_p, mem_ctx, blob_description, blob);
+       result = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, smb_fname,
+                               mem_ctx, blob_description, blob);
        clock_gettime_mono(&ts2);
        timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
 
        clock_gettime_mono(&ts2);
        timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
 
index 57e4182aff7e8094091b0901c1c04850f4e32615..cf341da371e84b0408bc36fc57e5218f6e41965c 100644 (file)
@@ -319,7 +319,11 @@ static int zfsacl_fail__sys_acl_delete_def_file(vfs_handle_struct *handle,
        return -1;
 }
 
        return -1;
 }
 
-static int zfsacl_fail__sys_acl_blob_get_file(vfs_handle_struct *handle, const char *path_p, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob)
+static int zfsacl_fail__sys_acl_blob_get_file(vfs_handle_struct *handle,
+                       const struct smb_filename *smb_fname,
+                       TALLOC_CTX *mem_ctx,
+                       char **blob_description,
+                       DATA_BLOB *blob)
 {
        return -1;
 }
 {
        return -1;
 }
index 4f0540b90a54e0468f842ed89e3662d0fcba68c6..07e0584003cec28125d674ff38a0f6de4751b400 100644 (file)
@@ -4734,7 +4734,7 @@ NTSTATUS get_nt_acl_no_snum(TALLOC_CTX *ctx, const char *fname,
 }
 
 int posix_sys_acl_blob_get_file(vfs_handle_struct *handle,
 }
 
 int posix_sys_acl_blob_get_file(vfs_handle_struct *handle,
-                               const char *path_p,
+                               const struct smb_filename *smb_fname_in,
                                TALLOC_CTX *mem_ctx,
                                char **blob_description,
                                DATA_BLOB *blob)
                                TALLOC_CTX *mem_ctx,
                                char **blob_description,
                                DATA_BLOB *blob)
@@ -4745,9 +4745,8 @@ int posix_sys_acl_blob_get_file(vfs_handle_struct *handle,
        struct smb_acl_wrapper acl_wrapper = {
                NULL
        };
        struct smb_acl_wrapper acl_wrapper = {
                NULL
        };
-       struct smb_filename *smb_fname;
-
-       smb_fname = synthetic_smb_fname(frame, path_p, NULL, NULL, 0);
+       struct smb_filename *smb_fname = cp_smb_filename_nostream(frame,
+                                               smb_fname_in);
        if (smb_fname == NULL) {
                TALLOC_FREE(frame);
                errno = ENOMEM;
        if (smb_fname == NULL) {
                TALLOC_FREE(frame);
                errno = ENOMEM;
@@ -4810,8 +4809,11 @@ int posix_sys_acl_blob_get_fd(vfs_handle_struct *handle,
 
        /* This ensures that we also consider the default ACL */
        if (fsp->is_directory ||  fsp->fh->fd == -1) {
 
        /* This ensures that we also consider the default ACL */
        if (fsp->is_directory ||  fsp->fh->fd == -1) {
-               return posix_sys_acl_blob_get_file(handle, fsp->fsp_name->base_name,
-                                                  mem_ctx, blob_description, blob);
+               return posix_sys_acl_blob_get_file(handle,
+                                               fsp->fsp_name,
+                                               mem_ctx,
+                                               blob_description,
+                                               blob);
        }
        frame = talloc_stackframe();
 
        }
        frame = talloc_stackframe();
 
index 556fb6b2f5bb30a237abf1ab9114cdce94705475..06d2461839bd6b85d4a978e3fb7a36765320c0b7 100644 (file)
@@ -800,7 +800,7 @@ NTSTATUS get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname,
                             uint32_t security_info_wanted,
                             struct security_descriptor **sd);
 int posix_sys_acl_blob_get_file(vfs_handle_struct *handle,
                             uint32_t security_info_wanted,
                             struct security_descriptor **sd);
 int posix_sys_acl_blob_get_file(vfs_handle_struct *handle,
-                               const char *path_p,
+                               const struct smb_filename *smb_fname,
                                TALLOC_CTX *mem_ctx,
                                char **blob_description,
                                DATA_BLOB *blob);
                                TALLOC_CTX *mem_ctx,
                                char **blob_description,
                                DATA_BLOB *blob);
index 82d0485416ebd070c5017be2bea48e03f083a035..8dd84a21eda87a1655ea3e771a2b21e9a41b492e 100644 (file)
@@ -2458,13 +2458,14 @@ 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,
 }
 
 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)
+                               const struct smb_filename *smb_fname,
+                               TALLOC_CTX *mem_ctx,
+                               char **blob_description,
+                               DATA_BLOB *blob)
 {
        VFS_FIND(sys_acl_blob_get_file);
 {
        VFS_FIND(sys_acl_blob_get_file);
-       return handle->fns->sys_acl_blob_get_file_fn(handle, path_p, mem_ctx, blob_description, blob);
+       return handle->fns->sys_acl_blob_get_file_fn(handle, smb_fname,
+                       mem_ctx, blob_description, blob);
 }
 
 int smb_vfs_call_sys_acl_blob_get_fd(struct vfs_handle_struct *handle,
 }
 
 int smb_vfs_call_sys_acl_blob_get_fd(struct vfs_handle_struct *handle,
index 390cffa34e4077e5029f73ac4f9eca29fc0ba951..0bb2903597284c5301f1f3b2db3c40aa2beb8ea1 100644 (file)
@@ -1718,13 +1718,20 @@ static NTSTATUS cmd_sys_acl_blob_get_file(struct vfs_state *vfs,
        DATA_BLOB blob;
        int ret;
        size_t i;
        DATA_BLOB blob;
        int ret;
        size_t i;
+       struct smb_filename *smb_fname = NULL;
 
        if (argc != 2) {
                printf("Usage: sys_acl_get_file <path>\n");
                return NT_STATUS_OK;
        }
 
 
        if (argc != 2) {
                printf("Usage: sys_acl_get_file <path>\n");
                return NT_STATUS_OK;
        }
 
-       ret = SMB_VFS_SYS_ACL_BLOB_GET_FILE(vfs->conn, argv[1], talloc_tos(),
+       smb_fname = synthetic_smb_fname_split(talloc_tos(),
+                                       argv[1],
+                                       lp_posix_pathnames());
+       if (smb_fname == NULL) {
+               return NT_STATUS_NO_MEMORY;
+       }
+       ret = SMB_VFS_SYS_ACL_BLOB_GET_FILE(vfs->conn, smb_fname, talloc_tos(),
                                            &description, &blob);
        if (ret != 0) {
                printf("sys_acl_blob_get_file failed (%s)\n", strerror(errno));
                                            &description, &blob);
        if (ret != 0) {
                printf("sys_acl_blob_get_file failed (%s)\n", strerror(errno));