Skip Menu |
 

Download (untitled) / with headers
text/plain 1.9KiB
From danw@MIT.EDU Sun Feb 28 14:53:16 1999
Received: from MIT.EDU (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.69.0.28]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id OAA11012 for <bugs@RT-11.MIT.EDU>; Sun, 28 Feb 1999 14:53:16 -0500
Received: from ANTHARIA.MIT.EDU by MIT.EDU with SMTP
id AA18747; Sun, 28 Feb 99 14:53:49 EST
Received: by antharia.mit.edu (950413.SGI.8.6.12/4.7) id OAA15171; Sun, 28 Feb 1999 14:53:14 -0500
Message-Id: <199902281953.OAA15171@antharia.mit.edu>
Date: Sun, 28 Feb 1999 14:53:14 -0500
From: danw@MIT.EDU
Reply-To: danw@MIT.EDU
To: krb5-bugs@MIT.EDU
Cc: nathanw@MIT.EDU
Subject: login.krb5 willfully eits tty window size
X-Send-Pr-Version: 3.99

Show quoted text
>Number: 697
>Category: krb5-appl
>Synopsis: login.krb5 willfully eits tty window size
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Sun Feb 28 14:54:01 EST 1999
>Last-Modified:
>Originator: Dan Winship
>Organization:
Athena
Show quoted text
>Release: 1.0
>Environment:

System: IRIX antharia 6.3 12161207 IP32


Show quoted text
>Description:
login.c contains this dubious fragment:

if (!hflag && !rflag && !kflag && !Kflag && !eflag) { /* XXX */
static struct winsize win = { 0, 0, 0, 0 };

(void)ioctl(0, TIOCSWINSZ, (char *)&win);
}

which has no apparent purpose other than to confuse the tty
driver about the size of the screen. In particular, if you
have login.krb5 as the getty-invoked login (as on an Athena
machine) and are running NetBSD with the new wscons code,
you'll lose in a variety of obnoxious ways until you run
stty or resize to fix your tty settings.

This code (including the /* XXX */) seems to have come
originally from the 4.3BSD login source. It's not there in the
4.4BSD source.

Show quoted text
>How-To-Repeat:

Show quoted text
>Fix:
I nuked that code and everything seems to work fine...
Show quoted text
>Audit-Trail:
>Unformatted:
Download (untitled) / with headers
text/plain 3.6KiB
From root@inception.smyrph.net Thu Jul 19 21:53:55 2001
Received: from pacific-carrier-annex.mit.edu (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.7.21.83])
by rt-11.mit.edu (8.9.3/8.9.3) with ESMTP id VAA09736
for <bugs@RT-11.mit.edu>; Thu, 19 Jul 2001 21:53:55 -0400 (EDT)
Received: from inception.smyrph.net (root@inception.smyrph.net [66.92.69.137])
by pacific-carrier-annex.mit.edu (8.9.2/8.9.2) with ESMTP id VAA06215
for <krb5-bugs@mit.edu>; Thu, 19 Jul 2001 21:53:54 -0400 (EDT)
Received: (from root@localhost)
by inception.smyrph.net (8.10.2/8.10.2) id f6K1rsQ03293;
Thu, 19 Jul 2001 21:53:54 -0400
Message-Id: <200107200153.f6K1rsQ03293@inception.smyrph.net>
Date: Thu, 19 Jul 2001 21:53:54 -0400
From: david@smyrph.net
Reply-To: david@smyrph.net
To: krb5-bugs@mit.edu
Subject: login.krb5 clearing TIOCSWINSZ on linux consoles
X-Send-Pr-Version: 3.99

Show quoted text
>Number: 978
>Category: krb5-appl
>Synopsis: login.krb5 clearing TIOCSWINSZ on linux consoles
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Thu Jul 19 21:54:00 EDT 2001
>Last-Modified:
>Originator: me?
>Organization:
just my personal things - smyrph.net
Show quoted text
>Release: krb5-1.2.2
>Environment:
Linux, slackware 7.1, Intel P3
System: Linux inception.smyrph.net 2.4.5-ac21 #2 Thu Jun 28 23:13:43 EDT 2001 i686 unknown
Architecture: i686

Show quoted text
>Description:
if the linux text console is set to more than 25 rows (50 for example)
when login.krb5 clears the struct winsize for the terminal, the console
only uses the top 25 rows.
Show quoted text
>How-To-Repeat:
set vga=1 on the linux command line (request 50 text rows), then replace
/bin/login with a symlink to login.krb5, and log into one of the virtual
coneoles. even though the text resolution is 50 rows, stty -a only
reports 25. (try running less, vim, or pine...)
Show quoted text
>Fix:
Try this patch. (it also fixes another annoyance - lets you add
kinit_root = 1 to the [login] section of krb5.conf to specify getting
tickets when root logs in - but leaves the default to no to maintain
the existing security paranoia)
diff -u --new-file --recursive krb5-1.2.2/src/appl/bsd/login.c krb5-1.2.2.noclearwinsize/src/appl/bsd/login.c
--- krb5-1.2.2/src/appl/bsd/login.c Wed Feb 28 17:06:43 2001
+++ krb5-1.2.2.noclearwinsize/src/appl/bsd/login.c Thu Jul 19 21:41:22 2001
@@ -60,6 +60,8 @@

int login_accept_passwd = 0;

+int login_kinit_root = 0;
+
/*
* login [ name ]
* login -r hostname (for rlogind)
@@ -113,6 +115,7 @@
* initializing these values anyway -- tcgetattr *should* give
* them reasonable defaults... */
#define NO_INIT_CC
+#define NO_SET_TIOCSWINSZ
#endif

#include <errno.h>
@@ -348,6 +351,7 @@
"krb4_get_tickets", &login_krb4_get_tickets,
"krb4_convert", &login_krb4_convert,
"krb4_run_aklog", &login_krb_run_aklog,
+ "kinit_root", &login_kinit_root,
#endif /* KRB5_KRB4_COMPAT */
};

@@ -1291,7 +1295,7 @@

lpass_ok = unix_passwd_okay(user_pwstring);

- if (pwd->pw_uid != 0) { /* Don't get tickets for root */
+ if (pwd->pw_uid != 0 || login_kinit_root) { /* Don't get tickets for root */
try_krb5(&me, user_pwstring);

#ifdef KRB4_GET_TICKETS
@@ -1438,11 +1442,13 @@
quietlog = access(HUSHLOGIN, F_OK) == 0;
dolastlog(quietlog, tty);

+#ifndef NO_SET_TIOCSWINSZ
if (!hflag && !rflag && !kflag && !Kflag && !eflag) { /* XXX */
static struct winsize win = { 0, 0, 0, 0 };

(void)ioctl(0, TIOCSWINSZ, (char *)&win);
}
+#endif

(void)chown(ttyn, pwd->pw_uid,
(gr = getgrnam(TTYGRPNAME)) ? gr->gr_gid : pwd->pw_gid);
Show quoted text
>Audit-Trail:
>Unformatted:
From: tlyu@mit.edu
Subject: CVS Commit
* login.c (main): Don't zero out terminal window size.


To generate a diff of this commit:



cvs diff -r5.372 -r5.373 krb5/src/appl/bsd/ChangeLog
cvs diff -r5.101 -r5.102 krb5/src/appl/bsd/login.c