2022-04-10 15:03:08 +02:00
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# License published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
|
2023-06-30 23:36:12 -07:00
|
|
|
abi <abi/4.0>,
|
2022-04-10 15:03:08 +02:00
|
|
|
|
|
|
|
include <tunables/global>
|
|
|
|
|
|
|
|
profile zgrep /usr/bin/{x,}zgrep {
|
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/bash>
|
|
|
|
|
|
|
|
/dev/tty rw,
|
2024-10-06 11:05:52 +02:00
|
|
|
@{etc_ro}/nsswitch.conf r,
|
|
|
|
/etc/passwd r,
|
2022-04-10 15:03:08 +02:00
|
|
|
/usr/bin/{ba,da,}sh ix,
|
|
|
|
/usr/bin/bzip2 Cx -> helper,
|
|
|
|
/usr/bin/cat ix,
|
2022-06-28 23:20:10 +02:00
|
|
|
/usr/bin/egrep Cx -> helper,
|
2022-04-16 22:29:04 +02:00
|
|
|
/usr/bin/expr ix,
|
2022-06-28 23:20:10 +02:00
|
|
|
/usr/bin/fgrep Cx -> helper,
|
2022-04-10 15:03:08 +02:00
|
|
|
/usr/bin/grep Cx -> helper,
|
|
|
|
/usr/bin/gzip Cx -> helper,
|
|
|
|
/usr/bin/mktemp ix,
|
|
|
|
/usr/bin/rm ix,
|
|
|
|
/usr/bin/sed Cx -> sed,
|
|
|
|
/usr/bin/xz Cx -> helper,
|
|
|
|
/usr/bin/xzgrep r,
|
|
|
|
/usr/bin/zgrep Cx -> helper,
|
2022-04-27 22:15:17 +02:00
|
|
|
/usr/bin/zstd Cx -> helper,
|
2022-04-10 15:03:08 +02:00
|
|
|
owner /tmp/zgrep* rw,
|
|
|
|
/usr/bin/zgrep r,
|
|
|
|
|
2024-10-06 23:10:39 +02:00
|
|
|
deny /etc/nsswitch.conf r,
|
|
|
|
deny /etc/passwd r,
|
|
|
|
|
2022-04-10 15:03:08 +02:00
|
|
|
include if exists <local/zgrep>
|
|
|
|
|
|
|
|
profile helper {
|
|
|
|
include <abstractions/base>
|
|
|
|
|
|
|
|
capability dac_override,
|
|
|
|
capability dac_read_search,
|
|
|
|
|
2022-06-28 23:20:10 +02:00
|
|
|
/dev/tty w,
|
|
|
|
|
2022-04-10 15:03:08 +02:00
|
|
|
/usr/bin/{ba,da,}sh ix,
|
|
|
|
/usr/bin/bzip2 mr,
|
2022-06-28 23:20:10 +02:00
|
|
|
/usr/bin/grep mrix,
|
2022-04-10 15:03:08 +02:00
|
|
|
/usr/bin/gzip mr,
|
|
|
|
/usr/bin/xz mr,
|
2022-04-27 22:15:17 +02:00
|
|
|
/usr/bin/zstd mr,
|
2022-04-10 15:03:08 +02:00
|
|
|
/{,**} r,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
profile sed {
|
|
|
|
include <abstractions/base>
|
|
|
|
|
|
|
|
/dev/tty rw,
|
|
|
|
/usr/bin/{ba,da,}sh ix,
|
|
|
|
/usr/bin/sed mr,
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|