From: pebenito@ieee.org (Chris PeBenito) Date: Wed, 15 Feb 2017 18:52:06 -0500 Subject: [refpolicy] [PATCH] capability sorting In-Reply-To: <37190070.fYifpz0EYe@russell.coker.com.au> References: <37190070.fYifpz0EYe@russell.coker.com.au> Message-ID: <114d698b-0f94-2f13-e762-0d3d844f43ea@ieee.org> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com On 02/12/17 04:23, Russell Coker via refpolicy wrote: > 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. Merged. > 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 $_; > } > } > > > > _______________________________________________ > refpolicy mailing list > refpolicy at oss.tresys.com > http://oss.tresys.com/mailman/listinfo/refpolicy > -- Chris PeBenito