All of lore.kernel.org
 help / color / mirror / Atom feed
* Finally got around to adding the following patch to policycoreutils
@ 2004-10-28 14:52 Daniel J Walsh
  0 siblings, 0 replies; only message in thread
From: Daniel J Walsh @ 2004-10-28 14:52 UTC (permalink / raw)
  To: SELinux

[-- Attachment #1: Type: text/plain, Size: 70 bytes --]

for audit2allow.

Enhanced Thomas Bleher's Patch a little bit.

Dan



[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 1010 bytes --]

diff --exclude-from=exclude -N -u -r nsapolicycoreutils/audit2allow/audit2allow policycoreutils-1.17.7/audit2allow/audit2allow
--- nsapolicycoreutils/audit2allow/audit2allow	2004-09-10 11:25:57.000000000 -0400
+++ policycoreutils-1.17.7/audit2allow/audit2allow	2004-10-28 10:34:33.476265420 -0400
@@ -124,13 +124,19 @@
 foreach $k (sort keys %rules)
 { 
     my ($a,$scontext,$tcontext,$tclass) = split /\|/, $k;
-    print OUT  "allow $scontext $tcontext:$tclass {";
+    if ($scontext eq $tcontext) {
+        $tcontext = 'self';
+    }
+    print OUT  "allow $scontext $tcontext:$tclass";
     
     my $access_types = $rules{$k};
+    $len=(keys %$access_types);
+    if ($len gt 2 ) { print OUT  " {"; }
     foreach $t (sort keys %$access_types) {
-		print OUT  "$t ";
+      if ($t ne "") {print OUT  " $t";}
     }
-    print OUT "};\n";
+    if ($len gt 2 ) { print OUT " }"; }
+    print OUT ";\n";
     $occur{$k} =~ s/\\(.)/$1/g;  # de-escape string
     print OUT "$occur{$k}\n" if ($verbose);
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-28 14:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-28 14:52 Finally got around to adding the following patch to policycoreutils Daniel J Walsh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.