Commit graph

5167 commits

Author SHA1 Message Date
Christian Boltz
2d74c42c75
Fix whitespace in ssl_* abstractions
Drop superfluous whitespace introduced by
4d275bab69 and
3016ffb336
2019-06-29 23:23:07 +02:00
Christian Boltz
b0575b077b Merge branch 'master' into 'master'
Add for Certbot on openSUSE Leap

The default path is `/etc/certbot/archive/{some domain}/{file name}.pem`

See merge request apparmor/apparmor!397


Acked-by: Christian Boltz <apparmor@cboltz.de>
2019-06-29 21:05:39 +00:00
Richard Chen
4d275bab69 Update ssl_keys 2019-06-28 07:31:10 +00:00
Richard Chen
3016ffb336 Add for CertBot on openSUSE Leap 2019-06-28 07:30:10 +00:00
Christian Boltz
0d327abf3a Merge branch 'cboltz-postfix-profiles' into 'master'
postfix/master needs to execute postfix/error

See merge request apparmor/apparmor!392

Acked-by: Seth Arnold <seth.arnold@canonical.com>
2019-06-27 14:41:41 +00:00
Christian Boltz
5aa17c1fa4 Merge branch 'cboltz-sfs-mountpoint' into 'master'
Fix and simplify setting SFS_MOUNTPOINT

See merge request apparmor/apparmor!394

Acked-by: Seth Arnold <seth.arnold@canonical.com>
2019-06-27 14:33:57 +00:00
Steve Beattie
7c7a4bc531
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
2019-06-26 08:36:04 -07:00
Christian Boltz
61c27d8808
Fix and simplify setting SFS_MOUNTPOINT
Instead of setting SFS_MOUNTPOINT in is_apparmor_loaded() (which is
called in most cases) and in is_container_with_internal_policy() (which
covers/fixes the remaining cases), set it globally.

This also fixes a bug in is_container_with_internal_policy() (introduced
in f10e72a14f) where the variable
definition tried to use the no longer existing $MODULE variable and
therefore got a wrong path for $SFS_MOUNTPOINT.

Besides this bug, there's a minor behaviour change / improvement if
securityfs isn't mounted - "file not found" error messages will now
contain the full/correct path ;-)

This change/cleanup is a follow-up of
https://gitlab.com/apparmor/apparmor/merge_requests/363 and some IRC
discussions 2019-04-16.
2019-06-21 19:22:15 +02:00
Christian Boltz
f250e94240
postfix/master needs to execute postfix/error 2019-06-20 14:37:46 +02:00
John Johansen
a45d2c9dcd libapparmor: bump revision to match 2.13.3 release revision.
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-18 14:08:57 -07:00
Christian Boltz
ff287e9238 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>
2019-06-14 01:10:38 -07:00
Christian Boltz
c866bc276b update freshclam profile
freshclam needs to write more files in /var/lib/clamav/, and also needs
to write its pid file.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/381
Signed-off-by: Christian Boltz <apparmor@cboltz.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 01:05:16 -07:00
John Johansen
9144e39d25 Revert "utils/test-network.py: fix failing testcase"
This reverts commit 378519d23f.
this commit was meant for the 2.13 branch not master

Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 01:05:16 -07:00
Steve Beattie
378519d23f 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:04:00 -07:00
John Johansen
48e9f0ee2e Merge branch 'cboltz-postfix-profiles' into 'master'
update postfix profiles

On openSUSE Leap 15.1, the postfix binaries live in /usr/lib/postfix/bin/ which was not covered in the postfix.\* attachment and mrix rules.

