Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Frank Mayhar
On Tue, 2 Aug 2005 11:47:19 -0500 (CDT) [EMAIL PROTECTED] wrote: > "When all you've got is a hammer, everything looks like a nail." Sorry, maybe it didn't have to be said. I tried, though, I did. -- Frank Mayhar [EMAIL PROTECTED] http://www.exit.com/ Exit Consulting http://www.g

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Craig Boston
Sigh, that's what I get for editing before I finish writing. On Tue, Aug 02, 2005 at 12:44:45PM -0500, Craig Boston wrote: > It's a very remote chance yes, but why ...but why take that chance when mkdir works perfectly fine? Chances are mkdir will be used at some point during the rc.d startup a

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Craig Boston
On Tue, Aug 02, 2005 at 11:47:19AM -0500, [EMAIL PROTECTED] wrote: > Well these notions have nothing todo with the way it works, but they are > interesting still. I would imagine a dir could be linked too if somebody > managed to insert a rc.d script in that was ordered sufficiently early > enough

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Brooks Davis
On Tue, Aug 02, 2005 at 11:47:19AM -0500, [EMAIL PROTECTED] wrote: > > On Mon, Aug 01, 2005 at 11:37:05PM -0500, [EMAIL PROTECTED] wrote: > >> Howdy hackers, > >> > >> I'm sorry for the previous patch, so here is at least one item that > >> really > >> bugs me that isn't obfuscation. In short, I do

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread diz
> On Mon, Aug 01, 2005 at 11:37:05PM -0500, [EMAIL PROTECTED] wrote: >> Howdy hackers, >> >> I'm sorry for the previous patch, so here is at least one item that >> really >> bugs me that isn't obfuscation. In short, I don't see any reason to fork >> some process to simply "touch" a file (is a files

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Vasil Dimov
On Tue, Aug 02, 2005 at 02:38:36PM +0300, Giorgos Keramidas wrote: > On 2005-08-02 14:05, Vasil Dimov <[EMAIL PROTECTED]> wrote: > >On Tue, Aug 02, 2005 at 12:33:48PM +0300, Giorgos Keramidas wrote: > >>On 2005-08-02 09:29, Vasil Dimov <[EMAIL PROTECTED]> wrote: > *) > - if (/bin/m

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Joerg Sonnenberger
On Tue, Aug 02, 2005 at 04:08:12PM +0300, Vasil Dimov wrote: > On Tue, Aug 02, 2005 at 01:15:35PM +0200, Joerg Sonnenberger wrote: > > On Tue, Aug 02, 2005 at 02:06:32PM +0300, Vasil Dimov wrote: > > > On Tue, Aug 02, 2005 at 12:52:34PM +0200, Dario Freni wrote: > > > > Vasil Dimov wrote: > > > > >

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Vasil Dimov
On Tue, Aug 02, 2005 at 01:15:35PM +0200, Joerg Sonnenberger wrote: > On Tue, Aug 02, 2005 at 02:06:32PM +0300, Vasil Dimov wrote: > > On Tue, Aug 02, 2005 at 12:52:34PM +0200, Dario Freni wrote: > > > Vasil Dimov wrote: > > > > Even we can use > > > > if [ -d /tmp -a -w /tmp ] ; then > > > > or (w

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Giorgos Keramidas
On 2005-08-02 14:05, Vasil Dimov <[EMAIL PROTECTED]> wrote: >On Tue, Aug 02, 2005 at 12:33:48PM +0300, Giorgos Keramidas wrote: >>On 2005-08-02 09:29, Vasil Dimov <[EMAIL PROTECTED]> wrote: *) - if (/bin/mkdir -p /tmp/.diskless 2> /dev/null); then - rmdir /tmp/.d

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Joerg Sonnenberger
On Tue, Aug 02, 2005 at 02:06:32PM +0300, Vasil Dimov wrote: > On Tue, Aug 02, 2005 at 12:52:34PM +0200, Dario Freni wrote: > > Vasil Dimov wrote: > > > Even we can use > > > if [ -d /tmp -a -w /tmp ] ; then > > > or (which is equivalent) > > > if [ -d /tmp ] && [ -w /tmp ] ; then > > > and save ex

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Vasil Dimov
On Tue, Aug 02, 2005 at 12:52:34PM +0200, Dario Freni wrote: > Vasil Dimov wrote: > > Even we can use > > if [ -d /tmp -a -w /tmp ] ; then > > or (which is equivalent) > > if [ -d /tmp ] && [ -w /tmp ] ; then > > and save external commands (mkdir) execution and directory > > creation/deletion at al

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Vasil Dimov
On Tue, Aug 02, 2005 at 12:33:48PM +0300, Giorgos Keramidas wrote: > On 2005-08-02 09:29, Vasil Dimov <[EMAIL PROTECTED]> wrote: > > > --- /etc/rc.d/tmp.orig Mon Aug 1 23:20:24 2005 > > > +++ /etc/rc.d/tmp Mon Aug 1 23:22:07 2005 > > > @@ -48,8 +48,8 @@ > > > [Nn][Oo]) > > > ;; >

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Dario Freni
Vasil Dimov wrote: > Even we can use > if [ -d /tmp -a -w /tmp ] ; then > or (which is equivalent) > if [ -d /tmp ] && [ -w /tmp ] ; then > and save external commands (mkdir) execution and directory > creation/deletion at all. You can't use test -w here. The script is checking if there is a read-o

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-02 Thread Giorgos Keramidas
On 2005-08-02 09:29, Vasil Dimov <[EMAIL PROTECTED]> wrote: > > --- /etc/rc.d/tmp.orig Mon Aug 1 23:20:24 2005 > > +++ /etc/rc.d/tmp Mon Aug 1 23:22:07 2005 > > @@ -48,8 +48,8 @@ > > [Nn][Oo]) > > ;; > > *) > > - if (/bin/mkdir -p /tmp/.diskless 2> /dev/null); then > > -

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-01 Thread Vasil Dimov
On Mon, Aug 01, 2005 at 11:37:05PM -0500, [EMAIL PROTECTED] wrote: > Howdy hackers, > > I'm sorry for the previous patch, so here is at least one item that really > bugs me that isn't obfuscation. In short, I don't see any reason to fork > some process to simply "touch" a file (is a filesystem wri

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-01 Thread YONETANI Tomokazu
On Mon, Aug 01, 2005 at 11:37:05PM -0500, [EMAIL PROTECTED] wrote: > I'm sorry for the previous patch, so here is at least one item that really > bugs me that isn't obfuscation. In short, I don't see any reason to fork > some process to simply "touch" a file (is a filesystem writable) when > built-

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-01 Thread diz
All the while I point to code example of this exact same usage being deployed in the system already, and in the same exact situation. I see no reason why you must bikeshed on this. Correctness is always correct, despite established bad'ism, and in this case I am carefull to use an already approved

Re: [patch] rc.d/tmp (silly mkdir usage)

2005-08-01 Thread Frank Mayhar
On Mon, 1 Aug 2005 23:37:05 -0500 (CDT) [EMAIL PROTECTED] wrote: > I grep'ed the entire rc.d dir, and found that the same technique is used > elsewhere in accounting, and cleanvar. So I feel justified this time, > although please review, and thanks for the look. While I understand the > need to wan

[patch] rc.d/tmp (silly mkdir usage)

2005-08-01 Thread diz
Howdy hackers, I'm sorry for the previous patch, so here is at least one item that really bugs me that isn't obfuscation. In short, I don't see any reason to fork some process to simply "touch" a file (is a filesystem writable) when built-in shell i/o does this: --- /etc/rc.d/tmp.orig Mon Aug 1