[2920] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

pending/588:

daemon@ATHENA.MIT.EDU (rbasch@MIT.EDU)
Mon May 4 16:57:30 1998

Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: gnats-admin@rt-11.MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU, rbasch@MIT.EDU
Date: Mon, 4 May 1998 16:48:31 -0400
From: rbasch@MIT.EDU
Reply-To: rbasch@MIT.EDU
To: krb5-bugs@MIT.EDU


>Number:         588
>Category:       pending
>Synopsis:       
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Mon May 04 16:49:01 EDT 1998
>Last-Modified:
>Originator:     Robert A Basch
>Organization:
	
MIT Information Systems
>Release:        1.0pl1
>Environment:
	
System: IRIX burn 6.2 03131015 IP22
(Athena workstation)

>Description:
	
This problem was seen on an SGI Indy Athena workstation running
Irix 6.2.  When you exit the window system and do a console login,
any such login except the first fails to acquire the controlling tty
(/dev/tport), giving the error:

login.krb5: tcsetpgrp: Inappropriate I/O control operation

As a result, job control, command-line editing, etc., do not
work.

>How-To-Repeat:
	
Do a console login on Irix 6.2.  (Works fine, if the first one since
reboot).  Logout.  Do another console login -- the tcsetpgrp() fails.

>Fix:
	

The setpgrp() in login.c/dofork() seems to trigger the problem; and,
since there should be no need to do both setsid() and setpgrp(), the
simple workaround/fix is not to perform the setpgrp() if setsid() is
available.  The following patch against the krb5 in the athena source
tree demonstrates:

Index: login.c
===================================================================
RCS file: /afs/dev.mit.edu/source/repository/third/krb5/src/appl/bsd/login.c,v
retrieving revision 1.17
diff -c -r1.17 login.c
*** login.c	1998/04/29 13:50:33	1.17
--- login.c	1998/05/04 19:49:46
***************
*** 2484,2494 ****
  #endif /* __linux__ */
  #ifdef HAVE_SETSID
        (void)setsid();
! #endif
  #ifdef SETPGRP_TWOARG
        (void)setpgrp(0, 0);
  #else
        (void)setpgrp();
  #endif
      } 
  
--- 2484,2495 ----
  #endif /* __linux__ */
  #ifdef HAVE_SETSID
        (void)setsid();
! #else
  #ifdef SETPGRP_TWOARG
        (void)setpgrp(0, 0);
  #else
        (void)setpgrp();
+ #endif
  #endif
      } 
  
>Audit-Trail:
>Unformatted:
no
login.krb5: don't do both setsid() and setpgrp()
non-critical
medium
krb5-appl
sw-bug

home help back first fref pref prev next nref lref last post