[news.software.nntp] NNTP 1.5.10 / Cnews 15-Dec-1990 / Stupid UNIX exec

warlock@ecst.csuchico.edu (John Kennedy) (01/31/91)

  Several people provided helpful suggestions to my solution, and it now
works fine.  I thought I'd summarize for others:

From:	David Macklem

	-->	The nntpd daemon, when posting a news article, sets the USER and
	-->	LOGNAME environment variables to something like 'usenet' and
	-->	then exec's inews (this will prevent anne.jones from going
	-->	through hoops to figure out the USER and LOGNAME).
	-->	Unfortunately, when the nntpd daemon exec's inews it passes
	-->	the wrong environment.

	  Seems like a reasonable solution.  If this is indeed the culpret,
	and a widespread one at that, perhaps the NNTP gods can patch it?  (-:

From:	Brendan Kehoe

	  Brendan approached it a different way -- he wrote a "who am i"
	equivalent that didn't have who's limitiations.  He offered source for
	it, so if you have this problem he'll probably mail it to you.

From:	Ian G Batten

	-->	i have basically the same situation as you --- my main news
	-->	engine is running v.3.2.  my fix is crude and effective

	case "$USER" in
#	"")	USER="`who am i </dev/null |	# last resort: use userid
#			sed -e 's/[	 ].*//' -e '/!/s/^.*!//' `" ;;
	"")	USER="`id | sed 's/^[^(]*(//;s/).*//'`" ;;
	esac

	-->	i just commented out the whoami.  it works ok --- remote Pnews
	-->	generates the From: and I just use the results of the id to
	-->	get the Sender:

  I ended up using Ian's version, mostly because it was involved the least
typing and therefor could be tried the quickest.  It works, as this article
successfully hitting the net will prove.  If it doesn't, I can eat my words,
repost, and you'll never know... (-:

sob@tmc.edu (Stan Barber) (01/31/91)

In article <1991Jan31.002827.20517@seka.ecst.csuchico.edu> warlock@ecst.csuchico.edu (John Kennedy) writes:
>
>  Several people provided helpful suggestions to my solution, and it now
>works fine.  I thought I'd summarize for others:
>
>From:	David Macklem
>
>	-->	The nntpd daemon, when posting a news article, sets the USER and
>	-->	LOGNAME environment variables to something like 'usenet' and
>	-->	then exec's inews (this will prevent anne.jones from going
>	-->	through hoops to figure out the USER and LOGNAME).
>	-->	Unfortunately, when the nntpd daemon exec's inews it passes
>	-->	the wrong environment.
>
>	  Seems like a reasonable solution.  If this is indeed the culpret,
>	and a widespread one at that, perhaps the NNTP gods can patch it?  (-:
>


The NNTP "god" will patch it in the next release of NNTP which will be out
this weekend. How's that for service? 

It also fixes a number of other bugs.

Look for the patch in comp.sources.bugs, news.software.nntp, and news.software.b.

Look for the fully patched sources on lib.tmc.edu and gazette.bcm.tmc.edu.
These are the authoratative ftp archive sources. I am sure they will be 
available via uucp archive sources as well. 

-- 
Stan           internet: sob@bcm.tmc.edu         Director, Networking 
Olan           uucp: {rutgers,mailrus}!bcm!sob   and Systems Support
Barber         Opinions expressed are only mine. Baylor College of Medicine