[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: [PATCH] trans/fakeroot.c

From: Samuel Thibault
Subject: Re: RFC: [PATCH] trans/fakeroot.c
Date: Tue, 9 Jun 2015 14:20:05 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Svante Signell, le Tue 09 Jun 2015 11:41:01 +0200, a écrit :
> On Tue, 2015-06-09 at 11:11 +0200, Samuel Thibault wrote:
> > So the package is actually doing something stupid (yes, that's what you
> > should have written in your mail to explain what is happening, actually
> > :) ). But it does work as root as specified by POSIX, so we have to
> > support it.
> Yes I think there is a package bug (it's up to the package maintainer to
> write good code, not me pointing fingers):

Well, the code is supposed to be run by root, so it's actually sorta
"correct" :)

> New patch attached. Maybe you want to remove the second condition to add
> S_IXUSR unconditionally for directories.

There is no point in testing for the flag before setting it, indeed.

You also need to fix the indentation.

> +    if ((real_mode & S_IFDIR) 

I don't think it's so simple, see the precise S_IFMT bit matter. That
should most probably be rather an S_ISDIR call.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]