aboutsummaryrefslogtreecommitdiff
path: root/lib/libskey/authfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libskey/authfile.c')
-rw-r--r--lib/libskey/authfile.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libskey/authfile.c b/lib/libskey/authfile.c
index 32b920a727db7..d93b846e7f3d9 100644
--- a/lib/libskey/authfile.c
+++ b/lib/libskey/authfile.c
@@ -21,6 +21,7 @@
#endif
#include "skey.h"
+#include "pathnames.h"
static int isaddr();
static int rdnets();
@@ -113,9 +114,15 @@ unsigned long host;
char *strtok();
int permit_it = 0;
- fp = fopen("/etc/skey.access", "r");
- if (fp == NULL)
- return 1; /* XXX */
+ /*
+ * If auth file not found, be backwards compatible with standard login
+ * and allow hard coded passwords in from anywhere. Some may consider
+ * this a security hole, but backwards compatibility is more desirable
+ * than others. If you don't like it, change the return value to be zero.
+ */
+ if ((fp = fopen(_PATH_SKEYACCESS, "r")) == NULL)
+ return 1;
+
while (fgets(buf, sizeof(buf), fp), !feof(fp)) {
if (buf[0] == '#')
continue; /* Comment */