apparmor:check-if-systemd-detect-virt-is-present

Last commit made on 2022-07-06
Get this branch:
git clone -b check-if-systemd-detect-virt-is-present https://git.launchpad.net/apparmor

Branch merges

Branch information

Name:
check-if-systemd-detect-virt-is-present
Repository:
lp:apparmor

Recent commits

06f86e2... by intrigeri

rc.apparmor.functions: only use systemd-detect-virt if it's present

This is a follow-up on !812, which added a call to systemd-detect-virt.
Everywhere else we don't assume that program is present,
and first check if it's there before we run it.
Let's do the same here.

57eebd6... by Christian Boltz

Merge zgrep: allow executing egrep and fgrep

egrep and fgrep also need to execute grep and write to /dev/tty in the
helper child profile.

Fixes: https://progress.opensuse.org/issues/113108

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/892
Approved-by: Jon Tourville <email address hidden>
Merged-by: Christian Boltz <email address hidden>

df37c29... by Christian Boltz

zgrep: allow executing egrep and fgrep

egrep and fgrep also need to execute grep and write to /dev/tty in the
helper child profile.

Fixes: https://progress.opensuse.org/issues/113108

08da556... by Christian Boltz

Merge Fix inconsistent return length.

Correct issue discussed in !889.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/890
Approved-by: Christian Boltz <email address hidden>
Merged-by: Christian Boltz <email address hidden>

728dbde... by Mark Grassi

Fix inconsistent return length.

43f4194... by Christian Boltz

Merge Speed up list creations, and change lists to tuples where appropriate.

Tuples [are quite a bit faster than lists](https://stackoverflow.com/a/22140115). If you don't need mutability, a tuple is almost always the better collection to choose. This merge request changes lists to tuples where appropriate, and speeds up some list creations by changing `list()` calls into `[]` literals. It also changes a few function calls to use tuple unpacking, i.e. `func(*tup)`, as opposed to `func(tup[0], tup[1], ...)`. This yields yet another performance improvement, as well as a readability improvement.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/889
Approved-by: Christian Boltz <email address hidden>
Merged-by: Christian Boltz <email address hidden>

7581c9e... by Mark Grassi

Speed up list creations, and change lists to tuples where appropriate..

36c704c... by Christian Boltz

Merge Avoid unnecessary memory copies when enlarging lists.

This merge request addresses issue #240.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/886
Approved-by: Christian Boltz <email address hidden>
Merged-by: Christian Boltz <email address hidden>

ca9920c... by Mark Grassi

Avoid unnecessary memory copies when enlarging lists.

50a45c6... by Christian Boltz

Merge Ensure opened files are closed.

This partially addresses issue #239. There are still some remaining instances where opened files are not properly closed, e.g. the `NamedTemporaryFile` in `utils/apparmor/config.py`.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/885
Approved-by: Christian Boltz <email address hidden>
Merged-by: Christian Boltz <email address hidden>