main/apparmor: fix busybox path in profiles

This commit is contained in:
Hoang Nguyen 2025-10-04 20:05:01 +07:00 committed by Achill Gilgenast
parent 8695f82ed4
commit 75b04f5336
3 changed files with 18 additions and 3 deletions

View File

@ -2,7 +2,7 @@
maintainer="Achill Gilgenast <achill@achill.org>"
pkgname=apparmor
pkgver=4.1.0
pkgrel=3
pkgrel=4
pkgdesc="Linux application security framework - mandatory access control for programs"
url="https://gitlab.com/apparmor/apparmor/wikis/home"
arch="all"
@ -53,6 +53,7 @@ source="
0001-Fix-linking-against-gettext-on-musl-libc.patch
0006-utils-adjust-rc-functions-for-aa-remove-unknown.patch
fix-dnsmasq-profile.patch
fix-busybox-profile.patch
binutils-missing-limits-h.patch
"
options="!check" # checkdepends in community
@ -203,6 +204,7 @@ sha512sums="
1a57cc577ba3aedfbe10ef6148c1e8f5d0bbf65c99e60eec80c52409c9dab59ae002024500c6e4fd0e01e8c7aeb0c85e3e6b41cacee08c17fdd869d31bca614e apparmor.initd
e94f44427ed3c6f64462170939ffc92ce9ac1a58c61c7c7c3483fe16fe8e1c419daade9d56cdd342132e4d823dcac1963a86ad889f10bf71fd52b7f54c4694ed 0001-Fix-linking-against-gettext-on-musl-libc.patch
38ebb30a0185f8eabd9103925959da365f64ef485f66ffb10180ac596fc172f9c98df39baec0b035138e9ab32056148e69a066faba9faebf9e92bf7a09c150c0 0006-utils-adjust-rc-functions-for-aa-remove-unknown.patch
cbe6eb9dd46e3ace122d5bc386596d5106a301b82a9ac1681f31a967013d3db67a8d674d54605444f30c3a136677ff3b26fad80f78d0f02dbe18a9f10f64672a fix-dnsmasq-profile.patch
11e4ee7c2ac567e4e049601c73b54af68f8acd762787e286b5d25462850cd9d026168a5c5628cbb3a7554b6e340cb4040a764d5b9f69ad5f5ef084701e73bc95 fix-dnsmasq-profile.patch
28c38ac6c5b05f339c7fb5b9c86956f021cc1e2ab1184f98f19600177a3b50d008111d2e2392b9c695b0b990d485cb1c08e7da1e5ee1d2737cd2cd7ae671bb7b fix-busybox-profile.patch
04e5dbced9c03dfeb3ca4534f4eba721eb8a7583d92177a5be6c9432ac2f6b8a7a7a127143978ed63fc848e79ba176ffae7e2cb594ae42a528a4f72b441ba625 binutils-missing-limits-h.patch
"

View File

@ -0,0 +1,13 @@
diff --git a/profiles/apparmor.d/busybox b/profiles/apparmor.d/busybox
index d726ddf0a..b49016d6d 100644
--- a/profiles/apparmor.d/busybox
+++ b/profiles/apparmor.d/busybox
@@ -4,7 +4,7 @@
abi <abi/4.0>,
include <tunables/global>
-profile busybox /usr/bin/busybox flags=(unconfined) {
+profile busybox /{,usr/}bin/busybox flags=(unconfined) {
userns,
# Site-specific additions and overrides. See local/README for details.

View File

@ -6,7 +6,7 @@ index 7ae9a14..0005b14 100644
/var/lib/misc/dnsmasq.leases rw, # Required only for DHCP server usage
/{,usr/}bin/{ba,da,}sh ix, # Required to execute --dhcp-script argument
+ /bin/busybox ix, # /bin/sh is a symlink of busybox on Alpine
+ /{,usr/}bin/busybox ix, # /bin/sh is a symlink of busybox on Alpine
# access to iface mtu needed for Router Advertisement messages in IPv6
# Neighbor Discovery protocol (RFC 2461)