Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!ukc!yorkohm!nigelm From: nigelm@ohm.york.ac.uk (Nigel Metheringham) Newsgroups: news.software.b Subject: Re: "fascist" option (or posting security) Message-ID: <1991May1.124919.8706@ohm.york.ac.uk> Date: 1 May 91 12:49:19 GMT References: <1991Apr26.070028.705000@zeus.calpoly.edu> <17196@celit.fps.com> Organization: Electronics Department, University of York, UK Lines: 50 [Reposted, because the idiot who set up nn set the default distribution to campus - shame that me and that idiot share a brain!] I haven't looked at this very hard yet, but think it may be a reasonable way of getting fascism in C-News. If not I'm sure someone will point out the problems fast enough. Basic premises:- + Posting is done with inews. + Inews calls relaynews after mangling the headers. + relaynews is also called by the incoming batch processors (from a cron job running UID news). + relaynews currently runs setuid news to allow it to write the news articles themselves. + relaynews can be called directly, bypassing anything you put into inews, making inews a bad place to do this... + relaynews only needs to be setuid for local posting - ie anything going through inews - everything else calls it with the correct uid. So, why can't we knock the setuid bits off relaynews, and then add a small setuid (news) program (maybe called injectnews), which is the one called by inews. relaynews would still work for processing batches etc, but could not be called by normal users to bypass the protections... injectnews checks the current UID against a stop list (or for the really fascist, against a valid posters list). If it accepted someone then it could be passed on to relaynews (which would be run from injectnews, and inherit the setuid status), otherwise it could drop the article or maybe the distribution header could be rewritten. For my own use, it would need to look at and possibly limit the distribution header. Since posting new news tends not to be the most common operation of the news system this should not hit performance badly. So, comments please, before I get my trusty C compiler out.... (Actually it sounds like a job for Perl to me...) Nigel. -- # Nigel Metheringham # EMail: nigelm@ohm.york.ac.uk # # System Administrator # Phone: +44 904 432374 # # Department of Electronics # Fax: +44 904 432335 # # University of York, Heslington, York, UK, YO1 5DD #