pvfs_setfileinfo_rename: map DELETE_PENDING to ACCESS_DENIED
authorStefan Metzmacher <metze@samba.org>
Tue, 26 Feb 2008 08:14:54 +0000 (09:14 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 26 Feb 2008 08:31:20 +0000 (09:31 +0100)
This is needed as odb_can_open/pvfs_can_delete changed the return value.

metze

source/ntvfs/posix/pvfs_setfileinfo.c

index fbbb8c2d4baeb3b1ab85a5c5171377d7add6ddee..c6d014a72f6dc14299a0a302a0c485b56f4d725a 100644 (file)
@@ -152,6 +152,9 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
                }
 
                status = pvfs_can_delete(pvfs, req, name2, NULL);
+               if (NT_STATUS_EQUAL(status, NT_STATUS_DELETE_PENDING)) {
+                       return NT_STATUS_ACCESS_DENIED;
+               }
                if (NT_STATUS_EQUAL(status, NT_STATUS_SHARING_VIOLATION)) {
                        return NT_STATUS_ACCESS_DENIED;
                }