diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-03-20 18:57:05 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-03-20 18:57:05 +0000 |
commit | 6c6c19ac0c5fb2d615149ba2f0445e6dafac79e8 (patch) | |
tree | 3c1100ce719ba0772e9f0e71db94b44e1c33ff0b /usr.bin/ssh/session.c | |
parent | fb225e7d0ebb8fdf6f94fef9701c6916d628ad1a (diff) |
add changes need for BSD_AUTH plus disabled BSD_AUTH code
Diffstat (limited to 'usr.bin/ssh/session.c')
-rw-r--r-- | usr.bin/ssh/session.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index d97dd68f248..0f364d4b894 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.61 2001/03/16 19:06:30 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.62 2001/03/20 18:57:04 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -58,10 +58,6 @@ RCSID("$OpenBSD: session.c,v 1.61 2001/03/16 19:06:30 markus Exp $"); #include "canohost.h" #include "session.h" -#ifdef HAVE_LOGIN_CAP -#include <login_cap.h> -#endif - /* types */ #define TTYSZ 64 @@ -831,8 +827,14 @@ do_child(Session *s, const char *command) (LOGIN_SETALL & ~LOGIN_SETPATH)) < 0) { 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 if (setlogin(pw->pw_name) < 0) error("setlogin failed: %s", strerror(errno)); |