🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #19219

Pnews & NNTP problem in trn 3.6

#19219
From: Rudolph Todd Maceyko
Date: Thu, 15 Feb 1996 00:00
92 lines
2912 bytes
I recently made the following patch to our Pnews to avoid a problem
where a malicious user could create his own active and/or newsgroups
file in /tmp and all other users on the machines would then use them.
This patch causes Pnews to disregard /tmp/active and/or /tmp/newsgroups
when configured to use NNTP.

I hope that something like this will make it into trn 4.0.

Thanks,
Rudy

-- 
Rudy Maceyko <rm55+@pitt.edu>
Computing & Information Services
University of Pittsburgh


*** 3.0	1992/02/23 21:25:39
--- Pnews.SH	1996/02/15 19:17:28
***************
*** 5,9 ****
  $spitshell >Pnews <<!GROK!THIS!
  $startsh
! # $Id: Pnews.SH,v 3.0 1992/02/23 21:25:39 davison Trn $
  # 
  # This software is Copyright 1991 by Stan Barber. 
--- 5,9 ----
  $spitshell >Pnews <<!GROK!THIS!
  $startsh
! # $Id: Pnews.SH,v 3.0.1.1 1996/02/15 19:16:45 rm55 Exp $
  # 
  # This software is Copyright 1991 by Stan Barber. 
***************
*** 110,134 ****
  
  tmp="${TMPDIR-/tmp}"
- newsgroups=${NEWSGROUPS-$lib/newsgroups}
- active=${NEWSACTIVE-$active}
- case "$active" in
- none) active="$tmp/Pnact.$$";;
- esac
  news_sig=${NEWSSIGNATURE-$dotdir/.news_sig}
  
  case "$NETSPEED" in
  fast)
!     if $test ! -f "$newsgroups"; then
! 	newsgroups="$tmp/Pnng.$$";
! 	rmlist="$newsgroups";
! 	cmdlist="$nntplist -o $newsgroups newsgroups ;";
!     fi
!     if $test ! -f "$active"; then
! 	active="$tmp/Pnact.$$";
! 	rmlist="$rmlist $active";
! 	cmdlist="$cmdlist $nntplist -o $active active";
!     fi
      ;;
  esac
  
  if $test -f $dotdir/.pnewsexpert; then
--- 110,139 ----
  
  tmp="${TMPDIR-/tmp}"
  news_sig=${NEWSSIGNATURE-$dotdir/.news_sig}
+ !NO!SUBS!
+ if $test "$d_nntp" = define; then
+ $spitshell >>Pnews <<'!NO!SUBS!'
+ newsgroups="$tmp/Pnng.$$"
+ active="$tmp/Pnact.$$"
  
  case "$NETSPEED" in
  fast)
!     rm -f "$newsgroups"
!     rmlist="$newsgroups";
!     cmdlist="$nntplist -o $newsgroups newsgroups ;";
! 
!     rm -f "$active"
!     rmlist="$rmlist $active";
!     cmdlist="$cmdlist $nntplist -o $active active";
      ;;
  esac
+ !NO!SUBS!
+ else
+ $spitshell >>Pnews <<'!NO!SUBS!'
+ newsgroups=${NEWSGROUPS-$lib/newsgroups}
+ active=${NEWSACTIVE-$active}
+ !NO!SUBS!
+ fi
+ $spitshell >>Pnews <<'!NO!SUBS!'
  
  if $test -f $dotdir/.pnewsexpert; then

Technical Details
Message-ID: <4g01k1$eae@usenet.srv.cis.pitt.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <4g01k1$eae@usenet.srv.cis.pitt.edu>
Subject: Pnews & NNTP problem in trn 3.6
Date: Thu, 15 Feb 1996 00:00:00 +0000
From: rm55+@pitt.edu (Rudolph Todd Maceyko)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 139522751
Organization: University of Pittsburgh
Newsgroups: news.software.readers
Summary: Pnews NNTP active newsgroups patch