From owner-freebsd-current@FreeBSD.ORG Mon Dec 10 09:45:01 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AED51AFC; Mon, 10 Dec 2012 09:45:01 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by mx1.freebsd.org (Postfix) with ESMTP id B453E8FC13; Mon, 10 Dec 2012 09:45:00 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id hj13so953248wib.13 for ; Mon, 10 Dec 2012 01:44:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=Ym9SEzKy5OClEg+7hqqwlaFkaTIWAk31xjTaCY1JClI=; b=IdJadRPF/l/zIIr8xvToBBHgdBLgpgOhIJfMPbdTPT2zHqy6LocEG0a6gWFJOBMdGc IMp9s77EMBPy4Ro08ZZZp7FPG/i0nlYTnD26HA7ILRhlrMUVQhkefvbyiqnWJAwBZhc4 mxDzFNCrgE+T78mTjamICbxA5Q3vr92vIa7xiO+vmgs35iT70OJJKJHEC9nOMBPdCwaS /d8gEL5DbosaXfAT6Ioj1h0XkesIa2rrY5nMuUnTC5ZlwJl/FvhF1VHcUsCeVFUWJ+5s FaNLbud6Jv84ZNb0/RJTRgrfSqXrUpGOnDjQDoXSeSLpzNdY70uwvcz1udNUUkhwTeAI fdLw== Received: by 10.216.213.36 with SMTP id z36mr4768789weo.202.1355132698953; Mon, 10 Dec 2012 01:44:58 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPS id cf6sm10742120wib.3.2012.12.10.01.44.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Dec 2012 01:44:57 -0800 (PST) Date: Mon, 10 Dec 2012 10:44:51 +0100 From: Mateusz Guzik To: Tim Kientzle Subject: Re: please add auditdistd user/group to -stable and the 9.1-release? Message-ID: <20121210094451.GA25061@dft-labs.eu> Mail-Followup-To: Mateusz Guzik , Tim Kientzle , Garrett Cooper , Adrian Chadd , freebsd-current , Robert Watson , Ken Smith References: <0D1FE0E1-7DAA-451D-8290-B338027249A0@kientzle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0D1FE0E1-7DAA-451D-8290-B338027249A0@kientzle.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Garrett Cooper , Adrian Chadd , freebsd-current , Robert Watson , Ken Smith X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2012 09:45:01 -0000 On Sun, Dec 09, 2012 at 09:52:18PM -0800, Tim Kientzle wrote: > > On Dec 3, 2012, at 12:46 AM, Garrett Cooper wrote: > > > On Sun, Dec 2, 2012 at 11:06 PM, Garrett Cooper wrote: > >> On Sun, Dec 2, 2012 at 9:20 PM, Garrett Cooper wrote: > >>> On Sun, Dec 2, 2012 at 9:08 PM, Adrian Chadd wrote: > >>>> Hi, > >>>> > >>>> Would you guys please add the auditdistd user/group info to > >>>> 9.1-release, so people doing crossbuilds of -HEAD on a fresh > >>>> 9.1-RELEASE won't get an install error? > >>> > >>> Or mtree could just use -w instead in Makefile.inc1 and distribute. > >>> Let me do some investigation to determine whether or not this is a > >>> valid solution to this problem. > >> > >> I've done some digging in the source tree and this seems like a > >> potentially workable solution for the issue reported -- in part > >> because auditdistd is only present in BSD.var.dist, /etc/rc.d/var runs > >> BSD.var.dist at boot, etc: > > A more robust -- and possibly simpler -- solution might be to > include the uid/gid in the mtree file as well and provide a > way for mtree to fall back to using that if the uname/gname can't > be looked up. > I disagree. We can have more tools requiring uid/gid pairs (install?). Having this information in more than one place may lead to mismatches. I think libc should export functions that would operate on arbitrary passwd files. Then we can teach tools to use them as needed. > This will probably require adding some switches to choose the > appropriate behavior from among the following: > > * If both are specified, prefer the name. This is what tar always does: > tries to use the name and falls back to using the number if the name > isn't available. > > * If both are specified, prefer the number. This would be helpful if > you were running mtree in a cross-build situation where the host > system has radically different user/group numbering (Robert > mentioned someday cross-building from non-FreeBSD hosts). > > * Require both to match. This would complain if the name/number in > the mtree file didn't both exactly match the current host. This > would be the useful behavior when using mtree files to verify > files on disk. This is likely the most appropriate default > behavior. > I agree, except s/number/name from in-tree passwd file/ . :) -- Mateusz Guzik