two irix patches
Alain St-Denis
Alain.St-Denis at ec.gc.ca
Sat Dec 2 05:44:34 EST 2000
After a few e-mail Exchanges with Michael, I realized only the ut_id field
needs to have the "tty" stripped. I think this means only the
line_abbrevname func needs the ifdef sgi code.
Hope this will do...
Here is the diff against 2.3.0p1:
*** loginrec.c.orig Fri Dec 01 13:39:13 EST 2000
--- loginrec.c Fri Dec 01 13:39:28 EST 2000
***************
*** 508,520 ****
line_stripname(char *dst, const char *src, int dstsize)
{
memset(dst, '\0', dstsize);
- #ifdef sgi
- if (strncmp(src, "/dev/tty", 8) == 0)
- strlcpy(dst, src + 8, dstsize);
- #else
if (strncmp(src, "/dev/", 5) == 0)
strlcpy(dst, src + 5, dstsize);
- #endif
else
strlcpy(dst, src, dstsize);
return dst;
--- 508,515 ----
I tried it and it seems to work for me.
Alain.
Michael Stone wrote:
> On Fri, Dec 01, 2000 at 01:12:01PM -0500, you wrote:
> > Irix only stores whatever comes after /dev/tty in [uw]tmp[x] files.
> >
> > Do a "who -a" and look for the id field, you'll understand what I mean.
>
> On mine, I see a ttyd1 from the console login. If I do a 'w', I see only
> the last two characters, but that's true whether I recorded ttyq1 or q1
> as the tty name. There is one difference: if I didn't store ttyq1, I
> don't JCPU or PCPU, and there's a - in the what field.
>
> --
> Mike Stone
mouring at etoh.eviladmin.org wrote:
> On Fri, 1 Dec 2000, Michael Stone wrote:
>
> > First, does anyone know why the following was added in the first place?
> > It purposely strips the tty off of tty names (e.g., ttyq1 becomes q1)
> > before sticking them in wtmp. IRIX then has no idea what terminal people
>
> > are attached to, causing commands like wall to fail (as they try to open
>
> > /dev/q1). Maybe this should be version specific?
> >
> revision 1.26
> date: 2000/09/30 10:34:44; author: djm; state: Exp; lines: +14 -4
> - (djm) Irix strips "/dev/tty" from [uw]tmp entries (other systems only
> strip "/dev/"). Fix loginrec.c based on patch from Alain St-Denis
> <Alain.St-Denis at ec.gc.ca>
>
> No idea what version Alain is running for SGI.
>
> - Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20001201/83285a61/attachment.html
More information about the openssh-unix-dev
mailing list