Change uint_t to unsigned int in source4
[ira/wip.git] / source4 / ntvfs / posix / pvfs_setfileinfo.c
index 9fe02a8e175eafad6baa7f7ceaaf5355be0b23e2..b40ae9c9ded2d3662b058ef2f9b9805230989171 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);
@@ -106,7 +108,8 @@ static NTSTATUS pvfs_setfileinfo_rename_stream(struct pvfs_state *pvfs,
 
 
        status = pvfs_stream_rename(pvfs, name, fd, 
-                                   info->rename_information.in.new_name+1);
+                                   info->rename_information.in.new_name+1,
+                                   info->rename_information.in.overwrite);
        return status;
 }
 
@@ -168,7 +171,7 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
        }
 
        /* resolve the new name */
-       status = pvfs_resolve_name(pvfs, name, new_name, 0, &name2);
+       status = pvfs_resolve_name(pvfs, req, new_name, 0, &name2);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }