From: pebenito@ieee.org (Chris PeBenito) Date: Sun, 12 Feb 2017 13:58:38 -0500 Subject: [refpolicy] [PATCH] capability sorting In-Reply-To: <37190070.fYifpz0EYe@russell.coker.com.au> References: <37190070.fYifpz0EYe@russell.coker.com.au> Message-ID: <311d8934-76e2-75fd-8ff3-8bbb3f7c573e@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. > > I used the below perl script to sort the capabilities and both inspected and > tested the result. I'm ok with the change, but I'm not clear why you made it. If it is what you understood from the style guide, I really need to clarify it, since this type of alphabetical sorting isn't required. > #!/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