smbd: Fix a profile problem
authorVolker Lendecke <Volker.Lendecke@SerNet.DE>
Wed, 28 Aug 2013 22:39:41 +0000 (15:39 -0700)
committerKarolin Seeger <kseeger@samba.org>
Fri, 30 Aug 2013 08:07:19 +0000 (10:07 +0200)
commitb55072ccf8d801726aec49a925f5a69277a10494
treed303a0f41560425b8478dc89f7d32200ee05b567
parent87adc2118677b7cabc3f3b476313b254856f5f9d
smbd: Fix a profile problem

When trying to read a profile, under certain circumstances Windows tries
to read with its machine account first. The profile previously written
was stored with an ACL that only allows access for the user and not
the machine. Windows should get an NT_STATUS_ACCESS_DENIED when using
the machine account, making it retry with the user account (which would
then succeed).

Samba under these circumstances erroneously gives
NT_STATUS_OBJECT_PATH_NOT_FOUND, which makes Windows give up and not
retry. The reasons is the "dropbox" patch in unix_convert, turning EACCESS
on the last path component to OBJECT_PATH_NOT_FOUND. This patch makes
the dropbox behaviour only kick in when we are creating a file. I think
this is an abstraction violation. unix_convert() should not have to know
about the create_disposition, but given that we have pathname resolution
separated from the core open code right now this is the best we can do.

Signed-off-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/smb.h
source3/smbd/filename.c
source3/smbd/nttrans.c
source3/smbd/reply.c
source3/smbd/smb2_create.c