Commit graph

5193 commits

Author SHA1 Message Date
Christian Boltz
acafe9de82 Merge branch 'profile-usr.sbin.dnsmasq' into 'master'
usr.sbin.dnsmasq: update to support dnsmasq 2.81

See merge request apparmor/apparmor!475

Acked-by: Christian Boltz for 2.11..master
2020-04-12 09:45:12 +00:00
nl6720
88c142c687
usr.sbin.dnsmasq: allow reading @{PROC}/@{pid}/fd/ as is needed by dnsmasq 2.81
See http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff;h=48755ebf093543113de96747a7f5f78e0640b333 .

Signed-off-by: nl6720 <nl6720@gmail.com>
2020-04-12 12:15:05 +03:00
John Johansen
a27ae2eb27 Merge Better error handling when creating apparmor.vim
See the individual commits for details and bug references.

PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/472
Acked-by: John Johansen <john.johansen@canonical.com>
2020-04-08 08:34:41 +00:00
Christian Boltz
0f891ba30e
Delete (possibly broken) apparmor.vim on failure
If create-apparmor.vim.py fails, an empty apparmor.vim gets created. The
next "make" run will assume that apparmor.vim was already created (the
file exists and has a new-enough timestamp) and will therefore skip the
create-apparmor.vim.py run, keeping the broken apparmor.vim forever.

Adjust the Makefile to delete apparmor.vim if the script fails. This
ensures that make tries again in the next run.
2020-04-05 14:31:33 +02:00
Christian Boltz
9e7c4f88f9
create-apparmor.vim.py: split stdout and stderr
This will prevent that stderr output ends up in apparmor.vim

References:
- https://gitlab.com/apparmor/apparmor/issues/75
- https://bugs.archlinux.org/task/65450
- https://bugs.launchpad.net/apparmor/+bug/1187437
2020-04-05 14:26:15 +02:00
Rich McAllister
eeac8c11c9 abstractions: add /etc/mdns.allow to /etc/apparmor.d/abstractions/mdns
In focal users of mdns get denials in apparmor confined applications.
An exampel can be found in the original bug below.

It seems it is a common pattern, see
https://github.com/lathiat/nss-mdns#etcmdnsallow

Therefore I'm asking to add
   /etc/mdns.allow r,
to the file
   /etc/apparmor.d/abstractions/mdns"
by default.

--- original bug ---

Many repetitions of

audit: type=1400 audit(1585517168.705:63): apparmor="DENIED" operation="open" profile="/usr/sbin/chronyd" name="/etc/mdns.allow" pid=1983815 comm="chronyd" requested_mask="r" denied_mask="r" fsuid=123 ouid=0

in log. I use libnss-mdns for .local name resolution, so /etc/nsswitch.conf contains

hosts: files mdns [NOTFOUND=return] myhostname dns

and /etc/mnds.allow contains the domains to resolve with mDNS (in may case, "local." and "local"; see /usr/share/doc/libnss-mdns/README.html.)

Presumably cronyd calls a gethostbyX() somewhere, thus eventually trickling down through the name service switch and opening /etc/mdns.allow, which the AppArmor profile in the chrony package does not allow.

