[2624] in Kerberos-V5-bugs

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

krb5-appl/335: When using POSIX signals, rlogin doesn't clear them properly

daemon@ATHENA.MIT.EDU (Ken Hornstein)
Mon Jan 6 23:54:21 1997

Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: krb5-unassigned@RT-11.MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU, kenh@cmf.nrl.navy.mil
Date: Mon, 6 Jan 1997 23:53:13 -0500 (EST)
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
Reply-To: kenh@cmf.nrl.navy.mil
To: krb5-bugs@MIT.EDU


>Number:         335
>Category:       krb5-appl
>Synopsis:       On systems with POSIX signals, rlogin doesn't clear them
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    krb5-unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Mon Jan 06 23:54:00 EST 1997
>Last-Modified:
>Originator:     Ken Hornstein
>Organization:
Naval Research Lab
>Release:        1.0
>Environment:
    	
System: SunOS nexus 4.1.4 1 sun4m
Architecture: sun4

>Description:
	
Rlogin will try to run the regular Unix rlogin if the Kerberos one fails.
However, if your system supports POSIX signals, there is a subtle problem.

The Kerberos rlogin does not clear the signal mask before it tries running
the regular rlogin; as a result, some rlogins will not get SIGUSR1 during
startup and will not send the window size.
>How-To-Repeat:
	
Run Kerberos rlogin on a system that supports POSIX signals (like NetBSD)
to host that doesn't support Kerberos.  Note that your window size isn't
passed.
>Fix:
	
--- krlogin.c.orig	Mon Jan  6 23:45:33 1997
+++ krlogin.c	Mon Jan  6 23:46:53 1997
@@ -1570,6 +1570,10 @@
      char **argv;
 {
     register char *host;
+#ifdef POSIX_SIGNALS
+    struct sigaction sa;
+    sigest_t mask;
+#endif
     
 #ifndef KRB5_ATHENA_COMPAT
     if (encrypt_flag)
@@ -1587,6 +1591,11 @@
     if (!strcmp(host, "rlogin"))
       argv++;
     
+#ifdef POSIX_SIGNALS
+    sigemptyset(&mask)
+    sigprocmask(SIG_SETMASK, &mask, NULL);
+#endif
+
     execv(UCB_RLOGIN, argv);
     perror("exec");
     exit(1);
>Audit-Trail:
>Unformatted:

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