s3: VFS: Change SMB_VFS_REMOVEXATTR to use const struct smb_filename * instead of...
[kamenim/samba-autobuild/.git] / source3 / modules / vfs_media_harmony.c
index 2113e0310a11d1cf0b5efb7d7f6093fe559049a4..3c330201f06baf7f3dbd1c48ab2b1247368f9922 100644 (file)
@@ -2281,33 +2281,28 @@ out:
  * In this case, "name" is an attr name.
  */
 static int mh_removexattr(struct vfs_handle_struct *handle,
-               const char *path,
+               const struct smb_filename *smb_fname,
                const char *name)
 {
        int status;
-       char *clientPath;
-       TALLOC_CTX *ctx;
+       struct smb_filename *clientFname = NULL;
 
        DEBUG(MH_INFO_DEBUG, ("Entering mh_removexattr\n"));
-       if (!is_in_media_files(path))
-       {
-               status = SMB_VFS_NEXT_REMOVEXATTR(handle, path, name);
+       if (!is_in_media_files(smb_fname->base_name)) {
+               status = SMB_VFS_NEXT_REMOVEXATTR(handle, smb_fname, name);
                goto out;
        }
 
-       clientPath = NULL;
-       ctx = talloc_tos();
-
-       if ((status = alloc_get_client_path(handle, ctx,
-                               path,
-                               &clientPath)))
-       {
+       status = alloc_get_client_smb_fname(handle,
+                               talloc_tos(),
+                               smb_fname,
+                               &clientFname);
+       if (status != 0) {
                goto err;
        }
-
-       status = SMB_VFS_NEXT_REMOVEXATTR(handle, clientPath, name);
+       status = SMB_VFS_NEXT_REMOVEXATTR(handle, clientFname, name);
 err:
-       TALLOC_FREE(clientPath);
+       TALLOC_FREE(clientFname);
 out:
        return status;
 }