Commit graph

4705 commits

Author SHA1 Message Date
Vincas Dargis
69c4cabb93 Add qt5-write abstraction
Qt-based applications stores QFileDialog (latest browsed directory) and
other shared user settings inside ~/.config/QtProject.conf. Currently
available qt abstraction only allows to read it (by design), so this
patch introduces abstraction that grants permissions for writing.
2018-08-15 13:02:21 +03:00
John Johansen
b1967c892a parser: allow specifying the parser config file
The parser config file can affect the parsers behavior during tests.
Allow overriding the default location with the option

  --config-file=

the option must be the first option in the commands argument list.

Also provile a
  --print-config-file

option to display what the parser is using for a config file.

BugLink: http://bugs.launchpad.net/bugs/1277711
Acked-by: Christian Boltz <apparmor@cboltz.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-14 18:31:10 -07:00
John Johansen
533b4ab5b6 Merge branch 'drg-mods-1' into 'master'
Abstractions need write access to create/update some common config dirs

See merge request apparmor/apparmor!165

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-14 23:58:25 +00:00
Vincas Dargis
94014c09f0 Add kde-icon-cache-write abstraction
KIconLoader uses ~/.cache/icon-cache.kcache, and it is opened in
read-write mode. Because access to it does not seem to be critical, and
read-only mode is not used, rules for accessing this cache is added to
it's own new "write" abstraction, instead of making kde abstraction more
permissive by default.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-14 16:49:30 -07:00
Vincas Dargis
7345f61e9c Add kde-language-write abstraction
Currently, kde abstraction only allows reading
~/.config/klanguageoverridesrc file (by design). Some KDE applications
has option to change language for it's interface, and this needs write
access. This is fixed by introducing new abstraction.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-14 16:49:16 -07:00
Vincas Dargis
fae93f1b6c Add kde-globals-write abstraction
Currently, kde abstraction only allows reading ~/.config/kdeglobals (by
design), though some applications might need to update it's contents
such as KFileDialog settings. This patch fixes it by introducing new
abstraction.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-14 16:49:07 -07:00
John Johansen
ec86a15322 Merge branch 'recent-documents-write' into 'master'
Add recent-documents-write abstraction

See merge request apparmor/apparmor!163

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-14 23:26:02 +00:00
Daniel Richard G
7972c038d7 Updated abstractions to allow writing to some common config dirs 2018-08-14 16:38:18 -04:00
Daniel Richard G
094dc741ee Updated abstractions to allow creating some common config dirs 2018-08-14 16:38:18 -04:00
Daniel Richard G
f2c5401ebe sbin.rpc.statd: updated comment to reflect use of prctl()
Acked-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-13 10:23:28 -07:00
John Johansen
085e2fc1a4 Merge branch 'kde-settings' into 'master'
Update kde abstraction for common settings

See merge request apparmor/apparmor!162

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-08 05:33:00 +00:00
John Johansen
e76181c4d9 Merge branch 'cboltz-ssl-dehydrated' into 'master'
add dehydrated certificate location to ssl_* abstractions

See merge request apparmor/apparmor!161

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-08 05:31:39 +00:00
Vincas Dargis
4fe8ae97c4 Add recent-documents-write abstraction
Add abstraction for updating recent documents list.
2018-08-07 23:27:23 +03:00
Vincas Dargis
867442e962 Update kde abstraction for common settings
Add rules to allow reading common KDE-specific settings, used mostly by
native KDE file dialog.
2018-08-07 20:20:08 +03:00
John Johansen
86053c9e38 Merge branch 'cboltz-genprof-readonly-ratelimit' into 'master'
aa-genprof: don't crash if setting printk_ratelimit fails

See merge request apparmor/apparmor!157

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-07 10:02:25 +00:00
John Johansen
c66a1a972c Merge branch 'cboltz-fix-complain-named-profiles' into 'master'
set_profile_flags(): allow named profiles without attachment

See merge request apparmor/apparmor!142

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-07 10:00:49 +00:00
John Johansen
9dab5f07f4 Merge branch 'cboltz-change-flags' into 'master'
prevent that aa-complain etc. overwrites flags in child profiles if they differ from the main profile

