chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
really: Support REALLY_CHECK_FILE_2 for checking multiple files
[chiark-utils.git]
/
cprogs
/
really.c
diff --git
a/cprogs/really.c
b/cprogs/really.c
index b79da8f9c02b8be1f95ca32178f9cbab36c12de7..3183e500746d9196c428f639e56a6a823df62d9e 100644
(file)
--- 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;
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
return -1;
}
#endif