version 1.61, 2001/03/16 19:06:30 |
version 1.62, 2001/03/20 18:57:04 |
|
|
#include "canohost.h" |
#include "canohost.h" |
#include "session.h" |
#include "session.h" |
|
|
#ifdef HAVE_LOGIN_CAP |
|
#include <login_cap.h> |
|
#endif |
|
|
|
/* types */ |
/* types */ |
|
|
#define TTYSZ 64 |
#define TTYSZ 64 |
|
|
(LOGIN_SETALL & ~LOGIN_SETPATH)) < 0) { |
(LOGIN_SETALL & ~LOGIN_SETPATH)) < 0) { |
perror("unable to set user context"); |
perror("unable to set user context"); |
exit(1); |
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 |
#else |
if (setlogin(pw->pw_name) < 0) |
if (setlogin(pw->pw_name) < 0) |
error("setlogin failed: %s", strerror(errno)); |
error("setlogin failed: %s", strerror(errno)); |