Commit graph

4278 commits

Author SHA1 Message Date
Christian Boltz
85f8cace12 Merge branch 'cboltz-ntpd' into 'master'
allow access to ntp clockstats

See merge request apparmor/apparmor!54
2018-01-23 23:02:16 +00:00
Christian Boltz
e1929298ac Merge branch 'master' into 'master'
abstractions/gnupg: allow pubring.kbx

See merge request apparmor/apparmor!58

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.9..trunk
2018-01-20 22:59:17 +00:00
Rene Engelhard
8fc3dcb312 abstractions/gnupg: allow pubring.kbx 2018-01-20 23:54:08 +01:00
John Johansen
6f1d054468 regression tests: fix regression tests to pass on 4.14 upstream kernel
Some of the regression tests are missing conditionals or have the
wrong conditionals so that they fail on current upstream kernels.

Fix this by adding and changing conditionals and requires where
appropriate. With the patches the tests report passing on 4.14 and
4.15 kernels.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Time out
2018-01-20 01:34:54 -08:00
John Johansen
ef718df685 Merge branch 'conditional-include'
Documentation changes intrigeri <intrigeri@debian.org>

Acked-by: Time out
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-01-20 00:38:49 -08:00
John Johansen
2ea3309942 parser: add support for conditional includes
This is a minimal patch to add conditional includes to the profile
language.

The syntax for conditional includes is similar to regular includes
except with the addition of "if exists" after "include"

  include if exists <foo/bar>
  include if exists "foo/bar"
  include if exists "/foo/bar"
  include if exists foo/bar

Note: The patch is designed to be backportable with minimum
effort. Cleanups and code refactoring are planned for follow up
patches that won't be back ported.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-01-20 00:32:20 -08:00
John Johansen
8d142809f5 parser tests: fix includes to allow white space
includes were not handling WS in path names correctly. Allow WS within
quotes. Eg
  include "foo bar"
  include <"foo bar">

BugLink: http://bugs.launchpad.net/bugs/1738880
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-01-20 00:32:20 -08:00
John Johansen
efd8eedd52 parser tests: add tests for relative path includes
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-01-20 00:32:20 -08:00
John Johansen
62dbd29656 Merge branch 'dovecot-lda-protocols' into 'master'
Allow dovecot-lda to read anything under /usr/share/dovecot/protocols.d/

See merge request apparmor/apparmor!57

Acked-by: John Johansen <john.johansen@canonical.com>
2018-01-20 08:18:07 +00:00
intrigeri
1b51dac4c9 Allow dovecot-lda to read anything under /usr/share/dovecot/protocols.d/.
On current Debian sid it needs to read
/usr/share/dovecot/protocols.d/imapd.protocol, which is not surprising given it
already needed read access to /usr/share/dovecot/protocols.d/.
2018-01-20 06:25:25 +00:00
John Johansen
1361116542 Merge branch 'cboltz-dovecot-lmtp-dac' into 'master'
dovecot/lmtp: allow dac_read_search

See merge request apparmor/apparmor!55

Acked-by: John Johansen <john.johansen@canonical.com>
2018-01-19 09:10:48 +00:00
John Johansen
8b17fd1fa6 Merge branch 'pam_apparmor-less-restrictive-permissions' into 'master'
Install pam_apparmor.so with write permission for its owner.

See merge request apparmor/apparmor!56

Acked-by: John Johansen <john.johansen@canonical.com>
2018-01-19 08:48:36 +00:00
intrigeri
6ab19ea82f Install pam_apparmor.so with write permission for its owner.
I could not find the reason why the upstream Makefile has been installing it
with permissions 555: this predates the migration from SVN.

Regardless, at least on Debian and derivatives, dh_fixperms has been
changing these permissions to 755 forever so it was causing problems,
likely we would know about it by now.

The initial motivation for this change is supporting rootless builds on Debian
and derivatives, also known as "Rules-Requires-Root:  no":

 - /usr/share/doc/dpkg-dev/rootless-builds.txt* on a Debian system
   with a sufficiently recent dpkg-dev installed
 - https://nthykier.wordpress.com/2017/10/29/building-packages-without-fakeroot/
 - https://lists.debian.org/debian-devel/2017/10/msg00520.html

With this change applied upstream, Debian-based downstreams don't need to adjust
their debian/rules to make this work with "Rules-Requires-Root: no":

	chrpath -d $(CURDIR)/debian/tmp/lib/security/pam_apparmor.so
