On 08/12/2011 02:44 PM, Stephen Smalley wrote: > On Fri, 2011-08-12 at 14:22 -0400, Eric Paris wrote: >> On Thu, Aug 4, 2011 at 10:58 AM, Stephen Smalley 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 ;) Decided to go with the gem.