From: MikeLiu Date: Thu, 26 Oct 2023 08:15:39 +0000 (+0800) Subject: vfs_fruit: ignore ENAMETOOLONG in fruit_unlink_rsrc_adouble() X-Git-Tag: talloc-2.4.2~640 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=88174f48d2ecb1c9ebb74a0eb45c4fa8e20eb923;p=thirdparty%2Fsamba.git 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 --- 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; }