Re: [PATCH 032/155] policycoreutils: fixfiles use new kernel seclabel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2011-08-12 at 14:22 -0400, Eric Paris wrote:
> On Thu, Aug 4, 2011 at 10:58 AM, Stephen Smalley <sds@xxxxxxxxxxxxx> wrote:
> > On Wed, 2011-08-03 at 16:58 -0400, Daniel J Walsh wrote:
> 
> >> This patch looks good to me. acked.
> >
> > When similar logic was added to setfiles, we included a kernel version
> > check (>= 2.6.30) to ensure that we didn't end up excluding all
> > filesystems on older kernels that do not report seclabel.
> 
> Patch replaced with the attached.

Your version comparison isn't quite right, e.g. consider 2.2.30.
If you want a reliable version compare, you probably want to do
something similar to KERNEL_VERSION() from include/linux/version.h and
convert both versions to simple integers that can be compared.  Or you
could do something based on this gem:
http://rubinium.org/blog/archives/2010/04/05/shell-script-version-compare-vercmp/

Or just rewrite fixfiles in a reasonable language ;)

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux