Commit graph

4405 commits

Author SHA1 Message Date
John Johansen
5d973c2657 Merge branch 'cboltz-dovecot-config' into 'master'
dovecot/config: allow dac_read_search and reading ssl-parameters.dat

See merge request apparmor/apparmor!95

Acked-by: John Johansen <john.johansen@canonical.com>
2018-04-14 21:05:29 +00:00
Christian Boltz
c4e607199c
dovecot/config: allow dac_read_search and reading ssl-parameters.dat
References: https://bugzilla.opensuse.org/show_bug.cgi?id=1087753#c12
2018-04-14 22:53:40 +02:00
Christian Boltz
e28d0a922a
Merge branch 'goldwynr/apparmor-fixes'
See https://gitlab.com/apparmor/apparmor/merge_requests/91

Acked-by: Christian Boltz <apparmor@cboltz.de>
2018-04-14 21:16:16 +02:00
Christian Boltz
b74f224106 Merge branch 'cboltz-dont-hide-parser-errors' into 'master'
drop display_usage() calls after printing an error message

See merge request apparmor/apparmor!83

Acked-by: John Johansen <john.johansen@canonical.com>
2018-04-13 14:00:17 +00:00
Christian Boltz
0b18e57cc5 exit(1) in process_arg() if c == 0
(as discussed on https://gitlab.com/apparmor/apparmor/merge_requests/83)
2018-04-13 13:58:55 +00:00
Christian Boltz
b714cf1b0d update Canonical copyright year in header and --help
References: https://bugs.launchpad.net/apparmor/+bug/1437946 "BTW2"
2018-04-13 13:58:55 +00:00
Christian Boltz
b7732a2a30 drop display_usage() calls after printing an error message
This avoids "hiding" the error message with the --help output

References: https://bugs.launchpad.net/apparmor/+bug/1437946
2018-04-13 13:58:55 +00:00
Christian Boltz
6b78daf25b Merge branch 'cboltz-dovecot-profiles' into 'master'
Dovecot profile updates

See merge request apparmor/apparmor!90

Acked-by: John Johansen <john.johansen@canonical.com>
2018-04-13 13:56:40 +00:00
Christian Boltz
26a8b72225 allow dovecot/auth to write /run/dovecot/old-stats-user
References: https://bugzilla.opensuse.org/show_bug.cgi?id=1087753#c4
            (3rd bullet point)
2018-04-13 13:55:05 +00:00
Christian Boltz
36bdd6ea70 add dovecot/stats profile, and allow dovecot to run it
References: https://bugzilla.opensuse.org/show_bug.cgi?id=1088161
2018-04-13 13:55:05 +00:00
Vincas Dargis
0d0a196077 Allow nvidia abstraction to read memory block size
Fix DENIED message detected with NVIDIA 390.48 drivers.
2018-04-12 20:36:56 +03:00
Goldwyn
5e187daa0b Set flags for profiles represented by a glob
Getting and Setting profile represented by a glob does not work correctly
because they are checked for equality. Use a glob match to check for them.
Also, add a warning stating that the profile being set represents multiple programs.

traceroute is an example whose profile name is represented as
/usr/{sbin/traceroute,bin/traceroute.db} and exhibits the issue:

Setting /usr/sbin/traceroute to enforce mode.

ERROR: /etc/apparmor.d/usr.sbin.traceroute contains no profile

Signed-off-by: Goldwyn <goldwyn@fiona.lan>
2018-04-12 05:57:27 -05:00
John Johansen
776975dc38 Merge branch 'cboltz-utils-quiet-tests' into 'master'
make utils tests less verbose

See merge request apparmor/apparmor!89

Acked-by: John Johansen <john.johansen@canonical.com>
2018-04-12 06:53:46 +00:00
Tyler Hicks
f3c39034ae Merge branch 'libapparmor-fix_syntax_error' into 'master'
libapparmor: fix typo in parser ignored list

See merge request apparmor/apparmor!88

Acked-by: Tyler Hicks <tyhicks@canonical.com>
2018-04-10 09:01:31 -05:00
Christian Boltz
45922c6d21
make utils tests less verbose
Given the big number of tests, printing a dot for each test (instead of
multiple lines) is enough ;-)
2018-04-08 20:18:30 +02:00
Tyler Hicks
80d900d18c Merge branch 'libapparmor-fix_syntax_error' into 'master'
libapparmor: fix typo in parser ignored list

See merge request apparmor/apparmor!88

