From owner-cvs-all@FreeBSD.ORG Mon Dec 1 09:28:23 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3C8216A4CE for ; Mon, 1 Dec 2003 09:28:23 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 27CFE44013 for ; Mon, 1 Dec 2003 09:28:19 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 13415 invoked by uid 1000); 1 Dec 2003 17:28:19 -0000 Date: Mon, 1 Dec 2003 09:28:19 -0800 (PST) From: Nate Lawson To: Dmitry Morozovsky In-Reply-To: <20031201195318.O68895@woozle.rinet.ru> Message-ID: <20031201092551.A13395@root.org> References: <20031201163631.B160A16A557@hub.freebsd.org> <20031201084533.H13221@root.org> <20031201195318.O68895@woozle.rinet.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@freebsd.org cc: Mike Makonnen cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/etc/rc.d cleartmp X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2003 17:28:23 -0000 On Mon, 1 Dec 2003, Dmitry Morozovsky wrote: > On Mon, 1 Dec 2003, Nate Lawson wrote: > NL> > run_rc_command "$1" > NL> > + > NL> > +case ${OSTYPE} in > NL> > +FreeBSD) > NL> > + # Remove X lock files, since they will prevent you from > NL> > + # restarting X > NL> > + # > NL> > + rm -f /tmp/.X*-lock > NL> > + rm -fr /tmp/.X11-unix > NL> > + mkdir -m 1777 /tmp/.X11-unix > NL> > + ;; > NL> > +NetBSD) > NL> > + ;; > NL> > +esac > NL> > NL> How about .X[0-9]-lock instead of *? > > Hmm... what about (rare, but possible) situation with symlink poisoning? > > Maybe > > find /tmp -name '.X[0-9]-lock -type f | xargs rm -f > [ -d /tmp/.X11-unix ] && rm -rf /tmp/.X11-unix > mkdir -m 1777 /tmp/.X11-unix rm doesn't follow symlinks. But yes, filename poisoning is the kind of thing I thought needed to be solved. -Nate