1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00
Stefan Metzmacher 759416582c s3:smbd: only pass UCF_PREP_CREATEFILE to filename_convert() if we may create a new file
This fixes a regression introduced by commit
f98d10af2a05f0261611f4cabdfe274cd9fe91c0
(smbd: Always use UCF_PREP_CREATEFILE for filename_convert calls to resolve a path for open)

The main problem was that Windows client seem to verify
the access to user.V2\ntuser.ini is rejected with NT_STATUS_ACCESS_DENIED,
using the machine credentials.

Passing UCF_PREP_CREATEFILE to filename_convert() triggers a code path
that implements a dropbox behaviour. A dropbox is a directory with only -wx permissions,
so get_real_filename fails with EACCESS, it needs to list the directory.
EACCESS is ignored with UCF_PREP_CREATEFILE.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10297

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 25 05:33:36 CEST 2016 on sn-devel-144
2016-10-25 05:33:36 +02:00
..
2016-07-20 05:21:06 +02:00
2016-08-24 01:33:49 +02:00
2016-07-20 05:21:07 +02:00
2016-07-20 05:21:07 +02:00
2016-09-15 20:21:41 +02:00
2016-10-14 05:31:07 +02:00
2016-05-04 01:28:22 +02:00
2015-10-13 01:23:07 +02:00
2016-05-04 05:00:36 +02:00
2016-05-04 01:28:22 +02:00
2016-03-09 21:51:52 +01:00