🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.uucp
Article #7

uux bug with long system names + Fix

#7
From: Larry Parmelee
Date: Fri, 13 Dec 1985 20:33
55 lines
2404 bytes
Subject: uux bug with long system names + Fix
Index:	/usr/src/usr.bin/uucp/uux.c 4.3BSD beta

Description:
	When your uucp system name is longer than 7 characters, and
	uux takes its input from stdin, uux tries to change the 
	processing grade of a temporary file, but misses the proper
	character, screwing up the sequence number instead.  This can
	cause a number of data files to be sent into the same file on
	the remote system.
Repeat-By:
	Make your system name something like tanstaafl (9 characters).
	Issue a few uux commands which take their input from stdin,
	and look at the control files generated:
		::::::::::::::
		file: C.cornellC00f4
		::::::::::::::
		S D.tanstaaB00f2 D.tanstaaB00S2 bill - D.tanstaaB00f2 0666
		S D.tanstaaX00f0 X.tanstaaC00f3 bill - D.tanstaaX00f0 0666

		::::::::::::::
		file: C.cornellC00g4
		::::::::::::::
		S D.tanstaaB00g2 D.tanstaaB00S2 bill - D.tanstaaB00g2 0666
		S D.tanstaaX00g0 X.tanstaaC00g3 bill - D.tanstaaX00g0 0666
	
	Note that the local data file gets sent into the same remote
	file name "D.tanstaaB00S2" both times.  Say your favorite mantra.

Fix:
	Here's a context diff.  Maybe patch will work.  No promises,
	though.
	
*** /tmp/d12452	Fri Dec 13 13:58:11 1985
--- uux.c	Fri Dec 13 13:47:05 1985
***************
*** 188,194 ****
  		fclose(fpd);
  		strcpy(tfile, dfile);
  		if (strcmp(local, xsys) != SAME) {
! 			tfile[strlen(local) + 2] = 'S';
  			GENSEND(fpc, dfile, tfile, User, "", dfile);
  			cflag++;
  		}
--- 188,197 ----
  		fclose(fpd);
  		strcpy(tfile, dfile);
  		if (strcmp(local, xsys) != SAME) {
! 			int slen = strlen(local);
! 			if (slen > SYSNSIZE)
! 				slen = SYSNSIZE;
! 			tfile[slen + 2] = 'S';
  			GENSEND(fpc, dfile, tfile, User, "", dfile);
  			cflag++;
  		}
Technical Details
Message-ID: <1698@cornell.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!parmelee

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site cornell.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!parmelee
From: parmelee@cornell.UUCP (Larry Parmelee)
Newsgroups: net.bugs.uucp
Subject: uux bug with long system names + Fix
Message-ID: <1698@cornell.UUCP>
Date: Fri, 13-Dec-85 15:33:14 EST
Article-I.D.: cornell.1698
Posted: Fri Dec 13 15:33:14 1985
Date-Received: Sat, 14-Dec-85 08:12:43 EST
Reply-To: parmelee@cornell.UUCP (Larry Parmelee)
Organization: Cornell Univ. CS Dept.
Lines: 55