summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-02-14 01:25:23 +1100
committerDamien Miller <djm@mindrot.org>2001-02-14 01:25:23 +1100
commit92ddb7d6f0d6a1942e27f75883d29dc0ea99223f (patch)
tree505a90486e59c722c4226a7c597b449f4b651529 /session.c
parent116b6bdda81d6647cc2742280c15b3f42ab3dd24 (diff)
- (djm) Split out and improve OSF SIA auth code. Patch from Chris Adams
<cmadams@hiwaay.net> with a little modification and KNF.
Diffstat (limited to 'session.c')
-rw-r--r--session.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/session.c b/session.c
index 7319df3d1..a9b4d87a3 100644
--- a/session.c
+++ b/session.c
@@ -72,11 +72,6 @@ RCSID("$OpenBSD: session.c,v 1.55 2001/02/08 19:30:52 itojun Exp $");
72#include <usersec.h> 72#include <usersec.h>
73#endif 73#endif
74 74
75#ifdef HAVE_OSF_SIA
76# include <sia.h>
77# include <siad.h>
78#endif
79
80#ifdef HAVE_CYGWIN 75#ifdef HAVE_CYGWIN
81#include <windows.h> 76#include <windows.h>
82#include <sys/cygwin.h> 77#include <sys/cygwin.h>
@@ -1051,21 +1046,8 @@ do_child(const char *command, struct passwd * pw, const char *term,
1051 switch, so we let login(1) to this for us. */ 1046 switch, so we let login(1) to this for us. */
1052 if (!options.use_login) { 1047 if (!options.use_login) {
1053#ifdef HAVE_OSF_SIA 1048#ifdef HAVE_OSF_SIA
1054 extern char **saved_argv;
1055 extern int saved_argc;
1056 char *host = get_canonical_hostname(options.reverse_mapping_check);
1057
1058 if (sia_become_user(NULL, saved_argc, saved_argv, host,
1059 pw->pw_name, ttyname, 0, NULL, NULL, SIA_BEU_SETLUID) !=
1060 SIASUCCESS) {
1061 perror("sia_become_user");
1062 exit(1);
1063 }
1064 if (setreuid(geteuid(), geteuid()) < 0) {
1065 perror("setreuid");
1066 exit(1);
1067 }
1068#else /* HAVE_OSF_SIA */ 1049#else /* HAVE_OSF_SIA */
1050 session_setup_sia(pw->pw_name, ttyname);
1069#ifdef HAVE_CYGWIN 1051#ifdef HAVE_CYGWIN
1070 if (is_winnt) { 1052 if (is_winnt) {
1071#else 1053#else