From: Ian Jackson Date: Mon, 12 Aug 2019 09:52:28 +0000 (+0100) Subject: really: Support REALLY_CHECK_FILE_2 for checking multiple files X-Git-Tag: archive/debian/6.1.1~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=69107a4cfd770f48ea0ca987004ef1f3297d596b;p=chiark-utils.git really: Support REALLY_CHECK_FILE_2 for checking multiple files Only works if REALLY_CHECK_FILE is defined too. Signed-off-by: Ian Jackson --- 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