diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -89,10 +89,6 @@ RCSID("$OpenBSD: session.c,v 1.56 2001/02/16 14:03:43 markus Exp $"); | |||
89 | # define S_UNOFILE_HARD S_UNOFILE "_hard" | 89 | # define S_UNOFILE_HARD S_UNOFILE "_hard" |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | #ifdef HAVE_LOGIN_CAP | ||
93 | #include <login_cap.h> | ||
94 | #endif | ||
95 | |||
96 | /* types */ | 92 | /* types */ |
97 | 93 | ||
98 | #define TTYSZ 64 | 94 | #define TTYSZ 64 |
@@ -1071,6 +1067,13 @@ do_child(const char *command, struct passwd * pw, const char *term, | |||
1071 | perror("unable to set user context"); | 1067 | perror("unable to set user context"); |
1072 | exit(1); | 1068 | exit(1); |
1073 | } | 1069 | } |
1070 | #ifdef BSD_AUTH | ||
1071 | if (auth_approval(NULL, lc, pw->pw_name, "ssh") <= 0) { | ||
1072 | error("approval failure for %s", pw->pw_name); | ||
1073 | fprintf(stderr, "Approval failure"); | ||
1074 | exit(1); | ||
1075 | } | ||
1076 | #endif | ||
1074 | # else /* HAVE_LOGIN_CAP */ | 1077 | # else /* HAVE_LOGIN_CAP */ |
1075 | if (setlogin(pw->pw_name) < 0) | 1078 | if (setlogin(pw->pw_name) < 0) |
1076 | error("setlogin failed: %s", strerror(errno)); | 1079 | error("setlogin failed: %s", strerror(errno)); |