🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Peter Chalmers Fri, 04 Apr 1997 00:00
INN 1.5.1, parsecontrol logfiles bug?
#16711
Author: Peter Chalmers
Date: Fri, 04 Apr 1997 00:00
95 lines
3476 bytes
[Apologies if you've seen this before. A problem with our upstream feed
means I'm not sure it got out the first time.]

I've recently upgraded our news server (running SunOS4.1.3) to
INN-1.5.1, and I'm using the PGP verification facilities. This morning
I noticed the following messages in the errlog:

	pgpverify: closing pgp pipe returned status 32512
	/usr/news/bin/writelog: badpgp.log: Permission denied
	/usr/news/bin/writelog: badpgp.log: Permission denied
	/usr/news/bin/writelog: badpgp.log: Permission denied

These were generated by 3 PGP signed newgroup messages ostensibly from
David Lawrence for comp.infosystems.www.authoring.site-design,
stylesheets, & tools. Now, the question of why the verification failed
aside (I presume these were forged or not correctly signed, since the
tests of the PGP verification detailed in the INN source were
successful), what I want to know is why writelog got "permission
denied" trying to create the badpgp.log (and also what the "returned
status 32512" means).

I've had a look through the various scripts, and while I don't claim to
fully understand what's going on, it seems to me that parsecontrol
isn't quite right. The PGP verification stuff is at the end of the file
(I've included the version header as well):

>#! /bin/sh
>##  $Revision: 1.15 $
>##  Initial parsing of control messages.
>
><...>
>
>case "${LOGFILE}" in
>"")
>    LOGFILE=/dev/null
>    ;;
>mail|/*)
>    ;;
>*)
>    LOGFILE=${MOST_LOGS}/${LOGFILE}.log
>    ;;
>esac
>export LOGFILE
>
>if $PGPVERIFY; then
>    PGPSENDER=`pgpverify < ${ARTICLE}`;
>    PGP_STATUS=$?
>    case "${ACTION}:${PGP_STATUS}" in
>    verify:0)
>        case "${PGPAUTH}" in
>        "")
>            ACTION=mail
>            LOGFILE=mail
>            ;;
>        ${PGPSENDER})
>            ACTION=doit
>            ;;
>        *)
>            ACTION=mail
>            LOGFILE=mail
>            ;;
>        esac
>        ;;
>    # code 255 is failure to run pgp.
>    verify:255)
>        ACTION=logit
>        LOGFILE=failedpgp.log
>        ;;
>    # pgp ran, but failed to verify message.
>    verify:*)
>       ACTION=logit
>       LOGFILE=badpgp.log
>       ;;
>    esac
>fi
>

Shouldn't the 'if $PGPVERIGY...' section come *before* the 'case
"${LOGFILE}" in' section? Otherwise the badpgp.log and failedpgp.log
LOGFILEs don't get ${MOST_LOGS} prepended to them, and the reason I get
"permission" denied is because the news user is trying to create the
log files in the root directory. Or is this file correct and there's
something I don't understand?

Thanks for any hints,

Pete C.
--
Pete Chalmers               | Tel: +44 1245 242226
GEC-Marconi Research Centre | Fax: +44 1245 475244/478639
Chelmsford, CM2 8HN      UK | Internet: peter.chalmers@gecm.com
The opinions above are mine and not necessarily those of my employer

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads