From d8dc0f407895f9be95a801528624b11665dbc585 Mon Sep 17 00:00:00 2001 From: wenyuzifang Date: Mon, 27 Oct 2025 15:19:57 +0800 Subject: [PATCH] Update code from upstream --- nfs4-acl-tools-0.4.2-acl-ptr-null.patch | 25 +++++++++++++++++++++++++ nfs4-acl-tools.spec | 9 ++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 nfs4-acl-tools-0.4.2-acl-ptr-null.patch diff --git a/nfs4-acl-tools-0.4.2-acl-ptr-null.patch b/nfs4-acl-tools-0.4.2-acl-ptr-null.patch new file mode 100644 index 0000000..8fc49f4 --- /dev/null +++ b/nfs4-acl-tools-0.4.2-acl-ptr-null.patch @@ -0,0 +1,25 @@ +commit ea0d882fa8c226ac27be4651f9550aa17d75462a +Author: Steve Dickson +Date: Mon Nov 21 14:07:58 2022 -0500 + + nfs4_getfacl: Initialize acl pointer to NULL + + nfs4_getfacl.c: scope_hint: In function 'print_acl_from_path' + nfs4_getfacl.c:168:17: warning[-Wmaybe-uninitialized]: + 'acl' may be used uninitialized in this function + + Signed-off-by: Steve Dickson + +diff --git a/nfs4_getfacl/nfs4_getfacl.c b/nfs4_getfacl/nfs4_getfacl.c +index 954cf7e..ddb3005 100644 +--- a/nfs4_getfacl/nfs4_getfacl.c ++++ b/nfs4_getfacl/nfs4_getfacl.c +@@ -148,7 +148,7 @@ out: + + static void print_acl_from_path(const char *fpath, enum acl_type type) + { +- struct nfs4_acl *acl; ++ struct nfs4_acl *acl = NULL; + + switch (type) { + case ACL_TYPE_ACL: diff --git a/nfs4-acl-tools.spec b/nfs4-acl-tools.spec index 0a0693c..86fb1a7 100644 --- a/nfs4-acl-tools.spec +++ b/nfs4-acl-tools.spec @@ -1,12 +1,13 @@ -%define anolis_release 2 +%define anolis_release 3 Name: nfs4-acl-tools -Version: 0.4.2 +Version: 0.4.2 Release: %{anolis_release}%{?dist} Summary: The nfs4 ACL tools License: BSD URL: http://git.linux-nfs.org/?p=bfields/nfs4-acl-tools.git;a=summary -Source0: http://linux-nfs.org/~steved/nfs4-acl-tools/%{name}-%{version}.tar.gz +Source0: http://linux-nfs.org/~bfields/nfs4-acl-tools/nfs4-acl-tools-0.4.2.tar.gz +Patch1: nfs4-acl-tools-0.4.2-acl-ptr-null.patch BuildRequires: make libtool libattr-devel @@ -54,6 +55,8 @@ make DESTDIR=%{buildroot} install %doc README TODO %changelog +* Mon Oct 27 2025 wenyuzifang - 0.4.2-3 +- Initialize the acl pointer to prevent undefined behavior and eliminate compiler warnings * Mon Dec 25 2023 Xiaoping Liu - 0.4.2-2 - rebuild -- Gitee