Corinna Vinschen
5f7ed4659b
Cygwin: access: Fix X_OK behaviour for backup operators and admins
...
After commit a0933cd17d19, access(_, X_OK) returns 0 if the user
holds SE_BACKUP_PRIVILEGE, even if the file's ACL denies execution
to the user. This is triggered by trying to open the file with
FILE_OPEN_FOR_BACKUP_INTENT.
Fix check_file_access() so it checks for X_OK without specifying
the FILE_OPEN_FOR_BACKUP_INTENT flag if the file is not a directory.
Rearrange function slightly and add comments for easier comprehension.
Fixes: a0933cd17d19 ("Cygwin: access: Correction for samba/SMB share")
Reported-by: Bruno Haible <bruno@clisp.org>
Co-authored-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
(cherry picked from commit 2e4db338ac125579d555aeee516e48588a628a16)
2025-01-08 16:13:51 +01:00
..
2022-08-29 17:53:48 +01:00
2024-12-04 20:55:28 +09:00
2024-12-20 16:39:35 +01:00
2022-08-04 20:54:09 +02:00
2024-12-04 19:08:01 +01:00
2024-01-18 10:53:25 +01:00
2024-12-10 16:57:10 +01:00
2023-04-18 13:43:06 +02:00
2024-12-19 10:47:57 -05:00
2023-03-20 12:58:03 +01:00
2025-01-08 16:13:51 +01:00
2024-12-06 11:43:17 +01:00
2025-01-08 16:13:51 +01:00
2022-12-20 10:19:23 +01:00
2022-08-04 22:13:59 +02:00
2023-08-07 16:04:32 +02:00
2024-06-01 15:35:58 +09:00
2022-12-04 14:01:41 +01:00
2022-10-28 16:26:53 +02:00
2022-05-16 18:17:06 +02:00
2023-02-25 16:12:51 +01:00
2022-08-04 22:13:59 +02:00
2022-08-23 12:09:44 +02:00
2024-01-15 12:52:56 +01:00
2022-10-28 16:26:53 +02:00
2024-04-09 22:30:34 +02:00
2022-08-22 14:38:49 +02:00
2024-07-09 00:02:02 +09:00
2024-07-09 00:02:02 +09:00
2024-01-23 09:49:02 +01:00
2022-05-29 17:54:32 -04:00
2024-01-29 13:33:05 +01:00
2023-11-05 17:01:43 +01:00
2024-02-03 20:03:43 +01:00
2022-08-04 15:16:48 +02:00
2024-12-06 11:43:26 +01:00
2022-07-28 22:00:40 +02:00
2023-03-07 10:51:29 +09:00
2022-05-29 17:45:52 -04:00
2024-11-20 21:34:21 +09:00
2024-01-29 13:33:05 +01:00
2023-09-08 22:34:52 +02:00
2022-05-04 15:08:44 +02:00
2024-03-18 11:10:20 +01:00
2024-02-03 20:03:43 +01:00
2024-03-11 15:29:51 +01:00
2022-07-28 16:38:01 +02:00
2022-08-04 22:13:59 +02:00
2022-05-29 17:45:52 -04:00
2023-08-29 14:17:04 +02:00
2022-08-04 22:13:59 +02:00
2022-05-29 17:54:32 -04:00
2023-11-05 17:01:43 +01:00
2024-11-20 17:12:09 +01:00
2022-05-29 17:45:52 -04:00
2024-01-08 11:45:13 +01:00
2024-08-22 19:58:49 +02:00
2024-08-22 19:58:49 +02:00
2023-06-16 21:44:41 +02:00
2024-02-26 10:04:32 +01:00
2024-04-04 18:22:19 +02:00
2024-08-22 19:58:49 +02:00
2022-06-27 10:54:24 +09:00
2022-08-10 18:11:57 +02:00
2024-10-23 13:25:20 +02:00
2022-08-04 22:13:59 +02:00
2022-08-03 16:01:29 +02:00
2023-11-14 17:52:48 +01:00
2022-12-04 14:01:41 +01:00
2024-11-27 18:08:53 +01:00
2024-08-22 19:58:49 +02:00
2022-08-22 14:28:11 +02:00
2024-12-06 11:43:26 +01:00
2024-12-12 21:40:48 +09:00
2022-08-22 17:58:53 +02:00
2024-10-31 17:42:27 +09:00
2022-06-06 12:00:45 -04:00
2023-08-15 22:34:29 +02:00
2023-03-15 21:44:52 +01:00
2024-12-04 22:56:37 +01:00
2023-08-29 14:17:04 +02:00
2022-08-03 15:35:29 +02:00
2024-11-12 13:09:19 +01:00
2022-08-04 22:13:59 +02:00
2024-02-20 12:30:51 +01:00
2022-08-23 12:09:44 +02:00
2024-09-12 10:57:24 -04:00
2024-02-26 10:04:32 +01:00
2022-12-07 22:22:38 +01:00
2023-06-20 10:06:56 +02:00
2022-08-04 22:13:59 +02:00