From 88174f48d2ecb1c9ebb74a0eb45c4fa8e20eb923 Mon Sep 17 00:00:00 2001 From: MikeLiu Date: Thu, 26 Oct 2023 16:15:39 +0800 Subject: [PATCH] vfs_fruit: ignore ENAMETOOLONG in fruit_unlink_rsrc_adouble() adouble_path() inside fruit_unlink_rsrc_adouble() prepend "._" to a basename, lenth of apple double filename will exceed NAME_MAX if length of basename is equal to NAME_MAX (or NAME_MAX-1). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15504 Signed-off-by: MikeLiu Reviewed-by: Volker Lendecke Reviewed-by: Ralph Boehme Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Fri Nov 17 11:07:01 UTC 2023 on atb-devel-224 --- source3/modules/vfs_fruit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index b510b04aea6..b3dd6016ae3 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -2110,7 +2110,7 @@ static int fruit_unlink_rsrc_adouble(vfs_handle_struct *handle, adp_smb_fname, 0); TALLOC_FREE(adp_smb_fname); - if ((rc != 0) && (errno == ENOENT) && force_unlink) { + if ((rc != 0) && (errno == ENOENT || errno == ENAMETOOLONG) && force_unlink) { rc = 0; } -- 2.47.3