🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1670

Re: Beware xargs security holes

#1670
From: =Engbert Gerrit IJff
Date: Tue, 30 Oct 1990 14:22
16 lines
1302 bytes
In article <303@cadlab.sublink.ORG>,
	staff@cadlab.sublink.ORG (Alex Martelli) writes:
) bhoughto@cmdnfs.intel.com (Blair P. Houghton) writes:
) 	...
) >>find / -name '#*' -print | egrep -v '.*/#[^/]*' | xargs rm -f --
) >Lose the -v, dimwit.
) 
) Won't "egrep '/#'" pass EXACTLY the same lines as "egrep '.*/#[^/]*'"???
) After all, it's not as if the RE had to match ALL of the incoming line!
) Yours for simpler, more regular expression of Regular Expressions...

Yes, you're right. However, if I am right, the original intention
was to delete files whose names started with the # character.
Shouldn't it be "egrep '/#[^/]*$'" then, to check on the basename?
							   ^
Bert IJff
Technical Details
Message-ID: <8093@star.cs.vu.nl>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ucsd!ucbvax!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!star.cs.vu.nl!engbert
References: <1990Oct24.0100 <john.656921455@troch> <649@inews.intel.com> <653@inews.intel.com> <303@cadlab.sublink.ORG>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ucsd!ucbvax!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!star.cs.vu.nl!engbert
From: engbert@cs.vu.nl (=Engbert Gerrit IJff)
Newsgroups: comp.unix.shell
Subject: Re: Beware xargs security holes
Message-ID: <8093@star.cs.vu.nl>
Date: 30 Oct 90 14:22:23 GMT
References: <1990Oct24.0100 <john.656921455@troch> <649@inews.intel.com> <653@inews.intel.com> <303@cadlab.sublink.ORG>
Sender: news@cs.vu.nl
Reply-To: engbert@cs.vu.nl (=Engbert Gerrit IJff)
Organization: VU Dept. of Computer Science, Amsterdam, The Netherlands
Lines: 16