Fixes: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1869629
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-03-31 21:03:52 -07:00
John Johansen
b2d0d87eba Merge exo-open: allow reading ~/.local/share/xfce4/helpers/*.desktop
Fixes: https://gitlab.com/apparmor/apparmor/-/issues/73
PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/467
Acked-by: John Johansen <john.johansen@canonical.com>
2020-03-31 23:05:51 +00:00
Christian Boltz
2a67d5e1ee
exo-open: allow reading ~/.local/share/xfce4/helpers/*.desktop
Fixes https://gitlab.com/apparmor/apparmor/-/issues/73
2020-04-01 00:46:55 +02:00
Christian Boltz
f56bab3f75 Merge branch 'mesa-20.0' into 'master'
abstractions/mesa: allow checking if the kernel supports the i915 perf interface

See merge request apparmor/apparmor!464

Acked-by: Vincas Dargis <vindrg@gmail.com>
Acked-by: Christian Boltz <apparmor@cboltz.de> for master and 2.13
2020-03-31 19:49:26 +00:00
intrigeri
61571da1a8 abstractions/mesa: allow checking if the kernel supports the i915 perf interface
On current Debian sid, applications that use mesa need this access.
2020-03-31 09:15:14 +00:00
John Johansen
d4296d217c Merge: abstractions/nameservice: allow accessing /run/systemd/userdb/
On systems with systemd 245, `nss-systemd` additionally queries NSS records from `systemd-userdbd.service`. See https://systemd.io/USER_GROUP_API/ .

This does not bring full support for `systemd-homed`, but I don't use that service so I can't help with that.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/82
PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/459
Acked-by: John Johansen <john.johansen@canonical.com>
2020-03-29 08:51:55 +00:00
nl6720
16f9f6885a
abstractions/nameservice: allow accessing /run/systemd/userdb/
On systems with systemd 245, nss-systemd additionally queries NSS records from systemd-userdbd.service. See https://systemd.io/USER_GROUP_API/ .

Signed-off-by: nl6720 <nl6720@gmail.com>
2020-03-29 11:08:38 +03:00
John Johansen
eafd3805a3 Merge fix capabilities in apparmor.vim
https://gitlab.com/apparmor/apparmor/-/merge_requests/461 / e92da079ca changed creating the capabilities to use a script.

A side effect is that the list is now separated by \\n instead of spaces. Adjust create-apparmor.vim.py to the new output.
PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/463
Acked-by: John Johansen <john.johansen@canonical.com>
2020-03-29 04:05:40 +00:00
Christian Boltz
60b005788e
fix capabilities in apparmor.vim
https://gitlab.com/apparmor/apparmor/-/merge_requests/461 /
e92da079ca changed creating the
capabilities to use a script.

A side effect is that the list is now separated by \n instead of
spaces. Adjust create-apparmor.vim.py to the new output.
2020-03-29 00:07:11 +01:00
Vladimir “Equidamoid” Shapranov @equidamoid
e731b8a335 policy: invalid path to libvirt_leaseshelper in usr.sbin.dnsmasq
Another instance of using libvirt_leaseshelper without having
libexec access. As addressed in the previous patch.

issue: https://gitlab.com/apparmor/apparmor/-/issues/87
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-03-28 14:00:58 -07:00
Vladimir “Equidamoid” Shapranov @equidamoid
28fce5f76d Invalid path to libvirt_leaseshelper in usr.sbin.dnsmasq
The error:

type=AVC msg=audit(1585403559.846:34317577): apparmor="DENIED" operation="exec" profile="/usr/sbin/dnsmasq" name="/usr/libexec/libvirt_leaseshelper" pid=7162 comm="sh" requested_mas
k="x" denied_mask="x" fsuid=0 ouid=0
type=AVC msg=audit(1585403559.846:34317578): apparmor="DENIED" operation="open" profile="/usr/sbin/dnsmasq" name="/usr/libexec/libvirt_leaseshelper" pid=7162 comm="sh" requested_mas
k="r" denied_mask="r" fsuid=0 ouid=0

Looks like the path to libvirt_leasehelper is incorrect usr.sbin.dnsmasq, at least in gentoo. Patching the file fixes the problem:

issue: https://gitlab.com/apparmor/apparmor/-/issues/87
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-03-28 12:42:13 -07:00
John Johansen
ce2833a3cc Merge: Fixings for crosscompilation
This patch fixes a couple of nitpicks that I encountered packaging apparmor for buildroot:

1. In a cross-compiling environment, python executable cannot be trusted for getting the python settings because it is generally compiled for the host. For this reason, we should rely on target python-config.
1. Setup.py for libapparmor swig bindings is always called without taking into account the discovered settings from ac_python_devel.m4

PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/462
2020-03-26 09:53:15 +00:00
Angelo Compagnucci
88c81d7b73 libapparmor: fixing setup.py call when crosscompiling
When crosscompiling, setupy.py should be called passing the settings
discovered by ac_python_devel.m4 and not using the default system
settings.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
2020-03-25 22:22:14 +01:00
Angelo Compagnucci
64e5c6b23d m4: ac_python_devel: fixing for crosscompiling environments
In a crosscompiling environment it's common to have a python executable
running for the host system with a python-config reporting the host
configuration and a second python-config reporting the target configuration.
In such cases, relying on the default oython-config is wrong and breaks
the cross compilation.

This patch adds a PYTHON_CONFIG variable that can be pointed to the second
python-config and fixes the rest of the m4 accordingly.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
2020-03-25 22:22:14 +01:00
John Johansen
d736fdb49e Generate CAPABILITIES in a script due to make 4.3
This way we could generate the capabilities in a way that works with every version of make. Changes to list_capabilities are intended to exactly replicate the old behavior.

PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/461
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-03-24 21:52:04 +00:00
Christian Boltz
5c1932d0d6 Merge branch 'master' into 'master'
Update usr.sbin.winbindd profile to allow krb5 rcache files locking

See merge request apparmor/apparmor!460

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master
2020-03-23 20:14:27 +00:00
allgdante
e92da079ca Generate CAPABILITIES in a script due to make 4.3
This way we could generate the capabilities in a way that works with
every version of make.
Changes to list_capabilities are intended to exactly replicate the old
behavior.
2020-03-23 15:09:15 +00:00
Samuel Cabrero
2c3001c7a1 Update usr.sbin.winbindd profile to allow krb5 rcache files locking
Samba 4.12.0 together with krb5 1.18 needs file locking permissions in
the krb5 rache directory:

type=AVC msg=audit(1584708328.422:76): apparmor="DENIED" operation="file_lock"
  profile="winbindd" name="/var/cache/krb5rcache/krb5_20500.rcache2"
  pid=1461 comm="winbindd" requested_mask="k" denied_mask="k"
  fsuid=20500 ouid=20500

Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2020-03-20 13:57:18 +01:00
John Johansen
02cfbc8b96 Sync library version with 2.13.4 release
The library version must be consistent across releases. Since 2.13.4
and master use the same library version it needs to be updated.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-03-12 04:20:29 -07:00
Steve Beattie
7c5572964d
Translations: merge updates from launchpad
Omnibus collection of translations updates through 2020/03/05

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-03-07 16:29:42 -08:00
Launchpad Translations on behalf of apparmor-dev
f6c4461a2c
Launchpad automatic translations update. 2020-03-07 16:10:25 -08:00
Launchpad Translations on behalf of apparmor-dev
58769a4765
Launchpad automatic translations update. 2020-03-07 16:10:18 -08:00
Steve Beattie
1af84c42f7
Translations: merge updates from launchpad
Omnibus collection of translations updates through 2020/02/22

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-24 10:01:32 -08:00
Launchpad Translations on behalf of apparmor-dev
ba232c0e9c
Launchpad automatic translations update. 2020-02-24 09:59:44 -08:00
Launchpad Translations on behalf of apparmor-dev
33b48e727f
Launchpad automatic translations update. 2020-02-24 09:59:43 -08:00
Launchpad Translations on behalf of apparmor-dev
300e3488ee
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-24 09:59:37 -08:00
John Johansen
9bccf457d1 Merge usr.sbin.dnsmasq: add configuration files created by openresolv
See https://roy.marples.name/projects/openresolv/configuration.html#dnsmasq .

PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/457
Acked-by: John Johansen <john.johansen@canonical.com>
2020-02-20 16:55:15 +00:00
Christian Boltz
d9275d6f1d Merge branch 'run-fix' into 'master'
Add trailing slash to the run variable definition

See merge request apparmor/apparmor!456

Acked-by: Christian Boltz <apparmor@cboltz.de>
2020-02-20 11:14:55 +00:00
nl6720
8b92f50e2c usr.sbin.dnsmasq: add configuration files created by openresolv
See https://roy.marples.name/projects/openresolv/configuration.html#dnsmasq .

Signed-off-by: nl6720 <nl6720@gmail.com>
2020-02-20 11:42:16 +02:00
nl6720
ef591a67ce Add trailing slash to the run variable definition
Signed-off-by: nl6720 <nl6720@gmail.com>
2020-02-20 10:43:21 +02:00
John Johansen
2cb932441c Merge usr.sbin.smbd: add usershare directory
See https://wiki.archlinux.org/index.php/Samba#Enable_Usershares .

AFAIK the `/var/lib/samba/usershares` directory is also used by Ubuntu.

PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/455
Acked-by: John Johansen <john.johansen@canonical.com>
2020-02-20 08:18:37 +00:00
John Johansen
6b6146d7cc Merge Add "run" variable
Split off from !212 . Add and use `@{run}`.

Also update a couple of profiles that don't use `@{PROC}`

PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/454
Acked-by: John Johansen <john.johansen@canonical.com>
2020-02-20 08:15:58 +00:00
Steve Beattie
edb72fc4f7
Translations: merge updates from launchpad
Omnibus collection of translations updates.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:52:29 -08:00
Launchpad Translations on behalf of apparmor-dev
d87ce2e586
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:19 -08:00
Launchpad Translations on behalf of apparmor-dev
ad524d7a85
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:18 -08:00
Launchpad Translations on behalf of apparmor-dev
77dbb4e1a7
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:18 -08:00
Launchpad Translations on behalf of apparmor-dev
938d908462
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:17 -08:00
Launchpad Translations on behalf of apparmor-dev
4d758cc2ab
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:17 -08:00
Launchpad Translations on behalf of apparmor-dev
2aa6f56e4a
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:17 -08:00
Launchpad Translations on behalf of apparmor-dev
78a66a6676
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:16 -08:00
Launchpad Translations on behalf of apparmor-dev
fbf91cfde3
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:16 -08:00
Launchpad Translations on behalf of apparmor-dev
d0708bc782
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:15 -08:00
Launchpad Translations on behalf of apparmor-dev
7ecc948748
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:15 -08:00
Launchpad Translations on behalf of apparmor-dev
27fa9a2eaa
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:14 -08:00
Launchpad Translations on behalf of apparmor-dev
0adbd59dbf
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-02-17 19:21:14 -08:00