From: russell@coker.com.au (Russell Coker) Date: Sun, 12 Feb 2017 20:23:29 +1100 Subject: [refpolicy] [PATCH] capability sorting Message-ID: <37190070.fYifpz0EYe@russell.coker.com.au> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com The attached patch (gzip compressed due to list size limits) sorts the capabilities in alphabetical order which is also the order from the system include files. I used the below perl script to sort the capabilities and both inspected and tested the result. #!/usr/bin/perl use strict; while() { if($_ =~ /capability.*{/) { chomp; my @line = split /{/,$_; my @end = split /}/,$line[1]; my $capabilities = join(' ', sort split / /,$end[0]); print "$line[0]\{$capabilities }$end[1]\n"; } else { print $_; } } -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/ -------------- next part -------------- A non-text attachment was scrubbed... Name: capability.diff.gz Type: application/gzip Size: 19488 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20170212/c0b72289/attachment-0001.bin