Fix bug #8144 - touch /mnt/newfile fails to set timestamp with CIFS client.
commit70967f9498fd23727228ed513547d4820f6dbe45
authorJeremy Allison <jra@samba.org>
Tue, 17 May 2011 23:18:51 +0000 (17 16:18 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 7 Jun 2011 17:59:40 +0000 (7 19:59 +0200)
tree14b2ec95129cbd9d6d496377dc9d40331754cc70
parentc26bc6b3019b465af23d8794487bf9e5623037e4
Fix bug #8144 - touch /mnt/newfile fails to set timestamp with CIFS client.

The extra checks added for Windows correctness in our metadata changing paths
to ensure the file handle has been opened with the correct access mask to
allow FILE_WRITE_ATTRIBUTES etc. caused problems with the POSIX open code.

The old POSIX open code maped O_RDONLY into FILE_READ, O_WRONLY into FILE_WRITE,
and O_RDWR into FILE_READ|FILE_WRITE. This patch extends the mapping to add
FILE_WRITE_ATTRIBUTES, FILE_READ_ATTRIBUTES and FILE_WRITE_EA, FILE_READ_EA to
allow POSIX opens to set these values.
(cherry picked from commit d68dbed16939a4ba04435f7dad490d0a9fa60bdb)
source3/smbd/trans2.c