From owner-freebsd-security Tue Jan 30 11: 6:56 2001 Delivered-To: freebsd-security@freebsd.org Received: from mail.gmx.net (sproxy.gmx.net [194.221.183.20]) by hub.freebsd.org (Postfix) with SMTP id 624B237B6AD for ; Tue, 30 Jan 2001 11:06:35 -0800 (PST) Received: (qmail 19521 invoked by uid 0); 30 Jan 2001 19:06:33 -0000 Received: from p3ee21603.dip.t-dialin.net (HELO speedy.gsinet) (62.226.22.3) by mail.gmx.net (mp016-rz3) with SMTP; 30 Jan 2001 19:06:33 -0000 Received: (from sittig@localhost) by speedy.gsinet (8.8.8/8.8.8) id TAA12277 for freebsd-security@freebsd.org; Tue, 30 Jan 2001 19:50:57 +0100 Date: Tue, 30 Jan 2001 19:50:56 +0100 From: Gerhard Sittig To: freebsd-security@freebsd.org Subject: Re: cvs commit: src/usr.bin/login login.c Message-ID: <20010130195056.C253@speedy.gsinet> Mail-Followup-To: freebsd-security@freebsd.org References: <7897.980850042@axl.fw.uunet.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <7897.980850042@axl.fw.uunet.co.za>; from sheldonh@uunet.co.za on Tue, Jan 30, 2001 at 12:20:42PM +0200 Organization: System Defenestrators Inc. Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, Jan 30, 2001 at 12:20 +0200, Sheldon Hearn wrote: > > On Tue, 30 Jan 2001 05:08:09 EST, Stu Pidaso wrote: > > > > # Destroy all stale Kerberos5 tickets > > > # > > > for i in `find /tmp -name 'krb5cc_*' -ctime +1 -print` ; do > > > rm -f $i > > > done > > > > and now you can delete you can delete any file in /tmp. > > > > touch 'krb5cc_1 somefileintmp' and wait. > > Well spotted. > > find /tmp -name 'krb5cc_*' -ctime +1 -exec rm -f {} \; > > I don't use -delete because it's not portable. What about the -print0 option and xargs(1)? Is it as portable as the above construction? Since this would result in less load (*much* less exec'ed processes). The "The xargs utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compliant." part of `man xargs` gives me hope ... find /tmp -name 'krb5cc_*' -ctime +1 -print0 | xargs -0 rm -f virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" Gerhard.Sittig@gmx.net -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message