[comp.sources.bugs] PRIORITY bug fixes to UNaXcess Conferencing 1.0.2

allbery@ncoast.UUCP (Brandon Allbery) (12/07/87)

Could someone please send this to the attention of whomever maintains
sources on BIX?  I've received a number of letters and phone calls from
people who received UNaXcess off BIX and haven't been able to run it
because of one of the bugs in this article.

There are two bugs corrected in this article; neither are in "patch" format,
sorry.

Bug #1:
Priority: HIGH
Index: install.sh
Description:
	The install.sh was not updated to reflect the 1.0.1 version
	of user validation; as a result, the NEW login gets a line length
	of 2
Repeat-By:
	Install an unpatched UNaXcess Conferencing 1.0.1 or 1.0.2; log in
	to UNaXcess as NEW and watch the output come out one character per
	line.
Fix:
	In install.sh, where the UNaXcess userfile is created, find the line
	defining the user "new"; it will look like
	
	new::6:0:2::
	
	Change the 2 to a 40 (40-column screen) or 80 (80-column screen).

Bug #2:
Priority: HIGH
Index: ua.h, system.c
Description:
	The documentation of mktemp() is less than clear about the effect
	of mktemp() on strings not containing the XXXXXX mask.  On the
	systems on which I wrote UNaXcess, mktemp() returned the string
	argument unchanged; on some other systems, notably SCO Xenix V,
	mktemp() appends the PID to the end of the string, causing the
	mktemp() string to eventually overwrite the FILE pointer for the
	user index and cause a "panic: userind".  Other bugs are quite
	possible as well, but usually the "panic: userind" shows up before
	any others.
Fix:
	This fix is far from the best, but it will work.
	In ua.h, add the following line to the end of the file:
	
	#define mktemp	UAmktemp

	In system.c, add the following section of code to the end of
	the file:
	
	#undef mktemp
	
	char *UAmktemp(template)
	char *template; {
		if (strlen(template) < 6 || strcmp(template + strlen(template) - 6, "XXXXXX") != 0)
			return template;
		return mktemp(template);
	}

The copy of UNaXcess Conferencing available on ncoast has both of these fixes;
the copies in the comp.sources.unix archives and on BIX and on some Fido
systems do NOT have these fixes.
-- 
Brandon S. Allbery		      necntc!ncoast!allbery@harvard.harvard.edu
 {hoptoad,harvard!necntc,cbosgd,sun!mandrill!hal,uunet!hnsurg3}!ncoast!allbery
			Moderator of comp.sources.misc