From 69107a4cfd770f48ea0ca987004ef1f3297d596b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 12 Aug 2019 10:52:28 +0100 Subject: [PATCH] really: Support REALLY_CHECK_FILE_2 for checking multiple files Only works if REALLY_CHECK_FILE is defined too. Signed-off-by: Ian Jackson --- cprogs/really.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cprogs/really.c b/cprogs/really.c index b79da8f..3183e50 100644 --- a/cprogs/really.c +++ b/cprogs/really.c @@ -103,6 +103,11 @@ static int checkroot(void) { int r; r= access(REALLY_CHECK_FILE, W_OK); if (!r) return 0; +#ifdef REALLY_CHECK_FILE_2 + r= access(REALLY_CHECK_FILE_2, W_OK); + if (!r) return 0; + /* If all fails we return the errno from file _2 */ +#endif REALLY_CHECK_FILE_2 return -1; } #endif -- 2.30.2