mirroring logic in login.c. [patch from David MacKenzie
krb5-appl/913]
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12952
dc483132-0cff-0310-8789-
dd5450dbe970
+2001-01-26 Tom Yu <tlyu@mit.edu>
+
+ * krshd.c: Get path for NOLOGIN file from paths.h if present,
+ mirroring logic in login.c. [patch from David MacKenzie
+ krb5-appl/913]
+
2001-01-23 Tom Yu <tlyu@mit.edu>
* forward.c (rd_and_store_for_creds): Overwrite any existing value
Key_schedule v4_schedule;
#endif
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
+
+#if defined(_PATH_NOLOGIN)
+#define NOLOGIN _PATH_NOLOGIN
+#else
+#define NOLOGIN "/etc/nologin"
+#endif
+
#include "defines.h"
#if HAVE_ARPA_NAMESER_H
goto signout_please;
}
- if (pwd->pw_uid && !access("/etc/nologin", F_OK)) {
+ if (pwd->pw_uid && !access(NOLOGIN, F_OK)) {
error("Logins currently disabled.\n");
goto signout_please;
}