From 2723295f3f7249c2151b5338986d73be7e962f0c Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 26 Jan 2001 22:54:40 +0000 Subject: [PATCH] * krshd.c: Get path for NOLOGIN file from paths.h if present, 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 --- src/appl/bsd/ChangeLog | 6 ++++++ src/appl/bsd/krshd.c | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 182bf0d2d..95032af37 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,9 @@ +2001-01-26 Tom Yu + + * 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 * forward.c (rd_and_store_for_creds): Overwrite any existing value diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c index b2b490902..2742066a7 100644 --- a/src/appl/bsd/krshd.c +++ b/src/appl/bsd/krshd.c @@ -160,6 +160,16 @@ char copyright[] = Key_schedule v4_schedule; #endif +#ifdef HAVE_PATHS_H +#include +#endif + +#if defined(_PATH_NOLOGIN) +#define NOLOGIN _PATH_NOLOGIN +#else +#define NOLOGIN "/etc/nologin" +#endif + #include "defines.h" #if HAVE_ARPA_NAMESER_H @@ -1119,7 +1129,7 @@ void doit(f, fromp) 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; } -- 2.26.2