This is the Linux version of rdist 6.1.0.

Patches to make it actually work are due to Mark Eichin
(eichin@cygnus.com).

Complete patch from the original sources follows.  Hopefully, this
will get integrated into the mainstream rdist distribution soon.

Have fun

Thomas Koenig
Thomas.Koenig@ciw.uni-karlsruhe.de

diff -u --recursive rdist-6.1.0/mf/Makefile.var rdist-6.1.0-linux/mf/Makefile.var
--- rdist-6.1.0/mf/Makefile.var	Tue Apr 12 01:20:17 1994
+++ rdist-6.1.0-linux/mf/Makefile.var	Mon Jun  5 16:57:30 1995
@@ -95,7 +95,7 @@
 #
 #YACC 		= bison -y
 
-OPT		= -g
+OPT		= -O2 -fomit-frame-pointer
 RM		= rm
 AR		= ar
 RANLIB		= ranlib
diff -u --recursive rdist-6.1.0/src/child.c rdist-6.1.0-linux/src/child.c
--- rdist-6.1.0/src/child.c	Thu Mar 31 04:56:26 1994
+++ rdist-6.1.0-linux/src/child.c	Mon Jun  5 16:49:38 1995
@@ -203,8 +203,16 @@
 		debugmsg(DM_MISC, "[readchild(%s, %d, %d) got %d bytes]", 
 			 child->c_name, child->c_pid, child->c_readfd, amt);
 
-		write(fileno(stdout), rbuf, amt);
-
+		{
+			int wamt=amt, ramt, woff=0;
+			while ((ramt = write(fileno(stdout), rbuf+woff, wamt)) > 0) {
+				woff += ramt; wamt -= ramt;
+				debugmsg(DM_MISC,
+					 "[readchild(%s, %d, %d) only wrote %d/%d bytes]",
+					 child->c_name, child->c_pid, child->c_readfd, 
+					 ramt, wamt);
+			}
+		}
 		debugmsg(DM_MISC, "[readchild(%s, %d, %d) write done]",
 			 child->c_name, child->c_pid, child->c_readfd);
 	}
diff -u --recursive rdist-6.1.0/src/client.c rdist-6.1.0-linux/src/client.c
--- rdist-6.1.0/src/client.c	Fri Apr 22 19:24:01 1994
+++ rdist-6.1.0-linux/src/client.c	Mon Jun  5 16:49:38 1995
@@ -429,12 +429,18 @@
 			 * this situation gracefully.
 			 */
 		}
-		if (write(rem, buf, amt) == -1) {
-			error("%s: Error writing to client: %s", 
-			      target, SYSERR);
-			err();
-			++goterr;
-			break;
+		{
+			int ramt, wamt=amt, woff=0;
+			while((ramt=write(rem,buf+woff,wamt)) > 0) {
+				woff += ramt; wamt -= ramt;
+			}
+			if (ramt < 0) {
+				error("%s: Error writing to client: %s", 
+				      target, SYSERR);
+				err();
+				++goterr;
+				break;
+			}
 		}
 		(void) alarm(0);
 	}
diff -u --recursive rdist-6.1.0/src/common.c rdist-6.1.0-linux/src/common.c
--- rdist-6.1.0/src/common.c	Wed Apr 20 20:11:03 1994
+++ rdist-6.1.0-linux/src/common.c	Mon Jun  5 16:58:51 1995
@@ -268,7 +268,13 @@
 		 (cmd == C_NONE) ? len-1 : len-2,
 		 (cmd == C_NONE) ? msg : msg + 1);
 
-	return(!(write(rem, msg, len) == len));
+	{
+		int ramt, wamt=len, woff=0;
+		while((ramt = write(rem,msg+woff,wamt)) > 0) {
+			woff += ramt; wamt -= ramt;
+		}
+		return ramt<0;
+	}
 }
 
 /*
@@ -885,7 +891,7 @@
 }
 
 extern char *basename(path)
-	char *path;
+	const char *path;
 {
 	register char *cp;
  
diff -u --recursive rdist-6.1.0/src/server.c rdist-6.1.0-linux/src/server.c
--- rdist-6.1.0/src/server.c	Tue Apr 26 18:58:56 1994
+++ rdist-6.1.0-linux/src/server.c	Mon Jun  5 17:03:51 1995
@@ -230,7 +230,7 @@
 	} else
 		gid = gr->gr_gid;
 
-	if (userid && gid >= 0 && gid != primegid) {
+	if (userid && gid >= 0x7fff && gid != primegid) {
 		if (gr)
 			for (i = 0; gr->gr_mem[i] != NULL; i++)
 				if (strcmp(locuser, gr->gr_mem[i]) == 0)
