From: Sam Hartman Date: Sun, 24 Mar 1996 20:28:37 +0000 (+0000) Subject: * krshd no longer does non-blocking IO. It never really needed it X-Git-Tag: krb5-1.0-beta6~299 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=01519a9849fcb64989e80e5bdf498d6e41b97dac;p=krb5.git * krshd no longer does non-blocking IO. It never really needed it * krcp works correctly even if not all data is written in a single request. * Implement temporary patch to make sure des_outbuf is big enough. Proven should be sending the Cygnus patch once he decides how to handle this permanently. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7706 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 7d15aa3fa..4e4e7e648 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,12 @@ +Sat Mar 23 17:20:00 1996 Sam Hartman + + * krcp.c (des_write): Use krb5_net_write instead of write, because + most parts of rcp that call this code ignore the return value and + we want to reblock properly. + + * krshd.c (doit): Don't use non-blocking IO; it is unnecessary and + may cause problems. + Wed Mar 20 19:36:21 1996 Richard Basch * krlogind.c (recvauth): use the library routines to do v4 to v5 diff --git a/src/appl/bsd/krcp.c b/src/appl/bsd/krcp.c index 3ed5c0089..be7f072a2 100644 --- a/src/appl/bsd/krcp.c +++ b/src/appl/bsd/krcp.c @@ -1130,7 +1130,7 @@ struct buffer *allocbuf(bp, fd, blksize) #else size = roundup(stb.st_blksize, blksize); #endif - if (size == 0) + size = blksize; if (bp->cnt < size) { if (bp->buf != 0) @@ -1433,7 +1433,7 @@ int des_write(fd, buf, len) if (fd == 0) fd = 1; if (!encryptflag) - return(write(fd, buf, len)); + return(krb5_net_write(bsd_context, fd, buf, len)); desoutbuf.length = krb5_encrypt_size(len,eblock.crypto_entry); if (desoutbuf.length > sizeof(des_outbuf)){ diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c index 1573939a9..a7ba147fd 100644 --- a/src/appl/bsd/krshd.c +++ b/src/appl/bsd/krshd.c @@ -1134,11 +1134,7 @@ if(port) (void) close(pw[1]); (void) close(px[0]); -if(port) - ioctl(pv[0], FIONBIO, (char *)&one); - ioctl(pw[0], FIONBIO, (char *)&one); - /* should set s nbio! */ - + FD_ZERO(&readfrom); FD_SET(f, &readfrom);