On 2014/02/06 06:44:48, minux wrote: > Hello mailto:golang-codereviews@googlegroups.com, > > I'd like you to review ...
11 years, 5 months ago
(2014-02-06 20:15:08 UTC)
#2
On 2014/02/06 06:44:48, minux wrote:
> Hello mailto:golang-codereviews@googlegroups.com,
>
> I'd like you to review this change to
> https://code.google.com/p/go
This seems like it'll still be wrong for a setup where users share a primary
group: now jdoe:users with umask 0022 will be creating a g+w file.
On Thu, Feb 6, 2014 at 3:15 PM, <tommi.virtanen@gmail.com> wrote: > On 2014/02/06 06:44:48, minux ...
11 years, 5 months ago
(2014-02-06 20:33:34 UTC)
#3
On Thu, Feb 6, 2014 at 3:15 PM, <tommi.virtanen@gmail.com> wrote:
> On 2014/02/06 06:44:48, minux wrote:
>
>> Hello mailto:golang-codereviews@googlegroups.com,
>>
>
> I'd like you to review this change to
>> https://code.google.com/p/go
>>
>
> This seems like it'll still be wrong for a setup where users share a
> primary group: now jdoe:users with umask 0022 will be creating a g+w
> file.
ok, g-w. PTAL.
On 2014/02/06 20:33:34, minux wrote: > On Thu, Feb 6, 2014 at 3:15 PM, <mailto:tommi.virtanen@gmail.com> ...
11 years, 5 months ago
(2014-02-06 20:43:41 UTC)
#4
On 2014/02/06 20:33:34, minux wrote:
> On Thu, Feb 6, 2014 at 3:15 PM, <mailto:tommi.virtanen@gmail.com> wrote:
>
> > On 2014/02/06 06:44:48, minux wrote:
> >
> >> Hello mailto:golang-codereviews@googlegroups.com,
> >>
> >
> > I'd like you to review this change to
> >> https://code.google.com/p/go
> >>
> >
> > This seems like it'll still be wrong for a setup where users share a
> > primary group: now jdoe:users with umask 0022 will be creating a g+w
> > file.
>
> ok, g-w. PTAL.
I'm quite pessimistic about just blindly using 0755 leading to anything good,
either. I can't see a reliable way out of this without having the end result
affected by umask somehow. If you can't / don't want to deal with umask, you
can't chmod blindly. Perhaps you should take a isExec bool and do a
read-edit-write cycle on the mode, adjusting just that?
On 2014/02/06 20:43:41, Tv wrote: > On 2014/02/06 20:33:34, minux wrote: > > On Thu, ...
11 years, 5 months ago
(2014-02-06 20:47:57 UTC)
#5
On 2014/02/06 20:43:41, Tv wrote:
> On 2014/02/06 20:33:34, minux wrote:
> > On Thu, Feb 6, 2014 at 3:15 PM, <mailto:tommi.virtanen@gmail.com> wrote:
> >
> > > On 2014/02/06 06:44:48, minux wrote:
> > >
> > >> Hello mailto:golang-codereviews@googlegroups.com,
> > >>
> > >
> > > I'd like you to review this change to
> > >> https://code.google.com/p/go
> > >>
> > >
> > > This seems like it'll still be wrong for a setup where users share a
> > > primary group: now jdoe:users with umask 0022 will be creating a g+w
> > > file.
> >
> > ok, g-w. PTAL.
>
> I'm quite pessimistic about just blindly using 0755 leading to anything good,
> either. I can't see a reliable way out of this without having the end result
> affected by umask somehow. If you can't / don't want to deal with umask, you
> can't chmod blindly. Perhaps you should take a isExec bool and do a
> read-edit-write cycle on the mode, adjusting just that?
On second thought, there's probably a bunch of other things doing install -m0755
and equivalent, so I guess 0755 / 0644 have to be good enough. (If your umask is
weirder than that, things just in general won't follow suit.)
LGTM
Issue 60480045: code review 60480045: cmd/go: do not create world-writable files.
(Closed)
Created 11 years, 5 months ago by minux1
Modified 11 years, 5 months ago
Reviewers:
Base URL:
Comments: 0