vfs: Convert vfs_gpfs_chmod to synthetic_smb_fname
authorVolker Lendecke <vl@samba.org>
Fri, 12 Apr 2013 09:19:26 +0000 (11:19 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Apr 2013 21:49:58 +0000 (14:49 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_gpfs.c

index 4cfbea3aff78cfad8389cce37c71a6d000a43f49..674e101c5837186b6850ee176c6bdd2fd7e6e461 100644 (file)
@@ -1183,10 +1183,12 @@ static int vfs_gpfs_chmod(vfs_handle_struct *handle, const char *path, mode_t mo
 {
        struct smb_filename *smb_fname_cpath;
        int rc;
-       NTSTATUS status;
 
-       status = create_synthetic_smb_fname(
-               talloc_tos(), path, NULL, NULL, &smb_fname_cpath);
+       smb_fname_cpath = synthetic_smb_fname(talloc_tos(), path, NULL, NULL);
+       if (smb_fname_cpath == NULL) {
+               errno = ENOMEM;
+               return -1;
+       }
 
        if (SMB_VFS_NEXT_STAT(handle, smb_fname_cpath) != 0) {
                return -1;