Also add several permissions to the postfix.\* profiles needed on openSUSE Leap 15.1.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/380
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:31:14 +00:00
Jamie Strandboge
f10e72a14f set SFS_MOUNTPOINT in is_container_with_internal_policy()
is_container_with_internal_policy() is called independently of
apparmor_*() in the systemd unit and potentially other consumers of
rc.apparmor.functions. When the unit and rc.apparmor.functions functions
were rewritten, they were written so that SFS_MOUNTPOINT was only set in
is_apparmor_loaded(), but this is only called in apparmor_start(),
remove_profiles(), apparmor_kill(), apparmor_restart(), apparmor_try_restart()
and apparmor_status() and not is_container_with_internal_policy().

While it is clear that is_container_with_internal_policy() is meant to
be called before apparmor_start(), is is unclear why SFS_MOUNTPOINT is
only defined in is_apparmor_loaded(). There are several ways to fix
this:

1. update is_container_with_internal_policy() to call is_apparmor_loaded()
2. identify the callers of is_container_with_internal_policy() and have
   them call is_apparmor_loaded()
3. reorganize the code to remove duplicate calls and assignments
4. define SFS_MOUNTPOINT along with SECURITYFS and MODULE, at the top
   level
5. also define SFS_MOUNTPOINT in is_container_with_internal_policy()

'1' would result in redundant calls in many common cases since the
systemd unit would call is_apparmor_loaded() both in
is_container_with_internal_policy() and prior to other calls.

'2' would like break consumers of rc.apparmor.funcions, like
Debian/Ubuntu's profile-load.

'3' is perhaps ok, but requires more effort and is regression-prone.

'4' seems the simplest, most correct fix

'5' is what this patch implements, which is as simple as '4' but tries
to maintain the original author's intent of when to set SFS_MOUNTPOINT.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/363
Signed-off-by: Jamie Strandboge <jamie@strandboge.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-13 21:21:21 -07:00
John Johansen
5fd07de9f4 Merge branch 'cboltz-syslog-ng' into 'master'
syslog-ng: add abstractions/python for python-parser

When running syslog-ng with a defined python-parser, it needs access to python libraries.

For details about python-parser, see https://www.syslog-ng.com/community/b/blog/posts/format-your-log-messages-in-python

References: https://github.com/balabit/syslog-ng/issues/2625

PR: https://gitlab.com/apparmor/apparmor/merge_requests/361
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 00:39:30 +00:00
John Johansen
5b2f4e8b66 Merge branch 'master' into 'master'
parser: Fix parsing of arrow “px -> …”

The parser failed to read the profile name after the the arrow. Rules with `-> foo-bar;` failed with “Found unexpected character: '-'”. Rules with `-> @{tgt};` compiled fine, but failed at runtime with “profile transition not found”.

The patch was written by sbeattie and published on https://paste.ubuntu.com/p/tzxxmVwGJ8/

