Date: Thu, 5 Sep 2024 14:50:38 GMT From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 82fd9219755d - stable/14 - sys: Mark ACL conversion routines as __result_use_check Message-ID: <202409051450.485Eocuw076449@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=82fd9219755dac73e51289493e1f024b32bbb2cd commit 82fd9219755dac73e51289493e1f024b32bbb2cd Author: Pierre Pronchery <pierre@freebsdfoundation.org> AuthorDate: 2024-08-09 17:37:38 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-09-05 14:50:09 +0000 sys: Mark ACL conversion routines as __result_use_check Both acl_copy_oldacl_into_acl() and acl_copy_acl_into_oldacl() may fail in some circumstances (e.g., acl.acl_cnt exceeding the capacity of OLDACL_MAX_ENTRIES). This change marks both routines with __result_use_check, enforcing check for errors by the caller. Suggested by: markj Reviewed by: markj, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46254 (cherry picked from commit ef9fc9609a1ff53047577aa7cf51246fc04c954b) --- sys/sys/acl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/acl.h b/sys/sys/acl.h index f679808dceca..b0d76404fffa 100644 --- a/sys/sys/acl.h +++ b/sys/sys/acl.h @@ -307,9 +307,9 @@ void acl_nfs4_compute_inherited_acl( const struct acl *parent_aclp, struct acl *child_aclp, mode_t mode, int file_owner_id, int is_directory); -int acl_copy_oldacl_into_acl(const struct oldacl *source, +int __result_use_check acl_copy_oldacl_into_acl(const struct oldacl *source, struct acl *dest); -int acl_copy_acl_into_oldacl(const struct acl *source, +int __result_use_check acl_copy_acl_into_oldacl(const struct acl *source, struct oldacl *dest); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409051450.485Eocuw076449>