Commit graph

4664 commits

Author SHA1 Message Date
John Johansen
50d12dbd5e 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>

(cherry picked from commit d4296d217c)

16f9f688 abstractions/nameservice: allow accessing /run/systemd/userdb/
2020-03-31 21:02:18 +00:00
Christian Boltz
411af09c97 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

(cherry picked from commit f56bab3f75)

61571da1 abstractions/mesa: allow checking if the kernel supports the i915 perf interface
2020-03-31 19:50:52 +00:00
Christian Boltz
5972adc7e3 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

(cherry picked from commit 5c1932d0d6)

2c3001c7 Update usr.sbin.winbindd profile to allow krb5 rcache files locking
2020-03-23 20:14:39 +00:00
Christian Boltz
2e2529bae8 Replace deprecated assertEquals with assertEqual
assertEquals is deprecated since Python 2.7 and 3.2.

(cherry picked from commit 62abfe38e8)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-03-17 13:25:02 -07:00
John Johansen
df0ac742f7 Release: Bump revisions for 2.13.4 release
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-03-12 04:17:10 -07:00
Christian Boltz
d779dbf88a Merge branch 'run-uuidd-request' into 'master'
abstractions/base: allow read access to /run/uuidd/request

See merge request apparmor/apparmor!445

Acked-by: John Johansen <john.johansen@canonical.com> for 2.11..master
Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master


(cherry picked from commit 80bf920929)

45fffc12 abstractions/base: allow read access to /run/uuidd/request
2020-02-03 21:17:40 +00:00
Christian Boltz
979d544b48 Merge branch 'gnome-abstraction-more-mimeapps' into 'master'
abstractions/gnome: also allow /etc/xdg/mimeapps.list

See merge request apparmor/apparmor!444

Acked-by: John Johansen <john.johansen@canonical.com> for 2.11..master
Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master


(cherry picked from commit 3becbbab2c)

67cf4fa3 abstractions/gnome: also allow /etc/xdg/mimeapps.list
2020-02-03 21:16:46 +00:00
Christian Boltz
9d4571aac9 Merge branch 'ecryptfs-top-dir' into 'master'
abstractions/base: allow read access to top-level ecryptfs directories

See merge request apparmor/apparmor!443

Acked-by: John Johansen <john.johansen@canonical.com> for 2.11..master
Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master


(cherry picked from commit 24895ea302)

fbd8981e abstractions/base: allow read access to top-level ecryptfs directories
2020-02-03 21:15:48 +00:00
Ian Johnson
8b297f2589 docs: fix typo in man doc of unix rules
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
(cherry picked from commit f4220a19be)
2020-01-31 22:18:59 -08:00
John Johansen
a863279f06 gnome abstraction: allow reading per-user themes from $XDG_DATA_HOME
Bug-Debian: https://bugs.debian.org/930031

As per https://developer.gnome.org/gtk3/stable/ch32s03.html, since GTK+ 3.6, $XDG_DATA_HOME/themes is preferred over $HOME/.themes. We already support the latter, let's also support the former.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/442
Acked-by: John Johansen <john.johansen@canonical.com>


(cherry picked from commit 098f0a7b5f)

852c1e76 gnome abstraction: allow reading per-user themes from $XDG_DATA_HOME
2019-12-17 23:20:46 +00:00
John Johansen
a657924262 Enable CI for the 2.13 branch
This adds a copy of the current .gitlab-ci.yml from master to the 2.13 branch to enable CI checks.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/436
Acked-by: John Johansen <john.johansen@canonical.com>
2019-11-27 23:31:59 +00:00
Christian Boltz
85bafde501
Enable CI for the 2.13 Branch
This adds a copy of the current .gitlab-ci.yml from master to the 2.13
branch to enable CI checks.
2019-11-27 22:55:05 +01:00
Christian Boltz
d3b92788e9 Merge branch 'cboltz-usr-etc' into 'master'
Allow /usr/etc/ in abstractions/authentication

openSUSE (and hopefully some other distributions) work on moving shipped
config files from /etc/ to /usr/etc/ so that /etc/ only contains files
written by the admin of each system.

See https://en.opensuse.org/openSUSE:Packaging_UsrEtc for details and
the first moved files.

Updating abstractions/authentication is the first step, and also fixes
bugzilla.opensuse.org/show_bug.cgi?id=1153162

See merge request apparmor/apparmor!426

Acked-by: John Johansen <john.johansen@canonical.com> for 2.12..master

(cherry picked from commit 1cfd4d4bbc)

