summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-02-18 17:01:00 +1100
committerDamien Miller <djm@mindrot.org>2001-02-18 17:01:00 +1100
commit60396b060b803fd2d20aa151dc0432a344f798b0 (patch)
tree6027eced4465cbb8ab7146ba6cd3f9a89c38bd03 /session.c
parent75da9a9e721bf0f73aab8a28505a62224c327d18 (diff)
- (djm) Merge BSD_AUTH support from Markus Friedl and David J. MacKenzie
enable with --with-bsd-auth.
Diffstat (limited to 'session.c')
-rw-r--r--session.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/session.c b/session.c
index 4e2471f2..b84f19ea 100644
--- a/session.c
+++ b/session.c
@@ -89,10 +89,6 @@ RCSID("$OpenBSD: session.c,v 1.56 2001/02/16 14:03:43 markus Exp $");
# define S_UNOFILE_HARD S_UNOFILE "_hard"
#endif
-#ifdef HAVE_LOGIN_CAP
-#include <login_cap.h>
-#endif
-
/* types */
#define TTYSZ 64
@@ -1071,6 +1067,13 @@ do_child(const char *command, struct passwd * pw, const char *term,
perror("unable to set user context");
exit(1);
}
+#ifdef BSD_AUTH
+ if (auth_approval(NULL, lc, pw->pw_name, "ssh") <= 0) {
+ error("approval failure for %s", pw->pw_name);
+ fprintf(stderr, "Approval failure");
+ exit(1);
+ }
+#endif
# else /* HAVE_LOGIN_CAP */
if (setlogin(pw->pw_name) < 0)
error("setlogin failed: %s", strerror(errno));