Fix bug #7733 - Invalid client DOS attributes on create can cause incorrect unix...
commit459613222a6d3c3b7a6b8c6c3184e67b25af537c
authorJeremy Allison <jra@samba.org>
Fri, 15 Oct 2010 20:30:07 +0000 (15 13:30 -0700)
committerKarolin Seeger <kseeger@samba.org>
Sat, 5 Mar 2011 13:34:36 +0000 (5 14:34 +0100)
treecba676575077e8ef1f0685faed3791fb3e06de8d
parent56628b08a587c31ba4031dfaac64057b06452ac1
Fix bug #7733 - Invalid client DOS attributes on create can cause incorrect unix mode_t to be generated.

It turns out a client can send an NTCreateX call for a new file, but specify
FILE_ATTRIBUTE_DIRECTORY in the attribute list. Windows silently strips this,
but we don't - causing the unix_mode() function to go through the "mode bits
for new directory" codepath, instead of the "mode bits for new file" codepath.

Jeremy.
(cherry picked from commit 92adb686372a9b67e47efb5b051bc351212f1780)
(cherry picked from commit 6b4141e92151adaa0d2ef036657783a99ef517c6)
source3/smbd/open.c