ee7194a7 Allow /usr/etc/ in abstractions/authentication
2019-11-27 19:41:02 +00:00
Christian Boltz
370c9292ed Merge branch 'cboltz-abstractions-kerberos' into 'master'
abstractions/kerberosclient: allow reading /etc/krb5.conf.d/

See merge request apparmor/apparmor!425

Acked-by: Steve Beattie <steve@nxnw.org> for 2.10..master
Acked-by: John Johansen <john.johansen@canonical.com> for 2.10..master


(cherry picked from commit 663546c284)

dffed831 abstractions/kerberosclient: allow reading /etc/krb5.conf.d/
2019-11-18 21:35:43 +00:00
Christian Boltz
fd50663ec5 Merge branch 'cboltz-drop-localinclude' into 'master'
Drop 'localinclude' in parse_profile_data() and ProfileStorage

See merge request apparmor/apparmor!427

Acked-by: John Johansen <john.johansen@canonical.com> for 2.12..master
Acked-by: Steve Beattie <steve@nxnw.org> for 2.12..master

(cherry picked from commit b017f8f8a9)

001ea9e3 Drop 'localinclude' in parse_profile_data() and ProfileStorage
2019-11-18 21:32:35 +00:00
Christian Boltz
ae74d9344a Merge branch 'fix-autoconf-check-for-python-3.8' into 'master'
Fix a Python 3.8 autoconf check

See merge request apparmor/apparmor!430

Acked-by: Christian Boltz <apparmor@cboltz.de> for master and 2.13
Acked-by: Steve Beattie <steve@nxnw.org> for master and 2.13

(cherry picked from commit 3db14e8e49)

ccbf1e0b Fix a Python 3.8 autoconf check
2019-11-18 20:16:45 +00:00
Christian Boltz
99c652c769 Merge branch 'cboltz-pyflakes-version' into 'master'
README: add PYFLAKES=/usr/bin/pyflakes3 env variable

See merge request apparmor/apparmor!429

Acked-by: John Johansen <john.johansen@canonical.com> for 2.11..master

(cherry picked from commit 1567ea6f4c)

556bb94a README: add PYFLAKES=/usr/bin/pyflakes3 env variable
2019-10-24 21:08:42 +00:00
Christian Boltz
937c5a15b2 Merge branch 'cboltz-status-parenthesis' into 'master'
aa-status: handle profile names containing '('

Closes #51

See merge request apparmor/apparmor!415

Acked-by: John Johansen <john.johansen@canonical.com> for 2.10..master

(cherry picked from commit b76567ce10)

