[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cvs and heimdal



On Fri, Jul 30, 1999 at 03:17:22PM +1000, Brian May wrote:
> Sorry to followup on my mail yet again...

And again...

> I think the problem is that some code is missing to tell the server
> that STDIN has been closed.

I have fixed all my rsh problems to date with the following patch.
Well... it would appear that the problems have gone, but I am still not
entirely sure my fixes are the best solution. For instance, shutdown
should not be called (I think) if there is any data still being
sent, and I don't know if this is a problem or not.

Index: heimdal-0.1l/appl/rsh/common.c
diff -c heimdal-0.1l/appl/rsh/common.c:1.1.1.1 heimdal-0.1l/appl/rsh/common.c:1.2
*** heimdal-0.1l/appl/rsh/common.c:1.1.1.1	Sat Jul 24 17:33:35 1999
--- heimdal-0.1l/appl/rsh/common.c	Fri Jul 30 14:14:45 1999
***************
*** 58,63 ****
--- 58,65 ----
  	    krb5_data data;
  
  	    ret = krb5_net_read (context, &fd, &len, 4);
+ 	    if (ret == 0)
+ 		return 0;
  	    if (ret != 4)
  		return -1;
  	    len = ntohl(len);
Index: heimdal-0.1l/appl/rsh/rsh.c
diff -c heimdal-0.1l/appl/rsh/rsh.c:1.1.1.2 heimdal-0.1l/appl/rsh/rsh.c:1.2
*** heimdal-0.1l/appl/rsh/rsh.c:1.1.1.2	Sat Jul 24 18:24:17 1999
--- heimdal-0.1l/appl/rsh/rsh.c	Fri Jul 30 15:39:51 1999
***************
*** 118,123 ****
--- 118,124 ----
  	    else if (ret == 0) {
  		close (STDIN_FILENO);
  		FD_CLR(STDIN_FILENO, &real_readset);
+ 		shutdown(s,1);
  	    } else
  		do_write (s, buf, ret);
  	}

-- 
Brian May <bmay@csse.monash.edu.au>

PGP signature