From a6dcfabce3d96975975a1ac65ab1ef80187e6549 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 12 Aug 2019 10:51:00 +0100 Subject: [PATCH] really: Invert logic in REALLY_CHECK_FILE checkroot This will make it possible to check for a 2nd file. No functional change. Reviewed-by: Clare Boothby Signed-off-by: Ian Jackson --- cprogs/really.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cprogs/really.c b/cprogs/really.c index ef2fb64..b79da8f 100644 --- a/cprogs/really.c +++ b/cprogs/really.c @@ -101,9 +101,9 @@ static const struct cmdinfo cmdinfos[]= { #ifdef REALLY_CHECK_FILE static int checkroot(void) { int r; - r= access(REALLY_CHECK_FILE,W_OK); - if (r) return -1; - return 0; + r= access(REALLY_CHECK_FILE, W_OK); + if (!r) return 0; + return -1; } #endif #ifdef REALLY_CHECK_GID -- 2.30.2