aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2018-12-13 09:47:38 -0500
committerAnthony G. Basile <blueness@gentoo.org>2018-12-13 09:48:28 -0500
commitcede3de716079a1a00d95409caf1244f2df1c9d1 (patch)
tree018da4d00bcde14695b11788a49adafc2a6a5790
parentattr/xattr.h is deprecated. Use sys/xattr.h instead (diff)
downloadelfix-cede3de716079a1a00d95409caf1244f2df1c9d1.tar.gz
elfix-cede3de716079a1a00d95409caf1244f2df1c9d1.tar.bz2
elfix-cede3de716079a1a00d95409caf1244f2df1c9d1.zip
src/paxctl-ng.c: return ENOENT if a file is not found
This addresses https://bugs.gentoo.org/672072 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--src/paxctl-ng.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/paxctl-ng.c b/src/paxctl-ng.c
index 25396d4..43718de 100644
--- a/src/paxctl-ng.c
+++ b/src/paxctl-ng.c
@@ -805,6 +805,13 @@ main( int argc, char *argv[])
if((fd = open(argv[fi], O_RDWR)) < 0)
{
+ if(errno == ENOENT) {
+ if(verbose)
+ printf("\topen() failed: file does not exist\n\n");
+ ret |= ENOENT;
+ continue;
+ }
+
rdwr_pt_pax = 0;
#ifdef PTPAX
if(verbose)