From aef8aad638b916026651d900b91e963897b31c1a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 9 Jul 2013 11:02:39 -0700 Subject: 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 Reviewed-by: Jeremy Allison --- source3/smbd/smbd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/smbd/smbd.h') diff --git a/source3/smbd/smbd.h b/source3/smbd/smbd.h index a5b211a678..e76915730d 100644 --- a/source3/smbd/smbd.h +++ b/source3/smbd/smbd.h @@ -73,5 +73,6 @@ struct trans_state { #define UCF_COND_ALLOW_WCARD_LCOMP 0x00000004 #define UCF_POSIX_PATHNAMES 0x00000008 #define UCF_UNIX_NAME_LOOKUP 0x00000010 +#define UCF_CREATING_FILE 0x00000020 #endif /* _SMBD_SMBD_H */ -- cgit