Commit graph

4338 commits

Author SHA1 Message Date
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
Kees Cook
735afbc947 aa-status: split profile from exec name
Right now, if you have a named profile with regular expressions to
match binaries, the profile will be shown in aa-status under the
"process list", which doesn't make sense. Instead, show the actual
executable name, and if the profile name differs, report it at the
end (or as a separate field in the json output mode).

Signed-off-by: Kees Cook <keescook@chromium.org>
2018-03-01 14:17:57 -08:00
Nicolas Videla
1c3839c39a Update man page and default configuration for notify.conf 2018-02-26 14:43:19 +11:00
Nicolas Videla
86db2263b8 Adding custom notification on AppArmor. 2018-02-26 14:34:58 +11:00
Steve Beattie
41b6182019 mlmmj-sub: fix moderated subscription
Merge branch 'cboltz-mlmmj-sub' into 'master'

See merge request apparmor/apparmor!70

Acked-by: Steve Beattie <steve@nxnw.org>
2018-02-22 22:55:06 +00:00
Christian Boltz
8ef7b59454
mlmmj-sub: fix moderated subscription
/var/spool/mlmmj/*/moderation/subscribe* rw, is needed for lists with
moderated subscription

References: http://bugzilla.opensuse.org/show_bug.cgi?id=1082230
2018-02-22 22:57:51 +01:00
Christian Boltz
0eefeeb0e7 Merge branch 'cboltz-notify-dbus-env' into 'master'
set DBUS_SESSION_BUS_ADDRESS, needed by notify-send

See merge request apparmor/apparmor!53


Acked-by: intrigeri <intrigeri@debian.org> for 2.9..master
2018-02-17 16:03:23 +00:00
Christian Boltz
21b0d14ea4 Merge branch 'fix-nvidia-dir' into 'master'
Allow to create .nv directory

See merge request apparmor/apparmor!69

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.9..master
2018-02-17 15:58:32 +00:00
Vincas Dargis
11e7dab95e Allow to create .nv directory
Update nvidia abstraction to allow creating NVIDIA-specific user directories in
case it is missing (due to fresh $HOME or if manually removed for any reason).
2018-02-16 16:54:32 +02:00
Christian Boltz
e88af93322 Merge branch 'update-base-abstraction' into 'master'
Update base abstraction for ld.so.conf and friends.

See merge request apparmor/apparmor!62

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.9..master
2018-02-15 20:14:38 +00:00
John Johansen
ad5e988efb Merge branch 'refactor-and-update-dri' into 'master'
Refactor and update dri-specific rules

See merge request apparmor/apparmor!66

Acked-by: Jamie Strandboge <jamie.strandboge@canonical.com>
2018-02-08 08:35:56 +00:00
Vincas Dargis
b0456adbd8 Add dri-enumerate abstraction
Create new dri-enumerate abstraction with rules needed for some GUI applications
allowing to get GPU device information.
2018-02-04 16:01:27 +02:00
Vincas Dargis
8dd517f6dd Move DRI-specific rules into it's own abstraction
Add new dri-common abstraction to contain basic DRI-specific rules.

This refactoring is based on a decision to have set of dri-* abstractions for
fine grained control on case-by-case basis. While dri-common is included in X
abstraction by default, additional DRI-related abstractions can be introduced
(such as for enumerating graphics devices) while keeping them logically together
with same dri- prefix.
2018-02-04 14:21:16 +02:00
John Johansen
547708bc99 Update base network mediation patch with missing feature pinning fixup
apparmor: fix regression in network mediation when using feature pinning

When the 4.14-rc6 and earlier kernels are used with an upstream 4.13
or earlier pinned feature set, there is a regression in network
mediation where policy is not being correctly enforced, because the
compilation is completely dropping the af mediation table as expected
by pre 4.14 kernels but the 4.14 kernel is not accounting for this.

Resulting in network denials that can not be fixed by policy.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-02-01 09:43:37 +01:00
John Johansen
8f6d94bf44 Update base network mediation patch with missing feature pinning fixup
apparmor: fix regression in network mediation when using feature pinning

When the 4.14-rc6 and earlier kernels are used with an upstream 4.13
or earlier pinned feature set, there is a regression in network
mediation where policy is not being correctly enforced, because the
compilation is completely dropping the af mediation table as expected
by pre 4.14 kernels but the 4.14 kernel is not accounting for this.

Resulting in network denials that can not be fixed by policy.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-02-01 09:39:19 +01:00
John Johansen
0b93a7f991 add final kernel patches for 4.14 and 4.15
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-02-01 08:27:19 +01:00
John Johansen
e2c1b21dec Merge branch 'cboltz-simplfy-write-include' into 'master'
simplify write_include() and drop write_single()

See merge request apparmor/apparmor!64

Acked-by: John Johansen <john.johansen@canonical.com>
2018-01-31 15:13:01 +00:00
John Johansen
cb4f553d60 Merge branch 'lp1608075-clarify-effect-of-reloading-a-profile' into 'master'
apparmor(7): clarify the effect of reloading a profile.

See merge request apparmor/apparmor!65

Acked-by: John Johansen <john.johansen@canonical.com>
2018-01-31 09:46:10 +00:00