Acked-by: Tyler Hicks <tyhicks@canonical.com>
2018-04-05 03:58:36 +00:00
Steve Beattie
812d53b546 libapparmor: fix typo in parser ignored list
The fix for issue #3/merge !86 in commit f0876ea9 contained a syntax
error that prevented libapparmor from building successfully. This
commit addresses the issue.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2018-04-04 20:23:21 -07:00
John Johansen
4ffcb2a8a9 Add larger version of mascot image to repo
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-04-03 14:42:37 -07:00
Tyler Hicks
96b339f870 Merge branch 'EmersonBernier/apparmor-patch-1'
Add .pacsave/.pacnew/.dpkg-remove to apparmor parser ignored list

See merge request apparmor/apparmor!86

Reviewed-by: intrigeri <intrigeri@debian.org>
Acked-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Tyler Hicks <tyhicks@canonical.com>
2018-04-02 14:28:49 +00:00
Emerson Bernier
b4fa0cf9f6 Add ".dpkg-remove" to apparmor parser ignored list
References: https://bugs.debian.org/893974
2018-04-02 14:24:44 +00:00
Emerson Bernier
f0876ea92a Add .pacsave/.pacnew to apparmor parser ignored list
Currently there is a list of file extensions which apparmor parser
should ignore which contains rpm and dpkg backup files. The list could
be extended with extensions used by pacman package manager
(Archlinux/Manjaro/Antergos):

.pacsave

.pacnew

https://wiki.archlinux.org/index.php/Pacman/Pacnew_and_Pacsave

References: https://gitlab.com/apparmor/apparmor/issues/3
2018-04-02 14:24:25 +00:00
Christian Boltz
06069cc47a Merge branch 'opensuse_browsers' into 'master'
Fix ubuntu-browsers for 64bit openSUSE

See merge request apparmor/apparmor!87

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.9..master
2018-04-01 15:35:01 +00:00
Vincas Dargis
0c2690d819 Fix ubuntu-browsers for 64bit openSUSE
On 64 bit openSUSE system, Chromium and Firefox browsers are installed in
/usr/lib64/ directory.
2018-04-01 16:48:13 +03:00
Christian Boltz
47da50b7e6 Merge branch 'master' into 'master'
Fix typo in apparmor_parser.pod

See merge request apparmor/apparmor!85

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.9..master
2018-03-26 19:50:30 +00:00
Emerson Bernier
50ee50f931 Fix typo in apparmor_parser.pod 2018-03-26 19:07:50 +00:00
Christian Boltz
566f656101 Merge branch 'cboltz-systemd' into 'master'
Add apparmor.service and aa-teardown

See merge request apparmor/apparmor!81

Acked-by: John Johansen john.johansen@canonical.com
2018-03-24 19:30:18 +00:00
Christian Boltz
11ae3f6ecd add aa-teardown manpage 2018-03-24 19:28:24 +00:00
Christian Boltz
671ddccf19 Add apparmor.service and aa-teardown
... and the apparmor.systemd wrapper.

Also add a new 'install-systemd' target to the Makefile to install these
systemd-related files on (open)SUSE by default. Other distributions can
follow by adding a dependency on 'install-systemd' on their
'install-$DISTRO' target.

Note that apparmor.service has ExecStop=/bin/true to avoid that running
processes get unconfined if someone accidently types
    systemctl restart apparmor   (instead of using "reload")

Use aa-teardown if you really want to unload all profiles.

The files in this commit are used in openSUSE since a while, and also in
Arch Linux.

BTW: The condition on var-lib.mount is because openSUSE uses
/var/lib/apparmor/cache/ - but with the changed btrfs layout on
openSUSE, maybe I'll change that to /var/cache/apparmor/ which is
a) used by Debian and b) more sane
2018-03-24 19:28:24 +00:00
John Johansen
4395d6dea8 Merge branch 'cboltz-aa-notify-use-group' into 'master'
comment out use_group to remove group restrictions

See merge request apparmor/apparmor!82

Acked-by: John Johansen <john.johansen@canonical.com>
2018-03-19 09:48:11 +00:00
Christian Boltz
86ec3dd658
comment out use_group to remove group restrictions
use_group is only honored if it is defined.

The "real" permission check is reading the logfile - the group check
in aa-notify is just an annoying additional check, and the default
"admin" only works on Ubuntu (other distributions typically use
"wheel").

This commit comments out use_group in the default config, which allows
everybody to use aa-notify. Permissions for reading the log file are of
course still needed.

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1058787
2018-03-18 19:56:29 +01:00
Christian Boltz
14096cb3a7 Merge branch 'cboltz-fix-make-C-profiles' into 'master'
Fix $(PWD) when using "make -C profiles"

See merge request apparmor/apparmor!80

Acked-by: John Johansen <john.johansen@canonical.com>
2018-03-18 18:28:29 +00:00
Christian Boltz
208933829f Fix $(PWD) when using "make -C profiles"
By default, it stays at the "calling directory" instead of the directory
of the Makefile, which breaks "make -C profiles check".
Explicitely set it in the Makefile to get the right directory.
2018-03-18 18:09:04 +00:00
John Johansen
cea8e7cfa0 Merge branch 'cboltz-drop-suse-initscript' into 'master'
Drop the old (open)SUSE initscript

