apparmor:master

Last commit made on 2024-05-30
Get this branch:
git clone -b master https://git.launchpad.net/apparmor

Branch merges

Branch information

Name:
master
Repository:
lp:apparmor

Recent commits

920120f... by John Johansen <email address hidden>

Merge utils: fix removing unknown profiles that contain spaces

aa-remove-unknown doesn't deal properly with profiles that contain
spaces in their names.

Using profile "MongoDB Compass" as an example, awk's sub returns the
number of matches - either 1 or 0 and replaces the actual string ($0)
with the substitution. By accessing the return of sub with $, awk
would be accessing $1 which would return only "MongoDB".
Fix this by using $0 instead of $str.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/395

Signed-off-by: Georgia Garcia <email address hidden>

Closes #395
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1243
Approved-by: John Johansen <email address hidden>
Merged-by: John Johansen <email address hidden>

b460539... by John Johansen <email address hidden>

Merge profiles/Makefile: Clean up rules to better support extra profiles

In the course of preparing !1207, I found that the validation rules in `profiles/Makefile` did not take kindly to the new `profiles/apparmor/profiles/extras/abstractions/` directory. I tried a couple rounds of quick fixes, but it became clear that the rules as currently written were just not amenable to the new addition, and needed more attention than I could give it by-the-by.

So I separated out that commit, and revised the makefile more thoroughly. The updated rules now rely more on `find(1)` than `$(wildcard)`, and have a number of [what I believe to be] small quality-of-life improvements. Taken together, `make check` passes cleanly with the new files from my other MR present.

One thing I noticed was that the profiles under `apparmor.d/` were not previously being checked for the `include if exists <local/*>` bit---only the ones under `extras/`. I've thus included a fix to the `sbuild-shell` profile, which fortunately was the only one that failed the check.

Note that at present, you'll get a couple of harmless `find: ‘./apparmor/profiles/extras/abstractions’: No such file or directory` errors when running the checks, since that directory won't appear until the other MR is merged. I figure, better to bear that for now, and not have to touch the makefile again later.

NOTE: The CI pipeline here will need to be updated to invoke the `check-local` target instead of `check-extras`. This target was renamed as it is no longer limited in scope to the profiles under `extras/`.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1214
Approved-by: John Johansen <email address hidden>
Merged-by: John Johansen <email address hidden>

ca03f69... by John Johansen <email address hidden>

Merge profiles: Add userns stub for Chromium and variants

This gets `chromium` and `ungoogled-chromium` working again on Ubuntu 24.04; see discussion [here](#394).

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1238
Approved-by: John Johansen <email address hidden>
Merged-by: John Johansen <email address hidden>

347277f... by John Johansen <email address hidden>

Merge apparmor.vim: add support for userns and the unconfined flag

I propose this patch for 4.0 and master.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1241
Approved-by: John Johansen <email address hidden>
Merged-by: John Johansen <email address hidden>

326a869... by John Johansen <email address hidden>

Merge libapparmor: add log parser support for saddr, daddr, src and dest

saddr, daddr, src and dest are used in network logs

Signed-off-by: Georgia Garcia <email address hidden>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1239
Approved-by: John Johansen <email address hidden>
Merged-by: John Johansen <email address hidden>

81a08ab... by John Johansen <email address hidden>

Merge Fix aa-teardown for `unconfined` profiles

Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1225457

I propose this patch for 4.0 and master.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1242
Approved-by: Georgia Garcia <email address hidden>
Merged-by: John Johansen <email address hidden>

7ef7704... by Georgia Garcia

utils: fix removing unknown profiles that contain spaces

aa-remove-unknown doesn't deal properly with profiles that contain
spaces in their names.

Using profile "MongoDB Compass" as an example, awk's sub returns the
number of matches - either 1 or 0 and replaces the actual string ($0)
with the substitution. By accessing the return of sub with $, awk
would be accessing $1 which would return only "MongoDB".
Fix this by using $0 instead of $str.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/395

Signed-off-by: Georgia Garcia <email address hidden>

cf5be7d... by Georgia Garcia

Merge Fix aa-remove-unknown for 'unconfined' profiles

Without this patch, aa-remove-unknown uses 'profile_name (unconfined)'
when trying to unload unconfined profiles, which fails for obvious
reasons with (picking a random example)

    Removing 'busybox (unconfined)'
    /sbin/aa-remove-unknown: line 112: echo: write error: No such file or directory

I propose this patch for 4.0 and master.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1240
Approved-by: Georgia Garcia <email address hidden>
Merged-by: Georgia Garcia <email address hidden>

f497afb... by Christian Boltz

Fix aa-teardown for `unconfined` profiles

Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1225457

4cd39e7... by Christian Boltz

apparmor.vim: add support for userns and the unconfined flag