2018-01-19 08:22:35 +00:00
Christian Boltz
1541175c36
dovecot/lmtp: allow dac_read_search
Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=887591
2018-01-18 18:15:43 +01:00
Christian Boltz
1b58f226ce
allow access to ntp clockstats
References: http://bugzilla.opensuse.org/show_bug.cgi?id=1076247
2018-01-16 21:15:41 +01:00
John Johansen
d71e46baaa Merge branch 'parser-readonly-fs' into 'master'
disable write cache if filesystem is read-only

See merge request apparmor/apparmor!52
2018-01-16 19:29:33 +00:00
Thorsten Kukuk
924983e702
disable write cache if filesystem is read-only
... and don't bail out

Patch by Thorsten Kukuk <kukuk@suse.com>

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1069906
            https://bugzilla.opensuse.org/show_bug.cgi?id=1074429
2018-01-14 21:33:01 +01:00
John Johansen
6344b8ecc3 parser: fix parser so that cache creation failure doesn't cause load failure
This is a minimal patch so that it can be backported to 2.11 and 2.10
which reverts the abort on error failure when the cache can not be
created and write-cache is set.

This is meant as a temporary fix for
https://bugzilla.suse.com/show_bug.cgi?id=1069906
https://bugzilla.opensuse.org/show_bug.cgi?id=1074429

where the cache location is being mounted readonly and the cache
creation failure is causing policy to not be loaded. And the
thrown parser error to cause issues for openQA.

Note: A cache failure warning will be reported after the policy load.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz apparmor@cboltz.de
(cherry picked from commit 42b68b65fe1861609ffe31e05be02a007d11ca1c)
2018-01-05 01:32:47 -08:00
John Johansen
7f72fd0fca Release: prepare for 2.12 release
update version and library version

Signed-off-by: John Johansen <john.johansen@canonical.com>
2017-12-24 00:48:31 -08:00
Steve Beattie
0b719e4f86 infrastructure: support make tarball for gitlab patch
This patch supports rolling a tarball for a release, as well as doing
'make tag'. Only stuff that's been committed should get incorporated
into the tarball.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2017-12-24 00:31:34 -08:00
John Johansen
3afbfed9ee aa-decode: add the ability to support PROCTITLE string
buglink: https://bugs.launchpad.net/apparmor/+bug/1736841

Signed-off-by: John Johansen <john.johansen@canonical.com>
2017-12-24 00:22:24 -08:00
John Johansen
e55583ff27 profile: fix syslog-ng startup for some configurations
buglink: https://bugs.launchpad.net/bugs/1739909

Signed-off-by: John Johansen <john.johansen@canonical.com>
2017-12-24 00:13:58 -08:00
John Johansen
b5808e8aa8 Import translations from launchpad translations
Signed-off-by: John Johansen <john.johansen@canonical.com>
2017-12-24 00:08:28 -08:00
John Johansen
a3693f56f3 Merge branch 'cboltz-netstat' into 'master'
netstat: allow capability sys_ptrace,

See merge request apparmor/apparmor!46
2017-12-22 20:50:11 +00:00
Christian Boltz
81ca52d948
netstat: allow capability sys_ptrace,
Denying it means netstat -p (actually tested with -tulpen) can't find
out the program name.

sys_ptrace is "only" needed for tracing processes that run under a
different uid.

Also add  ptrace (read),  for systems that support ptrace rules.
2017-12-22 21:43:54 +01:00
John Johansen
4d8fb33335 Merge branch 'cboltz-regex-exception-msg' into 'master'
Improve exception message for #include rules

See merge request apparmor/apparmor!47


Acked-by: John Johansen <john.johansen@canonical.com>
2017-12-22 20:42:47 +00:00
Christian Boltz
60f71930cd
Improve exception message for #include rules
This fixes one of the remaining issues in
https://gitlab.com/apparmor/apparmor/merge_requests/44
2017-12-22 21:40:18 +01:00
Christian Boltz
22fa0a3a77 Merge branch 'lp-1733700-fix-include-for-non-magicpath' into 'master'
update python tools to support includes with absolute paths

See merge request apparmor/apparmor!44

Acked-by: Christian Boltz <apparmor@cboltz.de>
2017-12-22 20:38:14 +00:00
John Johansen
c3b0a3e512 Merge branch 'cboltz-logprof-owner' into 'master'
let aa-logprof detect 'owner' events (again)

