[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] Missing 240 response



Hello!

leafnode doesn't return a "240" on accepting a posting to a non-local,
moderated group without moderator in /etc/leafnode/moderators if it
doesn't contain an Approved header¹.

This is because "(!moderator && !islocal(groups)) && (modgroup &&
!approved)" evaluates true for this case and thus dopost() returns
without sending the NNTP response.

nntpd.c:dopost():1410

	if (!moderator && !islocal(groups)) {
	    /* also posted to external groups or moderated group with
	       unknown moderator, store into out.going */
	    char s[PATH_MAX + 1];	/* FIXME: overflow possible */
	    outbasename = strrchr(inname, '/');
	    outbasename++;
	    sprintf(s, "%s/out.going/%s", spooldir, outbasename);
	    if (sync_link(inname, s)) {
		ln_log(LNLOG_SERR, LNLOG_CARTICLE,
		       "unable to schedule for posting to upstream, "
		       "link %s -> %s failed: %m", inname, s);
		nntpprintf("503 Could not schedule article for posting "
			   "to upstream, see syslog.");
		log_unlink(inname);
		return;
	    }
	    if (modgroup && !approved) {
		free(modgroup);
		log_unlink(inname);
		return;
	    }
	}

[...]

	switch (fork()) {

[...]

	default:
	    nntpprintf("240 Article posted, now be patient");
	    break;
	}			/* switch(fork()) */


I'm completely unsure why dopost() returns that early so I didn't
write a patch.

Cheers, Ray
_______ 
¹ Under what circumstances does it make sense to specify
moderators for non-local groups at all?
-- 
Raymond Scholz - rscholz@xxxxxxxx - PGP - http://www.zonix.de/

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list