logo

apparmor.d

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/apparmor.d.git

zgrep (1418B)


  1. # ------------------------------------------------------------------
  2. #
  3. # Copyright (C) 2022 Christian Boltz
  4. #
  5. # This program is free software; you can redistribute it and/or
  6. # modify it under the terms of version 2 of the GNU General Public
  7. # License published by the Free Software Foundation.
  8. #
  9. # ------------------------------------------------------------------
  10. abi <abi/3.0>,
  11. include <tunables/global>
  12. profile zgrep /usr/bin/{x,}zgrep {
  13. include <abstractions/base>
  14. include <abstractions/bash>
  15. /dev/tty rw,
  16. /usr/bin/{ba,da,}sh ix,
  17. /usr/bin/bzip2 Cx -> helper,
  18. /usr/bin/cat ix,
  19. /usr/bin/egrep Cx -> helper,
  20. /usr/bin/expr ix,
  21. /usr/bin/fgrep Cx -> helper,
  22. /usr/bin/grep Cx -> helper,
  23. /usr/bin/gzip Cx -> helper,
  24. /usr/bin/mktemp ix,
  25. /usr/bin/rm ix,
  26. /usr/bin/sed Cx -> sed,
  27. /usr/bin/xz Cx -> helper,
  28. /usr/bin/xzgrep r,
  29. /usr/bin/zgrep Cx -> helper,
  30. /usr/bin/zstd Cx -> helper,
  31. owner /tmp/zgrep* rw,
  32. /usr/bin/zgrep r,
  33. include if exists <local/zgrep>
  34. profile helper {
  35. include <abstractions/base>
  36. capability dac_override,
  37. capability dac_read_search,
  38. /dev/tty w,
  39. /usr/bin/{ba,da,}sh ix,
  40. /usr/bin/bzip2 mr,
  41. /usr/bin/grep mrix,
  42. /usr/bin/gzip mr,
  43. /usr/bin/xz mr,
  44. /usr/bin/zstd mr,
  45. /{,**} r,
  46. }
  47. profile sed {
  48. include <abstractions/base>
  49. /dev/tty rw,
  50. /usr/bin/{ba,da,}sh ix,
  51. /usr/bin/sed mr,
  52. }
  53. }