See merge request apparmor/apparmor!150

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-07 09:59:39 +00:00
John Johansen
b38e646630 Merge branch 'move-the-binary-cache-to-var-cache' into 'master'
Move the cache to /var/cache

See merge request apparmor/apparmor!156

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-07 09:57:28 +00:00
John Johansen
4200932d8f Merge branch 'binmerge' into 'master'
profiles: support distributions which merge sbin into bin

Closes #8

See merge request apparmor/apparmor!149

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-07 09:53:17 +00:00
John Johansen
9c66fa09cb Merge branch 'build-fix_libapparmor_coverity_scan' into 'master'
coverity build: capture separate log files for each coverity invocation

See merge request apparmor/apparmor!145
2018-08-07 09:36:46 +00:00
John Johansen
e4e73e3dc0 Merge branch 'cboltz-notify-pkg' into 'master'
make message about notify-send package cross-distro compatible

See merge request apparmor/apparmor!144

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-07 09:24:58 +00:00
John Johansen
bc4aa43d64 Merge branch 'cboltz-abstractions-opencl-pocl' into 'master'
Fix typo (double /) in opencl-pocl abstraction

See merge request apparmor/apparmor!158

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-07 09:16:56 +00:00
Christian Boltz
2e8b902248
add dehydrated certificate location to ssl_* abstractions
I don't use dehydrated myself, therefore this is based on the comments
on https://build.opensuse.org/request/show/533380
2018-08-06 23:15:06 +02:00
Christian Boltz
763a6787d8 Merge branch 'add-path-to-abstractions-python' into 'master'
Allow /usr/local/lib/python3/dist-packages in abstractions/python

See merge request apparmor/apparmor!160

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

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master
2018-08-06 18:11:37 +00:00
segfault
6a10f07650 Allow /usr/local/lib/python3/dist-packages in abstractions/python 2018-08-06 19:53:16 +02:00
John Johansen
4011c421db Merge branch 'cboltz-fix-get-profile' into 'master'
Fix unsetting filename in get_profile()

See merge request apparmor/apparmor!140

Acked-by: John Johansen <john.johansen@canonical.com>
2018-08-06 17:34:23 +00:00
Christian Boltz
a054855433
Fix typo (double /) in opencl-pocl abstraction 2018-08-05 17:03:34 +02:00
Christian Boltz
961e69afe5
aa-genprof: don't crash if setting printk_ratelimit fails
When running aa-genprof in a lxd instance, printk_ratelimit is readonly
and writing to it fails. Instead of crashing with a backtrace, only
print a warning.

References: https://bugs.launchpad.net/apparmor/+bug/1785391
2018-08-05 14:46:13 +02:00
Christian Boltz
b4c848c81e Merge branch 'drg-mods-1' into 'master'
Various profile/abstraction updates

See merge request apparmor/apparmor!153

Acked-by: intrigeri <intrigeri@debian.org>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2018-08-02 17:17:30 +00:00
intrigeri
ddb256076b Consistently point to the current (Launchpad) issue tracker. 2018-08-02 14:46:14 +00:00
intrigeri
2233818325 Merge branch 'drg-mods-3' into 'master'
Updated README to direct users to the GitLab issue tracker.

See merge request apparmor/apparmor!155
2018-08-02 04:20:59 +00:00
intrigeri
47e38944f3 Merge branch 'drg-mods-2' into 'master'
New abstraction: lsb_release (sub-profile).

See merge request apparmor/apparmor!154
2018-08-02 04:12:13 +00:00
Daniel Richard G
cffaa7a035 Updated README with links to the GitLab AppArmor project. 2018-08-01 23:56:59 -04:00
intrigeri
3d21cf0e32 Move the cache to /var/cache
Let's not store a bunch of automatically generated binary files in /etc.
AppArmor 3.0 will store the cache in /var/cache and most distros
(openSUSE, Debian, and soon Ubuntu) moved it there already.

