nntpsend overwrites backlogs

Russell Vincent russellv at uk.uu.net
Wed Sep 1 15:34:47 UTC 1999


inn/samples/nntpsend.in:
  - prevent nntpsend from overwriting its own batches when using
    storageapi and under certain circumstances (most likely when
    innxmit to a site isn't running and there is already a backlog).

This is a rather critical error. Patch applies to -stable, but
probably fits -current too.

 -Russell

Index: inn/samples/nntpsend.in
===================================================================
RCS file: /news/cvs/inn/samples/nntpsend.in,v
retrieving revision 1.11.2.1
diff -c -r1.11.2.1 nntpsend.in
*** nntpsend.in	1999/06/28 09:32:31	1.11.2.1
--- nntpsend.in	1999/09/01 15:31:49
***************
*** 352,358 ****
      if [ -f "${SITE}.work" ] ; then
  	if [ X${STORAGEAPI} = X"true" -o X${STORAGEAPI} = X"yes" -o \
  			X${STORAGEAPI} = X"on" ]; then
! 	    mv "${SITE}.work" "${BATCHFILE}"
  	else
  	    sort "${SITE}.work" >>"${BATCHFILE}"
  	    rm -f "${SITE}.work"
--- 352,359 ----
      if [ -f "${SITE}.work" ] ; then
  	if [ X${STORAGEAPI} = X"true" -o X${STORAGEAPI} = X"yes" -o \
  			X${STORAGEAPI} = X"on" ]; then
! 	    cat "${SITE}.work" >>"${BATCHFILE}"
! 	    rm -f "${SITE}.work"
  	else
  	    sort "${SITE}.work" >>"${BATCHFILE}"
  	    rm -f "${SITE}.work"
***************
*** 364,370 ****
  	if ctlinnd -s -t30 flush ${SITE} ; then
  	    if [ X${STORAGEAPI} = X"true" -o X${STORAGEAPI} = X"yes" -o \
  			X${STORAGEAPI} = X"on" ]; then
! 		mv ${SITE}.work "${BATCHFILE}"
  	    else
  		sort ${SITE}.work >>"${BATCHFILE}"
  		rm -f ${SITE}.work
--- 365,372 ----
  	if ctlinnd -s -t30 flush ${SITE} ; then
  	    if [ X${STORAGEAPI} = X"true" -o X${STORAGEAPI} = X"yes" -o \
  			X${STORAGEAPI} = X"on" ]; then
! 		cat ${SITE}.work >>"${BATCHFILE}"
! 		rm -f ${SITE}.work
  	    else
  		sort ${SITE}.work >>"${BATCHFILE}"
  		rm -f ${SITE}.work


More information about the inn-patches mailing list