Fix bug #6421 - POSIX read-only open fails on read-only shares.
authorJeremy Allison <jra@samba.org>
Sat, 30 May 2009 20:28:03 +0000 (13:28 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 2 Jun 2009 06:08:15 +0000 (08:08 +0200)
commit838f852ce4d8a88cfafeddf841342692ef7e21a9
tree33f3266912c9c5f9a3b1e20474939eb8c5ded0b4
parent1ca97c39de40f607cdc572551353e2960e90de6e
Fix bug #6421 - POSIX read-only open fails on read-only shares.
The change to smbd/trans2.c opens up
SETFILEINFO calls to POSIX_OPEN only. The change to first smbd/open.c closes 2
holes that would have been exposed by allowing POSIX_OPENS on readonly shares,
and their ability to set arbitrary flags permutations. The O_CREAT ->
O_CREAT|O_EXCL change removes an illegal combination (O_EXCL without O_CREAT)
that previously was being passed down to the open syscall.
Jeremy.
(cherry picked from commit d49ae9c87d182f32702a0b6a1cc2a2038f31d81d)
source3/smbd/open.c
source3/smbd/trans2.c