From:	AITGW::"ben%SPCVXB.SPC.EDU@VM1.NoDak.EDU" "Ben Cohen"  8-NOV-1991 04:40:04.42
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	NNTP not remotely sending locally posted items [+WORKAROUND]

Received: by AITGW.DECnet (utk-mail11 v1.5) ; Fri, 8 Nov 91 04:40:22 EST
Received: from vm1.NoDak.edu by aitgw.ge.com (5.65/GE Gateway 1.4)
	id AA13694; Fri, 8 Nov 91 04:40:11 -0500
Message-Id: <9111080940.AA13694@aitgw.ge.com>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 4698; Fri, 08 Nov 91 03:38:55 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 5099; Fri, 08 Nov 91 03:38:54 CST
Date:         Thu, 7 Nov 1991 23:40:36 GMT
Reply-To: Ben Cohen <ben%SPCVXB.SPC.EDU@VM1.NoDak.EDU>
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: Ben Cohen <ben%SPCVXB.SPC.EDU@VM1.NoDak.EDU>
Subject:      NNTP not remotely sending locally posted items [+WORKAROUND]
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
Subject: NNTP not remotely sending locally posted items
Index: [.NEWS_SRC]/multiple-files NEWS6.0-3 [+WORKAROUND]
 
Description:
        This was discovered as being a problem for NNTP_TCPUCXM, but it
        may exist for other versions of NNTP, since it is a somewhat
        insidious bug. Items which are posted via NNTP will appear to
        be posted properly, since they will be present in the server's
        database, but will not be relayed to any neighbors (as defined
        in the NEWS.SYS file).
 
        In NEWSDIST.C/sys_remote_send(), there is an explicit reference
        to SYS$SCRATCH to create a temporary file. If this file cannot
        be created, sys_remote_send() returns immediately with no error
        indication. For a server program which runs as a detached process,
        SYS$SCRATCH will _NOT_ be explicitly defined. Note that this
        routine is called _after_ the item is added to the local news
        spool.
 
Repeat-By:
        Using an NNTP news reader, post an item (to misc.test, usually).
        After you receive a "post successful" message, examine the out-
        going batch file(s) in the spooling directory (determined from
        NEWS.SYS). Note that your article/article-ID (depending on
        transmission method) is not present.
 
Workaround:
        This is not a true _fix_, since it doesn't address the intrinsic
        problem of sys_remote_send() attempting to use SYS$SCRATCH.
 
        To start up an NNTP server process [instance], use a two-stage
        .COM setup. The first .COM should RUN/DETACH SYS$SYSTEM:LOGINOUT.EXE
        with any necessary process parameters and SYS$INPUT defined as
        the second .COM file. The second .COM should DEFINE SYS$SCRATCH
        as NEWS_MANAGER and then run the server program.
 
        Please note that this definitely works for NNTP_TCPUCXM which
        is a multi-threaded server. I don't know how it will affect an
        NNTP server which uses a separate process for each server
        instance.
 
        Included after this problem report are the two files used here
        at St. Peter's College to work-around this problem, as samples
        which should be usable at other sites, after modification.
 
Suggested real fix(es):
        1) add to NNTP_SERVER/server_init(): check for existence of
        SYS$SCRATCH. If this logical is not defined, explicitly define
        it (process context) as NEWS_MANAGER.
 
        2) change NEWSDIST/sys_remote_send() to return a success/failure
        value rather than silently failing if there is an error. Note
        that there are _many_ error checks in this routine and _all_
        of them will just fail with no error indication.
 
Additional note:
        1) for some reason, the .ITM files created by the NNTP_SERVER
        are created with protection (G:R,W:R), whereas those created
        by the regular NEWS.EXE have protection (G:RE,W:RE). To correct
        this, there are two chmod(,0744) calls in NNTP_SERVER/do_new_item()
        which should be changed to chmod(,0755).
--------------------
 
NEWS_MANAGER:START_NNTP_DAEMON.COM
 
$ ! Start_NNTP_daemon.COM
$ !     Start up the NNTP news server.
$ !
$ run /proc="UCX/NNTP server" /uic=[newsmgr] -
        /working_set=8182 /maximum_working_set=8192 -
        /input=news_manager:run_nntp_daemon.com /output=nla0: /error=nla0: -
        sys$system:loginout.exe
 
NEWS_MANAGER:RUN_NNTP_DAEMON.COM
 
$ def sys$scratch news_manager
$ run news_manager:nntp_tcpucxm.exe
--
Ben Cohen               ben@st.canard.spc.edu, ...!rutgers!spcvxb!ben
St. Peter's College     Jersey City, NJ  USA -or- 40-42-57 N/74 03 54 W
