mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: _PATH_LASTLOG
Date: Tue, 3 Dec 2013 15:25:02 -0500	[thread overview]
Message-ID: <20131203202502.GO24286@brightrain.aerifal.cx> (raw)
In-Reply-To: <CACCP0GqMqf2BmH+mts31_nuqLR_jzqCSLsMxSDVYSu=nk8XRwA@mail.gmail.com>

On Tue, Dec 03, 2013 at 08:10:56PM +0000, Raphael Cohn wrote:
> Thanks for that - just having a list is an useful place to start. I think
> the default file names are quite sensible - especially for a common
> run-anywhere use case. And some - where mandated by POSIX - probably should
> never change. What would be nice might be to be able to define the prefix
> for /etc to something else (so we can use atomic symlink changes to flip
> configs).

Are you also talking about having separate configuration dirs for each
package? Would each package need its own user database (passwd file),
DNS configuration (which the DHCP client would have to update), etc.?
The intent in musl is that the "config"-like files it reads from /etc
are not things that should be application-local but system-global.
Obviously there are different views on what's local/global, though.
One problem I'd like to solve is making a way for users to override
the system resolv.conf; this would be especially valuable for us (musl
developers) writing test cases for the resolver, in that we could
redirect lookups to a fake DNS daemon running in a separate thread of
the test program serving fixed, possibly-intentionally-malformed
replies.

> I'd like to have more of a think about the other paths. We're only a short
> way into our project, so our ideas might change. What we're looking at is a
> Nixos-like linux, where we rebuild only packages because other packages
> have changed. We want to keep every package isolated, so we can apply PATH
> controls, fine-grained capability permissions, chattr -ai, etc. Part of
> doing this means we don't want paths 'hanging around' inside libraries that
> are used if present - as these allow an attacker (or more likely, a duff
> package) to accidentally stop itself working, ie if there's no /usr/lib on
> system, then nothing should be able to stick itself in /usr/lib and
> override the system setup.

This seems like a good foundation for a package system. I've looked
into Nixos before but never really tried it out, and got the
impression that the concept was very good but it might not be the best
implementation. So something similar to Nixos sounds interesting. :-)

> PS As an aside, I've always wanted /etc/hosts to also have a parallel
> /etc/hosts.d/. It'd make maintaining things without a DNS server extremely
> easy - think dynamically adding and removing VMs in most cloud providers,
> especially those where multicast DNS doesn't work... like Azure. (Yes, I
> had a client that insisted on using it with Linux). Likewise it'd be nice
> to be able to add and remove DNS servers with a /etc/resolv.conf.d. Makes
> automated config and change management and audit that bit easier. (Debian
> do this using run-parts for lots of things for those sorts of reasons).

The philosophy used in musl, which is somewhat different from the sort
of philosophy you might have when designing a new distribution, is not
to invent new policy but to avoid policy and build on existing,
already-widely-accepteed policy when it's unavoidable. There are LOTS
of ways one could extend hostname lookups, ranging from NSS modules to
hosts.d and resolv.d, but rather than trying to support everything
imaginable (result: bloat and serious security considerations) in
libc, the musl approach to hostname lookup is that libc contains the
basics that are suitable for most/all simple systems, and anything
more advances can be provided by an external daemon running on
localhost that speaks DNS protocol and provides whatever lookup
semantics you desire.

Rich


  reply	other threads:[~2013-12-03 20:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 17:44 _PATH_LASTLOG Raphael Cohn
2013-12-03 18:42 ` _PATH_LASTLOG Szabolcs Nagy
2013-12-03 19:09   ` _PATH_LASTLOG Raphael Cohn
2013-12-03 19:54     ` _PATH_LASTLOG Rich Felker
2013-12-03 20:10       ` _PATH_LASTLOG Raphael Cohn
2013-12-03 20:25         ` Rich Felker [this message]
2013-12-03 20:44           ` _PATH_LASTLOG Laurent Bercot
2013-12-03 20:51             ` _PATH_LASTLOG Raphael Cohn
2013-12-03 21:00               ` _PATH_LASTLOG Nathan McSween
2013-12-03 21:05                 ` _PATH_LASTLOG Raphael Cohn
2013-12-03 21:42                 ` _PATH_LASTLOG Rich Felker
2013-12-03 21:38             ` _PATH_LASTLOG Rich Felker
2013-12-03 20:49           ` _PATH_LASTLOG Raphael Cohn
2013-12-03 20:51         ` _PATH_LASTLOG Laurent Bercot
2013-12-03 20:52           ` _PATH_LASTLOG Raphael Cohn
2013-12-03 19:34 ` _PATH_LASTLOG Rich Felker
2013-12-03 19:50   ` _PATH_LASTLOG Raphael Cohn
2013-12-03 20:03     ` _PATH_LASTLOG Laurent Bercot
2013-12-03 20:11       ` _PATH_LASTLOG Raphael Cohn
2013-12-03 20:06     ` _PATH_LASTLOG Rich Felker
2013-12-03 20:18       ` _PATH_LASTLOG Raphael Cohn
2013-12-03 20:30         ` _PATH_LASTLOG Rich Felker

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=20131203202502.GO24286@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /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).