From 7b01e0df4cc90c829b2294a231c61a30f577a5d7 Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Sat, 10 Nov 2012 16:55:05 -0500 Subject: src/paxctl-ng.c: only PT_PAX needs the file open RDWR to set --- src/paxctl-ng.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/paxctl-ng.c b/src/paxctl-ng.c index 61bbcce..83ed15f 100644 --- a/src/paxctl-ng.c +++ b/src/paxctl-ng.c @@ -681,20 +681,20 @@ main( int argc, char *argv[]) if(verbose) printf("%s:\n", argv[fi]); -#ifdef PTPAX if((fd = open(argv[fi], O_RDWR)) < 0) { rdwr_pt_pax = 0; +#ifdef PTPAX if(verbose) printf("\topen(O_RDWR) failed: cannot change PT_PAX flags\n"); +#endif if((fd = open(argv[fi], O_RDONLY)) < 0) { if(verbose) - printf("\topen(O_RDONLY) failed: cannot change PT_PAX flags\n\n"); + printf("\topen(O_RDONLY) failed: cannot read/change PAX flags\n\n"); continue; } } -#endif #ifdef XTPAX if(cp_flags == CREATE_XT_FLAGS_SECURE || cp_flags == CREATE_XT_FLAGS_DEFAULT) -- cgit v1.2.3-65-gdbad