Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 05 Oct 2013 13:03:31 -0700
From:      Alfred Perlstein <bright@mu.org>
To:        =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= <des@des.no>
Cc:        arch@freebsd.org
Subject:   Re: Userland patch level
Message-ID:  <52507093.7080004@mu.org>
In-Reply-To: <86siwfqyqk.fsf@nine.des.no>
References:  <8661tbsi40.fsf@nine.des.no> <52506076.2090803@mu.org> <86siwfqyqk.fsf@nine.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/5/13 12:55 PM, Dag-Erling Smørgrav wrote:
> Alfred Perlstein <bright@mu.org> writes:
>> 1) Can we add it as a uname option as well?
> It was intentionally done as a shell script so it can be run from e.g. a
> live CD without having to worry about binary compatibility.
>
>> 2) FreeNAS uses /etc/version as just a file, any point in doing that
>> instead?
> No, /etc belongs to the user, and we can't trust that's it up to date;
> freebsd-update would update it, but make installworld probably wouldn't,
> and expecting the user to run mergemaster or etcupdate adds one more
> point of failure.
>
>> 3) This article has an example of a script that works on many flavors
>> of linux, any way to make it so that it works on FreeBSD as well?
>> http://unix.stackexchange.com/questions/6345/how-can-i-get-distribution-name-and-version-number-in-a-simple-shell-script
> Same reason as above.  Plus, I'm pretty sure this does not work;
> /etc/lsb-release on a RHEL 6 desktop looks like this:
>
> LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
>
> which is nothing like what that script expects.
>
> BTW, this grew out of a discussion in the security workgroup at the
> DevSummit (cf. https://wiki.freebsd.org/201309DevSummit/Security) during
> which we touched upon roughly the same points as you raised.
>
> This was initially meant to be little more than "echo X.Y-RELEASE-pZ"
> and to be used only by portaudit / pkg audit / what have you, which is
> why it's hidden away in /libexec, but considering how much it's grown
> from inception to implementation, it might make more sense to put it in
> a more accessible location.
>
> DES
Interesting points to which I can't really poke any holes in.

Having the ability to determine userland is a good bonus.

+1 to this idea and implementation.

-Alfred

-- 
Alfred Perlstein




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52507093.7080004>