Tru64 UNIX SIA in 2.5.2p1 is hosed
Steve VanDevender
stevev at darkwing.uoregon.edu
Wed Mar 21 10:54:12 EST 2001
Steve VanDevender writes:
> This explains the problem I'm having with SIA in Digital UNIX, but it's
> not immediately obvious to me how to fix it. This is probably also
> breaking the AIX code which refers to ttyname later in do_child.
I'll stop babbling now. After further study of the code in session.c it
became apparent how to fix the problem by noticing that between 2.5.1p2
and 2.5.2p1 'ttyname' changed to 's->tty' in other places in the
do_child function, just not in the parts relating to OSF_SIA and the AIX
code. A patch follows; with this applied I have the 2.5.2p1 sshd
working in Digital UNIX. I changed the occurrences of 'ttyname' to
's->tty' in one of the #ifdef _AIX sections in do_child() too, but
someone with AIX should probably confirm that it works there.
===================================================================
RCS file: session.c,v
retrieving revision 1.1
diff -c -r1.1 session.c
*** 1.1 2001/03/20 23:45:46
--- session.c 2001/03/20 23:46:17
***************
*** 1053,1059 ****
switch, so we let login(1) to this for us. */
if (!options.use_login) {
#ifdef HAVE_OSF_SIA
! session_setup_sia(pw->pw_name, ttyname);
#else /* HAVE_OSF_SIA */
#ifdef HAVE_CYGWIN
if (is_winnt) {
--- 1053,1059 ----
switch, so we let login(1) to this for us. */
if (!options.use_login) {
#ifdef HAVE_OSF_SIA
! session_setup_sia(pw->pw_name, s->tty);
#else /* HAVE_OSF_SIA */
#ifdef HAVE_CYGWIN
if (is_winnt) {
***************
*** 1134,1143 ****
* other stuff is stored - a few applications
* actually use this and die if it's not set
*/
! cp = xmalloc(22 + strlen(ttyname) +
2 * strlen(pw->pw_name));
i = sprintf(cp, "LOGNAME=%s%cNAME=%s%cTTY=%s%c%c",
! pw->pw_name, 0, pw->pw_name, 0, ttyname, 0,0);
if (usrinfo(SETUINFO, cp, i) == -1)
fatal("Couldn't set usrinfo: %s",
strerror(errno));
--- 1134,1143 ----
* other stuff is stored - a few applications
* actually use this and die if it's not set
*/
! cp = xmalloc(22 + strlen(s->tty) +
2 * strlen(pw->pw_name));
i = sprintf(cp, "LOGNAME=%s%cNAME=%s%cTTY=%s%c%c",
! pw->pw_name, 0, pw->pw_name, 0, s->tty, 0,0);
if (usrinfo(SETUINFO, cp, i) == -1)
fatal("Couldn't set usrinfo: %s",
strerror(errno));
More information about the openssh-unix-dev
mailing list