Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site scorplx.UUCP
Path: utzoo!linus!decvax!scorplx!craig
From: craig@scorplx.UUCP (Craig Miller)
Newsgroups: net.news.b
Subject: Re: sigtrap & setuid problems
Message-ID: <198@scorplx.UUCP>
Date: Wed, 17-Oct-84 13:54:25 EDT
Article-I.D.: scorplx.198
Posted: Wed Oct 17 13:54:25 1984
Date-Received: Thu, 18-Oct-84 08:08:39 EDT
References: <165@scorplx.UUCP> <193@scorplx.UUCP> <1749@sun.uucp>
Organization: Honeywell Info. Systems, Billerica, MA
Lines: 53

> How about "SYS3" and "SYS5" or "SYSIII" and "SYSV" but please don't mix
> Roman and Arabic numbers...  Do the USG cpp's specify what version of
> Unix they are?  What names do they use?

	1)	Duhhhh....  Where did I come up with SYS3 and SYSV?  Boy,
		that was stupid...  You're right: SYSIII and SYSV should
		be used...
	2)	Our cpp, at least, only has these defined (note: since
		we don't have the source to this system, I did a strings -1
		on cpp and looked for strings that looked like they might
		be in the list...): unix, PWB, plexus, m68.  PWB? (the
		manual says this is a System III implementation, so what's
		the connection?  I thought PWB was an earlier release from
		Bell Labs...?)

> late?) Unisoft systems and Fortunes.  For all I know it was in the
> original MIT libraries from Nu Unix.  When I brought up netnews on a
> friend's Fortune, it seems like the name was used as the springboard
> routine for signals -- the kernel would jump you to _sigtrap which
> would jump to the right signal handler.  Being an int variable
> defined by netnews (which prevented the "real" _sigtrap from being
> loaded from libc.a), jumping to it didn't work very well.

	Oh, yeah.  I also think they came from MIT...  Don't both Unisoft
	and Fortune use that compiler and libraries (or some derivative
	of them)?  Talk about a tough bug to find...  (I learned alot
	about adb those couple of days...)

> The fix as far as a portable netnews is concerned is:  don't use that
> name.  Rename the variable "sigkludge" or something.  We mortals can do
> it with #define but the master source should be fixed to use a totally
> new name.

	Yup.  (how about it Rick?)  (by the way, a real easy kludge that
	I used was to stick a -Dsigtrap=Sigtrap in CFLAGS in Makefile - I
	don't suggest that that be used as the real fix, however...)

> The fix as far as a Unix manufacturer is concerned is:  Don't put "_"
> on library routines that should be invisible to the user.  This makes
> them invisible to C programs anyway.

	Maybe invisible functions and variables should be declared
	'static', if at all possible (if I understand what you
	mentioned above about how _sigtrap was used, it may have
	been possible to declare the function 'sigtrap' static
	in this case...).
-- 

Craig Miller
Honeywell Info. Systems, Billerica, Mass.
{decvax,harvard}!scorplx!craig (soon to be ..!ihnp4!we53!busch!dcm)

Anheuser Busch: the official brewery of Usenet...