41d26b01 aa-status: handle profile names containing '('
2019-09-23 18:55:36 +00:00
Jamie Strandboge
81f6724747 abstractions/fonts: don't allow write of fontconfig cache files
879531b36ec3dfc7f9b72475c68c30e4f4b7b6af changed access for
@{HOME}/.{,cache/}fontconfig/** to include 'w'rite. Fontconfig has been
a source of CVEs. Confined applications should absolutely have read
access, but write access could lead to breaking out of the sandbox if a
confined application can write a malformed font cache file since
unconfined applications could then pick them up and be controlled via
the malformed cache. The breakout is dependent on the fontconfig
vulnerability, but this is the sort of thing AppArmor is meant to help
guard against.

(cherry picked from commit c5968c70d0)
PR: https://gitlab.com/apparmor/apparmor/merge_requests/420
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-09-20 02:48:36 -07:00
Paulo Gomes
6f817f6233 Fix capability mispelling.
PR: https://gitlab.com/apparmor/apparmor/merge_requests/421
(cherry picked from commit 2d19d4d159)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-09-20 02:15:09 -07:00
intrigeri
c557b89045 abstractions/X: allow reading the Xauth file mutter passes to Xwayland.
Bug-Debian: https://bugs.debian.org/935058

Applications running under Xwayland in a GNOME+Wayland session need read access
to this file since:

  a8984a81c2

… that was first included in mutter 3.33.3.

This rule is presumably only needed for GNOME+Wayland sessions, so one could
argue that it should live in abstractions/wayland instead, but Jamie argued that
it should be in the X abstraction because Xwayland is a X server.

(cherry picked from commit c006f79141)
MR: https://gitlab.com/apparmor/apparmor/merge_requests/419
Bug-Debian: https://bugs.debian.org/935058
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-09-16 08:11:56 -07:00
Tyler Hicks
89fdc1b532 parser: Fix typoed example dbus rule in apparmor.d(5) man page
Remove extra closing parenthesis.

Bug: https://launchpad.net/bugs/1838991
Fixes: 46586a6334 ("parser: Add example dbus rule for unconfined peers")
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>

(cherry picked from commit 7df48adae5)
Ref: https://gitlab.com/apparmor/apparmor/merge_requests/410
Acked-by: Christian Boltz <apparmor@cboltz.de>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2019-08-05 17:09:57 +00:00
Tyler Hicks
4c9fe34310 parser: Fix minor typo in usage
Correct the long option used to print the cache directory.

Fixes: e9d9395f91 ("parser: Add option to print the cache directory")
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>

(cherry picked from commit 50e34b45c2)
Ref: https://gitlab.com/apparmor/apparmor/merge_requests/406
Acked-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2019-08-01 21:15:06 +00:00
Christian Boltz
e821a018d9 Merge branch 'cboltz-unbalanced-parenthesis' into 'master'
Fix crash on unbalanced parenthesis in filename

See merge request apparmor/apparmor!402

Seth Arnold <seth.arnold@canonical.com> for 2.10..master

(cherry picked from commit db1f391844)

8f74ac02 Fix crash on unbalanced parenthesis in filename
2019-07-09 19:45:33 +00:00
Xiang Fei Ding
e78ef3f7ba
parser: allow overriding which ar(1) is invoked
When cross compiling apparmor-parser, Makefile will use ar for
creating the static library. However, ar produces libraries on
the build platform. The right ar could be prefixed with the target
platform triples.

Signed-off-by: Xiang Fei Ding <dingxiangfei2009@gmail.com>
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Ref: https://github.com/NixOS/nixpkgs/pull/63999
Bug: https://gitlab.com/apparmor/apparmor/issues/41
(cherry picked from commit 654d96a3f7)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-07-08 12:32:21 -07:00
John Johansen
ed9ccbdd31 libapparmor: logparse: fix RECORD_INVALID for valid log
v2:
- parse partial log line broken at \n
- add testcase_dbus_10.* for partial log line
- remove quotes from  testcasw_dbus_09.profile

The following log format has been seen in the wild, and currently results
in a RECORD_INVALID

    [4835959.046111] audit: type=1107 audit(1561053426.749:186): pid=640 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="ALLOWED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/systemd1" interface="org.freedesktop.systemd1.Manager" member="LookupDynamicUserByName" mask="send" name="org.freedesktop.systemd1" pid=20596 label="/usr/sbin/sshd" peer_pid=1 peer_label="unconfined"
                      exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'

Test parsing the above message with and without the \n embedded between
peer_label= and exec=

PR: https://gitlab.com/apparmor/apparmor/merge_requests/395
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 0349cf2d0a)
2019-07-02 01:21:59 -07:00
Christian Boltz
14a11e67a5 Merge branch 'cboltz-2.13-certbot' into 'apparmor-2.13'
[2.10..2.13] Add for Certbot on openSUSE Leap

See merge request apparmor/apparmor!398

Acked-by: John Johansen <john.johansen@canonical.com> for 2.10..2.13
2019-06-30 07:14:42 +00:00
Richard Chen
8b766451d5
Add for Certbot on openSUSE Leap
The default path is /etc/certbot/archive/{some domain}/{file name}.pem

See merge request apparmor/apparmor!397

This is a manual cherry-pick of 4d275bab69
and 3016ffb336
2019-06-29 23:14:49 +02:00
Christian Boltz
46b1c7a3bb Merge branch 'cboltz-2.13-parser-sbindir' into 'apparmor-2.13'
[2.13] parser: allow using a custom sbin & usr/sbin dir

This is especially handy if your distro doesn't split sbin and bin
and only wants to install into bin (so that the sbin directory doesn't
clash with the sbin -> bin symlink)

[Per feedback, added USR_SBINDIR as a toggle for the install location
 of aa-teardown -- @smb]

Signed-off-by: Rasmus Thomsen <cogitri@exherbo.org>
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/111/
(cherry picked from commit 7c86a2acaf)



Cherry-pick requested in https://gitlab.com/apparmor/apparmor/issues/38

See merge request apparmor/apparmor!393

Acked-by: Seth Arnold <seth.arnold@canonical.com>
2019-06-27 14:37:53 +00:00
Steve Beattie
515cb80901
regression tests/mult_mount: bump size of created disk image
The mult_mount test creates a small disk image, formats it, and mounts
it in multiple locations in preparation for the tests. However, the
created raw file (80KB) is too small to make a working file system if
4K blocks are used by mkfs. In Ubuntu 19.10, the default was recently
changed for mkfs to default to always using 4K blocks, causing the
script to fail.

We could force mkfs to use 1K blocks, but instead, in case some future
version of mkfs decides not to support 1K blocks at all, we bump up the
size of the disk image to 512KB; large enough to work with 4K blocks
yet small enough to be workable in small scale test environments.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Bug: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1834192
MR: https://gitlab.com/apparmor/apparmor/merge_requests/396
(cherry picked from commit 7c7a4bc531)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-26 09:15:28 -07:00
Rasmus Thomsen
4baccd12ef
parser: allow using a custom sbin & usr/sbin dir
This is especially handy if your distro doesn't split sbin and bin
and only wants to install into bin (so that the sbin directory doesn't
clash with the sbin -> bin symlink)

[Per feedback, added USR_SBINDIR as a toggle for the install location
 of aa-teardown -- @smb]

Signed-off-by: Rasmus Thomsen <cogitri@exherbo.org>
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/111/
(cherry picked from commit 7c86a2acaf)
2019-06-20 23:57:54 +02:00
John Johansen
2f9d9ea7e0 Release: Bump revisions for 2.13.3 release
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-17 16:55:38 -07:00
Christian Boltz
961a556e6e abstractions/dri-common: allow reading /dev/dri/
Fixes https://gitlab.com/apparmor/apparmor/issues/29

PR: https://gitlab.com/apparmor/apparmor/merge_requests/382
Signed-off-by: Christian Boltz <apparmor@cboltz.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit ff287e9238)
2019-06-14 05:00:50 -07:00
Daniel Richard G
d89aa31e8e Updated abstractions to allow writing to some common config dirs
(cherry picked from commit 7972c038d7)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
Daniel Richard G
2ce0881794 Updated abstractions to allow creating some common config dirs
(cherry picked from commit 094dc741ee)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
Jörg Sommer
5afdd0cbac profiles/gnome: add @{HOME}/.cache/gtk-3.0
Found this path is used by gtk_compose_hash_get_cache_path() in
gtkcomposetable.c.

(cherry picked from commit 6da7ed2a78)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
Daniel Richard G
2cb70457fc ldapclient abstraction: allow rw access to the nslcd socket.
This addresses https://launchpad.net/bugs/1575438 and also the case of
applications accessing the socket directly (due to NSS config).

(cherry picked from commit ac1d0545f4)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
Vincas Dargis
5bccc7351c Update nvidia for reading application profiles
Add file rule to allow reading application profiles for NVIDIA
Linux graphics driver.

(cherry picked from commit f2e0fdc72b)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
segfault
8eafb10b84 abstractions/python: allow /usr/local/lib/python3
(cherry picked from commit 548de2f3b8)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
Cameron Nemo
0054d673d1 abstractions/qt5: read user configuration
Signed-off-by: Cameron Nemo <camerontnorman@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 6d81563267)
2019-06-14 04:56:28 -07:00
Steve Beattie
0c65b9aeb9 utils/test-network.py: fix failing testcase
When dc010bc034 was
backported to the apparmor-2.13 branch (in commit
75236d62e2), it did not take into
account cb8c3377ba, which creates the
common/list_af_names.sh script as used in the test case, was not also
backported to the apparmor-2.13 branch.

Change the test case to get the list of network AF names via the same
make invocation taken by the utils/vim/create-apparmor.vim.py script
before the common/list_af_names.sh existed.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/391
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 00:55:31 -07:00
Steve Beattie
3ce03f8516
Translations: merge updates from launchpad
Omnibus collection of translations updates.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from merge commit 3ee468864d
 plus following translation fix.)
2019-06-13 23:05:01 -07:00
Steve Beattie
f9b3fff2d8
utils: remove conflicting action in Swedish translation
The translated action character for Deny conflicted with the
untranslated action character for Finish in the Swedish translation.
Remote it, and hope for more action translations.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 03c08cf989)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:55 -07:00
Launchpad Translations on behalf of apparmor-dev
c35eac608e
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 9d226f5887)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:47 -07:00
Launchpad Translations on behalf of apparmor-dev
145ef6ae52
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 01656486ef)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:39 -07:00
Launchpad Translations on behalf of apparmor-dev
a408872800
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 90a4b301bd)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:30 -07:00
Launchpad Translations on behalf of apparmor-dev
d1a5e30d8f
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 3b1c320cfc)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:22 -07:00
Launchpad Translations on behalf of apparmor-dev
0e25580aa2
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 5a62c68743)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:04 -07:00
Launchpad Translations on behalf of apparmor-dev
afe12f0ced
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 78c09e4337)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:52 -07:00
Launchpad Translations on behalf of apparmor-dev
729658325c
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 2c614d4413)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:45 -07:00