s4-pvfs: rename with full name gives SHARING_VIOLATION
authorAndrew Tridgell <tridge@samba.org>
Sun, 18 Oct 2009 03:15:48 +0000 (14:15 +1100)
committerAndrew Tridgell <tridge@samba.org>
Sun, 18 Oct 2009 04:06:12 +0000 (15:06 +1100)
source4/ntvfs/posix/pvfs_setfileinfo.c

index 244548382ce1018c09247f8096d9f01fb10317fa..c70b44def05839736158aacee4537e0836e08cd7 100644 (file)
@@ -89,8 +89,10 @@ static NTSTATUS pvfs_setfileinfo_rename_stream(struct pvfs_state *pvfs,
        NTSTATUS status;
        struct odb_lock *lck = NULL;
 
+       /* strangely, this gives a sharing violation, not invalid
+          parameter */
        if (info->rename_information.in.new_name[0] != ':') {
-               return NT_STATUS_INVALID_PARAMETER;
+               return NT_STATUS_SHARING_VIOLATION;
        }
 
        status = pvfs_access_check_simple(pvfs, req, name, SEC_FILE_WRITE_ATTRIBUTE);