[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: [PATCH] trans/fakeroot.c
From: |
Svante Signell |
Subject: |
Re: RFC: [PATCH] trans/fakeroot.c |
Date: |
Tue, 09 Jun 2015 17:15:58 +0200 |
On Tue, 2015-06-09 at 16:58 +0200, Samuel Thibault wrote:
> 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;
Sorry I forgot to hit <TAB> on that line. New patch attached for
convenience.
> 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?
I've built pycorrfit and hurd so far, no issues yet. Will build glibc,
gnat-4.9 and gcc-5 to be sure.
trans_fakeroot_chmod.patch
Description: Text Data
- Re: RFC: [PATCH] trans/fakeroot.c, (continued)
- 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, 2015/06/09
- Re: RFC: [PATCH] trans/fakeroot.c,
Svante Signell <=
- 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