File zgrep-profile-sync-with-master.diff of Package apparmor.38412

References: bsc#1214458

zgrep specific profile changes from:

  commit 540117e4a1ee7739847ef8c33ff8066fa324f59f
  Author: Daniel Richard G <skunk@iSKUNK.ORG>
  Date:   Sat Apr 8 20:30:00 2023 -0400

      profiles: sync with master

Merged atop existing zgrep-profile-mr870.diff .

Acked-by: David Disseldorp <ddiss@suse.de>

---
 profiles/apparmor.d/zgrep |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

Index: apparmor-3.0.4/profiles/apparmor.d/zgrep
===================================================================
--- apparmor-3.0.4.orig/profiles/apparmor.d/zgrep
+++ apparmor-3.0.4/profiles/apparmor.d/zgrep
@@ -1,6 +1,6 @@
 # ------------------------------------------------------------------
 #
-#    Copyright (C) 2021 Christian Boltz
+#    Copyright (C) 2022 Christian Boltz
 #
 #    This program is free software; you can redistribute it and/or
 #    modify it under the terms of version 2 of the GNU General Public
@@ -17,10 +17,12 @@ profile zgrep /usr/bin/{x,}zgrep {
   include <abstractions/bash>
 
   /dev/tty rw,
-  /usr/bin/bash ix,
+  /usr/bin/{ba,da,}sh ix,
   /usr/bin/bzip2 Cx -> helper,
   /usr/bin/cat ix,
+  /usr/bin/egrep Cx -> helper,
   /usr/bin/expr ix,
+  /usr/bin/fgrep Cx -> helper,
   /usr/bin/grep Cx -> helper,
   /usr/bin/gzip Cx -> helper,
   /usr/bin/mktemp ix,
@@ -41,9 +43,11 @@ profile zgrep /usr/bin/{x,}zgrep {
     capability dac_override,
     capability dac_read_search,
 
-    /usr/bin/bash ix,
+    /dev/tty w,
+
+    /usr/bin/{ba,da,}sh ix,
     /usr/bin/bzip2 mr,
-    /usr/bin/grep mr,
+    /usr/bin/grep mrix,
     /usr/bin/gzip mr,
     /usr/bin/xz mr,
     /usr/bin/zstd mr,
@@ -55,7 +59,7 @@ profile zgrep /usr/bin/{x,}zgrep {
     include <abstractions/base>
 
     /dev/tty rw,
-    /usr/bin/bash ix,
+    /usr/bin/{ba,da,}sh ix,
     /usr/bin/sed mr,
 
   }
openSUSE Build Service is sponsored by