[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 16:58:44 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Svante Signell, le Tue 09 Jun 2015 16:46:14 +0200, a écrit :
> On Tue, 2015-06-09 at 14:20 +0200, Samuel Thibault wrote:
> > 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" :)
>
> The difference is that real root can change the directory mode to
> drw-r--r-- and still access everything below, but fakeroot has to do at
> least drwxr--r- for anybody except root itself to read that directory.
Yes, that's what I meant.
> New patch attached using the IS_ISDIR macro. Better now?
Yes, except that
> - if (nn->openmodes & O_EXEC)
> - real_mode |= S_IXUSR;
> + real_mode = mode | S_IRUSR | S_IWUSR;
> + if (S_ISDIR (mode))
> + real_mode |= S_IXUSR;
This should be 2-space indentation like the rest of the file.
I'm also wondering whether we'd want to set IXUSR when
openmodes & O_EXEC.
BTW, I guess you have tested the patch?
Samuel
- Re: RFC: [PATCH] trans/fakeroot.c, Samuel Thibault, 2015/06/05
- Re: RFC: [PATCH] trans/fakeroot.c, Svante Signell, 2015/06/09
- Re: RFC: [PATCH] trans/fakeroot.c, Samuel Thibault, 2015/06/09
- Re: RFC: [PATCH] trans/fakeroot.c, Samuel Thibault, 2015/06/09
- Re: RFC: [PATCH] trans/fakeroot.c, Svante Signell, 2015/06/09
- Re: RFC: [PATCH] trans/fakeroot.c, Samuel Thibault, 2015/06/09
- Re: RFC: [PATCH] trans/fakeroot.c, Svante Signell, 2015/06/09
- Re: RFC: [PATCH] trans/fakeroot.c,
Samuel Thibault <=
- Re: RFC: [PATCH] trans/fakeroot.c, Svante Signell, 2015/06/09
- Re: RFC: [PATCH] trans/fakeroot.c, Svante Signell, 2015/06/10
- Re: RFC: [PATCH] trans/fakeroot.c, Svante Signell, 2015/06/10
- Re: RFC: [PATCH] trans/fakeroot.c, Samuel Thibault, 2015/06/16