[816] in Kerberos-V5-bugs

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

Minor bug in krlogind.c

daemon@ATHENA.MIT.EDU (grossa@SDSC.EDU)
Fri Sep 30 22:19:17 1994

Date: Fri, 30 Sep 94 19:20:25 PDT
From: grossa@SDSC.EDU
To: krb5-bugs@MIT.EDU


Hello,

   In the protocol() function in krlogind.c the read on the pty is not
checked for the POSIX error equivalent for EWOULDBLOCK.  The POSIX read
returns -1 and sets errno to EAGAIN (why?) instead.  I just added a
#ifdef based on POSIX_SIGNALS since that indicates POSIX and nothing
else really applies.  Maybe just checking for both EAGAIN and EWOULDBLOCK
in the same if would be better?

Thank you
Andrew Gross
=========================================================================
        if (ibits & (1<<p)) {
            pcc = read(p, pibuf, sizeof (pibuf));
            pbp = pibuf;
#ifdef POSIX_SIGNALS
            if (pcc < 0 && errno == EAGAIN)
#else
            if (pcc < 0 && errno == EWOULDBLOCK)
#endif
              pcc = 0;
            else if (pcc <= 0)
              break;
=========================================================================

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