[PATCH v3] Cygwin: access: Correction for samba/SMB share
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Dec 10 19:20:08 GMT 2024
On Dec 10 22:45, Takashi Yano wrote:
> Previously, access() and eaccess() does not determine the permissions
> for files on samba/SMB share correctly. Even if the user logs-in as
> the owner of the file, access() and eaccess() referes to others'
> permissions. With this patch, to determine the permissions correctly,
> NtOpenFile() with desired access mask is used.
>
> Fixes: cf762b08cfb0 ("* security.cc (check_file_access): Create.")
> Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
> ---
> winsup/cygwin/sec/base.cc | 119 +++++++-------------------------------
> 1 file changed, 20 insertions(+), 99 deletions(-)
LGTM.
Thanks,
Corinna
More information about the Cygwin-patches
mailing list