See merge request apparmor/apparmor!79

Acked-by: John Johansen <john.johansen@canonical.com>
2018-03-18 16:18:37 +00:00
Christian Boltz
c9bf36dd2e
Drop the old (open)SUSE initscript
Also adjust the install-suse make target to
- make 'rcapparmor' a symlink to 'service'
- no longer create the 'rcsubdomain' symlink

(open)SUSE does this in apparmor.spec since several releases, so this
commit upstreams the changes the spec did after running make install.
2018-03-18 16:31:47 +01:00
Christian Boltz
e6ef536957 Merge branch 'cboltz-utils-test-ignore-include-if-exists' into 'master'
utils tests: ignore tests for 'include if exists'

See merge request apparmor/apparmor!78

Acked-by: John Johansen <john.johansen@canonical.com>
2018-03-16 21:38:13 +00:00
Christian Boltz
dc7c702188 utils tests: ignore tests for 'include if exists'
... and some exotic includes that are not supported by the tools yet
2018-03-16 21:37:17 +00:00
Christian Boltz
3b5683be29 Merge branch 'cboltz-skip-git-dir' into 'master'
ignore .git in is_skippable_dir()

See merge request apparmor/apparmor!77

Acked-by: John Johansen <john.johansen@canonical.com>
2018-03-16 21:35:52 +00:00
Christian Boltz
f9eb3fea0f ignore .git in is_skippable_dir()
References: https://bugs.launchpad.net/apparmor/+bug/1440273
2018-03-16 21:34:38 +00:00
Steve Beattie
130958a4a4 tests: Allow shell helper test read the locale
Merge branch 'sh-helper-read-locale' into 'master'

See merge request apparmor/apparmor!76

Signed-off-by: Steve Beattie <steve@nxnw.org>
2018-03-09 15:00:17 +00:00
Tyler Hicks
2bc64070c9 tests: Allow shell helper test read the locale
The environ.sh test fails with the following fatal error:

  Fatal Error (environ): Unable to run test sub-executable

The reason is due to the tests which use the env_check.sh helper see
unexpected output in the helper's output:

  /bin/bash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)

I see a number of locale related denials:

apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/locale-archive" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/etc/locale.alias" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_IDENTIFICATION" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_CTYPE" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_COLLATE" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_MESSAGES/" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_NUMERIC" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_TIME" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

Allowing everything under /usr/lib/locale/ to be read by the helper
results in the environ.sh test passing.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2018-03-09 07:55:06 +00:00
John Johansen
1f9085e5e7 Merge branch 'logparse-max-uint' into 'master'
utils: Properly identify empty ouid/fsuid fields in logs

See merge request apparmor/apparmor!75

Acked-by: John Johansen <john.johansen@canonical.com>
2018-03-07 15:37:50 +00:00
Tyler Hicks
46f88f5f0d utils: Properly identify empty ouid/fsuid fields in logs
libaalogparse uses (unsigned long) -1 to indicate that a log entry does
not contain ouid and/or fsuid fields. The utils logparser was
incorrectly using 2^64 - 1 to detect such a condition but that wasn't
sufficient for 32 bit environments.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2018-03-07 15:26:26 +00:00
John Johansen
f8c535801e Twiddle with badge urls
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-03-06 08:13:50 -08:00
John Johansen
8b3997aa0e README.md: fix Bad Header in the README file
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-03-06 07:20:59 -08:00
John Johansen
7f643fbc31 Move the README file to README.md
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-03-06 07:17:30 -08:00
John Johansen
275c7c0d50 Add core infrastructure badge and build status and coverage badges
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-03-06 07:12:02 -08:00
Steve Beattie
d66720ef07 build: support coverity python scan
Coverity now supports scanning python (and other languages). Apply the
fs-capture-search option to the libapparmor and utils directpries to
capture the python source.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-03-05 23:58:43 -08:00
intrigeri
22e94633c3 dnsmasq profile: allow chown capability.
dnsmasq on Debian sid now chown's its PID file.

Bug-Debian: https://bugs.debian.org/889806
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-03-05 23:51:23 -08:00
John Johansen
ccef9161a8 Merge branch 'master' into 'master'
Add custom notification

See merge request apparmor/apparmor!72

Acked-by: John Johansen <john.johansen@canonical.com>
2018-03-06 07:42:37 +00:00
John Johansen
b21b28f486 Merge branch 'aa-status-exe' into 'master'
aa-status: split profile from exec name

See merge request apparmor/apparmor!73

Acked-by: John Johansen <john.johansen@canonical.com>
2018-03-01 22:23:25 +00:00