[https://matrix.to/#/!pNJIrowvqsuGgjXsEY:matrix.org/$15477566201815716pmube:matrix.org?via=matrix.org&via=alea.gnuu.de](https://matrix.to/#/!pNJIrowvqsuGgjXsEY:matrix.org/%2415477566201815716pmube:matrix.org?via=matrix.org&via=alea.gnuu.de)

PR: https://gitlab.com/apparmor/apparmor/merge_requests/334
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 00:32:55 +00:00
Mike Salvatore
82ff86bfbf Add a build-dep target to tests/regression/apparmor/Makefile
Add a target to install build dependencies for the apparmor regression
tests. Currently supports Ubuntu and Debian distros.

Signed-off-by: Mike Salvatore <mike.salvatore@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-13 17:29:00 -07:00
Steve Beattie
03c08cf989
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>
2019-06-13 15:03:06 -07:00
Steve Beattie
3ee468864d
Translations: merge updates from launchpad
Omnibus collection of translations updates.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:45:25 -07:00
Launchpad Translations on behalf of apparmor-dev
9d226f5887
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:39:52 -07:00
Launchpad Translations on behalf of apparmor-dev
01656486ef
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:39:52 -07:00
Launchpad Translations on behalf of apparmor-dev
90a4b301bd
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:39:52 -07:00
Launchpad Translations on behalf of apparmor-dev
3b1c320cfc
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:30:01 -07:00
Launchpad Translations on behalf of apparmor-dev
5a62c68743
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:30:00 -07:00
Launchpad Translations on behalf of apparmor-dev
78c09e4337
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:30:00 -07:00
Launchpad Translations on behalf of apparmor-dev
2c614d4413
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:30:00 -07:00
Launchpad Translations on behalf of apparmor-dev
d14723b78c
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:30:00 -07:00
Launchpad Translations on behalf of apparmor-dev
fe2faeb24f
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:30:00 -07:00
Launchpad Translations on behalf of apparmor-dev
9650201928
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:29:59 -07:00
Launchpad Translations on behalf of apparmor-dev
2b936e25a8
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:29:59 -07:00
Launchpad Translations on behalf of apparmor-dev
02ba8523c6
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:29:59 -07:00
Launchpad Translations on behalf of apparmor-dev
72bcf23c5d
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:29:59 -07:00
Launchpad Translations on behalf of apparmor-dev
9f9294b48b
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:29:59 -07:00
Launchpad Translations on behalf of apparmor-dev
41b5fecbcf
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:29:59 -07:00
Launchpad Translations on behalf of apparmor-dev
dc98e8ff55
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:29:09 -07:00
Launchpad Translations on behalf of apparmor-dev
ba3dc9fc85
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:28:53 -07:00
Launchpad Translations on behalf of apparmor-dev
42b43d58d0
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:28:40 -07:00
Launchpad Translations on behalf of apparmor-dev
301857ef5d
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:28:10 -07:00
Launchpad Translations on behalf of apparmor-dev
303deea3a8
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:27:22 -07:00
Launchpad Translations on behalf of apparmor-dev
894c6cd6d2
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:26:56 -07:00
Launchpad Translations on behalf of apparmor-dev
eb38db5953
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:26:30 -07:00
Launchpad Translations on behalf of apparmor-dev
5cc8718965
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 14:26:01 -07:00
Jamie Strandboge
1f9cc702ed Merge branch 'cache-fix' into 'master'
parser: Don't skip cache just because optimizations are specified

See merge request apparmor/apparmor!385
2019-06-06 21:54:06 +00:00
John Johansen
f6cd5c01c1 parser: Don't skip cache just because optimizations are specified
The parser currently skips the cache if optimizations are specified
because it can not determine if the cached policy was compiled
with the specified optimization. However this causes cache misses
even if policy is cached with those options, and distros are setting
some optimizations by default.

Instead of skipping reading the cache if optimizations are set, users
can force overwriting the cache if needed, until the parser can
store aditional meta info in the cache.

BugLink: http://bugs.launchpad.net/bugs/1820068
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-05 02:18:46 -07:00
John Johansen
a6ac6f4cfc libapparmor python: Fix 'aa_log_record' object has no attribute '__getattr__'
When building with swig 4 we are seeing the error

AttributeError: 'aa_log_record' object has no attribute '__getattr__'

Which forces swig to use modern classes which do not generate __getattr__
methods.

issue: https://gitlab.com/apparmor/apparmor/issues/33
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-04 21:43:48 -07:00
Christian Boltz
7016ac954b
Add several permissions to the postfix.* profiles
... needed on openSUSE Leap 15.1
2019-06-02 18:39:43 +02:00
Christian Boltz
f668f31bf0
adjust postfix profiles for openSUSE path
On openSUSE Leap 15.1, the postfix binaries live in
/usr/lib/postfix/bin/ which was not covered in the postfix.* attachment
and mrix rules.
2019-06-02 18:39:43 +02:00
Christian Boltz
60d3be22cf Merge branch 'cboltz-finishing' into 'master'
drop unused 'finishing' in do_logprof_pass()

See merge request apparmor/apparmor!383

Acked-by: Eric Chiang <ericchiang@google.com>
2019-05-20 15:30:19 +00:00