Bug-Debian: https://bugs.debian.org/904637
2018-08-02 01:18:04 +00:00
Daniel Richard G
99e45b59d3 lsb_release: added permissions needed by openSUSE implementation. 2018-08-01 19:13:26 -04:00
Daniel Richard G
f73514052d New profile: lsb_release (no attachment path)
This will allow removal of the lsb_release sub-profile from the
chromium, firefox and murmurd profiles, and consolidation of the rules
for /usr/bin/lsb_release in a single file.
2018-08-01 19:13:18 -04:00
Daniel Richard G
67728c4f91 usr.sbin.sshd: need write access to Kerberos ticket cache. 2018-08-01 17:39:30 -04:00
Daniel Richard G
0de3d5e14b usr.sbin.lighttpd: minor updates, added Debian/Ubuntu integration.
The integration changes are taken from the patch at
apparmor-2.12/debian/patches/debian/add-debian-integration-to-lighttpd.patch
and are necessary so that lighttpd doesn't serve everything as
application/octet-stream.
2018-08-01 17:39:17 -04:00
Daniel Richard G
e43468c94a usr.sbin.in.fingerd: needs lock access on /run/utmp. 2018-08-01 17:37:11 -04:00
Daniel Richard G
c047abcaf3 sbin.rpc.statd: updated so that it actually works. 2018-08-01 17:36:54 -04:00
Daniel Richard G
ac1d0545f4 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).
2018-07-30 22:49:24 -04:00
intrigeri
f30544f185 Merge branch 'flatpak-exports' into 'master'
abstractions/freedesktop.org: treat Flatpak exports the same way as bits shipped by the distro

See merge request apparmor/apparmor!71
2018-07-29 23:39:41 +00:00
intrigeri
aa3022208f tunables/share: make variables value more readable by avoiding the use of too many alternations.
Thanks to Christian Boltz for the suggestion and the patch!
2018-07-29 01:31:39 +00:00
Steve Beattie
4ee50ae1c4
Profiles: Patch usr.sbin.useradd to support usr-merge.
Merge branch 'xnox/apparmor-master'

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/152
2018-07-27 10:25:56 -07:00
Dimitri John Ledkov
e99fa6c605 Patch usr.sbin.useradd to support usr-merge. 2018-07-27 17:05:00 +01:00
intrigeri
34dbe372c5 Rename @{usr_share} → @{system_share_dirs} and @{home_local_share} → @{user_share_dirs}.
Thanks a lot to Simon McVittie for the much better names suggestion.
2018-07-27 06:33:42 +00:00
intrigeri
51f2259c08 freedesktop.org abstraction: refactor (factorize) for consistency.
This change makes the @{home_local_share} rules similar to the
@{usr_share} ones.
2018-07-27 06:28:22 +00:00
intrigeri
aed447aca2 freedesktop.org abstraction: simplify by not attempting to guess the exhaustive list of files that can exist in {~/.local/share,/usr/share}/applications/.
As Simon McVittie wrote, "if a specification or library creates extra caches, or
has .desktop files in a subdirectory, or anything like that, then I don't see
why we wouldn't want to allow reading those too".
2018-07-27 06:26:57 +00:00
intrigeri
9d843b90fe kde abstraction: drop redundant rules for icons access.
These rules are already in abstractions/freedesktop.org that's included
by the abstractions/kde.
2018-07-27 06:22:29 +00:00
intrigeri
0ba94f5a04 freedesktop.org abstraction: treat Flatpak exports the same way as bits shipped by the distro.
As Simon McVittie <smcv@collabora.com> wrote on
https://bugs.debian.org/865206 and on the AppArmor mailing list:

"Anything in /var/lib/flatpak/exports/share or
~/.local/share/flatpak/exports/share is essentially equivalent to
the corresponding path in /usr/{local/,}share, and is something
that has deliberately been "exported" to the rest of the system by a
Flatpak-confined app.

The only reason to prevent reading those directories would be if you do
not want the AppArmor-confined app to be able to enumerate the other
software you have installed on your system, as an anti-fingerprinting
mechanism.".

Bug-Debian: https://bugs.debian.org/865206
2018-07-27 06:22:22 +00:00