Article View: news.software.nn
Article #498Fix for SCO posting with nnpost to cnews
From: Kevin W. Reed
Date: Tue, 29 May 1990 22:41
Date: Tue, 29 May 1990 22:41
85 lines
3473 bytes
3473 bytes
The following is how I fixed my posting problems using nn 6.4.3 and Cnews.
History:
SCO Xenix 386 2.3.2
Could not post, mail or forward using nn 6.4.3 on a Cnews system. Actually
the article could be posted but the users name would be missing. Mail and
forwarding did not work at all.
Cnews 'postnews' work without any problems.
Solution:
It seems that for some reason, when inews is called from nn it is no longer
attached to a terminal (?) and since this is so, who am i fails. When called
from postnews it works ok.
What I did (with the help of Geoff Collyer as he pointed out what was wanted),
I removed the section that didn't work with a simple USER=`/usr/bin/logname'
and Wala.... it works...
I still don't know what the ypmatch is, but it evidently doesn't get that
far...
Below is a diff file for the change.
BTW: I liked the comment in anne.jones :-)
# dig up user's name (a simple task, you'd think, but you'd be wrong)
Thanks for the help guys...
<<this message was posted with nnpost>>
*** anne.jones Tue May 29 14:10:40 1990
--- anne.jones.new Tue May 29 14:10:18 1990
***************
*** 28,58
# badsites="pucc.bitnet!" # tailor, syntax is "host1!host2!...host3!"
host="$mailname"
! # dig up user's name (a simple task, you'd think, but you'd be wrong)
! case "$LOGNAME" in
! "")
! # "who am i" on many Unixes does "ttyname(0)" and "getpwuid(getuid())"
! # if that fails - it can be confused by empty utmp entries (per jerqs);
! # "who am i </dev/null" yields your userid, not your login name.
! # "tty" does "ttyname(0)"; also fallible.
! # So, emulate a slightly-modified V7 getlogin(3) (actually ttyslot(3)):
! # look for tty on /dev/tty, stdin, stdout, stderr (actually via ttyname(3)).
! for fd in 3 0 1 2 # 3 is /dev/tty on V8
! do
! if test -t $fd; then
! case "$USER" in
! "") USER="`who am i <&$fd |
! sed -e 's/[ ].*//' -e '/!/s/^.*!//' `" ;;
! esac
! fi
! done
! case "$USER" in
! "") USER="`who am i </dev/null | # last resort: use userid
! sed -e 's/[ ].*//' -e '/!/s/^.*!//' `" ;;
! esac
! ;;
! *) USER="$LOGNAME" ;;
! esac
case "$NAME" in
"")
if test -s $HOME/.name; then
--- 28,35 -----
# badsites="pucc.bitnet!" # tailor, syntax is "host1!host2!...host3!"
host="$mailname"
! USER=`/usr/bin/logname`
!
case "$NAME" in
"")
if test -s $HOME/.name; then
--
Kevin W. Reed - TeleSys Development Systems - San Diego - Voice (619) 270-1338
{nosc,ucsd,hplabs!hp-sdd}!crash!telesys!kreed --- XBBS & telesys.UUCP 483-3890
kreed@telesys.cts.com --------- Development Site for ARC Business Systems, Inc
Technical Details
Message-ID:
<1990May29.224134.6404@telesys.cts.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!hubcap!ncrcae!ncr-sd!serene!telesys!kreedShow Full Headers
Complete Article Headers
Message-ID: <1990May29.224134.6404@telesys.cts.com> Subject: Fix for SCO posting with nnpost to cnews Date: Tue, 29 May 1990 22:41:34 +0000 From: kreed@telesys.cts.com (Kevin W. Reed) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!hubcap!ncrcae!ncr-sd!serene!telesys!kreed Newsgroups: news.software.nn,news.software.b Summary: Fixes cnews so that nn can post, forward and mail Keywords: nnpost nn cnews posting Organization: TeleSys Development Systems, San Diego, CA Lines: 84