See merge request apparmor/apparmor!34
2017-12-22 20:16:16 +00:00
John Johansen
f8b208ee80 Merge branch 'cboltz-dovecot' into 'master'
Update /usr/lib/dovecot/* profiles

See merge request apparmor/apparmor!42

Acked-by: John Johansen <john.johansen@canonical.com>
2017-12-22 19:20:07 +00:00
John Johansen
118ea834fd Merge branch 'cboltz-unused-UI_ask_mode_toggles' into 'master'
remove unused UI_ask_mode_toggles() in aa.py

See merge request apparmor/apparmor!41

Acked-by: John Johansen <john.johansen@canonical.com>
2017-12-22 19:18:23 +00:00
John Johansen
f2a84e5f1d Merge branch 'cboltz-owner-buttons' into 'master'
Display "owner permissions on/off" buttons in aa-logprof

See merge request apparmor/apparmor!40

Acked-by: John Johansen <john.johansen@canonical.com>
2017-12-22 19:06:34 +00:00
John Johansen
bcfb735b9a Merge branch 'cboltz-xauth' into 'master'
abstractions/X: add another location for .Xauthority

See merge request apparmor/apparmor!39

Acked-by: John Johansen <john.johansen@canonical.com>
2017-12-22 19:00:36 +00:00
John Johansen
7159538fc8 Merge branch 'cboltz-libapparmor-revision' into 'master'
get libapparmor revision in sync with the 2.11.1 release

See merge request apparmor/apparmor!35

Acked-by: John Johansen <john.johansen@canonical.com>
2017-12-22 18:44:17 +00:00
Jamie Strandboge
99f144f8c2 clarify error message in regex.py (thanks to cboltz) 2017-12-21 15:29:52 -06:00
Jamie Strandboge
5c95e3bf39 don't strip() a quoted path (thanks to cboltz) 2017-12-21 15:27:09 -06:00
Jamie Strandboge
515e40ec7f abstract out abs path include to get_include_path() (thanks to cboltz) 2017-12-21 15:07:21 -06:00
Jamie Strandboge
a7e79ffa3d rename vague 'dir' variables (thanks to cboltz) 2017-12-21 14:36:35 -06:00
Jamie Strandboge
9bbef8e307 update python tools to support includes with absolute paths
For now we only allow quoted absolute paths without spaces in the name
due to:
- 1738877: include rules don't handle files with spaces in the name
- 1738879: include rules don't handle absolute paths without quotes in
  some versions of parser
- 1738880: include rules don't handle relative paths in some versions of
  the parser
2017-12-20 17:21:21 -06:00
Tyler Hicks
ebf0cfe838 Merge branch 'update-README-for-python' into 'master'
update README for python on (at least) Ubuntu systems. Setup thanks to tyhicks

See merge request apparmor/apparmor!45

Acked-by: Tyler Hicks <tyhicks@canonical.com>
2017-12-19 00:28:22 +00:00
Jamie Strandboge
b8195dad31 update README for python on (at least) Ubuntu systems. Setup thanks to tyhicks 2017-12-18 16:02:34 -06:00
Christian Boltz
c803c34558 Merge branch 'gitignore-additions' into 'master'
.gitignore additions for libapparmor tests, binutils, and the vim syntax highlighting files

See merge request apparmor/apparmor!43

Acked-by: Christian Boltz <apparmor@cboltz.de>
2017-12-18 16:12:42 +00:00
Christian Boltz
06928db1ce
Update /usr/lib/dovecot/* profiles
- dict needs abstractions/openssl (seen with dovecot 2.2.31 since
  using openssl 1.1)
- imap needs to write tempfiles (seen with dovecot 2.2.31)
- managesieve-login needs access to the login-master-notify socket
  (seen with dovecot 2.2.33)
- pop3-login needs access to the anvil socket (reported by pfak on
  IRC some months ago)
2017-12-18 17:00:35 +01:00
Tyler Hicks
426990cfaf .gitignore: Add files to ignore in utils/vim/
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2017-12-18 15:50:59 +00:00
Tyler Hicks
e325e74b0f .gitignore: Add files to ignore from libapparmor test runs
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2017-12-18 15:48:59 +00:00
Tyler Hicks
ba0cdbc013 .gitignore: Add files to ignore in binutils/
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2017-12-18 15:45:48 +00:00
Tyler Hicks
da6db0c2b9 Merge branch 'cboltz-gitignore' into 'master'
.gitignore: add several parser/**.o and utils/**.pyc files

See merge request apparmor/apparmor!37

Acked-by: Tyler Hicks <tyhicks@canonical.com>
2017-12-18 15:42:32 +00:00
Christian Boltz
566218612c
remove unused UI_ask_mode_toggles() in aa.py 2017-12-17 17:38:46 +01:00
Christian Boltz
6713f9d94a Merge branch 'fix-pulse-config' into 'master'
Fix local pulseaudio config file access

See merge request apparmor/apparmor!38


Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.9..trunk
2017-12-17 16:19:42 +00:00
Christian Boltz
23220af3b9
.gitignore: add several parser/**.o and utils/**.pyc files
Also ignore parser/libapparmor_re/libapparmor_re.a and the utils
coverage report.
2017-12-17 16:55:10 +01:00