kern.pts.enable=1 forces tcsh autologout
Kris Kennaway
kris at obsecurity.org
Tue Nov 14 20:10:33 PST 2006
When kern.pts.enable=1, the ptys are named /dev/pts/<n>, and tcsh
doesn't correctly recognize that it's a pty and it should disable
autologout. Actually it does seem to have some code but it seems to
be incorrect:
if (loginsh || (uid == 0)) {
if (*cp) {
/* only for login shells or root and we must have a tty */
if ((cp2 = Strrchr(cp, (Char) '/')) != NULL) {
cp = cp2 + 1;
}
else
cp2 = cp;
if (!(((Strncmp(cp2, STRtty, 3) == 0) && Isalpha(cp2[3])) ||
((Strncmp(cp, STRpts, 3) == 0) && cp[3] == '/'))) {
if (getenv("DISPLAY") == NULL) {
/* NOT on X window shells */
set(STRautologout, Strsave(STRdefautologout),
VAR_READWRITE);
}
}
}
}
Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20061115/b0fbefb9/attachment.pgp
More information about the freebsd-current
mailing list