From 0a745c3cda0d4d74f21fd93304c157ae519c8556 Mon Sep 17 00:00:00 2001 From: Unknown User d91-jda Date: Fri, 28 Jul 1995 00:38:24 +0000 Subject: [PATCH] _PATH_LOGIN -> LOGIN_PATH that defaults to /usr/athena/bin/login Better support for Solaris git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@70 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/telnet/telnetd/sys_term.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/appl/telnet/telnetd/sys_term.c b/appl/telnet/telnetd/sys_term.c index 0f3e9bff8..54844d1b0 100644 --- a/appl/telnet/telnetd/sys_term.c +++ b/appl/telnet/telnetd/sys_term.c @@ -1624,7 +1624,7 @@ start_login(host, autologin, name) { addarg(&argv, "-h"); addarg(&argv, host); -#ifdef SOLARIS +#ifdef SOLARIS_LOGIN /* * SVR4 version of -h takes TERM= as second arg, or - */ @@ -1711,7 +1711,7 @@ start_login(host, autologin, name) * to have "localhost" in their .rhost file. */ # define LOGIN_HOST "localhost" -# endif +# endif /* LOGIN_HOST */ addarg(&argv, "-r"); addarg(&argv, LOGIN_HOST); @@ -1742,7 +1742,7 @@ start_login(host, autologin, name) tty_setecho(isecho); tty_setraw(israw); set_termbuf(); -#if !defined(SOLARIS) +#ifndef SOLARIS if (!israw) { /* * Write a newline to ensure @@ -1755,10 +1755,10 @@ start_login(host, autologin, name) } pty = xpty; } -# else +# else /* LOGIN_R */ addarg(&argv, name); # endif -# endif +# endif /* NO_LOGIN_F */ } /* else */ /* esc@magic.fi; removed stupid else */ #endif if (getenv("USER")) { @@ -1783,7 +1783,7 @@ start_login(host, autologin, name) */ unsetenv("USER"); } -#ifdef SOLARIS +#ifdef SOLARIS_LOGIN else { char **p; @@ -1806,7 +1806,16 @@ start_login(host, autologin, name) sleep(1); if (k_hasafs()) k_setpag(); /* Put users process in an new pag */ - execv(_PATH_LOGIN, argv.argv); +#ifdef SHOW_LOGIN_ARGS + { + int i; + for(i=0;argv.argv[i];i++) + fprintf(stderr, "%s ", argv.argv[i]); + fprintf(stderr, "\n"); + } +#endif + + execv(LOGIN_PATH, argv.argv); syslog(LOG_ERR, "%s: %m\n", _PATH_LOGIN); fatalperror(net, _PATH_LOGIN);