Date: Tue, 1 Dec 2015 10:25:23 -0800 From: "Simon J. Gerraty" <sjg@juniper.net> To: Tim Kientzle <tim@kientzle.com> Cc: Warner Losh <imp@bsdimp.com>, Michal Ratajsky <michal.ratajsky@gmail.com>, Brooks Davis <brooks@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>, <sjg@juniper.net> Subject: Re: mtree "language" enhancements Message-ID: <535.1448994323@chaos> In-Reply-To: <71D3DCA2-B336-4849-88E3-8412F8A93324@kientzle.com> References: <CANCZdfrDtfkwKxMV3o9tcQNzBQDKZdTx1JErkTKtC7UZORT5aA@mail.gmail.com> <AFF9BC5D-536B-4F7D-83CC-E26D9CBA8BF3@kientzle.com> <CANCZdfp%2BtCnXDkbMan9crp9YepVnZKT_hSw%2Bi43OAzZX3VWhXg@mail.gmail.com> <A5A83D40-6B19-465C-9042-3DB3FB127759@kientzle.com> <0A51B6D4-9EDD-4EFF-876F-C6B515DBB4F3@kientzle.com> <CANCZdfo3fsupKZ3TJ%2B8MBhXR27c9dHkCYVa7R6J2q-z2mdAGmA@mail.gmail.com> <71D3DCA2-B336-4849-88E3-8412F8A93324@kientzle.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Tim Kientzle <tim@kientzle.com> wrote: > > So I'm left thinking that maybe the rule should be 'last one wins' at = least > > for the use case where we use the target's /etc/master_password. That'= s > > what I've actually implemented. > = > There are two key cases that drove this design for tar: > = > 1. Handling user info that is not (yet) in the target password file. > In practice, images get built up in different orders: I might add a > bunch of new files owned by a new user before some other process gets > a chance to add the user. This is the issue we face. We don't like magic numbers so prefer to use names (uid=3D0 gid=3D0 is fine). We use mtree with BSD.var.dist at various times, and in at least some of those cases we cannot assume that the passwd or group databases will be complete (or even valid - eg during recovery from corrupted storage). In such cases we could easily tollerate mtree simply using 0:0 (or current uid:gid) for any uname:gname it could not resolve, since we aren't likely to care about those dirs until we are up and running properly - by which time the ownership would have been fixed. What we don't want is for mtree to toss its cookies or flood the console with pointless noise (which it is wont to do). What we currently have to do to avoid problems, is run BSD.var.dist through sed to replace all \([gu]\)name=3D[^ ]* with \1id=3D0 and and it would be nice to be able to skip that.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?535.1448994323>