mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Tim Cuthbertson <tim@gfxmonk.net>
Cc: musl@lists.openwall.com
Subject: Re: [musl] Bug: installed symlinks are unreadable on MacOS
Date: Wed, 31 Jan 2024 18:32:51 -0500	[thread overview]
Message-ID: <20240131233251.GZ22081@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAC-LLDjK+Tx1_APJ-dwfdxz78+nQTekqkCrw3Ms9=zRTDHBmtw@mail.gmail.com>

On Thu, Feb 01, 2024 at 09:39:56AM +1100, Tim Cuthbertson wrote:
> Yeah, setting it to `chmod 000` in just the symlink branch seems good to me
> too.
> 
> Looking at the script more closely, `mode` is always set and so I'm unclear
> why there is also a `umask 077` at all. Whatever permissions we create the
> file with, we `chmod` it explicitly before doing anything else.
> 
> Is that line just there to undo the potential change to `umask` in the
> mkdirp branch? If so, maybe that should be done explicitly by capturing the
> old umask? e.g:

No, it's so that the install.sh never exposes a file to users who
should not have access to it via the existing umask being more
permissive than the requested install mode. Normally this does not
matter for use as part of musl's install process, but the script is
written to be general and not have security bugs like that.

Rich

  reply	other threads:[~2024-01-31 23:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31  2:30 Tim Cuthbertson
2024-01-31 13:47 ` Rich Felker
2024-01-31 22:39   ` Tim Cuthbertson
2024-01-31 23:32     ` Rich Felker [this message]
2024-02-02  2:42       ` Tim Cuthbertson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240131233251.GZ22081@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    --cc=tim@gfxmonk.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).