[5479] in Kerberos

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

Re: sserver: recvauth failed--Bad file number

daemon@ATHENA.MIT.EDU (John Stewart)
Tue Jul 11 03:17:33 1995

To: kerberos@MIT.EDU
Date: 11 Jul 1995 07:04:23 GMT
From: jns@cisco.com (John Stewart)



Here I am following up my own postings ... go figure. Well, I narrowed
it down to krb5_net_read having a bad file decriptor (-1 to be exact)
and backtraced to it sserver.c having "sock" initialized to -1 at run
time -- even if it's running from inetd. 

Out of inetd, it should be 0, not -1. A minor patch, see the attached
- for a one-liner, this was painful. Anyway, another note -- I've
noticed that in certain instances, if there are principals in the
database with say, kshell/foo.cisco.com and also a host/foo.cisco.com
and rsh/rlogin client does into wait state waiting for the daemon to
return -- and that daemon sits waiting on a read.

I'm looking into that as well, but since it took me far too long to
identify the coding error for this simple one, I think I'll go to
sleep instead :)

--John


------=------=------=------=------=------=------=------=------=------
*** sserver.c   1995/07/10 23:22:44     1.1
--- sserver.c   1995/07/11 07:01:01
***************
*** 123,129 ****
            syslog(LOG_ERR, "getpeername: %m");
            exit(1);
        }
!     }
  
      peeraddr.addrtype = peername.sin_family;
      peeraddr.length = sizeof(peername.sin_addr);
--- 123,132 ----
            syslog(LOG_ERR, "getpeername: %m");
            exit(1);
        }
!       sock=0;
!      }
! 
! 
  
      peeraddr.addrtype = peername.sin_family;
      peeraddr.length = sizeof(peername.sin_addr);


-------=-------=-------=-------=-------=-------=-------=-------=-------

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