r3729: permission changes on directories always include the FILE_ATTRIBUTE_DIRECTORY bit
authorAndrew Tridgell <tridge@samba.org>
Sun, 14 Nov 2004 09:16:03 +0000 (09:16 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:47 +0000 (13:05 -0500)
source/ntvfs/posix/pvfs_setfileinfo.c

index e54c37741c1cee9e79c0fd3f8c6e60d69c4c4e3f..b9ed592bf4f3f02c4b55a58be148f9ec1cbcee14 100644 (file)
@@ -471,6 +471,7 @@ NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
        }
 
        /* possibly change the attribute */
+       newstats.dos.attrib |= (name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY);
        if (newstats.dos.attrib != name->dos.attrib) {
                mode_t mode = pvfs_fileperms(pvfs, newstats.dos.attrib);
                if (chmod(name->full_name, mode) == -1) {