2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 22:35:35 +00:00

Compare commits

...

454 Commits

Author SHA1 Message Date
John Johansen
b51a2d271d Prepare for AppArmor 2.13.7 release
- update version file

Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-11-21 15:34:09 -08:00
Christian Ehrhardt
f8286feada Allow access to possible cpus for glibc-2.36
Glibc in 2.36 and later will [1] access sysfs at
/sys/devices/system/cpu/possible when usig sysconf
for _SC_NPROCESSORS_CONF.

That will make a lot of different code, for example
anything linked against libnuma, trigger this apparmor
denial.

  apparmor="DENIED" operation="open" class="file" ...
  name="/sys/devices/system/cpu/possible" ...
  requested_mask="r" denied_mask="r" fsuid=0 ouid=0

This entry seems rather safe, and it follows others
that are already in place. Instead of fixing each
software individually this should go into the base
profile as well.

Initially reported via
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1989073
Fixes: https://gitlab.com/apparmor/apparmor/-/issues/267
MR: none - ML
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit c159d0925a)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-11-14 21:48:08 -08:00
John Johansen
5700ff9e40 Merge syslog-ng: allow reading *.journal in flatter directory structure
On openSUSE Leap 15.4 (and probably also 15.3), the journal lives in
/var/log/journal/*.journal - without an additional subdirectory level.

I propose this patch for 2.13..master.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/932
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
(cherry picked from commit e049b31c04)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-10-28 06:02:47 -07:00
Christian Boltz
ee0ae96566 Merge [2.13+3.0] Use string startswith() and endswith() methods
... instead of slicing to check for prefixes and suffixes.

This change prevents a crash in aa-mergeprof - if `replacement` is empty,
trying to access `replacement[0]` causes an IndexError.
Using `.startswith()` works without crashing.

This backports parts of the severity.py changes in
commit 091c6ad59d
by Mark Grassi.

I propose this fix for 2.13 and 3.0. (3.1 and master already have this fix.)

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/931
Approved-by: Jon Tourville <jon.tourville@canonical.com>
Merged-by: Christian Boltz <apparmor@cboltz.de>


(cherry picked from commit 7ebb259610)

e1714b96 Use string startswith() and endswith() methods
2022-10-11 16:18:43 +00:00
John Johansen
67e7b302a4 Merge dnsmasq: Add missing r permissions for libvirt_leaseshelper
Note: This was reported for /usr/libexec/libvirt_leaseshelper, but since
this is probably unrelated to the path or a path change, this commit
also adds r permissions for the previous path.

Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1202161

I propose this patch for 3.0 and master (optionally also for 2.12 and 2.13 - please tell me if you want that after reviewing the patch, or just merge ;-)

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/905
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>


(cherry picked from commit f51049ea2e)

c9c5208f dnsmasq: Add missing r permissions for libvirt_leaseshelper
2022-08-22 21:52:43 +00:00
John Johansen
157c8ee36a Merge [2.11..2.13] Add 'mctp' network domain keyword [only to utils]
Reported as comment on https://build.opensuse.org/request/show/951354
(update to glibc 2.35)

This is a partial backport of
https://gitlab.com/apparmor/apparmor/-/merge_requests/832

I propose this patch for 2.11, 2.12 and 2.13.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/911
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2022-08-22 21:44:14 +00:00
Christian Boltz
d62b5a9a7d Add 'mctp' network domain keyword [only to utils]
Reported as comment on https://build.opensuse.org/request/show/951354
(update to glibc 2.35)

This is a partial backport of
https://gitlab.com/apparmor/apparmor/-/merge_requests/832
2022-08-22 23:32:29 +02:00
John Johansen
3c047517a4 Merge [2.11..2.13] Support setuptools >= 61.2 in Python tests
Fix for #253, by mirroring the change from 1c23f5e1e4

On top of that, fix setuptools version detection in buildpath.py. libraries/libapparmor/swig/python/test/buildpath.py: The changes introduced in cc7f549665 targetted a wrong setuptools version (61.2). The change in build directory naming has been introduced with 62.0.

Fixes #259 Fixes #39

The first 3 commits are based on https://gitlab.com/apparmor/apparmor/-/merge_requests/897, the other two come from https://gitlab.com/apparmor/apparmor/-/merge_requests/904. Since there are several differences between 2.13 and >= 3.0, I had to adjust the patches at several places.

I propose this MR for 2.11, 2.12 and 2.13.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/910
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2022-08-22 21:31:33 +00:00
David Runge
9fff1c5c6a Use basepath.py in profiles Makefile
profiles/Makefile:
Set PYTHON_DIST_BUILD_PATH using
libraries/libapparmor/swig/python/test/buildpath.py as it solves the
problem of setting the build directory generically.

(cherry picked from commit 1ff0c2c7d6,
 adjusted to 2.13 which used a different python command before)
2022-08-22 22:24:21 +02:00
David Runge
d415e48646 Fix setuptools version detection in buildpath.py
libraries/libapparmor/swig/python/test/buildpath.py:
The changes introduced in
cc7f549665
targetted a wrong setuptools version (61.2).
The change in build directory naming has been introduced with 62.1
(1c23f5e1e4).

(cherry picked from commit fda390983f)
2022-08-22 22:22:40 +02:00
Ben Greiner
63751d20e2 reviewed edits
(cherry picked from commit d442584a0a)
2022-08-22 22:21:11 +02:00
Christian Boltz
411249b3b5 add setuptools to test-utils CI job
This is based on 85734c3bac, but the
.gitlab-ci.yml (and therefore also this patch) is completely different
in 2.13.
2022-08-22 22:19:22 +02:00
Ben Greiner
8921644ab4 use new build_platlib path with setuptools >= 61.2
(cherry picked from commit 47d68dac0f,
 adjusted to the 2.13 branch which used slightly different python
 commands. Also, utils/test/README.md doesn't exist in 2.13, therefore
 drop the part that changes it)
2022-08-22 22:16:09 +02:00
Christian Boltz
fd1b463643 Merge [2.11..2.13] Grep away deprecation warning for distutils
... which will be removed in Python 3.12, and that probably won't be
used on systems running the AppArmor 2.1x branches.

This prevents CI failures on gitlab.com, which uses a new-enough python
to show

    DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

For 3.0 and master, the proper fix (switching to setuptools) was done in
!813.

I propose this patch for 2.11, 2.12 and 2.13.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/908
Approved-by: John Johansen <john@jjmx.net>
Merged-by: Christian Boltz <apparmor@cboltz.de>
2022-08-22 20:02:46 +00:00
Christian Boltz
ca3e5be507 Grep away deprecation warning for distutils
... which will be removed in Python 3.12, and that probably won't be
used on systems running the AppArmor 2.1x branches.

This prevents CI failures on gitlab.com, which uses a new-enough python
to show

    DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

For 3.0 and master, the proper fix (switching to setuptools) was done in
!813.
2022-08-16 23:24:44 +02:00
Christian Boltz
37d938b815 Merge Set (instead of compare) exresult
Interestingly this accidentally worked because `if exresult` is true for
both a non-empty string ("PASS") as well as a real `True` value.

Found by Mark Grassi as part of
https://gitlab.com/apparmor/apparmor/-/merge_requests/906

I propose this patch for all branches.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/907
Approved-by: Jon Tourville <jon.tourville@canonical.com>
Merged-by: Christian Boltz <apparmor@cboltz.de>


(cherry picked from commit c06ea77445)

5a2fb856 Set (instead of compare) exresult
2022-08-16 19:27:04 +00:00
John Johansen
3f4e97e228 Merge Update for the mesa abstraction
I noticed that some apps return the following errors when launched:

```
  kernel: audit: type=1400 audit(1651244478.255:5501): apparmor="DENIED" operation="open" profile="some_app" name="/sys/devices/pci0000:00/0000:00:02.0/revision" pid=1877976 comm="some_app" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
  kernel: audit: type=1400 audit(1651244478.255:5502): apparmor="DENIED" operation="open" profile="some_app" name="/sys/devices/pci0000:00/0000:00:02.0/config" pid=1877976 comm="some_app" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
```

Blocking the files results in the following errors when the app is executed in a terminal:

```
  MESA: error: Failed to query drm device.
  libGL error: failed to create dri screen
  libGL error: failed to load driver: crocus
  MESA: error: Failed to query drm device.
  libGL error: failed to create dri screen
  libGL error: failed to load driver: crocus
```

Since they have something to do with MESA, I think the mesa abstraction should
be updated to fix the issue.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/879
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-05-23 15:37:14 -07:00
John Johansen
7e6df95729 Merge profiles: update snap_browsers permissions
The snap_browsers abstraction requires more permissions
due to updates on snaps.

Some of the permissions are not required in older versions of
Ubuntu that use 2.12 and 2.13, but are introduced for unification
and ease of maintenance purposes. These include:
```
    all dbus permissions,
    @{PROC}/sys/kernel/random/uuid r,
    owner @{PROC}/@{pid}/cgroup r,
    /var/lib/snapd/sequence/{chromium,firefox,opera}.json r,
```

I also propose a cherry-pick of this commit to 2.12, 2.13 and 3.0

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/877
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
(cherry picked from commit bfa67b369d)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-04-19 11:38:07 -07:00
Christian Boltz
1a3b81857a Merge Allow dovecot to use all signals
similar to commit 2f9d172c64
we discovered that there was a service outage
when dovecot tried to send a usr1 signal

type=AVC msg=audit(1648024138.249:184964): apparmor="DENIED" operation="signal" profile="dovecot" pid=1690 comm="dovecot" requested_mask="send" denied_mask="send" signal=usr1 peer="dovecot-imap-login"

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/865
Approved-by: Christian Boltz <apparmor@cboltz.de>
Merged-by: Christian Boltz <apparmor@cboltz.de>


(cherry picked from commit 83685ba703)

f0919f83 Allow dovecot to use all signals
2022-03-25 20:53:20 +00:00
Georgia Garcia
e3371f871f add snap-browsers profile
Whenever the evince deb package tries to open a snap browser which was
selected as the default, we get the following denial:

audit[2110]: AVC apparmor="DENIED" operation="exec" profile="/usr/bin/evince" name="/usr/bin/snap" pid=2110 comm="env" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0

As a short-term solution, we are adding a snap-browsers profile
which restricts what snaps opened by evince can do.
The long-term solution is currently not available, but could be
accomplished by using enhanced environment variable filtering/mediation
and delegation of open fds.

Bug: https://launchpad.net/bugs/1794064

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
(cherry picked from commit fb3283f37e)
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/863
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
2022-03-17 09:42:07 -03:00
John Johansen
2d6380c26a Merge smbd, samba-bgqd: allow reading openssl.cnf
References: https://bugzilla.opensuse.org/show_bug.cgi?id=1195463#c10

I propose this patch for 3.0 and master. (<= 2.13 don't have the samba-bgpd profile - if we want to backport to 2.x, we'll have to pick only the smbd part.)

Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1195463#c10
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/862
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>

backport: drop ../profiles/apparmor.d/samba-bgqd
(cherry picked from commit c3f64513f2)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-03-13 08:13:00 -07:00
John Johansen
5f3f4ba087 Merge [2.x..3.0] aa-remove-unknown: abort on parser failure
If apparmor_parser -N (in profiles_names_list()) fails,
aa-remove-unknown possibly gets an incomplete list of profiles in
/etc/apparmor.d/ and therefore might remove more profiles than it
should.

Replace the profiles_names_list() call with a direct apparmor_parser
call, and abort aa-remove-unknown if it exits with $? != 0

Before:
```
aa-remove-unknown -n
AppArmor parser error for /etc/apparmor.d/broken in profile /etc/apparmor.d/broken at line 1: syntax error, unexpected TOK_ID, expecting TOK_OPEN
Would remove 'delete_me'
```

After:
```
./aa-remove-unknown -n
AppArmor parser error for /etc/apparmor.d in profile /etc/apparmor.d/zbroken at line 1: syntax error, unexpected TOK_ID, expecting TOK_OPEN
apparmor_parser exited with failure, aborting.
```

And of course, after fixing the broken profile:
```
./aa-remove-unknown -n
Would remove 'delete_me'
```

(cherry picked from commit 5053a01d84)

This backports the fix in `aa-remove-unknown` from !836, but doesn't backport the cleanup in `rc.apparmor.functions`.

I propose this patch for 3.0 and all 2.x branches.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/859
Approved-by: Georgia Garcia <georgia.garcia@canonical.com>
Merged-by: John Johansen <john@jjmx.net>
(cherry picked from commit c6324c2a3e)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-03-09 16:56:16 -08:00
John Johansen
4540cb2f50 libapparmor: fix building with link time optimization (lto)
Currently libapparmor fails to build when lto is used because it uses
the asm directive to provide different version of some symbols.
Unfortunately gcc does not recognize this and the symbols defined by
asm are lost and optimized out by lto and then the link fails.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/214
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/831
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 7cde91f57f)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-02-04 15:51:28 -08:00
John Johansen
3cdfe944ac Merge Fix: Opening links with Chrome
Permission denied when Evince tries to use Chrome to open link.

In config is missing the bin: `/opt/google/chrome/crashpad_handler`.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/830
Acked-by: John Johansen <john@jjmx.net>
(cherry picked from commit 08f32ac703)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-02-04 02:18:41 -08:00
John Johansen
15e5b5c459 Merge abstractions/openssl: allow /etc/ssl/{engdef,engines}.d/
These directories were introduced in openssl in https://patchwork.ozlabs.org/project/openwrt/patch/20210429153530.10020-2-cotequeiroz@gmail.com/

I propose this patch for 3.0 and master. Optionally also for older branches, even if it's unlikely that systems using 2.13.x or older get a new-enough openssl to need this ;-)

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/818
Acked-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 2b270216aa)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-01-17 12:10:18 -08:00
John Johansen
3da24e0116 Merge Add missing /proc permissions to avahi-daemon profile
Fixes: https://gitlab.com/apparmor/apparmor/-/issues/203

MR:https://gitlab.com/apparmor/apparmor/-/merge_requests/811
Acked-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit ee9e61aad2)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-10-30 02:18:48 -07:00
Christian Boltz
be8ab7d538 Merge branch 'fix-lexer' into 'master'
parser: Fix unknown state condition RLIMIT_MODEINCLDE

See merge request apparmor/apparmor!803

Acked-by: Christian Boltz for all branches

(cherry picked from commit b0bc0d5323)

dc7755e5 parser: Fix unknown state condition RLIMIT_MODEINCLDE
2021-09-24 11:26:55 +00:00
Steve Beattie
b469e1f3e8 utils: Add new python versions to logprof.conf
Adding everything up to 3.19 should make the file future-proof for a
while ;-)

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/193
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/795
Acked-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 4559a2997c)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2021-08-26 10:55:00 -07:00
Christian Boltz
2993533d61 Merge branch 'fix-video-abstraction' into 'master'
add a missing slash at the end of the sys rule

See merge request apparmor/apparmor!791

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit 4fd7bcc289)

b3dcd02d add a missing slash at the end of the sys rule
2021-08-20 18:16:32 +00:00
Christian Boltz
5d7b35d30d Merge branch 'cboltz-typo' into 'master'
Fix typo in manpage

Closes #192

See merge request apparmor/apparmor!789

Acked-by: Acked-by: Seth Arnold <seth.arnold@canonical.com> for all branches

(cherry picked from commit 131ae8425b)

1459f49b Fix typo in manpage
2021-08-17 18:26:30 +00:00
John Johansen
2686a0af6c Merge Update abstractions/python and profiles for python 3.10
Add support for python 3.10 in abstractions and profiles.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/187
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/783
Acked-by: John Johansen <john.johansen@canonical.com>
(backported from commit 31fda3eee7)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-08-13 13:37:06 -07:00
John Johansen
9de934c3e7 Merge allow Prometheus metrics end-point in dovecot/stats
Patch by Michael Ströder <michael@stroeder.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/776
Acked-by: John Johansen <john@jjmx.net>
(cherry picked from commit d8ec3dafb7)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-07-21 12:30:15 -07:00
John Johansen
701943948c parser: fix cache time stamp check to include dir time stamps
Currently for directory includes the directory timestamp is ignored.
This is wrong as operations like removing a file from the dir won't
be considered in the timestamp check.

Fix this by updating the timestamp check to include the included
directories timestamp.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/760
Signed-off-by: John Johansen <john@jjmx.net>
Acked-by: Georgia Garcia  <georgia.garcia@canonical.com>
(cherry picked from commit 3d1232e640)
2021-07-13 18:44:04 -07:00
Georgia Garcia
47bb1a31b0 tests: fix i18n.sh regression test on arm64
The following errors are happening on the regression tests
of i18n.sh on arm64 hirsute/impish:

Error: open failed. Test 'i18n (194) OPEN (octal) "/tmp/sdtest.3654-6536-J2ZwFM/file__post" RW' was expected to 'pass'. Reason for failure 'FAIL: open /tmp/sdtest.3654-6536-J2ZwFM/file__post failed - Permission denied'
...

The cause is a bash bug handling UTF-8 on subshells.

Fixes: https://bugs.launchpad.net/apparmor/+bug/1932331
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/765

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 458a981b62)
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
2021-06-28 15:49:46 -03:00
Christian Boltz
898c2cda7a abstractions/php: support PHP 8
Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1186267
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/755
(cherry picked from commit 5853f52233)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-05-24 03:11:42 -07:00
John Johansen
14ed051657 profiles: dhclient: allow setting task comm name
dhclient wants to set its thread names to functional names for
introspection purposes. Eg.

$ pstree -at 3395
dhclient ens3
  ├─{isc-socket}
  ├─{isc-timer}
  └─{isc-worker0000}

When denied this can result in dhclient breaking and failing to obtain
IPv4 addresses.

Fixes: https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1918410
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
(cherry picked from commit c734839551)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-03-31 03:02:21 -07:00
John Johansen
8e04e39b7c Merge look up python-config using AC_PATH_TOOL
Doing so adds the $ac_tool_prefix during cross compilation and will end up using the correct, architecture-dependent python-config.

This is the second and last upstreamable change from https://bugs.debian.org/984582. It looks a little simpler here, because apparmor evolved upstream compared to the Debian version. Fortunately, it got a lot simpler in the process.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/729
Acked-by: John Johansen <john.johansen@canonical.com>
(debian version of commit c32c970d00)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-03-20 03:35:06 -07:00
John Johansen
552ee5d621 Merge Do not abuse AC_CHECK_FILE
AC_CHECK_FILE is meant to check for host files and therefore fails hard during cross compilation unless one supplies a cached check result. Here we want to know about the presence of a build system file though, so AC_CHECK_FILE is the wrong tool.

This is part of https://bugs.debian.org/984582.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/728
Acked-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit f17143b5c3)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-03-20 03:13:50 -07:00
John Johansen
c8e57213f9 profiles: dhcpd: add rule for port_range
The following AppArmor denial errors are shown on startup:

Oct 25 00:52:00 xxx kernel: [  556.231990] audit: type=1400 audit(1603601520.710:32): apparmor="DENIED" operation="open" profile="/usr/sbin/dhcpd" name="/proc/sys/net/ipv4/ip_local_port_range" pid=1982 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

Oct 25 00:52:00 xxx kernel: [  556.232257] audit: type=1400 audit(1603601520.710:33): apparmor="DENIED" operation="open" profile="/usr/sbin/dhcpd" name="/proc/sys/net/ipv4/ip_local_port_range" pid=1982 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

Fixes: https://bugs.launchpad.net/bugs/1901373
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/726
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 277677daf3)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-03-15 23:58:50 -07:00
John Johansen
44e6f90f23 parser: fix filter slashes for link targets
The parser is failing to properly filter the slashes in the link name
after variable expansion. Causing match failures when multiple slashes
occur.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/153
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/723
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 2852e1ecdf)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-03-15 00:53:06 -07:00
Mikhail Morfikov
dd03484866 abstractions: Add missing rule in wutmp abstraction
Currently the wutmp abstraction has the following rules:
  /var/log/lastlog  rwk,
  /var/log/wtmp     wk,
  @{run}/utmp       rwk,

According to what I see in my apparmor profiles, just a few apps want
to interact with the files listed above, especially with the
/var/log/wtmp . But when the apps do this, they sometimes want the
read access to this file. An example could be the last command. Is
there any reason for not having the r in the rule?  The second thing
is the file /var/log/btmp (which isn't included in the
abstracion). Whenever I see an app, which wants to access the
/var/log/wtmp file, it also tries to interact with the /var/log/btmp
file, for instance lightdm/sddm or su . Most of the time they need
just wk permissions, but sometimes apps need also r on this file, an
example could be the lastb command, which is just a link to last.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/152
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/724
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit d4e0a94511)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-03-14 11:55:27 -07:00
John Johansen
00396b8f13 parser: fix backport of MR700
The backport of
  855dbd4a parser: fix rule downgrade for unix rules

using the rule_t::warn_once which doesn't exist in the 2.x parser
series. Switch this the the static function warn_once.

Fixes: 3d85e123 parser: fix rule downgrade for unix rules
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-03-14 09:02:27 -07:00
John Johansen
3d85e1234a parser: fix rule downgrade for unix rules
Rule downgrades are used to provide some confinement when a feature
is only partially supported by the kernel.

  Eg. On a kernel that doesn't support fine grained af_unix mediation
      but does support network mediation.

        unix (connect, receive, send)
              type=stream
              peer=(addr="@/tmp/.ICE-unix/[0-9]*"),

      will be downgraded to

        network unix type=stream,

Which while more permissive still provides some mediation while
allowing the appication to still function. However making the rule
a deny rule result in tightening the profile.

  Eg.
        deny unix (connect, receive, send)
              type=stream
              peer=(addr="@/tmp/.ICE-unix/[0-9]*"),

      will be downgraded to

        deny network unix type=stream,

and that deny rule will take priority over any allow rule. Which means
that if the profile also had unix allow rules they will get blocked by
the downgraded deny rule, because deny rules have a higher priority,
and the application will break. Even worse there is no way to add the
functionality back to the profile without deleting the offending deny
rule.

To fix this we drop deny rules that can't be downgraded in a way that
won't break the application.

Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1180766
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/700
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 855dbd4ac8)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-03-14 07:19:16 -07:00
Rose Kunkel
4c8ac78605 Fix nscd conflict with systemd-homed
My main user account is managed by systemd-homed. When I enable
AppArmor and have nscd running, I get inconsistent behavior with my
user account - sometimes I can't log in, sometimes I can log in but
not use sudo, etc.

This is the output of getent passwd:
  $ getent passwd
  root0:0::/root:/usr/bin/zsh
  bin1:1::/:/sbin/nologin
  daemon2:2::/:/sbin/nologin
  mail8:12::/var/spool/mail:/sbin/nologin
  ftp14:11::/srv/ftp:/sbin/nologin
  http33:33::/srv/http:/sbin/nologin
  nobody65534:65534:Nobody:/:/sbin/nologin
  dbus81:81:System Message Bus:/:/sbin/nologin
  [...]
  rose1000:1000:Rose Kunkel:/home/rose:/usr/bin/zsh

But getent passwd rose and getent passwd 1000 both return no output.
Stopping nscd.service fixes these problems. Checking the apparmor
logs, I noticed that nscd was denied access to
/etc/machine-id. Allowing access to that file seems to have fixed the
issue.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/707
Fixes: https://gitlab.com/apparmor/apparmor/-/issues/145
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit ee5303c8a0)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-02-11 22:56:09 -08:00
Seth Arnold
17032f2254 profiles: firefox Add support for widevine DRM
Ubuntu 18.04, Firefox 60.0.1+build2-0ubuntu0.18.04.1

Running firefix, then going to netflix.com and attempting to play a
movie. The widevinecdm plugin crashes, the following is found in
syslog:

Jun 15 19:13:22 xplt kernel: [301351.553043] audit: type=1400 audit(1529046802.585:246): apparmor="DENIED" operation="file_mmap" profile="/usr/lib/firefox/firefox{,*[^s][^h]}" name="/home/xav/.mozilla/firefox/wiavokxk.default-1510977878171/gmp-widevinecdm/1.4.8.1008/libwidevinecdm.so" pid=16118 comm="plugin-containe" requested_mask="m" denied_mask="m" fsuid=1000 ouid=1000
Jun 15 19:13:22 xplt kernel: [301351.553236] audit: type=1400 audit(1529046802.585:247): apparmor="DENIED" operation="ptrace" profile="/usr/lib/firefox/firefox{,*[^s][^h]}" pid=24714 comm="firefox" requested_mask="trace" denied_mask="trace" peer="/usr/lib/firefox/firefox{,*[^s][^h]}"
Jun 15 19:13:22 xplt kernel: [301351.553259] plugin-containe[16118]: segfault at 0 ip 00007fcdfdaa76af sp 00007ffc1ff03e28 error 6 in libxul.so[7fcdfb77a000+6111000]
Jun 15 19:13:22 xplt snmpd[2334]: error on subcontainer 'ia_addr' insert
...

Fixes: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1777070
Reported-by: Xav Paice <xav.paice@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/684
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 656f2103ed)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2021-02-11 19:40:38 -08:00
John Johansen
de784f55d3 parser: fix --jobs so job scaling is applied correctly
job scaling allows the parser to resample the number of cpus available
and increase the number of jobs that can be launched if cpu available
increases.

Unfortunately job scaling was being applied even when a fixed number
of jobs was specified. So
  --jobs=2

doesn't actually clamp the compile at 2 jobs.

Instead job scaling should only be applied when --jobs=auto or when
jobs are set to a multiple of the cpus.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/703
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 65ba20b955)
2021-02-10 19:20:27 -08:00
Steve Beattie
ad0a6ac6bf profiles: add new deny path for kwallet (used in KDE 5)
Reported on IRC by finalspacevoid

Acked-by: Steve Beattie <steve@nxnw.org>
Merge branch 'cboltz-kwallet-path' into 'master'
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/704

(cherry picked from commit 15e897cad0)
(Fixed up conflict due to 2.13 not containing the include rule for
 abstractions/private-files-strict.d/)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2021-02-07 22:04:03 -08:00
Christian Boltz
95aa5b5895 apparmor.vim: add support for abi rules
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/690
(cherry picked from commit c421fcd38a)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-12-11 14:56:00 -08:00
John Johansen
c16fff8cb4 Release: Bump revisions for 2.13.6 release
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-12-07 03:27:44 -08:00
Christian Boltz
2db3d94ce2 aa-autodep: load abstractions on start
So far, aa-autodep "accidently" loaded the abstractions when parsing the
existing profiles. Obviously, this only worked if there is at least one
profile in the active or extra profile directory.

Without any existing profiles, aa-autodep crashed with
KeyError: '/tmp/apparmor.d/abstractions/base'

Prevent this crash by explicitely loading the abstractions on start.

Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1178527#c1 [1]
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/682
(cherry picked from commit f6b3de7116)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-11-28 05:13:51 -08:00
Christian Boltz
b174705a31 abstractions/X: Allow (only) reading X compose cache
... (/var/cache/libx11/compose/*), and deny any write attempts

Reported by darix,
https://git.nordisch.org/darix/apparmor-profiles-nordisch/-/blob/master/apparmor.d/teams

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/685
(cherry picked from commit 78bd811e2a)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-11-17 02:07:11 -08:00
John Johansen
56cc87aace Merge [2.13] Check hotkey conflicts case-insensitive
This is needed to catch conflicts between uppercase and lowercase hotkeys of the same letter, as seen with `(B)enannt` and `A(b)lehnen` in the german utils translations.

(cherry picked from commit 07bd11390e)

Also fix hotkey conflict in utils id.po and sv.po (cherry picked from commit 7cf54f2cd8)

Note that 7cf54f2cd8 also included fixes for de.po which are not needed in the 2.13 branch.

This is the 2.13 variant of MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/675.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/678
Acked-by: John Johansen <john.johansen@canonical.com>
2020-11-03 09:43:39 +00:00
Christian Boltz
ca0d9f758b Fix hotkey conflict in utils id.po and sv.po
(cherry picked from commit 7cf54f2cd8)

Note that 7cf54f2cd8 also included fixes
for de.po which are not needed in the 2.13 branch.
2020-11-01 22:58:19 +01:00
Christian Boltz
a606a59d96 Check hotkey conflicts case-insensitive
This is needed to catch conflicts between uppercase and lowercase
hotkeys of the same letter, as seen with `(B)enannt` and `A(b)lehnen` in
the german utils translations.

(cherry picked from commit 07bd11390e)
2020-11-01 22:39:49 +01:00
John Johansen
6a8a5de637 Merge dovecot: backport usr.lib.dovecot.script-login to 2.13
Backport profile to fix denials in Debian Buster+Bullseye.

Add hashes for #include's, remove abi specification.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/672
Acked-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: John Johansen <john.johansen@canonical.com>
2020-10-27 20:56:09 +00:00
Vincas Dargis
1bcf85737b dovecot: backport usr.lib.dovecot.script-login to 2.13
Backport profile to fix denials in Debian Buster+Bullseye.

Add hashes for #include's, remove abi specification.
2020-10-27 21:14:37 +02:00
Vincas Dargis
ea55ef22e7 dovecot: allow reading dh.pem
Dovecot is hit with this denial on Debian 10 (buster):
```
type=AVC msg=audit(1603647096.369:24514): apparmor="DENIED"
operation="open" profile="dovecot" name="/usr/share/dovecot/dh.pem"
pid=28774 comm="doveconf" requested_mask="r" denied_mask="r" fsuid=0
ouid=0
```

This results in fatal error:

```
Oct 25 19:31:36 dovecot[28774]: doveconf: Fatal: Error in configuration
file /etc/dovecot/conf.d/10-ssl.conf line 50: ssl_dh: Can't open file
/usr/share/dovecot/dh.pem: Permission denied
```

Add rule to allow reading dh.pem.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/671
(cherry picked from commit 9d8e111abe)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-26 15:20:31 -07:00
Vincas Dargis
dc3e2c39fb dovecot: allow kill signal
Dovecot might try to kill related processes:

```
type=AVC msg=audit(1601314853.031:9327): apparmor="DENIED"
operation="signal" profile="dovecot" pid=21223 comm="dovecot"
requested_mask="send" denied_mask="send" signal=kill
peer="/usr/lib/dovecot/auth"

type=AVC msg=audit(1601315453.655:9369): apparmor="DENIED"
operation="signal" profile="dovecot" pid=21223 comm="dovecot"
requested_mask="send" denied_mask="send" signal=kill
peer="/usr/lib/dovecot/pop3"

type=AVC msg=audit(1602939754.145:101362): apparmor="DENIED"
operation="signal" profile="dovecot" pid=31632 comm="dovecot"
requested_mask="send" denied_mask="send" signal=kill
peer="/usr/lib/dovecot/pop3-login"
```
This discovered on low-power high-load machine (last resort timeout
handling?).

Update signal rule to allow SIGKILL.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/671
(cherry picked from commit 2f9d172c64)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-26 15:20:14 -07:00
John Johansen
1335b80ff4 utils: fix make -C profiles check-logprof fails
On arch
  make -C profiles check-logprof

fails with
  *** Checking profiles from ./apparmor.d against logprof

  ERROR: Can't find AppArmor profiles in /etc/apparmor.d
  make: *** [Makefile:113: check-logprof] Error 1
  make: Leaving directory '/build/apparmor/src/apparmor-2.13.3/profiles'

because /etc/apparmor.d/ is not available in the build environment
and aa-logprofs --dir argument, is not being passed to init_aa()
but used to update profiles_dir after the fact.

Fix this by passing profiledir as an argument to init_aa()

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/36
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/663
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
(backported from commit 15dc06248c)
2020-10-25 01:44:11 -07:00
John Johansen
1808d14e35 Merge Fix 2.13 libapparmor so version
ab0f4ab2ed increased `AA_LIB_REVISION` and `AA_LIB_AGE`, with the result that 2.13.5 builds `libapparmor.so.0.7.3`, while 2.13.4 had `libapparmor-1.6.2`

This patch reverts the `AA_LIB_AGE` increase to fix the so name so that we'll get `libapparmor-1.6.3`.

Note: If you want to apply this fix on top of the 2.13.5 tarball, you'll need to also apply the patch to `Makefile.in`.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/658
Acked-by: John Johansen <john.johansen@canonical.com>
2020-10-20 10:39:27 +00:00
Christian Boltz
145136f604 Fix 2.13 libapparmor so version
ab0f4ab2ed increased AA_LIB_REVISION and
AA_LIB_AGE, with the result that 2.13.5 builds libapparmor.so.0.7.3,
while 2.13.4 had libapparmor-1.6.2

This patch reverts the AA_LIB_AGE increase to fix the so name so that
we'll get libapparmor-1.6.3.

Note: If you want to apply this fix on top of the 2.13.5 tarball, you'll
need to also apply the patch to Makefile.in.
2020-10-17 17:30:39 +02:00
John Johansen
ab0f4ab2ed Release: Bump revisions for 2.13.5 release
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-15 03:14:22 -07:00
John Johansen
5c47e448b4 libapparmor: Bump revision in preparation for release.
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-15 03:03:58 -07:00
Christian Boltz
72f97a98e7 Add CAP_CHECKPOINT_RESTORE to severity.db
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/656
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 2c2dbdc3a3)
2020-10-15 03:03:58 -07:00
John Johansen
726c3fc129 parser: Make sure apparmor can build on old kernels
With the backport of static caps to support caps from newer kernels
in older build environments. Builds against older kernels broke
because not all of the newer capabilities are defined in the kernel
headers, nor in apparmor.

In particular

CAP_AUDIT_READ was added to the kernel in 3.16

and

CAP_AUDIT_WRITE, CAP_AUDIT_CONTROL, CAP_SETFCAP, CAP_MAC_OVERRIDE,
CAP_MAC_ADMIN, CAP_SYSLOG, CAP_WAKE_ALARM, CAP_BLOCK_SUSPEND in 3.8

The apparmor kernel module was merge into the upstream kernel in 2.6.36.
In order to support all upstream kernels with apparmor add the set
of capabilities introduced since apparmor was merged upstream.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/655
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
2020-10-14 15:05:04 -07:00
John Johansen
be05b4497f translations: update generated pot files
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-14 03:50:46 -07:00
John Johansen
fac184d923 parser: Add support for CAP_CHECKPOINT_RESTORE
Linux 5.9 added CAP_CHECKPOINT_RESTORE add it to the set of supported
capabilities.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/654
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(backported from commit 644a473971)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-13 21:44:47 -07:00
Steve Beattie
a090a6377b socketpair regression test: add aa_getpeercon() enabled perm
Because of the need to be stacking LSM aware, aa_getpeercon() calls
aa_enable to ensure that apparmor is enabled. Without the permission,
aa_getpeercon() fails, causing test failures.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit fb773fec36)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-13 05:15:57 -07:00
John Johansen
4527abd028 regression tests: fix aa_policy_cache to use correct config file
The aa_policy_cache test is using the system parser.conf file even
when the tests are set to use source. This can lead to failures
if the system parser.conf contain options not understood by
the source parser.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/653
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 1033e19171)
2020-10-13 05:07:28 -07:00
John Johansen
350b4a5358 regression test: Fix regression tests when using in tree parser
When using the in tree parser we should not be using the system
parser.conf file, as if the system apparmor is newer than the
tree being tested the parser.conf file could contain options not
understood by the in tree apparmor_parser.

Use --config-file to specify the default in tree parser.conf

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/653
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 5ac368bce7)
2020-10-13 05:07:23 -07:00
Steve Beattie
3f8cfac384 parser/Makefile: fix generated cap comparison against known list
The sed command to manipulate the known cap list (base_cap_names.h) into
a format to match the generated_cap_names.h was buggy because the
trailing '}' would never match anything, leading to failures when built
against 5.8 kernel headers, due to it not replacing the base capabilities
correctly.

Fix this by removing the trailing '}" match and instead match the third
comma-delimited field that matches a capability name, and replace that.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/596
(cherry picked from commit a7fc8bb500)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-13 03:00:53 -07:00
John Johansen
054079b271 parser: call filter slashes for mount conditionals
The mnt_point and devices conditionals in mount rules are generally
paths and should have slashes filtered after variable expansion.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/607
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit a1978fb1b2)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-09 02:44:50 -07:00
John Johansen
f6eb8553dc parser: call filter slashes for the dbus path conditional
Similar to unix addr rules, the dbus path conditional is more a path
than a profile name and should get its slashes filtered after variable
expansion.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/607
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 35f6d49ec6)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-09 02:44:50 -07:00
John Johansen
8b5e4a45a9 parser: enable variable expansion for mount type= and options=
Currently mount options type= and options= do not expand variables
but they should. Fix it.

Note: this does not treat either as paths because their use is
too device dependent for it to be safe to filter slashes.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/99
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/638
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 882380ad3d)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-09 02:44:50 -07:00
Patrick Steinhardt
8771cff94b libapparmor: add missing include for socklen_t
While `include/sys/apparmor.h` makes use of `socklen_t`, it doesn't
include the `<sys/socket.h>` header to make its declaration available.
While this works on systems using glibc via transitive includes, it
breaks compilation on musl libc.

Fix the issue by including the header.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
(cherry picked from commit 47263a3a74)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-10-03 13:21:32 -07:00
Patrick Steinhardt
351014c3f6 libapparmor: add _aa_asprintf to private symbols
While `_aa_asprintf` is supposed to be of private visibility, it's used
by apparmor_parser and thus required to be visible when linking. This
commit thus adds it to the list of private symbols to make it available
for linking in apparmor_parser.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/643
Signed-off-by: Patrick Steinhardt <ps@pks.im>
(cherry picked from commit 9a8fee6bf1)
2020-10-03 12:24:40 -07:00
John Johansen
903e743b87 parser: Fix expansion of variables in unix rules addr= conditional
The parser is not treating unix addr as a path and filtering slashes
after variable expansion. This can lead to errors where

@{foo}=/a/
unix bind addr=@{foo}/bar,

will always fail because addr is being matched as /a//bar instead of
/a/bar.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/607
Fixes: https://bugs.launchpad.net/apparmor/+bug/1856738
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 6af05006d9)
2020-09-29 12:00:40 -07:00
John Johansen
7a7c7fb346 regression tests: Don't build syscall_sysctl if missing kernel headers
sys/sysctl.h is not guaranteed to exist anymore since
https://sourceware.org/pipermail/glibc-cvs/2020q2/069366.html

which is a follow on to the kernel commit
61a47c1ad3a4 sysctl: Remove the sysctl system call

While the syscall_sysctl currently checks if the kernel supports
sysctrs before running the tests. The tests can't even build if the
kernel headers don't have the sysctl defines.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/119
Fixes: https://bugs.launchpad.net/apparmor/+bug/1897288
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/637
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 2e5a266eb7)
2020-09-29 11:55:36 -07:00
John Johansen
58e4e8169c parser: Fix automatic adding of rule for change_hat interface
The parser is supposed to add a rule to profiles if they are a hat
or contain hats granting write access to the kernel interfaces
used to perform the change_hat operation.

Unfortunately the check is broken and currently won't add the
rule to hats (it does add it for the parent).

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/625
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Acked-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 5b850c154f)
2020-09-17 15:04:24 -07:00
John Johansen
4cab2dbc17 Merge [2.13] Refresh postfix profiles
Refresh the postfix profiles in the 2.13 branch with (mostly) all changes in master.

The most important changes are:

* support having the `postfix/*` binaries in `/usr/lib/postfix/bin/` (like for example openSUSE has now)
* add profile names
* rename the profile files to `postfix-*`
* several "smaller" changes (especially added permissions), see the individual commits for all details

Note that some changes were not backported to the 2.13 branch:

* adding abi rules
* changing `#include` to `include`
* removal of "superfluous" rules covered by abstractions (dd4903efc6)
* removal of `peer=/usr/lib/postfix/...` rules

20/20 Revert renaming usr.lib.postfix.* to postfix.* in 2.13 branch
19/20 postfix-master: allow access to postlog socket
18/20 Allow to read icu *.dat files in postfix-related profiles
17/20 postfix/master needs to execute postfix/error
16/20 Add several permissions to the postfix.* profiles
15/20 adjust postfix profiles for openSUSE path
14/20 profiles/postfix-smtpd: Include ssl_certs, ssl_keys
13/20 profiles/postdrop: Allow reading from pickup socket
12/20 profiles/postfix-pickup: Allow reading from cleanup socket
11/20 postfix.local: Minor adjustments to make it work
10/20 postfix.*: Adapt for new queue names, and extra locking and r/w communication
9/20 postfix.tlsmgr: Connect to urandom and prng exchange
8/20 postfix.master: Change path of child processes
7/20 profiles/postfix: add locking perm to pid files
6/20 profiles: add a postfix dnsblog profile
5/20 profiles: add a postfix postscreen profile
4/20 profiles/postfix-master: grant signal+unix communication with children
3/20 profiles/postfix: use named profiles
2/20 profiles/postfix-master: use profile name instead of match pattern
1/20 allow locking /etc/aliases.db

Note: Backport Exception Requested by OpenSuse, updated profiles needed, on a 2.13 release
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/621
Acked-by: John Johansen <john.johansen@canonical.com>
2020-09-09 20:14:01 +00:00
Christian Boltz
8501ed822e Revert renaming usr.lib.postfix.* to postfix.* in 2.13 branch
... as discussed/proposed in !621

This means the postfix.* filenames stay master-only.
2020-09-09 21:30:22 +02:00
Christian Boltz
e54fdf8e2b postfix-master: allow access to postlog socket
(cherry picked from commit d55ca8b624)
2020-09-09 21:28:20 +02:00
Christian Boltz
57f6315783 Allow to read icu *.dat files in postfix-related profiles
This is needed for postdrop, postmap, postqueue and sendmail

Seen on openSUSE Tumbleweed.

(cherry picked from commit b23aa00b81)
2020-09-08 21:23:18 +02:00
Christian Boltz
6fae03d142 postfix/master needs to execute postfix/error
(cherry picked from commit f250e94240)
2020-09-08 21:22:51 +02:00
Christian Boltz
bd401448fa Add several permissions to the postfix.* profiles
... needed on openSUSE Leap 15.1

(cherry picked from commit 7016ac954b)
2020-09-08 21:22:37 +02:00
Christian Boltz
6e2de0806c 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.

(cherry picked from commit f668f31bf0)
2020-09-08 21:20:56 +02:00
Julian Andres Klode
583fb1c0cd profiles/postfix-smtpd: Include ssl_certs, ssl_keys
This is needed for serving TLS.

(cherry picked from commit 4c85a7ec9e)
2020-09-08 21:18:28 +02:00
Julian Andres Klode
54806dce22 profiles/postdrop: Allow reading from pickup socket
(cherry picked from commit b858428dd1)
2020-09-08 21:18:16 +02:00
Julian Andres Klode
25338e4691 profiles/postfix-pickup: Allow reading from cleanup socket
(cherry picked from commit d1ab0a021e)
2020-09-08 21:18:04 +02:00
Julian Andres Klode
9051288c3d postfix.local: Minor adjustments to make it work
This connects queue manager to local.

(cherry picked from commit 60d203b622)
2020-09-08 21:17:52 +02:00
Julian Andres Klode
0107d57915 postfix.*: Adapt for new queue names, and extra locking and r/w communication
This gets us to the local process now, which comes next.

(cherry picked from commit 02528133d2)

Note: this cherry-pick doesn't include the removal of the path-based
signal and unix rules in postfix-master.
2020-09-08 21:16:46 +02:00
Julian Andres Klode
1909ca0dcb postfix.tlsmgr: Connect to urandom and prng exchange
(cherry picked from commit e8841a0953)
2020-09-08 21:12:23 +02:00
Julian Andres Klode
d6ebf87d2b postfix.master: Change path of child processes
(cherry picked from commit f4bfd78164)
2020-09-08 21:11:39 +02:00
Steve Beattie
43af5f9751 profiles/postfix: add locking perm to pid files
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 9943da2f52)
2020-09-08 21:11:06 +02:00
Steve Beattie
065546c312 profiles: add a postfix dnsblog profile
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 889503f623)
2020-09-08 21:08:19 +02:00
Steve Beattie
2060ccde22 profiles: add a postfix postscreen profile
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 1c9459825a)
2020-09-08 21:08:03 +02:00
Steve Beattie
df9cfced8c profiles/postfix-master: grant signal+unix communication with children
Grant the ability to communicate with the postfix named child profiles
via signals and unix sockets. Include the path-based match names as
a fallback on upgrades.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 35d84895fe)
2020-09-08 21:07:42 +02:00
Steve Beattie
9a9c2f9793 profiles/postfix: use named profiles
Convert all the postfix subprocesses to using named profiles instead of
path match profiles, and adjust exec paths for newer debian/ubuntu
releses. Rename profiles to match profile names.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 39ca2adff6)
2020-09-08 21:07:29 +02:00
Steve Beattie
8b0e2bdc94 profiles/postfix-master: use profile name instead of match pattern
Convert postfix's master profile to use a named profile
(postfix-master) rather than the exec path match pattern. Adjust
postfix-common abstraction to take this into account. Rename profile
name in the profiles/apparmor/profiles/extras/ directory to match
the profile name.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 01648c6a61)
2020-09-08 21:02:35 +02:00
Christian Boltz
68316d265b allow locking /etc/aliases.db
This is needed for "newaliases" on current openSUSE Tumbleweed / postfix 3.3.1

(cherry picked from commit f74edd5d5a)
2020-09-08 20:59:06 +02:00
Christian Boltz
e32cbfc0e6 Merge branch 'cboltz-2.13-dnsmasq' into 'apparmor-2.13'
[2.12+2.13] dnsmasq: Backport support for /usr/libexec/libvirt_leaseshelper path

References: https://build.opensuse.org/request/show/831960

See merge request apparmor/apparmor!618

Acked-by: John Johansen <john.johansen@canonical.com> for 2.12 and 2.13
2020-09-06 18:06:33 +00:00
Vladimir “Equidamoid” Shapranov @equidamoid
f2e09aa234 policy: invalid path to libvirt_leaseshelper in usr.sbin.dnsmasq
Another instance of using libvirt_leaseshelper without having
libexec access. As addressed in the previous patch.

issue: https://gitlab.com/apparmor/apparmor/-/issues/87
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit e731b8a335)
2020-09-06 12:24:29 +02:00
Vladimir “Equidamoid” Shapranov @equidamoid
af6bf82389 Invalid path to libvirt_leaseshelper in usr.sbin.dnsmasq
The error:

type=AVC msg=audit(1585403559.846:34317577): apparmor="DENIED" operation="exec" profile="/usr/sbin/dnsmasq" name="/usr/libexec/libvirt_leaseshelper" pid=7162 comm="sh" requested_mas
k="x" denied_mask="x" fsuid=0 ouid=0
type=AVC msg=audit(1585403559.846:34317578): apparmor="DENIED" operation="open" profile="/usr/sbin/dnsmasq" name="/usr/libexec/libvirt_leaseshelper" pid=7162 comm="sh" requested_mas
k="r" denied_mask="r" fsuid=0 ouid=0

Looks like the path to libvirt_leasehelper is incorrect usr.sbin.dnsmasq, at least in gentoo. Patching the file fixes the problem:

issue: https://gitlab.com/apparmor/apparmor/-/issues/87
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 28fce5f76d)
2020-09-06 12:23:59 +02:00
Christian Boltz
02dce59d29 postfix-common: allow reading icu *.dat
several postfix-* binaries on openSUSE Tumbleweed need to read
/usr/share/icu/[0-9]*.[0-9]*/*.dat.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/615
(cherry picked from commit 39ef7c508f)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-09-05 02:45:21 -07:00
Vincas Dargis
dab520aae9 nvidia_modprobe: allow creating /dev/nvidia-modeset
On Debian Sid we get this denial:

```
type=AVC msg=audit(1599065006.981:527): apparmor="DENIED"
operation="mknod" profile="nvidia_modprobe" name="/dev/nvidia-modeset"
pid=12969 comm="nvidia-modprobe" requested_mask="c" denied_mask="c"
fsuid=0 ouid=0
```

Update nvidia_modprobe profile to allow creating device file.

(cherry picked from commit e6dbe3bfd3)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-09-03 11:04:15 -07:00
John Johansen
70d3183a23 Merge [2.13] add abstractions/hosts_access
This is a partial backport of eb8f9302aa (only adding the abstraction) to the 2.13 branch.

Note that the 2.13 version of the abstraction doesn't have

* the abi rule
* the `include if exists <abstractions/hosts_access.d>`

because both are new in master and would cause interesting\[tm\] problems with the 2.13 tools.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/612
Acked-by: John Johansen <john.johansen@canonical.com>
2020-09-02 20:48:32 +00:00
Christian Boltz
64dfc797dd add abstractions/hosts_access
This is a partial backport of eb8f9302aa
(only adding the abstraction) to the 2.13 branch.

Note that the 2.13 version of the abstraction doesn't have
- the abi rule
- the `include if exists <abstractions/hosts_access.d>`
because both are new in master and would cause interesting[tm] problems
with the 2.13 tools.
2020-09-02 22:36:39 +02:00
Steve Beattie
ad45b80789 parser: add CAP_BPF/PERFMON; convert to pregenerated cap list
Add support for CAP BPF and PERFMON

Backport from !578 the subset of patches that convert the parser to a pregenerated list of capability names instead of a dynamically generated list.

The dynamically generated list is still created and compared to the pregenerated list and the build will fail if new capabilities are added to the dynamically generated list that are not in the pregenerated list.

This enables the parser to support new capabilities like CAP BPF and PERFMON that are might not be in the kernel that the parser is being built against.

This patch series adds support CAP BPF and PERFMON in the pregenerated list of capabilities

See merge request apparmor/apparmor!594
2020-09-01 04:40:02 +00:00
Christian Boltz
aca6adea2a Merge branch 'patch-1' into 'master'
Fix /usr/lib/postfix binary paths in postfix+dovecot profiles

See merge request apparmor/apparmor!602

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit 6cf58457d7)

c4f90ec1 Fix smtpd path in sendmail profile
9fbe599c Fix /usr/lib/postfix binary paths in postfix+dovecot profiles
2020-08-30 18:57:22 +00:00
Christian Boltz
2a3752c4c4 Merge branch 'update-nvidia-modprobe' into 'master'
nvidia_modprobe: allow reading driver parameters

See merge request apparmor/apparmor!603

Acked-by: Christian Boltz <apparmor@cboltz.de> for master and 2.13

(cherry picked from commit 112e2bc9fb)

a98a4f73 nvidia_modprobe: allow reading driver parameters
2020-08-30 18:49:54 +00:00
Steve Beattie
a07de3f095 regression tests/prologue: adjust sed to not use ~ as regex separators
prologue.inc:settest() in same cases invokes a sed command that uses
'~' as a pattern separator, on things that can contain filesystem
paths. However, in the debian/ubuntu world, '~' can be used in version
strings, particularly for pre-release versions, and when this happens
and the version is embedded in the path, the sed command breaks
because of the extraneous separator. Fix this by using '#' as a
separator, which has the benefit of being considered a comment if
accidentally interpreted by a shell.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/599
(cherry picked from commit efc6590409)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-08-28 02:05:28 -07:00
John Johansen
60007d3fe4 parser: Add warning to capability_table about the need to update the Makefile
The autogenerated capabilities comparison needs to be updated if the
capability_table structure changes. Add a note by the structure to
make sure the Makefile will get updated if the structure is changed.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/597
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
(backported from commit 139fac6062)
2020-08-27 01:26:11 -07:00
John Johansen
ef8d514138 parser/Makefile: use LC_ALL=C when invoking sed
Acked-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/596
(backported from commit 33ff79a9e5)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-08-26 23:55:46 -07:00
John Johansen
4e194b2f3a parser: unify capability name handling
There are currently two capability name tables the one that is
autogenerated and an internal hardcoded name table.

Now that the autogenerated table has been converted to a base
static table we can drop the internal static table. This
removes the chance of getting the tables getting out of sync.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit fb9c5f9bcf)
2020-08-24 02:28:25 -07:00
John Johansen
ed61e482cb parser: cleanup capability_table generation by dropping cap sys_log
The static cap sys_log declaration is no longer needed as
base_cap_names.h contains it and ensures that it will always be
present.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit fdba3a571c)
2020-08-24 02:28:13 -07:00
John Johansen
efb6952e0c parser: Move to a pre-generated cap_names.h
The auto-generated cap_names.h has problems when the parser if the
parser is built against a kernel with a smaller capability list than
the kernel policy is being compiled for.

Moving to a pre-generated list lets us support all capabilities even
when we build against older kernels. However we don't want to only use
the pre-generated list as that would make it too easy to miss when a
new capability has been added.

Keep auto generating the caps list and compare it to the pre-generated
caps list so we can detect when new capabilities are added, and fail
the build so that the pre-generated list can be updated. We screen the
diff for only additions so that the parser can continue to build on
older kernels that don't have the full capability list without errors.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 270fb0a2b2)
2020-08-24 02:07:25 -07:00
Jonas Witschel
aecc9e1cb6 abstractions/gnome: allow /usr/share/gtk-3.0/settings.ini
GTK+ 3 has a global settings file that should be readable as well.

(cherry picked from commit af6fe026e1)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/592
2020-08-20 14:01:02 -07:00
John Johansen
489fa60fda Merge utils make check_severity_db: say ERROR for failing the build
utils `make check_severity_db` will fail the build if a (probably new) capability in not listed in severity.db. This also means it should print out an ERROR, not a warning.

This is a follow-up of lp#1890547 and https://gitlab.com/apparmor/apparmor/-/merge_requests/589

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/591
Acked-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 2f5d5e1b24)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-08-20 01:15:16 -07:00
Christian Boltz
cd4a161350 Add CAP_BPF and CAP_PERFMON to severity.db
These capabilities were introduced in Linux 5.8

References: https://bugs.launchpad.net/bugs/1890547
(cherry picked from commit ae01250209)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-08-07 13:51:55 -07:00
Christian Boltz
701b3ba29c Handle symlink log events in aa-logprof
Nobody told the tools that log events with operation="symlink" exist.
Add this keyword to the list of file or network operations (I don't
expect network symlinks ;-) but keeping everything in that list makes
things easier than special-casing it.)

Also add the log sample and expected result to the libapparmor tests.

Fixes https://gitlab.com/apparmor/apparmor/-/issues/107

(cherry picked from commit 98bf187323)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-08-06 11:19:34 -07:00
Steve Beattie
c63cc73672 utils/tests: add libaparmor swig library path
Similar to the profiles/ check using the python utilities, the
tests for the python utilities were not including the path for the
swig libapparmor library in the LD_LIBRARY_PATH variable, only in
PYTHONPATH. This commit fixes that, renaming the variable used for
the built libapparmor check.

v2:
 - actually use the LIBAPPARMOR_PATH variable when defining
   LD_LIBRARY_PATH

Bug: https://gitlab.com/apparmor/apparmor/-/issues/98
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/586
2020-07-25 00:54:57 -07:00
Steve Beattie
a65078494e profiles/Makefile: fix aa-logprof invocation
The commit c8b6d8b393 ("profiles: Update 'make check' to select tools
based on USE_SYSTEM") set a bunch of variables but neglected to apply
them when invoking aa-logprof. This commit addresses this by:

  * correcting the PYTHONPATH used with aa-logprof
  * setting LD_LIBRARY_PATH when invoking aa-logprof
  * adjusting LD_LIBRARY_PATH to include both the directory location
    of libapparmor but also the swig libapparmor library needed for
    python tools to function.
  * adjusts the test for the presence of libapparmor to not use
    LD_LIBRARY_PATH but instead a libapparmor specific variable
    LIBAPPARMOR_PATH

Bug: https://gitlab.com/apparmor/apparmor/-/issues/98
Fixes: c8b6d8b393
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/586
2020-07-25 00:54:57 -07:00
Steve Beattie
d1d74e8950 profiles/Makefile: add check for built libapparmor
When running the 'check-logprof' test using tools in the tree,
libapparmor needs to have been built for the python utilities to work.
Add a check for its existence to the test-dependencies target.

Bug: https://gitlab.com/apparmor/apparmor/-/issues/98
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/586
2020-07-25 00:54:57 -07:00
Steve Beattie
88517e9768 profiles/Makefile: local target does not depend on parser
The "local" make target does not depend on the parser having been
built. Create a separate "test-dependencies" target and have the tests
that need them depend on that and the "local" target, when validating
the profile set against the apparmor tools.

Fixes: c8b6d8b393
Bug: https://gitlab.com/apparmor/apparmor/-/issues/98
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/586
2020-07-25 00:54:57 -07:00
John Johansen
6016f931eb profiles: Update 'make check' to select tools based on USE_SYSTEM
The profiles dirs make check is not always using the correct tools.
Update it to be similar to other Makefiles where the var USE_SYSTEM

  make check USE_SYSTEM=1

is used to indicated that the system installed tools should be used
and

  make check

is used to run the tests against the in tree tools

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/580
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
(cherry picked from commit c8b6d8b393)
2020-07-22 16:17:11 -07:00
John Johansen
f25770c27b Merge Fix lexer 2.13
This is a backport of the fix-lexer patch series for 2.13

Atm it has more patches than are strictly necessary. The open question is how much of that series do we actually want to bring back?

technically the only patch we need to keep CI working and fix the issues that have been discovered are

```
Remove TODO for half-quoted abi rule
parser: split newline and end of rule handling into separate rules
parser: update rule to process newlines to include states that eat WS
parser: add ABI_MODE to WS consumption state
```

However that would keep us from being able to catch other errors. If we want to be able to catch other potential lexer pass-through errors, at a minimum we need to include.

```
Error out on unhandled parts when parsing a profile
```

Which excludes only

```
parser: add missing states to the default rule and improve the error msg
```

While its nice to have better debug output, I am not sure it is worth backporting this patch
Summary of Discussion: The debug output is worth having

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/572
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2020-07-21 22:53:20 +00:00
John Johansen
5623881bfa Merge [2.11..2.13] abstractions/X: add another xauth path
Future sddm version will use $XDG_RUNTIME_DIR/xauth_XXXXXX

References:

* https://bugzilla.opensuse.org/show_bug.cgi?id=1174290
* https://bugzilla.suse.com/show_bug.cgi?id=1174293
* https://github.com/sddm/sddm/pull/1230
* https://github.com/jonls/redshift/issues/763

This is the 2.13 version of 35f033ca7c / https://gitlab.com/apparmor/apparmor/-/merge_requests/581

The difference is that this commit avoids using the @{run} variable.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/582
Acked-by: John Johansen <john.johansen@canonical.com>
2020-07-21 22:34:49 +00:00
John Johansen
9528672c36 libapparmor: fix hashing of the feature set
The hashing of the featue set is wrong because it is hashing the
whole feature structure instead of just the feature string.

This results in the refcount and hash field becoming part of the
hash and the feature string not being completely hashed as the
bytes of the refcount and hash field are being counted in the
as part of the string length when the hash is taken.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/583
Reported-by: Samuele Pedroni <samuele.pedroni@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit b8be1c3ff8)
2020-07-21 15:18:49 -07:00
Christian Boltz
02b9090eda abstractions/X: add another xauth path
Future sddm version will use $XDG_RUNTIME_DIR/xauth_XXXXXX

References:
- https://bugzilla.opensuse.org/show_bug.cgi?id=1174290
- https://bugzilla.suse.com/show_bug.cgi?id=1174293
- https://github.com/sddm/sddm/pull/1230
- https://github.com/jonls/redshift/issues/763

This is the 2.13 version of 35f033ca7c /
https://gitlab.com/apparmor/apparmor/-/merge_requests/581

The difference is that this commit avoids using the @{run} variable.
2020-07-20 20:35:41 +02:00
Christian Boltz
7c5c8a0cc1 Merge branch 'update-debian-fonts' into 'master'
Update fonts abstraction for Debian

Closes #94

See merge request apparmor/apparmor!575

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit 5b4a40ea58)

7b7e98a5 Update fonts abstraction for Debian
2020-06-27 18:35:01 +00:00
Christian Boltz
ac4bf706e5 Merge branch 'cboltz-2.13-tests-profile-dir' into 'apparmor-2.13'
[2.11..2.13] fix setting apparmor.aa.profile_dir in some tests

cherry picked from commit 6fe4b5e59a -
but only the test-aa.py changes because test-profile-list.py didn't have
the affected tests in 2.13 yet.

See merge request apparmor/apparmor!574

Acked-by: Steve Beattie <steve.beattie@canonical.com> for 2.11..2.13
2020-06-19 11:42:57 +00:00
Jochen Sprickerhof
53a95a58e6 enchant abstraction: support libenchant-2-2
PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/573
(cherry picked from commit 178f5d5e77)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-06-19 00:53:25 -07:00
Christian Boltz
583ea724b2 fix setting apparmor.aa.profile_dir in some tests
cherry picked from commit 6fe4b5e59a -
but only the test-aa.py changes because test-profile-list.py didn't have
the affected tests in 2.13 yet
2020-06-17 13:16:36 +02:00
John Johansen
b3560008dd parser: add ABI_MODE to WS consumption state
ABI_MODE needs to be able to consume white space, unfortunately this
was missed, and only showed up with the basckport of the patches
to stop unmatched input from being passed through.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-06-14 01:36:49 -07:00
John Johansen
2f04bf6498 parser: update rule to process newlines to include states that eat WS
Newlines should generally be treated as whitespace. Expand the list
of states using the newline rule to include almost all rules that
eat WS.

There are two exceptions assign and comment which have special handling
of newlines.

this fixes the failures

not ok 71543 - ./simple_tests//vars/vars_simple_assignment_13.sd: quoted commas should not trigger an error

not ok 71544 - ./simple_tests//vars/vars_simple_assignment_14.sd: quoted commas should not trigger an error

found by introducing nodefault

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/569
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
(cherry picked from commit 21498ff9a4)
2020-06-14 00:01:42 -07:00
John Johansen
438d2794e1 parser: split newline and end of rule handling into separate rules
Split the newline processing into a separate rule block so that it can
be shared with states that need to process newlines without processing
end of rule conditions.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/569
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
(cherry picked from commit fffca2ffa0)
2020-06-14 00:01:24 -07:00
John Johansen
711a1747a2 parser: add missing states to the default rule and improve the error msg
There were several states missing from the default rule which catches
unexpected input in a state.

Update the default rule to catch all input including newlines and
update its error message to include information about which state the
failure occured in. Also update the comment about what to do when
adding new states.

While the lexer now has the "nodefault" option set, it doesn't provide
as much information as the default rule does, so we prefer states
to use our provided default rule.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/569
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
(cherry picked from commit 1a4288886b)
2020-06-13 23:51:47 -07:00
Christian Boltz
b302327ac8 Remove TODO for half-quoted abi rule
With %option nodefault, the parser now errors out as expected, even if
the error message isn't too helpful.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/569
Signed-off-by: Christian Boltz <apparmor@cboltz.de>                            Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
(cherry picked from commit 7d062917aa)
2020-06-13 23:51:35 -07:00
Christian Boltz
af32be0fb4 Error out on unhandled parts when parsing a profile
... (using `%option nodefault`) instead of echoing the unknown parts to
stdout, and ignoring the error.

This will cause the parser to error out with

    flex scanner jammed

and $?=2 if a profile contains unknown/invalid parts. That's not really
a helpful error message, but still better than ignoring errors.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/569
Signed-off-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
(cherry picked from commit c01ed1d57b)
2020-06-13 23:51:21 -07:00
Christian Boltz
0c858fb34d allow reading my.cnf in dovecot-dict profile
Seen on openSUSE Tumbleweed with the mail users in a mysql database.

(cherry picked from commit f7ab91f423)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-06-13 01:56:09 -07:00
Christian Boltz
8a3b92cd62 Allow /proc/*/attr/current in dovecot imap and lmtp
This is needed when using the "apparmor" plugin which means dovecot
switches to user-specific hats.

Seen on openSUSE Tumbleweed.

(backported from commit 6a388859f8)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-06-13 01:55:28 -07:00
Jörg Sommer
1842231253 profiles/gnome: Allow access of /run/mount/utab
When a filesystem is mounted with the option *user*, the file selection
dialogue, e.g. in *Evince*, triggers an access of */run/mount/utab*, which
comes from *libmount* and should be allowed.

Reported-by: JrgSommer[m] in #apparmor
(cherry picked from commit cd3532f792)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-05-27 00:43:48 -07:00
Christian Boltz
2d0358c95c Fix strip_quotes() to handle empty strings
strip_quotes() assumed its parameter is at least one character long, and
errored out on an empty string.

It also converted a string consisting of a single quote to an empty
string because that single quote had a quote as first and last char.

This commit fixes these two bugs.

Also rewrite TestStripQuotes to use tests[], and add some test for an empty
string, a one-char path (just a slash) and a single quote.

(cherry picked from commit 373e8e23b1)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-05-26 00:44:30 -07:00
Christian Boltz
5929c1519b Merge branch 'dnsmasq-trust-anchors' into 'master'
dnsmasq: allow reading DNSSEC trust anchors

See merge request apparmor/apparmor!547

Acked-by: Christian Boltz <apparmor@cboltz.de

(cherry picked from commit 5d04922f00)

1b9469eb dnsmasq: allow reading DNSSEC trust anchors
2020-05-25 18:25:55 +00:00
Vincas Dargis
53798e90d5 vulkan: fix device and driver enumeration
vkcube test application produces these DENIED messages on current Debian
Sid:
```
type=AVC msg=audit(1589815066.509:868): apparmor="DENIED"
operation="open" profile="/usr/bin/vkcube"
name="/sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_min_freq_mhz"
pid=32553 comm="vkcube" requested_mask="r" denied_mask="r" fsuid=1000
ouid=0
```

```
type=AVC msg=audit(1590082079.377:1155): apparmor="DENIED"
operation="open" profile="/usr/bin/vkcube"
name="/sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_max_freq_mhz"
pid=51348 comm="vkcube" requested_mask="r" denied_mask="r" fsuid=1000
ouid=0
```

```
type=AVC msg=audit(1590082107.057:1249): apparmor="DENIED"
operation="open" profile="/usr/bin/vkcube"
name="/sys/devices/pci0000:00/0000:00:02.0/drm/card0/metrics/" pid=51459
comm="vkcube" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
```

```
type=AVC msg=audit(1590082519.937:1408): apparmor="DENIED"
operation="open" profile="/usr/bin/vkcube"
name="/sys/devices/pci0000:00/0000:00:02.0/drm/card0/metrics/403d8832-1a27-4aa6-a64e-f5389ce7b212/id"
pid=51960 comm="vkcube" requested_mask="r" denied_mask="r" fsuid=1000
ouid=0
```

```
type=AVC msg=audit(1590082842.193:1829): apparmor="DENIED"
operation="open" profile="/usr/bin/vkcube"
name="/etc/glvnd/egl_vendor.d/" pid=53000 comm="vkcube"
requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
```

```
type=AVC msg=audit(1590082842.193:1830): apparmor="DENIED"
operation="open" profile="/usr/bin/vkcube"
name="/usr/share/glvnd/egl_vendor.d/" pid=53000 comm="vkcube"
requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

```

Add appropriate rules to fix these enumerations.

(cherry picked from commit 21bbfc0652)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-05-21 12:56:17 -07:00
Christian Boltz
5f61bd4cf2 Merge branch 'cboltz-2.13-collapse-log' into 'apparmor-2.13'
[2.12+2.13] collapse_log(): avoid accidently initializing aa[profile]

See merge request apparmor/apparmor!539

Acked-by: John Johansen <john.johansen@canonical.com> for 2.12 and 2.13
2020-05-20 19:23:21 +00:00
Christian Boltz
72c2a7d2de collapse_log(): avoid accidently initializing aa[profile]
... or calling is_known_rule() on events for non-existing hats.

It's the usual hasher() "fun" again - accessing a non-existing element
will create its parent.

In theory this commit might be worth a backport. In practise, it doesn't cause
any visible problem.

However, starting with the next commit, it will cause lots of test errors.

Also add a missing is_known_rule() call for dbus rules, which might have
caused similar hasher() "fun".

(Backported from 9f1b2f4014)
2020-05-20 20:06:27 +02:00
Christian Boltz
e038123f8f Merge branch 'cboltz-fail-verbose' into 'master'
read_profile(): don't fail silently

See merge request apparmor/apparmor!530

Acked-by: Steve Beattie <steve.beattie@canonical.com> for 2.11..master

(cherry picked from commit e0f9b7cb07)

af8b9dc5 read_profile(): don't fail silently
2020-05-12 19:43:59 +00:00
nl6720
2841103039 profiles: add trailing slash to the run variable definition
Merge request apparmor/apparmor!466 (454fca7483) pulled back the
@{run} variable definition from apparmor/apparmor!454 (452b5b8735)
to the 2.13 and 2.12 branches, to make backporting profile changes
easier.  However, it did not include the followup fix to the @{run}
definition to include trailing slashes to ensure they are treated as
directories (apparmor/apparmor!456 ef591a67ce).

Signed-off-by: nl6720 <nl6720@gmail.com>
(cherry picked from commit ef591a67ce)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/533
2020-05-12 12:30:11 -07:00
Christian Boltz
0e89e79a32 Merge branch 'cboltz-vim-alias' into 'master'
apparmor.vim: allow leading whitespace for alias rules

See merge request apparmor/apparmor!527

Acked-by: Steve Beattie <steve.beattie@canonical.com> for 2.11..master

(cherry picked from commit ae70ecfbaa)

c636580f apparmor.vim: allow leading whitespace for alias rules
2020-05-10 22:54:44 +00:00
Christian Boltz
0ad7109eea Merge branch 'cboltz-less-shell' into 'master'
less shell ;-)

See merge request apparmor/apparmor!520

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

(cherry picked from commit 6b55794074)

48bae9e3 less shell ;-)
2020-05-07 17:59:16 +00:00
Christian Boltz
eb5185c961 Merge branch 'cboltz-2.13-genprof-fix-json' into 'apparmor-2.13'
[2.11..2.13] Fix showing the local inactive profile in json mode

See merge request apparmor/apparmor!516

Acked-by: Steve Beattie <steve.beattie@canonical.com> for 2.12 and 2.13
2020-05-07 10:18:12 +00:00
Christian Boltz
da07cdf79c Fix showing the local inactive profile in json mode
When aa-genprof proposes a local inactive profile, it had a hardcoded
call to 'less' to display that profile.

Unsurprisingly, this doesn't work in JSON mode and breaks YaST (luckily
it's only a case of "the button doesn't work").

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1171315
(cherry picked from commit 68a258b006)
(cherry picked from commit cb95e9a2568b19e2e7601c0af363e0605a6889d9)
2020-05-07 01:06:41 +02:00
Christian Boltz
6e9dd6494b Split off UI_ShowFile() from UI_Changes
UI_ShowFile() is more generic and can be used to display various (text)
files, not only diffs.

(cherry picked from commit bb3803b931,
adjusted for 2.13 branch)
2020-05-07 01:06:05 +02:00
Christian Boltz
6c638c97c5 Merge branch 'cboltz-vim-if-exists' into 'master'
apparmor.vim: support 'include if exists'

See merge request apparmor/apparmor!500

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

(cherry picked from commit a4864146e2)

efa7c6d6 apparmor.vim: support 'include if exists'
2020-05-03 19:28:09 +00:00
Christian Boltz
b3dff41eb7 Merge branch 'privacy' into 'master'
Privacy statement

See merge request apparmor/apparmor!441

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master

(cherry picked from commit 4281b58c89)

bfde89a6 infrastructure: Add privacy statement to the README
2020-04-26 11:43:26 +00:00
John Johansen
cca58df6f5 Merge Fixings for crosscompilation
This series adds a couple of patches to make the software more crosscompilation friendly. They are based on the work I'm doing to fix the package on buildroot

PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/485
Acked-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 9ba2334423)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-04-26 03:00:34 -07:00
Daniel Gerber
95b75a628a fix fails to load profiles in busybox with:
egrep: bad regex '^/.[ \t]+flags[ \t]=[ \t]*([ \t]complain[ \t])[ \t]+{': Invalid contents of {}

Note the final non-escaped {.
The issue is not present any more in branch master.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/80
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-04-20 16:51:40 -07:00
Christian Boltz
ddb747c0a9 Merge branch 'profile-usr.sbin.dnsmasq' into 'master'
usr.sbin.dnsmasq: update to support dnsmasq 2.81

See merge request apparmor/apparmor!475

Acked-by: Christian Boltz for 2.11..master

(cherry picked from commit acafe9de82)

88c142c6 usr.sbin.dnsmasq: allow reading @{PROC}/@{pid}/fd/ as is needed by dnsmasq 2.81
2020-04-12 09:45:24 +00:00
John Johansen
01841ade3a Merge Better error handling when creating apparmor.vim
See the individual commits for details and bug references.

PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/472
Acked-by: John Johansen <john.johansen@canonical.com>
2020-04-08 01:37:44 -07:00
John Johansen
e02a017014 Merge Backport xdg open
@Talkless requested xdg-open and friends be cherry-picked into 2.13

This is the set of commits (and fixes) to do that without modifying them.

We could drop backporting dbus-strict by modifying both the adding missing .d dirs, and add xdg-open and friends patches.

This series does not currently include the make check test and its fixes for the .d directories, as they were not required but we may want to include them to catch any potential errors.
PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/471
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-04-03 01:47:03 +00:00
John Johansen
0b31930b3b Merge exo-open: allow reading ~/.local/share/xfce4/helpers/*.desktop
Fixes: https://gitlab.com/apparmor/apparmor/-/issues/73
PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/467
Acked-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit b2d0d87eba)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-04-02 03:17:19 -07:00
Christian Boltz
b9af6564a5 Merge branch 'cboltz-exoopen-local' into 'master'
Add #include if exists <*.d> to new abstractions

See merge request apparmor/apparmor!453

Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit 962f1e7a7b)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-04-02 03:17:04 -07:00
John Johansen
632fb92bc5 Add xdg-open (and friends) abstraction
Implement set of abstractions to handle opening uris via xdg-open and similar helpers used on different desktop environments.

Abstractions are intended to be included into child profile, together with bundle abstractions such as ubuntu-browsers, ubuntu-email and others, for fine-grained control on what confined application can actually open via xdg-open and similar helpers.

PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/404
Acked-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit d257afd309)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-04-02 03:16:51 -07:00
Christian Boltz
79e942bf2a Merge branch 'cboltz-abstractions-missing-include' into 'master'
add missing *.d include to dbus-network-manager-strict abstraction

See merge request apparmor/apparmor!448

Acked-by: Seth Arnold <seth.arnold@canonical.com>
(cherry picked from commit eae474bb5c)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-04-02 03:09:36 -07:00
John Johansen
c046bc83dc Add dbus-network-manager-strict abstraction
Some applications queries network configuration (using QNetworkConfigurationManager class in Qt and similar), and that produces DBus denials under AppArmor confinement when NetworkManager backend is used.

Add abstraction that allows most common read-only DBus queries for getting current network configuration from NetworkManager backend.


PR: https://gitlab.com/apparmor/apparmor/merge_requests/409
Acked-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit a10fa57fb6)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-04-02 03:09:21 -07:00
Rich McAllister
dda6825ff2 abstractions: add /etc/mdns.allow to /etc/apparmor.d/abstractions/mdns
In focal users of mdns get denials in apparmor confined applications.
An exampel can be found in the original bug below.

It seems it is a common pattern, see
https://github.com/lathiat/nss-mdns#etcmdnsallow

Therefore I'm asking to add
   /etc/mdns.allow r,
to the file
   /etc/apparmor.d/abstractions/mdns"
by default.

--- original bug ---

Many repetitions of

audit: type=1400 audit(1585517168.705:63): apparmor="DENIED" operation="open" profile="/usr/sbin/chronyd" name="/etc/mdns.allow" pid=1983815 comm="chronyd" requested_mask="r" denied_mask="r" fsuid=123 ouid=0

in log. I use libnss-mdns for .local name resolution, so /etc/nsswitch.conf contains

hosts: files mdns [NOTFOUND=return] myhostname dns

and /etc/mnds.allow contains the domains to resolve with mDNS (in may case, "local." and "local"; see /usr/share/doc/libnss-mdns/README.html.)

Presumably cronyd calls a gethostbyX() somewhere, thus eventually trickling down through the name service switch and opening /etc/mdns.allow, which the AppArmor profile in the chrony package does not allow.

Fixes: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1869629
Signed-off-by: John Johansen <john.johansen@canonical.com>

(cherry picked from commit eeac8c11c9)
2020-03-31 21:04:45 -07:00
John Johansen
92f6679da9 Merge [2.13] fix build with make 4.3
his MR backports the patches for make 4.3 compability to the 2.13 branch.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/74
Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1167953
Acked-by: John Johansen <john.johansen@canonical.com>
2020-03-31 22:05:47 +00:00
John Johansen
03acdebf07 Merge [2.12 + 2.13] Add "run" variable
Define the "run" variable in 2.12 and 2.13 to make backporting profile updates easier.

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/88
PR: https://gitlab.com/apparmor/apparmor/-/merge_requests/466

Acked-by: John Johansen <john.johansen@canonical.com>
2020-03-31 21:59:34 +00:00
nl6720
1f319c3870 abstractions/nameservice: allow accessing /run/systemd/userdb/
On systems with systemd 245, nss-systemd additionally queries NSS records from systemd-userdbd.service. See https://systemd.io/USER_GROUP_API/ .

(cherry picked from commit 16f9f6885a)
Fixes: https://gitlab.com/apparmor/apparmor/-/issues/82
Signed-off-by: nl6720 <nl6720@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-03-31 14:05:15 -07:00
Christian Boltz
411af09c97 Merge branch 'mesa-20.0' into 'master'
abstractions/mesa: allow checking if the kernel supports the i915 perf interface

See merge request apparmor/apparmor!464

Acked-by: Vincas Dargis <vindrg@gmail.com>
Acked-by: Christian Boltz <apparmor@cboltz.de> for master and 2.13

(cherry picked from commit f56bab3f75)

61571da1 abstractions/mesa: allow checking if the kernel supports the i915 perf interface
2020-03-31 19:50:52 +00:00
nl6720
454fca7483 Add "run" variable
Signed-off-by: nl6720 <nl6720@gmail.com>
(cherry picked from commit 452b5b8735)
2020-03-31 21:29:45 +02:00
Christian Boltz
af0c288fcd fix capabilities in apparmor.vim
https://gitlab.com/apparmor/apparmor/-/merge_requests/461 /
e92da079ca changed creating the
capabilities to use a script.

A side effect is that the list is now separated by \n instead of
spaces. Adjust create-apparmor.vim.py to the new output.

(cherry picked from commit 60b005788e)
2020-03-31 20:57:53 +02:00
allgdante
0d8e4cda3f Generate CAPABILITIES in a script due to make 4.3
This way we could generate the capabilities in a way that works with
every version of make.
Changes to list_capabilities are intended to exactly replicate the old
behavior.

(cherry picked from commit e92da079ca)
2020-03-31 20:57:53 +02:00
John Johansen
69651fc656 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>
(cherry picked from commit 9144e39d25)
2020-03-31 20:55:27 +02:00
Eric Chiang
fc2beaca9d *: ensure make apparmor_parser is cached
This change updates parser/Makefile to respect target dependencies and
not rebuild apparmor_parser if nothing's changed. The goal is to allow
cross-compiled tests #17 to run on a target system without the tests
attempting to rebuild the parser.

Two changes were made:

* Generate af_names.h in a script so the script timestamp is compared.
* Use FORCE instead of PHONY for libapparmor_re/libapparmor_re.a

Changes to list_af_names are intended to exactly replicate the old
behavior.

Signed-off-by: Eric Chiang <ericchiang@google.com>
(cherry picked from commit cb8c3377ba)
2020-03-31 20:55:17 +02:00
Christian Boltz
5972adc7e3 Merge branch 'master' into 'master'
Update usr.sbin.winbindd profile to allow krb5 rcache files locking

See merge request apparmor/apparmor!460

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master

(cherry picked from commit 5c1932d0d6)

2c3001c7 Update usr.sbin.winbindd profile to allow krb5 rcache files locking
2020-03-23 20:14:39 +00:00
Christian Boltz
2e2529bae8 Replace deprecated assertEquals with assertEqual
assertEquals is deprecated since Python 2.7 and 3.2.

(cherry picked from commit 62abfe38e8)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-03-17 13:25:02 -07:00
John Johansen
df0ac742f7 Release: Bump revisions for 2.13.4 release
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-03-12 04:17:10 -07:00
Christian Boltz
d779dbf88a Merge branch 'run-uuidd-request' into 'master'
abstractions/base: allow read access to /run/uuidd/request

See merge request apparmor/apparmor!445

Acked-by: John Johansen <john.johansen@canonical.com> for 2.11..master
Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master


(cherry picked from commit 80bf920929)

45fffc12 abstractions/base: allow read access to /run/uuidd/request
2020-02-03 21:17:40 +00:00
Christian Boltz
979d544b48 Merge branch 'gnome-abstraction-more-mimeapps' into 'master'
abstractions/gnome: also allow /etc/xdg/mimeapps.list

See merge request apparmor/apparmor!444

Acked-by: John Johansen <john.johansen@canonical.com> for 2.11..master
Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master


(cherry picked from commit 3becbbab2c)

67cf4fa3 abstractions/gnome: also allow /etc/xdg/mimeapps.list
2020-02-03 21:16:46 +00:00
Christian Boltz
9d4571aac9 Merge branch 'ecryptfs-top-dir' into 'master'
abstractions/base: allow read access to top-level ecryptfs directories

See merge request apparmor/apparmor!443

Acked-by: John Johansen <john.johansen@canonical.com> for 2.11..master
Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.11..master


(cherry picked from commit 24895ea302)

fbd8981e abstractions/base: allow read access to top-level ecryptfs directories
2020-02-03 21:15:48 +00:00
Ian Johnson
8b297f2589 docs: fix typo in man doc of unix rules
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
(cherry picked from commit f4220a19be)
2020-01-31 22:18:59 -08:00
John Johansen
a863279f06 gnome abstraction: allow reading per-user themes from $XDG_DATA_HOME
Bug-Debian: https://bugs.debian.org/930031

As per https://developer.gnome.org/gtk3/stable/ch32s03.html, since GTK+ 3.6, $XDG_DATA_HOME/themes is preferred over $HOME/.themes. We already support the latter, let's also support the former.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/442
Acked-by: John Johansen <john.johansen@canonical.com>


(cherry picked from commit 098f0a7b5f)

852c1e76 gnome abstraction: allow reading per-user themes from $XDG_DATA_HOME
2019-12-17 23:20:46 +00:00
John Johansen
a657924262 Enable CI for the 2.13 branch
This adds a copy of the current .gitlab-ci.yml from master to the 2.13 branch to enable CI checks.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/436
Acked-by: John Johansen <john.johansen@canonical.com>
2019-11-27 23:31:59 +00:00
Christian Boltz
85bafde501 Enable CI for the 2.13 Branch
This adds a copy of the current .gitlab-ci.yml from master to the 2.13
branch to enable CI checks.
2019-11-27 22:55:05 +01:00
Christian Boltz
d3b92788e9 Merge branch 'cboltz-usr-etc' into 'master'
Allow /usr/etc/ in abstractions/authentication

openSUSE (and hopefully some other distributions) work on moving shipped
config files from /etc/ to /usr/etc/ so that /etc/ only contains files
written by the admin of each system.

See https://en.opensuse.org/openSUSE:Packaging_UsrEtc for details and
the first moved files.

Updating abstractions/authentication is the first step, and also fixes
bugzilla.opensuse.org/show_bug.cgi?id=1153162

See merge request apparmor/apparmor!426

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

(cherry picked from commit 1cfd4d4bbc)

ee7194a7 Allow /usr/etc/ in abstractions/authentication
2019-11-27 19:41:02 +00:00
Christian Boltz
370c9292ed Merge branch 'cboltz-abstractions-kerberos' into 'master'
abstractions/kerberosclient: allow reading /etc/krb5.conf.d/

See merge request apparmor/apparmor!425

Acked-by: Steve Beattie <steve@nxnw.org> for 2.10..master
Acked-by: John Johansen <john.johansen@canonical.com> for 2.10..master


(cherry picked from commit 663546c284)

dffed831 abstractions/kerberosclient: allow reading /etc/krb5.conf.d/
2019-11-18 21:35:43 +00:00
Christian Boltz
fd50663ec5 Merge branch 'cboltz-drop-localinclude' into 'master'
Drop 'localinclude' in parse_profile_data() and ProfileStorage

See merge request apparmor/apparmor!427

Acked-by: John Johansen <john.johansen@canonical.com> for 2.12..master
Acked-by: Steve Beattie <steve@nxnw.org> for 2.12..master

(cherry picked from commit b017f8f8a9)

001ea9e3 Drop 'localinclude' in parse_profile_data() and ProfileStorage
2019-11-18 21:32:35 +00:00
Christian Boltz
ae74d9344a Merge branch 'fix-autoconf-check-for-python-3.8' into 'master'
Fix a Python 3.8 autoconf check

See merge request apparmor/apparmor!430

Acked-by: Christian Boltz <apparmor@cboltz.de> for master and 2.13
Acked-by: Steve Beattie <steve@nxnw.org> for master and 2.13

(cherry picked from commit 3db14e8e49)

ccbf1e0b Fix a Python 3.8 autoconf check
2019-11-18 20:16:45 +00:00
Christian Boltz
99c652c769 Merge branch 'cboltz-pyflakes-version' into 'master'
README: add PYFLAKES=/usr/bin/pyflakes3 env variable

See merge request apparmor/apparmor!429

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

(cherry picked from commit 1567ea6f4c)

556bb94a README: add PYFLAKES=/usr/bin/pyflakes3 env variable
2019-10-24 21:08:42 +00:00
Christian Boltz
937c5a15b2 Merge branch 'cboltz-status-parenthesis' into 'master'
aa-status: handle profile names containing '('

Closes #51

See merge request apparmor/apparmor!415

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

(cherry picked from commit b76567ce10)

41d26b01 aa-status: handle profile names containing '('
2019-09-23 18:55:36 +00:00
Jamie Strandboge
81f6724747 abstractions/fonts: don't allow write of fontconfig cache files
879531b36ec3dfc7f9b72475c68c30e4f4b7b6af changed access for
@{HOME}/.{,cache/}fontconfig/** to include 'w'rite. Fontconfig has been
a source of CVEs. Confined applications should absolutely have read
access, but write access could lead to breaking out of the sandbox if a
confined application can write a malformed font cache file since
unconfined applications could then pick them up and be controlled via
the malformed cache. The breakout is dependent on the fontconfig
vulnerability, but this is the sort of thing AppArmor is meant to help
guard against.

(cherry picked from commit c5968c70d0)
PR: https://gitlab.com/apparmor/apparmor/merge_requests/420
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-09-20 02:48:36 -07:00
Paulo Gomes
6f817f6233 Fix capability mispelling.
PR: https://gitlab.com/apparmor/apparmor/merge_requests/421
(cherry picked from commit 2d19d4d159)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-09-20 02:15:09 -07:00
intrigeri
c557b89045 abstractions/X: allow reading the Xauth file mutter passes to Xwayland.
Bug-Debian: https://bugs.debian.org/935058

Applications running under Xwayland in a GNOME+Wayland session need read access
to this file since:

  a8984a81c2

… that was first included in mutter 3.33.3.

This rule is presumably only needed for GNOME+Wayland sessions, so one could
argue that it should live in abstractions/wayland instead, but Jamie argued that
it should be in the X abstraction because Xwayland is a X server.

(cherry picked from commit c006f79141)
MR: https://gitlab.com/apparmor/apparmor/merge_requests/419
Bug-Debian: https://bugs.debian.org/935058
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-09-16 08:11:56 -07:00
Tyler Hicks
89fdc1b532 parser: Fix typoed example dbus rule in apparmor.d(5) man page
Remove extra closing parenthesis.

Bug: https://launchpad.net/bugs/1838991
Fixes: 46586a6334 ("parser: Add example dbus rule for unconfined peers")
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>

(cherry picked from commit 7df48adae5)
Ref: https://gitlab.com/apparmor/apparmor/merge_requests/410
Acked-by: Christian Boltz <apparmor@cboltz.de>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2019-08-05 17:09:57 +00:00
Tyler Hicks
4c9fe34310 parser: Fix minor typo in usage
Correct the long option used to print the cache directory.

Fixes: e9d9395f91 ("parser: Add option to print the cache directory")
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>

(cherry picked from commit 50e34b45c2)
Ref: https://gitlab.com/apparmor/apparmor/merge_requests/406
Acked-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2019-08-01 21:15:06 +00:00
Christian Boltz
e821a018d9 Merge branch 'cboltz-unbalanced-parenthesis' into 'master'
Fix crash on unbalanced parenthesis in filename

See merge request apparmor/apparmor!402

Seth Arnold <seth.arnold@canonical.com> for 2.10..master

(cherry picked from commit db1f391844)

8f74ac02 Fix crash on unbalanced parenthesis in filename
2019-07-09 19:45:33 +00:00
Xiang Fei Ding
e78ef3f7ba parser: allow overriding which ar(1) is invoked
When cross compiling apparmor-parser, Makefile will use ar for
creating the static library. However, ar produces libraries on
the build platform. The right ar could be prefixed with the target
platform triples.

Signed-off-by: Xiang Fei Ding <dingxiangfei2009@gmail.com>
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Ref: https://github.com/NixOS/nixpkgs/pull/63999
Bug: https://gitlab.com/apparmor/apparmor/issues/41
(cherry picked from commit 654d96a3f7)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-07-08 12:32:21 -07:00
John Johansen
ed9ccbdd31 libapparmor: logparse: fix RECORD_INVALID for valid log
v2:
- parse partial log line broken at \n
- add testcase_dbus_10.* for partial log line
- remove quotes from  testcasw_dbus_09.profile

The following log format has been seen in the wild, and currently results
in a RECORD_INVALID

    [4835959.046111] audit: type=1107 audit(1561053426.749:186): pid=640 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="ALLOWED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/systemd1" interface="org.freedesktop.systemd1.Manager" member="LookupDynamicUserByName" mask="send" name="org.freedesktop.systemd1" pid=20596 label="/usr/sbin/sshd" peer_pid=1 peer_label="unconfined"
                      exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'

Test parsing the above message with and without the \n embedded between
peer_label= and exec=

PR: https://gitlab.com/apparmor/apparmor/merge_requests/395
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 0349cf2d0a)
2019-07-02 01:21:59 -07:00
Christian Boltz
14a11e67a5 Merge branch 'cboltz-2.13-certbot' into 'apparmor-2.13'
[2.10..2.13] Add for Certbot on openSUSE Leap

See merge request apparmor/apparmor!398

Acked-by: John Johansen <john.johansen@canonical.com> for 2.10..2.13
2019-06-30 07:14:42 +00:00
Richard Chen
8b766451d5 Add for Certbot on openSUSE Leap
The default path is /etc/certbot/archive/{some domain}/{file name}.pem

See merge request apparmor/apparmor!397

This is a manual cherry-pick of 4d275bab69
and 3016ffb336
2019-06-29 23:14:49 +02:00
Christian Boltz
46b1c7a3bb Merge branch 'cboltz-2.13-parser-sbindir' into 'apparmor-2.13'
[2.13] parser: allow using a custom sbin & usr/sbin dir

This is especially handy if your distro doesn't split sbin and bin
and only wants to install into bin (so that the sbin directory doesn't
clash with the sbin -> bin symlink)

[Per feedback, added USR_SBINDIR as a toggle for the install location
 of aa-teardown -- @smb]

Signed-off-by: Rasmus Thomsen <cogitri@exherbo.org>
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/111/
(cherry picked from commit 7c86a2acaf)



Cherry-pick requested in https://gitlab.com/apparmor/apparmor/issues/38

See merge request apparmor/apparmor!393

Acked-by: Seth Arnold <seth.arnold@canonical.com>
2019-06-27 14:37:53 +00:00
Steve Beattie
515cb80901 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
(cherry picked from commit 7c7a4bc531)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-26 09:15:28 -07:00
Rasmus Thomsen
4baccd12ef parser: allow using a custom sbin & usr/sbin dir
This is especially handy if your distro doesn't split sbin and bin
and only wants to install into bin (so that the sbin directory doesn't
clash with the sbin -> bin symlink)

[Per feedback, added USR_SBINDIR as a toggle for the install location
 of aa-teardown -- @smb]

Signed-off-by: Rasmus Thomsen <cogitri@exherbo.org>
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/111/
(cherry picked from commit 7c86a2acaf)
2019-06-20 23:57:54 +02:00
John Johansen
2f9d9ea7e0 Release: Bump revisions for 2.13.3 release
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-17 16:55:38 -07:00
Christian Boltz
961a556e6e 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>
(cherry picked from commit ff287e9238)
2019-06-14 05:00:50 -07:00
Daniel Richard G
d89aa31e8e Updated abstractions to allow writing to some common config dirs
(cherry picked from commit 7972c038d7)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
Daniel Richard G
2ce0881794 Updated abstractions to allow creating some common config dirs
(cherry picked from commit 094dc741ee)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
Jörg Sommer
5afdd0cbac profiles/gnome: add @{HOME}/.cache/gtk-3.0
Found this path is used by gtk_compose_hash_get_cache_path() in
gtkcomposetable.c.

(cherry picked from commit 6da7ed2a78)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
Daniel Richard G
2cb70457fc 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).

(cherry picked from commit ac1d0545f4)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
Vincas Dargis
5bccc7351c Update nvidia for reading application profiles
Add file rule to allow reading application profiles for NVIDIA
Linux graphics driver.

(cherry picked from commit f2e0fdc72b)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
segfault
8eafb10b84 abstractions/python: allow /usr/local/lib/python3
(cherry picked from commit 548de2f3b8)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-14 04:56:28 -07:00
Cameron Nemo
0054d673d1 abstractions/qt5: read user configuration
Signed-off-by: Cameron Nemo <camerontnorman@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 6d81563267)
2019-06-14 04:56:28 -07:00
Steve Beattie
0c65b9aeb9 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:55:31 -07:00
Steve Beattie
3ce03f8516 Translations: merge updates from launchpad
Omnibus collection of translations updates.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from merge commit 3ee468864d
 plus following translation fix.)
2019-06-13 23:05:01 -07:00
Steve Beattie
f9b3fff2d8 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>
(cherry picked from commit 03c08cf989)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:55 -07:00
Launchpad Translations on behalf of apparmor-dev
c35eac608e Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 9d226f5887)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:47 -07:00
Launchpad Translations on behalf of apparmor-dev
145ef6ae52 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 01656486ef)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:39 -07:00
Launchpad Translations on behalf of apparmor-dev
a408872800 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 90a4b301bd)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:30 -07:00
Launchpad Translations on behalf of apparmor-dev
d1a5e30d8f Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 3b1c320cfc)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:22 -07:00
Launchpad Translations on behalf of apparmor-dev
0e25580aa2 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 5a62c68743)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:04 -07:00
Launchpad Translations on behalf of apparmor-dev
afe12f0ced Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 78c09e4337)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:52 -07:00
Launchpad Translations on behalf of apparmor-dev
729658325c Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 2c614d4413)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:45 -07:00
Launchpad Translations on behalf of apparmor-dev
8f2ee21057 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit d14723b78c)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:34 -07:00
Launchpad Translations on behalf of apparmor-dev
3f23facd6c Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit fe2faeb24f)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:21 -07:00
Launchpad Translations on behalf of apparmor-dev
059becffa7 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 9650201928)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:12 -07:00
Launchpad Translations on behalf of apparmor-dev
c05a08d4fd Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 2b936e25a8)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:03 -07:00
Launchpad Translations on behalf of apparmor-dev
369951df87 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 02ba8523c6)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:52 -07:00
Launchpad Translations on behalf of apparmor-dev
868703fb97 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 72bcf23c5d)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:41 -07:00
Launchpad Translations on behalf of apparmor-dev
dedac677b6 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 9f9294b48b)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:33 -07:00
Launchpad Translations on behalf of apparmor-dev
edd479d996 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 41b5fecbcf)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:22 -07:00
Launchpad Translations on behalf of apparmor-dev
b93b5ca426 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit dc98e8ff55)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:14 -07:00
Launchpad Translations on behalf of apparmor-dev
9ff782450f Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit ba3dc9fc85)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:05 -07:00
Launchpad Translations on behalf of apparmor-dev
aa848bdca2 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 42b43d58d0)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:17:55 -07:00
Launchpad Translations on behalf of apparmor-dev
5d434ffd34 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 301857ef5d)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:17:30 -07:00
Launchpad Translations on behalf of apparmor-dev
5d26399925 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 303deea3a8)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:17:18 -07:00
Launchpad Translations on behalf of apparmor-dev
6c054b503b Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 894c6cd6d2)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:17:08 -07:00
Launchpad Translations on behalf of apparmor-dev
37eeff0057 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit eb38db5953)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:17:00 -07:00
Launchpad Translations on behalf of apparmor-dev
e087c20381 Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 5cc8718965)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:16:18 -07:00
Christian Boltz
e704d1c18d 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
(cherry picked from commit 234a924480)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-13 17:40:47 -07:00
Jörg Sommer
2d2dc42aa6 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
PR: https://gitlab.com/apparmor/apparmor/merge_requests/334
(cherry picked from commit 0e0663e99e)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-13 17:35:40 -07:00
John Johansen
4c40011a3b 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.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/385
BugLink: http://bugs.launchpad.net/bugs/1820068
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit f6cd5c01c1)
2019-06-13 17:21:33 -07:00
Christian Boltz
39a81f4a19 Merge branch 'cboltz-dovecot-backports' into 'apparmor-2.13'
[2.12+2.13] backport dovecot profile additions

See merge request apparmor/apparmor!389

Acked-by: Seth Arnold <seth.arnold@canonical.com>
2019-06-13 20:33:36 +00:00
Christian Boltz
e97af4af46 backport dovecot profile additions
This is a partial backport of bc36daa264
(without the abstractions/nameservice removal in
usr.lib.dovecot.pop3-login)

Original commmit message:

dovecot: align {pop3,managesieve}-login to imap-login

Those 3 login daemons should have similiar needs and thus similar
profiles. IMAP is likely the most tested one so let's align the
other 2 with it. Unix and TCP sockets rules were added to pop3-login
after the removal of abstractions/nameservice that included them
implicitly.

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2019-06-13 22:26:18 +02:00
Christian Boltz
9318977332 Merge branch 'cboltz-postfix-name' into 'apparmor-2.13'
[2.12+2.13] make abstractions/postfix-common compatible with latest postfix profiles

See merge request apparmor/apparmor!387

Seth Arnold <seth.arnold@canonical.com>
2019-06-13 20:06:21 +00:00
Christian Boltz
4573d25297 make abstractions/postfix-common compatible with latest postfix profiles
Even if we don't backport the latest postfix profiles (in extras) to
2.12 and 2.13, making the abstraction compatible with them (by adding
peer=postfix-master rules in addition to the path-based ones) makes
things much easier for people who want to use the latest profiles.
2019-06-13 21:46:12 +02:00
John Johansen
fd2b170e65 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>
(cherry picked from commit a6ac6f4cfc)
2019-06-04 21:51:08 -07:00
John Johansen
d49fd5b9fa tests/regression: fix mount test to use next available loop device
looping through the first 16 loop devices to find a free device will
fail if those mount devices are taken, and unfortunately there are
now services that use an excessive amount of loop devices causing
the regression test to fail.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/379
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
(cherry picked from commit ab0f2af1da)
2019-05-11 22:26:07 -07:00
Christian Boltz
d2e83231f0 Merge branch 'cboltz-fix-deny-hat' into 'apparmor-2.13'
[2.11..2.13] handle_children: Fix denying of adding a hat

See merge request apparmor/apparmor!378

Acked-by: John Johansen <john.johansen@canonical.com>
2019-05-02 22:19:12 +00:00
Christian Boltz
87f91864be handle_children: Fix denying of adding a hat
Choosing "Deny" when handle_children() asks about adding a hat should
not add that hat, but it should _not_ leave the function because that
means all the other log events that were not migrated to prelog yet will
be lost.

Change "return" to "continue" to fix this.
2019-05-02 22:42:03 +02:00
Christian Boltz
21c3d57f8d Merge branch 'cboltz-link-man' into 'master'
Drop 'to' option for link rules from manpage

See merge request apparmor/apparmor!368

Acked-by: Eric Chiang <ericchiang@google.com>

(cherry picked from commit 041cd95a98)

115a1d89 Drop 'to' option for link rules from manpage
2019-04-29 19:22:13 +00:00
Christian Boltz
388e5be974 Merge branch 'cboltz-gitignore' into 'master'
Add several libapparmor/swig/ruby files to gitignore

See merge request apparmor/apparmor!366

(cherry picked from commit 9c11ce37c6)

7ed1a16a Add several libapparmor/swig/ruby files to gitignore
2019-04-26 16:16:21 +00:00
Christian Boltz
9aaff3ce13 Merge branch 'bugfix/aa-always-logfile-fallback' into 'master'
Fix error 'KeyError: 'logfiles'' when no logprof.conf exists

See merge request apparmor/apparmor!365

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit cece787182)

455c4413 aa.py: Ensure there is always a fallback falue for the logfile location
3c7e1668 aa.py: Indicate permission error if log file is found but cannot be opened
2019-04-21 16:48:47 +00:00
Goldwyn Rodrigues
82094950e2 identd: Add network netlink dgram
identd requires access to network netlink dgram.

(cherry picked from commit 1d75abba3f)
PR: https://gitlab.com/apparmor/apparmor/merge_requests/353
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-29 01:06:41 -07:00
intrigeri
08f9d16d37 Adjust tests to match base abstraction update.
Since !345 the set of permissions that are granted (get_file_perms_2)
or suggested (propose_file_rules) has changed. These new sets are
expected due to the changes brought by this MR, so let's adjust
the test suite accordingly.

(cherry picked from commit 0170e98f9c)
PR: https://gitlab.com/apparmor/apparmor/merge_requests/358
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-29 00:58:11 -07:00
intrigeri
8dff7dc232 base abstraction: allow mr on *.so* in common library paths.
For example, VirtualBox guests have /usr/lib/VBoxOGL.so.

Without this changes, in a VirtualBox VM with VBoxVGA graphics,
at least one Qt5 application (OnionShare) won't start and display:

  ImportError: libGL.so.1: failed to map segment from shared object

… and the system logs have:

  apparmor="DENIED" operation="file_mmap" profile="/usr/bin/onionshare-gui" name="/usr/lib/VBoxOGL.so" pid=11415 comm="onionshare-gui" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0

While this works fine with VBoxSVGA and VMSVGA when 3D acceleration is enabled.

So let's not assume all libraries have a name that starts with "lib".

PR: https://gitlab.com/apparmor/apparmor/merge_requests/345
(cherry picked from commit 5cbb7df95e)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-24 00:06:25 -07:00
Simon Deziel
b4f55efcc9 dovecot: master SIGTERM child that are slow to die
When doing a service reload, I noticed the following:

    ```Mar 22 15:52:27 smtp dovecot: master: Warning: SIGHUP received - reloading configuration
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=35309 out=232805
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=24600 out=1688166
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=14026 out=95516
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=13776 out=141513
    Mar 22 15:52:33 smtp dovecot: master: Warning: Processes aren't dying after reload, sending SIGTERM.
    Mar 22 15:52:33 smtp dovecot: master: Error: service(imap): kill(5806, 15) failed: Permission denied
    Mar 22 15:52:33 smtp dovecot: master: Error: service(imap-login): kill(5804, 15) failed: Permission denied
    Mar 22 15:52:33 smtp dovecot: master: Error: service(config): kill(506, 15) failed: Permission denied
    Mar 22 15:52:33 smtp kernel: [65542.184326] audit: type=1400 audit(1553284353.609:82): apparmor="DENIED" operation="signal" profile="dovecot" pid=414 comm="dovecot" requested_mask="send" denied_mask="send" signal=term peer="/usr/lib/dovecot/imap"
    Mar 22 15:52:33 smtp kernel: [65542.197596] audit: type=1400 audit(1553284353.625:83): apparmor="DENIED" operation="signal" profile="dovecot" pid=414 comm="dovecot" requested_mask="send" denied_mask="send" signal=term peer="/usr/lib/dovecot/imap-login"
    Mar 22 15:52:33 smtp kernel: [65542.197635] audit: type=1400 audit(1553284353.625:84): apparmor="DENIED" operation="signal" profile="dovecot" pid=414 comm="dovecot" requested_mask="send" denied_mask="send" signal=term peer="/usr/lib/dovecot/config"
    Mar 22 15:52:36 smtp dovecot: imap(simon): Server shutting down. in=17882 out=104004
    ```

The server was heavily loaded which is probably why it ended up trying to SIGTERM those.

Signed-off-by: Simon Deziel <simon@sdeziel.info>
(cherry picked from commit f01fd38ca0)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-22 16:04:52 -07:00
Christian Boltz
d4f1f9310b Merge branch 'cboltz-subshell' into 'master'
remove_profiles(): Fix returning $retval

See merge request apparmor/apparmor!352

Acked-by: Eric Chiang <ericchiang@google.com> for 2.11..master

(cherry picked from commit c9148a304c)

be02f008 remove_profiles(): Fix returning $retval
2019-03-18 17:46:22 +00:00
Christian Boltz
75236d62e2 Merge branch 'cboltz-utils-keywords' into 'master'
update network keyword list in utils and add test

See merge request apparmor/apparmor!350

Acked-by: Eric Chiang <ericchiang@google.com> for 2.12..master

(cherry picked from commit dc010bc034)

49849ed7 update network keyword list in utils and add test
2019-03-18 16:02:42 +00:00
Christian Boltz
e6a25f6971 Merge branch 'cboltz-network-keywords' into 'master'
apparmor.d manpage: update list of network domain keywords

See merge request apparmor/apparmor!349

Acked-by: Eric Chiang <ericchiang@google.com> for 2.12..master

(cherry picked from commit 6416ccebf6)

6b276563 apparmor.d manpage: update list of network domain keywords
2019-03-14 21:20:14 +00:00
Tyler Hicks
b502110dcf libapparmor: Fix variable name overlap in merge() macro
The calling function and the merge() macro both make use of a variable
named "i" but this causes problems when merging. The aa_policy_cache.sh
test script experiences "bad file descriptor" failures due to the merged
list containing invalid fd values (-1).

Fix this by renaming merge()'s index variables from i and j to y and z
to hopefully prevent future overlap. The better fix here would be to
convert merge() to a function but that's a more intrusive change and I
don't have an easy way to test the overlay feature.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit d7ac07afc4)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:22:26 -07:00
Tyler Hicks
01aec04bd6 libapparmor: Fix segfault when loading policy cache files
qsort()'s _size_ parameter is used to indicate the size of the elements
in the _base_ array parameter. Adjust the third argument to qsort() to
indicate that we're dealing with an array of struct dirent pointers
rather than an array of struct dirent.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit 8b21871820)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:21:41 -07:00
Tyler Hicks
68eb3be2ae tests: Teach aa_policy_cache.sh about the cache location and subdirs
Adjust aa_policy_cache.sh to handle the additional layer in the
directory hierarchy when determining where the policy cache binaries are
stored. This is needed due to the multicache changes that allow multiple
policy caches to exist on a single system.

Differentiate between the cache location (the top level directory
containing all caches) and the cache directory (the directory used to
store the cached policies).

Use the libapparmor wrapper to get the cache directory for the given
cache location and the features of the currently running kernel.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit f31457b26e)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:20:48 -07:00
Tyler Hicks
9374f419a0 tests: Add option to dump policy cache dir with the libapparmor wrapper
Print the policy cache directory path for the features of the currently
running kernel to stdout so that the aa_policy_cache.sh regression test
script can make use of it when writing out binary policy files.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit ad81ea0e67)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:20:24 -07:00
John Johansen
5704fba8d9 library: fix segfault in overlaydirat_for_each
(cherry picked from commit abbca9435f)
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Tyler Hicks <tyler.hicks@canonical.com>
2019-03-12 16:19:59 -07:00
Eric Chiang
a75ae4497c parser: determine xmatch priority based on smallest DFA match
The length of a xmatch is used to prioritize multiple profiles that
match the same path, with the intent that the more specific match wins.
Currently, the length of a xmatch is computed by the position of the
first regex character.

While trying to work around issues with no_new_privs by combining
profiles, we noticed that the xmatch length computation doesn't work as
expected for multiple regexs. Consider the following two profiles:

    profile all /** { }
    profile bins /{,usr/,usr/local/}bin/** { }

xmatch_len is currently computed as "1" for both profiles, even though
"bins" is clearly more specific.

When determining the length of a regex, compute the smallest possible
match and use that for xmatch priority instead of the position of the
first regex character.

(cherry picked from commit cc09794fbd)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 04:28:53 -07:00
John Johansen
4454ed77fd policy: Revert /usr/{bin,sbin}/ alternation in dnsmasq profile name
Using /usr/{bin,sbin}/dbsmasq as both the profile name and attachment break compatibility with the peer=/usr/sbin/dnsmasq rule, in the libvirtd profile.

Instead specify the profile has the old name of /usr/sbin/dnsmasq and specify the attachment separately. This looks funny but it avoids breaking libvirtd and still provides the broader attachment need by distros that have merged sbin into bin.

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1127073

I propose this patch for 2.12 and 2.13. (Older versions didn't get the alternation, master has a profile name added.)

PR: https://gitlab.com/apparmor/apparmor/merge_requests/346
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-07 23:35:54 +00:00
Christian Boltz
0afd232e5b dnsmasq: Work around breakage caused by {bin,sbin} alternation
Even if we expected it to stay compatible with peer=/usr/sbin/dnsmasq in
the libvirtd profile, practise shows that we were wrong.

This patch adds a tricky workaround so that the profile name doesn't
change, but the profile will attach even on distributions with merged
bin and sbin. (Credits for this crazy idea go to John ;-)

It also re-adds the libvirtd peer name /usr/sbin/libvirtd to avoid
breaking libvirtd.

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1127073
and the discussion in https://gitlab.com/apparmor/apparmor/merge_requests/346
2019-03-07 21:55:47 +01:00
intrigeri
a7dab42516 Merge branch 'bug1816470' into 'master'
tunables/share: fix buggy syntax that broke the ~/.local/share part of the @{user_share_dirs} tunable

See merge request apparmor/apparmor!344

(cherry picked from commit 2ed3763a2f)

cdeb6185 tunables/share: fix buggy syntax that broke the ~/.local/share part of the...
2019-02-25 06:49:40 +00:00
John Johansen
394d086e58 parser: Fix parser failing to handle errors when setting up work
The parser is not correctly handling some error conditions when
dealing with work units. Failure to spawn work, access files, etc
should be returned where appropriate, and be able to abort processing
if abort_on_error is set.

In addition some errors are leading to a direct exit without checking
for abort_on_error.

BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921866
BugLink: http://bugs.launchpad.net/bugs/1815294

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Eric Chiang <ericchiang@google.com>
(backported from commit cb43e57d27)

Conflicts:
	parser/parser_main.c
Reason:
	commit 48a32b78b1 not backported
2019-02-22 02:35:22 -08:00
Christian Boltz
28c4dcccc3 Merge branch 'dovecot-fixes-no-doveadm' into 'master'
misc dovecot fixes (take #2)

See merge request apparmor/apparmor!336

Acked-by: Christian Boltz <apparmor@cboltz.de> for master..2.10

(cherry picked from commit e68beb988a)

a57f01d8 dovecot: allow FD passing between dovecot and dovecot's anvil
d0aa863f dovecot: allow chroot'ing the auth processes
9afeb225 dovecot: let dovecot/anvil rw the auth-penalty socket
17db8f38 dovecot: auth processes need to read from postfix auth socket
6a7c49b1 dovecot: add abstractions/ssl_certs to lmtp
2019-02-17 21:04:38 +00:00
Steve Beattie
f75ec6fef6 usr merge fixups
Debian and Ubuntu have releases coming out with usr-merge in place. For
these systems, /bin and /sbin are symlinks to their respective /usr
directories. This breaks a few tests in the python utils and in the
regression tests. This patch series fixes them, mostly by performing
realpath() calls when necessary. For the ptrace regression test,
it copies the called /bin/true binary into the created temporary
directory and executes it from there. (Good for other reasons, too.)

(cherry picked from commit b4ab8476e4)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/merge_requests/331
2019-02-13 09:22:58 -08:00
Christian Boltz
6fd3abe214 Merge branch 'update-vulkan' into 'master'
vulkan: allow reading /etc/vulkan/icd.d/

See merge request apparmor/apparmor!329

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit f2c0a11327)

e322c02c vulkan: allow reading /etc/vulkan/icd.d/
2019-02-10 13:41:06 +00:00
Christian Boltz
6779402786 Merge branch 'backport-kde-213' into 'apparmor-2.13'
Backport kde abstraction to 2.13

See merge request apparmor/apparmor!327

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12 and 2.13
2019-02-09 17:27:47 +00:00
Vincas Dargis
dc3b73daf9 kde: fix global settings access for Kubuntu and openSUSE
On Kubuntu, these denies are being produced:
```
type=AVC msg=audit(1549301888.419:91): apparmor="DENIED" operation="open"
profile="qtox"
name="/usr/share/kubuntu-default-settings/kf5-settings/kdeglobals" pid=1603
comm="qtox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

type=AVC msg=audit(1549301964.008:126): apparmor="DENIED" operation="open"
profile="qtox" name="/usr/share/kubuntu-default-settings/kf5-settings/breezerc"
pid=1822 comm="qtox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

type=AVC msg=audit(1549302031.194:155): apparmor="DENIED" operation="open"
profile="qtox"
name="/usr/share/kubuntu-default-settings/kf5-settings/baloofilerc" pid=1899
comm="qtox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
```

Meanwhile, on openSUSE:
```
type=AVC msg=audit(1549302286.921:205): apparmor="DENIED" operation="open" profile="qtox" name="/etc/xdg/kdeglobals" pid=12781 comm="qtox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
```

Add read only rules for allowing access to global KDE settings.
2019-02-09 16:17:35 +02:00
Vincas Dargis
aae838faca Update kde abstraction for common settings
Add rules to allow reading common KDE-specific settings, used mostly by
native KDE file dialog.
2019-02-09 16:16:54 +02:00
intrigeri
f5867f1dac audio abstraction: grant read access to the libao configuration files.
Bug-Debian: https://bugs.debian.org/920670

Relevant documentation: https://xiph.org/ao/doc/config.html

(cherry picked from commit 16c4713363)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-01-31 03:31:43 -08:00
intrigeri
6dc7aca07e audio abstraction: grant read access to the system-wide asound.conf.
Bug-Debian: https://bugs.debian.org/920669

Relevant documentation: http://www.alsa-project.org/main/index.php/Asoundrc

We already grant read access to the corresponding per-user configuration file
(~/.asoundrc) so it makes sense to also grant access to the system-wide one.

(cherry picked from commit 2d72795f65)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-01-31 03:31:11 -08:00
intrigeri
e3230fb5ea Merge branch 'move-drircd' into 'master'
Move drirc.d access to dri-common abstraction

See merge request apparmor/apparmor!314

(cherry picked from commit a5e74c3be3)

2d8d2f06 Move drirc.d access to dri-common abstraction
2019-01-27 16:46:42 +00:00
Marius Tomaschewski
1bc2dfc014 abstractions/nameservice: allow /run/netconfig/resolv.conf
Latest netconfig in openSUSE writes /run/netconfig/resolv.conf, and only
has a symlink to it in /etc

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1097370
Acked-by: Christian Boltz <apparmor@cboltz.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit b0bacba9db)
2019-01-24 02:45:04 -08:00
Christian Boltz
16832e3f1b drop failing corner-case check in logparser.py
aa-logprof errors out if it hits a log event for a non-existing profile
while a profile file with the default filename for that non-existing
profile exists. This can for example happen after adding a profile name
to a profile if audit.log still contains events for the attachment-based
profile name.

Since we ignore log events for non-existing profiles in general, drop
the code for the special case "but a file matching the default filename
for that non-existing profile exists" and also silently ignore events
for this very special non-existing profile.

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1120472
(cherry picked from commit 03ea5b82b7)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-01-24 02:28:19 -08:00
Christian Boltz
a2051bc976 update mysqld profile
This updates the mysqld to what I use on my servers nowadays.

Note: my profile also has capability sys_resource,, but I'm not sure
why I had to add this and therefore didn't include it in this merge
request.

Speaking about "why I had added $whatever" - these changes were
collected over the last years and of course ;-) I don't remember any
details.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/310
(cherry picked from commit 0199edf8e7)
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-01-23 20:28:13 -08:00
John Johansen
1cc8c72aee Merge branch 'cherry-pick-7bd3029f' into 'apparmor-2.13'
[2.10..2.13] Backport updated font paths

Update fonts for Debian and openSUSE

- Allow to read conf-avail dir itself.
- Add various openSUSE-specific font config directories.

See merge request !96 (merged) for details.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/309

(cherry picked from commit 7bd3029f)
2019-01-24 03:57:43 +00:00
Jamie Strandboge
bae9410ea6 Merge branch 'update-fonts' into 'master'
Update fonts for Debian and openSUSE

See merge request apparmor/apparmor!96

(cherry picked from commit 7bd3029f25)

b902d250 Update fonts for Debian and openSUSE
2019-01-22 22:58:49 +00:00
Christian Boltz
0016e024a3 Merge branch 'cboltz-dnsmasq-libvirtd' into 'master'
dnsmasq: allow peer=libvirtd to support named profile

See merge request apparmor/apparmor!304

Acked-by: Eric Chiang <ericchiang@google.com> for 2.12..master

(cherry picked from commit 5d384d9625)

20fe099c dnsmasq: allow peer=libvirtd to support named profile
2019-01-22 22:24:14 +00:00
Christian Boltz
86974e6cd4 Merge branch 'update-mesa' into 'master'
mesa: allow reading drirc.d

See merge request apparmor/apparmor!308

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit 91dc2c4c29)

b5be5964 mesa: allow reading drirc.d
2019-01-19 17:37:18 +00:00
Christian Boltz
f483d10bb4 Merge branch 'fix-compose-cache' into 'master'
qt5-compose-cache-write: fix anonymous shared memory access

See merge request apparmor/apparmor!301

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master

(cherry picked from commit 027dcdb23f)

12504024 qt5-compose-cache-write: fix anonymous shared memory access
2019-01-14 20:51:20 +00:00
Christian Boltz
f2b1ee5f6e Merge branch 'fix-qt5-settings' into 'master'
qt5-settings-write: fix anonymous shared memory access

See merge request apparmor/apparmor!302

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master

(cherry picked from commit 3e3c90152f)

f1200873 qt5-settings-write: fix anonymous shared memory access
8f6a8fb1 Refactor qt5-settings-write
2019-01-14 20:48:33 +00:00
Christian Boltz
9dbb1bc1f5 Merge branch 'fix-alsa' into 'master'
audio: Fix alsa settings access

See merge request apparmor/apparmor!303

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit 808218d8ee)

73f01196 audio: Fix alsa settings access
2019-01-13 16:11:54 +00:00
intrigeri
29f1260230 Make tunables/share play well with aliases.
This reverts commit aa3022208f.

Space-separated list of values don't play well with aliases.
For example, in Tails, despite this alias rule:

  alias / -> /lib/live/mount/rootfs/*.squashfs/,

… the Tor Browser profile denies access to
/lib/live/mount/rootfs/filesystem.squashfs/usr/share/mime/mime.cache, which
should be equivalent to /usr/share/mime/mime.cache. That's fixed by using
alternations instead; too bad they're less readable.

Possibly related:
https://bugs.launchpad.net/apparmor/+bug/888077
https://bugs.launchpad.net/apparmor/+bug/1703692
https://bugs.launchpad.net/apparmor/+bug/1703692

Cherry-picked from master branch: a91d199ab1.
2019-01-09 17:53:54 +00:00
intrigeri
31cc3f7159 Merge branch 'drg-mods-2' into 'master'
New abstraction: lsb_release (sub-profile).

See merge request apparmor/apparmor!154

(cherry picked from commit 47e38944f3)

f7351405 New profile: lsb_release (no attachment path)
99e45b59 lsb_release: added permissions needed by openSUSE implementation.
2019-01-06 14:02:08 +00:00
Christian Boltz
98a2a107d3 Merge branch 'EmersonBernier/shellcheck' into 'master'
parser/apparmor.systemd: fix minor issues detected by shellcheck

See merge request apparmor/apparmor!293

Acked-by: Christian Boltz <apparmor@cboltz.de> for master and 2.13

(cherry picked from commit a772ee0f8b)

b3937d19 parser/apparmor.systemd: fix minor issues detected by shellcheck
2019-01-03 17:42:06 +00:00
Christian Boltz
7a91411704 Merge branch 'var-lib-dehydrated' into 'master'
abstractions/ssl_{certs,keys}: dehydrated uses /var/lib on Debian

See merge request apparmor/apparmor!299

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master

(cherry picked from commit 1f53de174d)

1306f9a6 abstractions/ssl_{certs,keys}: dehydrated uses /var/lib on Debian
c5a89d5d abstractions/ssl_{certs,keys}: sort the alternation for dehydrated and drop...
04b2842e abstractions/ssl_{certs,keys}: allow reading ocsp.der maintained by dehydrated for OCSP stapling
2019-01-03 17:33:03 +00:00
John Johansen
af4808b5f6 Release: Bump revisions in preparation for 2.13.2 release
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-12-21 03:16:02 -08:00
John Johansen
f811fa9951 Merge branch 'cboltz-2.13-dnsmasq-name' into 'apparmor-2.13'
[2.12+2.13] revert naming the dnsmasq profile

Changing to "profile dnsmasq /..." broke the peer=/usr/sbin/dnsmasq in the libvirtd profile. Revert adding the name to avoid breaking the libvirtd profile in stable branches.

See also https://bugzilla.opensuse.org/show_bug.cgi?id=1118952 which is a request to update the libvirtd profile to allow both peer=dnsmasq and peer=/usr/sbin/dnsmasq

I propose this revert for 2.12 and 2.13 (older branches didn't get the named profile)

PR: https://gitlab.com/apparmor/apparmor/merge_requests/290

Acked-by: John Johansen <john.johansen@canonical.com>
2018-12-16 05:19:20 +00:00
Christian Boltz
a68e6426f4 revert naming the dnsmasq profile
Changing to "profile dnsmasq /..." broke the peer=/usr/sbin/dnsmasq in
the libvirtd profile. Revert adding the name to avoid breaking the
libvirtd profile in stable branches.

See also https://bugzilla.opensuse.org/show_bug.cgi?id=1118952
which is a request to update the libvirtd profile to allow both
peer=dnsmasq and peer=/usr/sbin/dnsmasq
2018-12-11 19:16:58 +01:00
Christian Boltz
7356f51425 dovecot: allow reading /proc/sys/fs/suid_dumpable
This is needed if a dovecot child process segfaults - in this case,
dovecot provides a helpful error message like

dovecot[6179]: auth-worker: Fatal: master: service(auth-worker): child 8103 killed with signal 11 (core not dumped - https://dovecot.org/bugreport.html#coredumps - set /proc/sys/fs/suid_dumpable to 2)

which involves reading the current value in suid_dumpable.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/286
(cherry picked from commit 2202a8a267)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-12-08 00:32:56 -08:00
Christian Boltz
ef21e9ded7 Ignore *.orig and *.rej files when loading profiles
or: get rc.apparmor.functions in sync with the tools and libapparmor.

This was "accidently" reported by Ralph on the opensuse-support
mailinglist.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/282
(cherry picked from commit 228b92ce5a)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-12-08 00:17:29 -08:00
Jamie Strandboge
1a0016ff17 deny ~/.mutt** in private-files and audit deny ~/.aws in private-files-strict
PR: https://gitlab.com/apparmor/apparmor/merge_requests/276
Signed-Off-By: Jamie Strandboge <jamie@canonical.com>
(cherry picked from commit 170e8d6ac8)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-12-07 23:00:14 -08:00
John Johansen
3607865b18 Merge branch 'cboltz-profile-list-2.13' into 'apparmor-2.13'
[2.12+2.13] Replace "existing_profiles" & fix minitools for named profiles

(This is the 2.13 version of !249 (merged) which had a few merge conflicts in the 2.13 branch, and needs a little change (last commit) on top)

This patchset introduces the ProfileList class which replaces "existing_profiles" in aa.py and fixes some bugs in aa-complain and the other minitools:

* aa-complain etc. never found profiles that have a profile name (the attachment wasn't checked)

* even if the profile name was given as parameter to aa-complain, it first did "which $parameter" so it never matched on named profiles

* profile names with alternations (without attachment specification) also never matched because the old code didn't use AARE.


References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882047#92 (search for "As usual" ;-)

See the individual commit messages for details.

All changes survived my tests (both manually and unittests), but as always when doing bigger changes to aa.py, more manual testing is always welcome ;-)

I propose this patch for 2.12 and 2.13.

Acked-by: John Johansen <john.johansen@canonical.com>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/268
2018-12-08 06:36:34 +00:00
Petr Vorel
597e17eb67 dnsmasq: Add pid file used by NetworkManager
PR: https://gitlab.com/apparmor/apparmor/merge_requests/288
Signed-off-by: Petr Vorel <pvorel@suse.cz>
(cherry picked from commit 49848b9081)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-12-07 22:27:06 -08:00
Petr Vorel
7dce58987f dnsmasq: Adjust pattern for log files to comply SELinux
i.e. move '*' from beginning to before suffix.

Commit 025c7dc6 ("dnsmasq: Add permission to open log files") added
pattern, which is not compatible with SELinux. As this pattern has been
in SELinux since 2011 (with recent change to accept '.log' suffix +
logrotate patterns which are not relevant to AppArmor) IMHO it's better
to adjust our profile.

Fixes: 025c7dc6 ("dnsmasq: Add permission to open log files")
PR: PR: https://gitlab.com/apparmor/apparmor/merge_requests/288
Signed-off-by: Petr Vorel <pvorel@suse.cz>
(cherry picked from commit 3ef8df6ac0)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-12-07 22:26:21 -08:00
Christian Boltz
c044757de9 Merge branch 'certbot' into 'master'
Add /etc/letsencrypt/archive to ssl_key abstraction

See merge request apparmor/apparmor!283

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master

(cherry picked from commit 0a666b8e48)

cb468786 Add /etc/letsencrypt stuff to ssl_keys/ssl_certs abstraction
2018-11-30 15:44:22 +00:00
Vincas Dargis
6249579842 Merge branch 'backport-vulkan' into 'apparmor-2.13'
Backport: Add vulkan abstraction

See merge request apparmor/apparmor!266

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..2.13
2018-11-22 17:35:59 +00:00
Christian Boltz
37edb354ff Fix viewing a local inactive profile in aa-genprof
aa-genprof checks if one of the profiles in the extra profile dir
matches the binary, and proposes to use that profile as a starting
point.

Since 4d722f1839 the "(V)iew profile"
option to display the proposed profile was broken.

The easiest fix is to remember the filename in the extras directory, and
display the file from there.

Sidenote: when choosing to use the extra profile, it gets written to
disk without any problems, so this bug really only affected "(V)iew
profile" to preview the proposed extra profile.

(cherry picked from commit 8b4e76a7d5)
2018-11-18 21:41:48 +01:00
Christian Boltz
b8dc8d1394 parse_profile_data(): Ensure last line in a profile is valid
'lastline' gets merged into 'line' (and reset to None) when reading the
next line. If 'lastline' isn't empty after reading the whole profile,
this means there's something unparseable at the end of the profile,
therefore parse_profile_data() should error out.

Also remove some simple_tests testcases from the 'exception_not_raised'
list - they only didn't raise the exception because the invalid rule was
the last line in the affected profile.

Thanks to Eric Chiang for accidently (and maybe even unnoticedly ;-)
discovering this bug while adding some xattr testcases that surprisingly
didn't fail in the tools.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/271
(cherry picked from commit 4efff35bf8)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-11-13 16:02:23 -08:00
intrigeri
1f2eb0bbbf Merge branch 'use-sys-213' into 'apparmor-2.13'
Backport to 2.13: Use @{sys} tunable in profiles and abstractions

See merge request apparmor/apparmor!265
2018-11-11 18:53:22 +00:00
Christian Boltz
2296c30af5 serialize_profile(): Fix handling of options
In the 2.13 branch (and older), 'options' is not always a dict, but can
also be None or an empty string.

Adjust the if condition in serialize_profile() so that "View changes
between clean profiles" doesn't error out.
2018-11-11 18:49:42 +01:00
Christian Boltz
aa328cb058 Replace existing_profiles & fix minitools for named profiles
Technical stuff first:

Replace existing_profiles (a dict with the filenames for both active and
inactive profiles) with active_profiles and extra_profiles which are
ProfileList()s and store the active profiles and those in the extra
directory separately. Thanks to ProfileList, now also the relation
between attachments and filenames is easily available.

Also replace all usage of existing_profiles with active_profiles and
extra_profiles, and adjust it to the ProfileList syntax everywhere.

With this change, several bugs in aa-complain and the other minitools
get fixed:
- aa-complain etc. never found profiles that have a profile name
  (the attachment wasn't checked)
- even if the profile name was given as parameter to aa-complain, it
  first did "which $parameter" so it never matched on named profiles
- profile names with alternations (without attachment specification)
  also never matched because the old code didn't use AARE.

References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882047#92
(search for "As usual" ;-)

Just for completeness - the matching still doesn't honor/expand
variables in the profile name.

(cherry picked from commit 4d722f1839)
2018-11-11 18:33:56 +01:00
Christian Boltz
1d183660d5 add ProfileList class to store list of profiles
ProfileList is meant to store the list of profiles (both name and
attachment) and in which files they live.

Also add unittests to make sure everything works as expected.

(cherry picked from commit 789c4658e2)
2018-11-11 18:33:56 +01:00
Christian Boltz
7b07832459 Move updating existing_profiles out of parse_profile_data()
parse_profile_data() returns the parsed profiles, but writes to
existing_profiles directly.

read_profiles() calls parse_profile_data() and already handles adding
the parsed profiles to aa, original_aa or extras, which means updating
existing_profiles there is a much better place.

This commit also includes a hidden change: Previously, when parsing
include files, they were also added to existing_profiles. This is
superfluous, only real profiles need to be stored there.

(cherry picked from commit 8809218ac8)
2018-11-11 18:33:56 +01:00
Christian Boltz
b6c96f3933 split off get_new_profile_filename()
... and call it from get_profile_filename_* if get_new is True
(= always with the current code)

(cherry picked from commit a6b8d14908)
2018-11-11 18:33:56 +01:00
Christian Boltz
ad236a59b8 split get_profile_filename into .._from_profile_name and .._from_attachment
Split get_profile_filename() into
- get_profile_filename_from_profile_name() (parameter: a profile name)
- get_profile_filename_from_attachment() (parameter: an attachment)

Currently both functions call get_profile_filename_orig() (formerly
get_profile_filename()) so the behaviour doesn't change yet.

The most important part of this commit is changing all
get_profile_filename() calls to use one of the new functions to make
clear if they specify a profile or an attachment/executable as
parameter.

As promised, the is_attachment parameter starts to get used in this
patch ;-)

Note: The get_new parameter (which I'll explain in the patch actually
using it) is set to True in all calls to the new functions.
The long term plan is to get rid of it in most cases (hence defaulting
to False), but that will need more testing.

(cherry picked from commit ec741424f8)
2018-11-11 18:33:55 +01:00
Christian Boltz
f8b95d036d Add is_attachment parameter to write_profile
The minitools call write_profile(), write_profile_feedback_ui() and
serialize_profile() with the _attachment_ as parameter.

However, aa-logprof etc. call them with the _profile name_ as parameter.

This patch adds an is_attachment parameter to write_profile() and
write_profile_feedback_ui(). It also passes it through to
serialize_profile() via the options parameter.

If is_attachment is True, the parameter will be handled as attachment,
otherwise it is expected to be a profile name.

tools.py gets changed to set is_attachment to True when calling the
functions listed above to make clear that the parameter is an attachment.

Note: This patch only adds the is_attachment parameter/option, but
doesn't change any behaviour. That will happen in the next patch.

(cherry picked from commit bc783372b8)
2018-11-11 18:33:53 +01:00
Christian Boltz
f4d7f8ae57 Merge branch 'cboltz-view-changes-2.13' into 'apparmor-2.13'
[2.12+2.13] use serialize_profile() for the new profile in (V)iew Changes

See merge request apparmor/apparmor!267

Acked-by: John Johansen <john.johansen@canonical.com> for 2.12 and 2.13
2018-11-11 17:28:17 +00:00
Christian Boltz
1b32d764ef delete serialize_profile_from_old_profile()
... which is unused since the last commit.

Note: unlike 0eb12a8cbd, this commit does
_not_ delete several write_* function that were only used by this
function. Verifying that these functions are really unused is not worth
the effort in the 2.13 branch.

(cherry picked from commit 0eb12a8cbd -
but only apply partially)
2018-11-11 15:20:14 +01:00
Christian Boltz
dd4c2b05ea use serialize_profile() for the new profile in (V)iew Changes
... instead of serialize_profile_from_old_profile()

This will give a realistic preview of the changes (serialize_profile()
is also used when actually writing the profile) and replaces the
known-buggy serialize_profile_from_old_profile() with known-working
code.

It also fixes the issue reported in
    https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1528139
which means we no longer need the workaround of catching AttributeError
(verified in manual before/after test)

References:
- https://bugs.launchpad.net/apparmor/+bug/1394788
- https://bugs.launchpad.net/bugs/1528139
- https://bugs.launchpad.net/apparmor/+bug/1404893

(cherry picked from commit 469eb444de)
2018-11-11 15:14:24 +01:00
Vincas Dargis
314617014a Add vulkan abstraction
Add abstraction for Vulkan API specific file paths.
2018-11-11 10:49:41 +02:00
Vincas Dargis
41ff006f3d Use @{sys} tunable in profiles and abstractions
Commit aa06528790 made @{sys} tunable
available by default.

Update profiles and abstractions to actually use @{sys} tunable for
better confinement in the future (when @{sys} becomes kernel var).

Closes LP#1728551
2018-11-11 10:18:31 +02:00
Christian Boltz
7fc843d8d0 Merge branch 'cboltz-strict-todo-check' into 'master'
error out on superfluous TODOs

See merge request apparmor/apparmor!197

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

(cherry picked from commit 39a2031487)

4b26850e error out on superfluous TODOs
2018-11-06 21:14:51 +00:00
Christian Boltz
fc18647fba Merge branch 'cboltz-disable-some-abi-tests' into 'master'
disable abi/ok_10 and abi/ok_12 tests

See merge request apparmor/apparmor!259

(cherry picked from commit 608af94dff)

a3305b51 disable abi/ok_10 and abi/ok_12 tests
2018-11-06 20:43:16 +00:00
Christian Boltz
064521c236 Merge branch 'cboltz-fixed-todos' into 'master'
Remove TODO notes from no-longer-failing tests

See merge request apparmor/apparmor!180

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

(cherry picked from commit c98d8570ee)

d15bdaba Remove TODO notes from no-longer-failing tests
2018-11-06 17:50:13 +00:00
intrigeri
566ad1fefa apparmor(7): Document various debugging options.
Credits go to John Johansen <john@jjmx.net> for most of the information
and the initial phrasing.

Bug-Debian: https://bugs.debian.org/826218

Cherry-picked from commit b95f9bdd3b
2018-11-04 12:03:41 +00:00
Christian Boltz
8def66134d Merge branch 'cboltz-postalias' into 'master'
allow locking /etc/aliases.db

See merge request apparmor/apparmor!250

Acked-by: intrigeri <intrigeri@debian.org>

(cherry picked from commit 473d1f5daa)

f74edd5d allow locking /etc/aliases.db
2018-10-26 14:39:42 +00:00
John Johansen
8661ebcb79 parser: fix failures due to -M only setting compile-features
Split the features file into compile features and kernel features
which is needed for policy versioning and the new caching scheme.

A new flag --kernel-features was added to set the kernel features but
unfortunately -M, --features-file was setup to only specify the
compile features, when it used to effectively specify both the
compile and kernel features.

This broke existing uses of -M.

Fix this by having -M specify both the compile and kernel features,
and a new flag --compile-features that can be used to specify the
compile fature set separate from the kernel feature set.

sbeattie> fixed up error message to refer to compile features when
--compile-features argument fails.

Backport-requested-by: intrigeri <intrigeri@debian.org>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/104
(cherry picked from commit e83fa67edf)
Fixes: 9e48a5da5e ("parser: split kernel features from compile features.")
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2018-10-21 19:13:35 -07:00
John Johansen
3ee32c7ed7 Merge branch 'cboltz-2.13-gitignore' into 'apparmor-2.13'
[2.12+2.13] backport some .gitignore additions

I propose this patch for 2.12 and 2.13, which will bring the .gitignore in sync with master.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/241
Acked-by: John Johansen <john.johansen@canonical.com>
2018-10-22 00:29:43 +00:00
Christian Boltz
9687b44842 Merge branch 'cboltz-profile-names' into 'master'
Add profile names to all profiles with {bin,sbin} attachment

See merge request apparmor/apparmor!242

Acked-by: intrigeri <intrigeri@debian.org>

(cherry picked from commit fd68a5eb64)

b77116e6 Add profile names to all profiles with {bin,sbin} attachment
2018-10-21 10:35:13 +00:00
intrigeri
fac1e427f1 Don't hard code the location of netinet/in.h.
This "will break with non-glibc libcs on Debian and with glibc headers moved to
multiarch locations" (https://bugs.debian.org/798955). Patch based on the one
proposed by Helmut Grohne <helmut@subdivi.de>, amended to replace hard coded
"gcc" with "$(CC)".

PR: https://gitlab.com/apparmor/apparmor/merge_requests/245
Bug-Debian: https://bugs.debian.org/909966
(cherry picked from commit 2d91211842)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-20 23:32:56 -07:00
Christian Boltz
37d176e72f Fix syntax error in rc.apparmor.functions
This bug was introduced in
- https://gitlab.com/apparmor/apparmor/merge_requests/230
- commit c974dd0d07 (master)
- commit 9987a7ec9c (2.13 branch)
2018-10-20 16:00:56 +00:00
Christian Boltz
6f70502ad1 Merge branch 'test-includes' into 'master'
profiles/Makefile: test abstractions against apparmor_parser

See merge request apparmor/apparmor!237

Acked-by: Christian Boltz <apparmor@cboltz.de> for trunk and 2.13.

Pre-acked for 2.10..2.12 after removing the --config-file option which is not supported in these branches.

(cherry picked from commit 2863e20f37)

dc7ae28d profiles/Makefile: test abstractions against apparmor_parser
2018-10-17 22:21:03 +00:00
Christian Boltz
37e64d99d1 Merge branch 'aa-notify-manpage' into 'master'
aa-notify man page: update user's configuration file path

See merge request apparmor/apparmor!239

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master

(cherry picked from commit f920915dd3)

2209e09a aa-notify man page: update user's configuration file path
2018-10-16 15:55:58 +00:00
Christian Boltz
e17d974330 add utils/test/common_test.pyc to gitignore
(cache file that gets created when running the tests with python2)

(cherry picked from commit 63d17ecf16)
2018-10-14 20:35:57 +02:00
Christian Boltz
1f884d7612 add libapparmor/src/PMurHash.{o,lo} to gitignore
(cherry picked from commit db92d96e68)
2018-10-14 20:35:28 +02:00
John Johansen
2e922a9a9b Release: Bump revisions in preparation for 2.13.1 release
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-13 16:38:06 -07:00
Christian Boltz
6937123153 Add most abi/bad_*.sd tests to "exception not raised" list
Interestingly, abi/bad_6.sd is detected as invalid, and therefore not
added to the list.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/238
(cherry picked from commit 5c54f66279)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-13 14:33:50 -07:00
John Johansen
5df25d9077 parser: ignore feature abi rules
AppArmor 3.0 requires policy to use a feature abi rule for access to
new features. However some policy may start using abi rules even if
they don't have rules that require new features.  This is especially
true for out of tree policy being shipped in other packages.

Add enough support to older releases that the parser will ignore the
abi rule and warn that it is falling back to the apparmor 2.x
technique of using the system abi.

If the profile contains rules that the older parser does not
understand it will fail policy compilation at the unknown rule instead
of the abi rule.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/196
(backported form commit 83df7c4747)
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2018-10-12 22:22:29 -07:00
John Johansen
095c9013a5 Merge branch 'cboltz-nmbd-systemd' into 'master'
References: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1719354
(comment 8)

PR: https://gitlab.com/apparmor/apparmor/merge_requests/236
Acked-by: John Johansen <john.johansen@canonical.com>


(cherry picked from commit 924d4e87ad)

d4afbccb nmbd profile: allow writing to /run/systemd/notify
2018-10-12 23:17:18 +00:00
John Johansen
99f19fdc0f parser: do not output cache warning for stdin if not using cache
Currently if stdin is used the warning
  apparmor_parser: cannot use or update cache, disable, or force-complain via stdin

is always displayed but if caching has been disabled there is no need for
this message.

(cherry picked from commit c421a29c61)
PR: https://gitlab.com/apparmor/apparmor/merge_requests/233
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2018-10-11 22:12:41 -07:00
Christian Boltz
c1dc77347c Merge branch 'cboltz-mergeprof-hasher-fun' into 'master'
Fix aa-mergeprof crash caused by accidentially initialzed hat

See merge request apparmor/apparmor!234

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

(cherry picked from commit 93445ca02d)

bc492533 Fix aa-mergeprof crash caused by accidentially initialzed hat
2018-10-11 19:49:36 +00:00
Christian Boltz
514cabda19 .gitignore profiles/apparmor.d/local/* except README
The old patter *.* doesn't match lsb_release and nvidia_modprobe, and
the only file we ship in local is a README. This patch adjusts the
pattern to ignore everything except README.

(cherry picked from commit aeee9a1aab)
PR: https://gitlab.com/apparmor/apparmor/merge_requests/227
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-11 10:24:32 -07:00
Cameron Nemo
9987a7ec9c rc.apparmor.functions: skip XBPS conffile artifacts
PR: https://gitlab.com/apparmor/apparmor/merge_requests/230
(cherry picked from commit 918e19238a)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-09 17:31:06 -07:00
Christian Boltz
149800201c add new location for ssl-params file
(probably Ubuntu-only? The ssl-params file doesn't exist on my openSUSE
installation)

References: https://bugs.launchpad.net/apparmor-profiles/+bug/1796966
(cherry picked from commit 16a98d26d0)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-09 16:54:33 -07:00
John Johansen
ddfb5722c0 libapparmor: Finish removing LD_RUN_PATH from Makefile.perl
commit 94dfe15b28 attempted to remove
LD_RUN_PATH unfortunately

   But all it actually does is cause the Makefile.perl to embed the rpath
    "" instead. Which is still an rpath, only I guess an even worse one.

    --
    Eli Schwartz
    Arch Linux Bug Wrangler and Trusted User

This is because it cleared the setting of the variable LD_RUN_PATH
which was expanded in the command

$(INST_DYNAMIC) : $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVEDEP) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
	$(RM_F) $@
	 LD_RUN_PATH="$(LD_RUN_PATH)" $(LD)  $(LDDLFLAGS) $(LDFROM) $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) \
	  $(PERL_ARCHIVE) $(LDLOADLIBS) $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST) \
	  $(INST_DYNAMIC_FIX)
	$(CHMOD) $(PERM_RWX) $@

resulting in LD_RUN_PATH="" being passed to the command.

Finish removing LD_RUN_PATH from Makefile.perl by removing it from
the command invocation if it is present.

Note: we use \x24 instead of $ in the regex as there seems to be a bug
and no level of escaping $ would allow it to be used.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/207
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
(cherry picked from commit 958cc28876)
2018-10-09 16:44:11 -07:00
Christian Boltz
7b03af8210 Merge branch 'sys-by-default' into 'master'
Make @{sys} available by default

See merge request apparmor/apparmor!228

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master

(cherry picked from commit 772a8702e0)

aa065287 Make @{sys} available by default
2018-10-09 22:30:23 +00:00
Petr Vorel
f37e9b4e7f dnsmasq: Add permission to open log files
--log-facility option needs to have permission to open files.
Use '*' to allow using more files (for using more dnsmasq instances).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Jamie Strandboge <jamie@canonical.com>
(cherry picked from commit 025c7dc6a1)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2018-10-09 09:04:11 -07:00
Christian Boltz
f64e0e79f8 Merge branch 'fix-bison' into 'master'
parser: fix Makefile hardcoded paths to flex and bison

Closes #4

See merge request apparmor/apparmor!224

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master

(cherry picked from commit 34cf085036)

17e059a2 parser: fix Makefile hardcoded paths to flex and bison
2018-10-05 19:03:45 +00:00
Vincas Dargis
bed6986bef Use nvidia_modprobe named profile inside opencl-nvidia abstraction
Commit 8f9bd5b0e3 rightfully removed PUx
transition into nvidia-modprobe executable due to security concerns. To
overcome this, commit 327420b151 added
named nvidia_modprobe profile, which allows to use this abstraction
without requiring additional rules to make OpenCL work with NVIDIA
drivers.

Add rule to allow Px transition into nvidia_modprobe profile for
nvidia-modprobe executable.

https://gitlab.com/apparmor/apparmor/merge_requests/219
(cherry picked from commit e4b1cadf63)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-04 23:54:50 -07:00
Vincas Dargis
a70c80a80f Add nvidia_modprobe named profile
nvidia-modprobe is setuid executable is used to create various device
files and load the the NVIDIA kernel module
(https://github.com/NVIDIA/nvidia-modprobe).

Add named profile to be used in application profiles for confining
potentially risky setuid application.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/213
(cherry picked from commit 327420b151)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-04 23:54:50 -07:00
nl6720
17d3831d2d aa-notify: Read user's configuration file from XDG_CONFIG_HOME
Legacy path ~/.apparmor/notify.conf is preferred if it exists, otherwise
$XDG_CONFIG_HOME/apparmor/notify.conf, with fallback to
~/.config/apparmor/notify.conf, is used.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/215
Signed-off-by: nl6720 <nl6720@gmail.com>
(cherry picked from commit 1fb9acc59e)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-04 23:37:39 -07:00
Christian Boltz
6ab732ed38 Merge branch 'profile-usr.sbin.smbd' into 'master'
Add missing paths to usr.sbin.nmbd, usr.sbin.smbd and abstractions/samba

See merge request apparmor/apparmor!210

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master

(cherry picked from commit f76a718f28)

80e98f2d Update usr.sbin.nmbd & usr.sbin.smbd
2018-10-04 20:34:19 +00:00
John Johansen
ab91f7bfa3 Merge branch 'cboltz-abi-2.13' into 'apparmor-2.13'
2.13: Add basic support for abi rules to the tools

Add basic "understand and keep" support for abi rules, where
"understand" means to not error out when seeing an abi rule, and "keep"
simply means to keep the original abi rule when serializing a profile.

On the long term, abi rules should be parsed (similar to include rules),
but for now, this patch is the smallest possible changeset and easy to
backport.

Note that the only added test is via cleanprof_test.* which is used by
minitools_test.py - and does not run if you do a 'make check'.
Oh, and of course the simple_tests/abi/ files also get parsed by
test-parser-simple-tests.py.

BTW: Even serialize_profile_from_old_profile() can handle abi rules :-)

This is a backport of 072d3e04 / !202 (merged) to
2.13 (with some adjustments because that commit didn't appy cleanly)

I propose this patch for 2.10..2.13

PR: https://gitlab.com/apparmor/apparmor/merge_requests/216
Acked-by: John Johansen <john.johansen@canonical.com>
2018-10-03 15:02:27 +00:00
Christian Boltz
420aea6262 Add basic support for abi rules to the tools
Add basic "understand and keep" support for abi rules, where
"understand" means to not error out when seeing an abi rule, and "keep"
simply means to keep the original abi rule when serializing a profile.

On the long term, abi rules should be parsed (similar to include rules),
but for now, this patch is the smallest possible changeset and easy to
backport.

Note that the only added test is via cleanprof_test.* which is used by
minitools_test.py - and does _not_ run if you do a 'make check'.
Oh, and of course the simple_tests/abi/ files also get parsed by
test-parser-simple-tests.py.

BTW: Even serialize_profile_from_old_profile() can handle abi rules :-)

This is a backport of 072d3e0451 / !202 to
2.13 (with some adjustments because that commit didn't appy cleanly)
2018-10-03 16:32:45 +02:00
Vincas Dargis
b672900629 Add qt5-compose-cache-write abstraction
Qt GUI applications that uses "platforminputcontexts"-class of plugins
might need reading and/or writing compose cache. Add read-only rule in
qt5 abstraction and create new writing dedicated for compose cache
writing.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/159
(cherry picked from commit 67816c42cf)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-02 23:04:35 -07:00
Vincas Dargis
77ebda113e 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.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/159
(cherry picked from commit 69c4cabb93)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-02 23:03:53 -07:00
Vincas Dargis
f18c39514c Add qt5 abstraction
Create abtractions/qt5 with common rules needed for Qt5-based
applications.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/99
(cherry picked from commit 6a85ffe00e)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-02 22:59:02 -07:00
John Johansen
67c1eaff9d library: fix dirat_for_each2() fd handling
The function was messing up its use of fds, it could get away with
it because the cb_dirfd passed to fdopendir was still valid until
closedir was called but if code was moved around, or fdopendir
code changed behavior it could easily break.

Also the check for dup failing was wrong fix it.

Reference: coverity #187003

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Time-out
(cherry picked from commit 63cb46d20a)
2018-10-01 09:17:34 -07:00
Vincas Dargis
ca23b1af45 Include qt5 into kde abstraction
Currently, kde abstraction has rules relevant to Qt 3 and Qt 4
libraries, but are missing rules against latest Qt 5.

Include read-only Qt 5 abstraction to fix styling and similar issues for
software running on KDE 5 desktop.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/209
Fixes https://bugs.launchpad.net/apparmor/+bug/1787201
(cherry picked from commit bd33cdd19a)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-01 08:50:35 -07:00
Vincas Dargis
1742647862 Add uid and uids kernel var placeholders
Add @{uid} and @{uids} variables to allow migrating profiles in advance
while awaiting path mediation implementation, based on current user id,
in kernel side.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/208
(cherry picked from commit cba10db7e7)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-10-01 08:49:17 -07:00
John Johansen
b50888a6de Merge branch 'harden-abstractions-part-ii' into 'master'
Harden abstractions part ii

- abstractions/private-files: disallow access to the dirs of private files
- private-files{,-strict}: disallow writes to parent dirs too
- user-files: disallow writes to parents dirs

PR: https://gitlab.com/apparmor/apparmor/merge_requests/206
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-27 13:45:55 -07:00
Jamie Strandboge
f2a40bb530 similar change for user-files 2018-09-27 13:45:04 -07:00
Jamie Strandboge
803fef6cd9 private-files{,-strict}: disallow writes to parent dirs too 2018-09-27 13:45:04 -07:00
Emerson Bernier
732ed66f0a abstractions/private-files: disallow access to the dirs of private files
Reference:
https://launchpad.net/bugs/1794820
2018-09-27 13:45:04 -07:00
Vincas Dargis
f6ee78d5b2 ubuntu-email: allow running Thunderbird wrapper script
gio-launch-desktop helper tries to execute /usr/bin/thunderbird wrapper
script, not the /usr/lib/thunderbird... directly.

Add rule allowing to execute /usr/bin/thunderbird.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/204
(cherry picked from commit cee9527fa8)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-27 12:18:33 -07:00
John Johansen
082274c10f Merge branch 'harden-abstractions' into 'apparmor-2.13'
Harden abstractions

Harden abstractions

    remove antiquated abstractions/launchpad-integration
    abstractions/opencl-nvidia: don't allow PUx on nvidia-modprobe
    abstractions/private-files-strict: disallow access to the dirs of private files
    abstractions/private-files: disallow writes to thumbnailer dir (LP: #1788929)
    ubuntu-browsers.d/user-files: disallow access to the dirs of private files

    Nominating launchpad-integration and opencl-nvidia for 2.13. Nominating private-files-strict, private-files and user-files for 2.10 and higher

PR: https://gitlab.com/apparmor/apparmor/merge_requests/203
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-27 10:42:42 -07:00
Jamie Strandboge
734130abad we don't need to adjust keyring**. Thanks cboltz 2018-09-27 10:37:10 -07:00
Jamie Strandboge
b78e8edee0 ubuntu-browsers.d/user-files: disallow access to the dirs of private files 2018-09-27 10:37:10 -07:00
Jamie Strandboge
fbb8486fe6 abstractions/private-files: disallow writes to thumbnailer dir (LP: #1788929) 2018-09-27 10:37:10 -07:00
Jamie Strandboge
25aad109e1 abstractions/private-files-strict: disallow access to the dirs of private files
Reference:
https://launchpad.net/bugs/1794820
2018-09-27 10:37:10 -07:00
Jamie Strandboge
859a16310b abstractions/opencl-nvidia: don't allow PUx on nvidia-modprobe 2018-09-27 10:37:10 -07:00
Jamie Strandboge
052820e648 remove antiquated abstractions/launchpad-integration 2018-09-27 10:37:10 -07:00
Christian Boltz
5e4c68712f Merge branch 'zsh' into 'master'
add zsh to logprof.conf

See merge request apparmor/apparmor!201

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.10..master

(cherry picked from commit 7e22b0a894)

00871696 add zsh to logprof.conf
2018-09-24 17:35:10 +00:00
nl6720
ddee796d70 usr.sbin.dnsmasq: add paths for NetworkManager connection sharing
Also add /usr/share/dnsmasq/, DNSSEC trust anchors are kept there.

(cherry picked from commit 5bc7a9fbd6)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-19 00:08:03 -07:00
nl6720
9d841a2291 usr.sbin.ntpd: add openntpd drift and socket files
(cherry picked from commit b3c4a73e2f)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-19 00:08:03 -07:00
Cameron Nemo
9cb010f746 profiles: support void-specific binary names for openntpd, traceroute, and ping
(cherry picked from commit 6e28a94ace)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-19 00:08:03 -07:00
Cameron Nemo
645545048c profiles: support distributions which merge sbin into bin
Closes #8

(cherry picked from commit 9ab45d811e)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-19 00:08:03 -07:00
John Johansen
540aa94418 parser: fix build warning for assigning default cache location
The compiler is spitting out the warning

parser_main.c:1291:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
    char *tmp = "/var/cache/apparmor";

fix this by constifying the cacheloc array.

Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit e7949d09fa)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-18 02:46:00 -07:00
intrigeri
affc7a9fb4 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
(cherry picked from commit 3d21cf0e32)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-18 02:46:00 -07:00
Christian Boltz
6f5c61e6af Use parser/tst/parser.conf in profiles 'make check'
This avoids problems if the system-wide parser.conf has caching enabled,
and the cache location is not writeable for the user running 'make check'.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/191
(cherry picked from commit fdfcd47baa)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-17 02:49:56 -07:00
Christian Boltz
b86f313281 use empty parser/tst/parser.conf in all parser tests
Without this, the system-wide parser.conf gets used, which causes test
failures if for example caching is enabled and the cache dir isn't
writeable for the user running the tests.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/191
(cherry picked from commit 5a18fd7c89)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-17 02:48:57 -07:00
John Johansen
4167497738 parser: add empty config file for parser caching tests
The caching tests will fail if a warning is thrown. Some setups may
not have a parser config file in the default location which results
in the warning
  config file '/etc/apparmor/parser.conf' not found

which causes the tests to fail.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/175
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 657495fa55)
2018-09-17 02:42:17 -07:00
John Johansen
5cc04694bf parser: update option parsing so --config-file does not have to be first
Requiring --config-file to be first in the option list is not user
friendly fix the option parsing so that --config-file can be specified
anywhere in the option list.

This also fixes a bug where even when the --config-file option is
first the option parsing fails because the detection logic is broken
for some option cases.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/175
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit af1818c053)
2018-09-17 02:41:43 -07:00
John Johansen
b54929b0e0 parser: group parser number of config options together
To help avoid the duplicate option problem in the future sort and group
the config options using numbers at the end of the option table.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/173
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 9a8e7e58d2)
2018-09-17 02:41:26 -07:00
John Johansen
e0f7594c73 parser: fix collision of --config-file and --compile-features options
Unfortunately both --config-file and --compile-features are using
139 to indicate the feature which breaks one or the other depending
on how the switch state that processes the options is compiled.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/173
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 3da52f7515)
2018-09-17 02:39:48 -07:00
John Johansen
a17775b821 parser: Add fixes to --config-file option
After the config file patch was committed to 2.13 a couple of
improvements were suggested by intrigeri and cboltz. These have
been done as a separate patch so they can be applied to both
dev and 2.13.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/170
Acked-by: Christian Boltz <apparmor@cboltz.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 2c0d7e608c)
2018-09-17 02:39:35 -07:00
John Johansen
e97b1e732a 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>
(cherry picked from commit b1967c892a)
2018-09-17 02:38:59 -07:00
John Johansen
bc133dd9b5 Revert "parser: allow specifying the parser config file"
The version of --config-file that landed in apparmor-2.13 has bugs
and the upstream version evolved before it was committed (it is
not just commits on top of the 2.13 patch).

So to backport the newer version with fixes,
revert commit 56b8e16698.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-17 02:35:44 -07:00
Christian Boltz
2f658e2422 add python3.7 to logprof.conf
(cherry picked from commit db096135eb)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-14 16:56:22 -07:00
John Johansen
730b346fde Merge branch 'mesa-abstraction-2.13' into 'apparmor-2.13'
Backport Mesa abstraction to 2.13

See merge request apparmor/apparmor!189
2018-09-14 07:29:15 +00:00
intrigeri
51a7041f85 mesa abstraction: allow locking .cache/mesa_shader_cache/??/*.
At least Totem needs it on current Debian sid.
2018-09-14 06:26:13 +00:00
Vincas Dargis
d55b94642c Add mesa abstraction
Add mesa abstraction to allow writing to the Mesa-specific cache
locations and listing devices. Abstraction is needed for applications
utilizing OpenGL API with Mesa implementation available on the system.
2018-09-14 06:26:09 +00:00
John Johansen
8b79ce540c infrasture: update branch name for release builds
When apparmor-2.13 was branched from master the branch name was not
updated in the Makefile. Fix it.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-13 16:04:53 -07:00
John Johansen
866aaa1687 Documentation: Sync Readme.md with master branch updates
Sync Readme.md with master branch updates and to add badge, build and
coverage badges.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-13 15:44:40 -07:00
Tyler Hicks
08412a8a39 README: Point to the security vuln section of the wiki
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2018-09-13 11:45:59 -07:00
Tyler Hicks
1f99202c26 README: Point to the new email address for security bug reports
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2018-09-13 11:45:59 -07:00
Tyler Hicks
14744e83a6 README: Improve the bug reporting instructions
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2018-09-13 11:45:59 -07:00
Tyler Hicks
69800c435a README: Move project contact info into the main README
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2018-09-13 11:45:59 -07:00
Tyler Hicks
50ae9a1884 parser: Remove mention of wiretrip vulnerability handling policy
It looks as if the wiretrip domain has changed hands. The linked policy
page no longer exists.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2018-09-13 11:45:59 -07:00
Tyler Hicks
e27df656f0 utils: Point to the correct Profiles wiki page
The URL redirect ends up at a page in the new wiki that doesn't exist.
We have to link directly to the gitlab URL here since the current URL
redirect doesn't let us use a wiki.apparmor.net URL and still reach the
expected Profiles page.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2018-09-13 11:45:59 -07:00
Tyler Hicks
2bef2e23d1 all: Use HTTPS links for apparmor.net
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2018-09-13 11:45:59 -07:00
John Johansen
ed1fd20aa9 libapparmor: fix readdirfd to memory checks and cleanup on failure
The open-coded readdirfd fn used to replace scandirat skipped
checks for memory allocation failures and cleaning on faulures,
fix this.

Acked-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 25f98537db)
2018-09-12 16:20:52 -07:00
Patrick Steinhardt
ffb051db51 libapparmor: replace scandirat with open-coded variant
The `scandirat` function is a nonstandard GNU extension, which opens a
directory relative to a file descriptor. musl libc does not implement
that function and thus cannot be used to compile libapparmor.

All our uses of `scandirat` directly scan the directory the file
descriptor is referring to, not any directory beneath the FD. Implement
a function `readdirfd()`, which gets as arguments the directory FD, the
location where to put the list of directory entries as well as a
function pointer to a comparing function. `readdirfd` will then scan all
directory entries except "." and ".." and return them via an allocated
array. The array is sorted in case the comparing function is set.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/107
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit 259a4bad50)
2018-09-12 10:47:27 -07:00
John Johansen
e45a46d47d parser: fix cache write message when stdin is used
Using stdin with --write-cache set results in

  # apparmor_parser --show-cache --write-cache
  Cache: added primary location '/var/cache/apparmor'
  Warnung aus stdin (Zeile 1): Cache: added readonly location '/usr/share/apparmor/cache'
  Warnung aus stdin (Zeile 1): apparmor_parser: cannot use or update cache, disable, or force-complain via stdin
  Cache miss: stdin
  Wrote cache: /var/cache/apparmor/9b2cd0d0.0/(null)

The "Wrote cache:" message is referencing a null value and should not
be displayed.

BugLink: http://bugs.launchpad.net/bugs/1787717
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Timeout
2018-09-11 18:33:47 -07:00
Christian Boltz
f651633281 abstractions/php: allow ICU (unicode support) data tables
Reported by darix on IRC, and also something I noticed in my own usage
of PHP.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/184
(cherry picked from commit e396f9dae9)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-11 18:22:59 -07:00
Christian Boltz
02ab39208b remove unused exception binding in sandbox.py
pyflakes 2.0 is more strict and found that 'e' is never used.

References: https://build.opensuse.org/request/show/629206 (comment
section)

PR: https://gitlab.com/apparmor/apparmor/merge_requests/178
(cherry picked from commit 51482c33f5)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-09-11 18:21:25 -07:00
John Johansen
fac81098fa 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>


(cherry picked from commit c66a1a972c)

0dca959c set_profile_flags(): allow named profiles without attachment
2018-09-11 21:02:04 +00:00
John Johansen
2fbb1ed2df Merge branch 'cboltz-change-flags-2.13' into 'apparmor-2.13'
2.13:  prevent that aa-complain etc. overwrites flags in child profiles if they differ from the main profile

See merge request apparmor/apparmor!185

Acked-by: John Johansen <john.johansen@canonical.com>
2018-09-11 18:29:53 +00:00
Christian Boltz
65c1a6cae2 let change_profile_flags() change flags in child profiles
... instead of overwriting them with the flags of the main profile.

This fixes a longstanding issue with aa-complain, aa-enforce and
aa-audit which broke the flags of child profiles and hats if they
differed from the main profile.

It also fixes several issues documented in the tests (which obviously
need adjustment to match the fixed behaviour).

Also change the "no profile found" cases to AppArmorException - errors
in a profile are not worth triggering AppArmorBug ;-)

(cherry picked from commit b00aab0843)
2018-09-02 17:05:24 +02:00
Christian Boltz
529985973d change_profile_flags: raise AppArmorBug on empty new flag
(cherry picked from commit d26ffbdd29)
2018-09-02 17:05:16 +02:00
Christian Boltz
7349a9cb03 merge set_profile_flags() into change_profile_flags()
(and adjust a few comments in profile_storage.py)

(cherry picked from commit c016fc6656)
2018-09-02 17:05:08 +02:00
Christian Boltz
fb7a5983bc rewrite set_profile_flags() tests to use change_profile_flags()
All callers call change_profile_flags(), so it makes sense to test this
function instead of set_profile_flags().

Besides that, set_profile_flags() will be merged into
change_profile_flags() in the next commit ;-)

Note that this commit adds some '# XXX' notes to the tests. These will
be addressed in later commits.

(cherry picked from commit abd124c00d)
2018-09-02 17:04:58 +02:00
Christian Boltz
f4c722c739 change_profile_flags: use ', ' as flags delimiter
This looks better than a comma without whitespace.

Also adjust minitools_test.py to follow this change.

(cherry picked from commit 4a021ec203)
2018-09-02 17:04:49 +02:00
Christian Boltz
267c18e725 extend add_or_remove_flag() to handle str for old flags
If the old flags are given as str (or None), call split_flags() to
convert them to a list.

This allows to simplify change_profile_flags() which now doesn't need to
call split_flags() on its own.

Also add some tests with a str for the old flags

(cherry picked from commit e80caa130a +
 conflict resolution)
2018-09-02 17:04:29 +02:00
Christian Boltz
41eae89869 split off add_or_remove_flag() from change_profile_flags()
Also add some tests for add_or_remove_flag()

(cherry picked from commit 604004c2b6 +
 conflict resolution)
2018-09-02 17:00:55 +02:00
Christian Boltz
e13569fecb move splitting flags into profile_storage split_flags() function
... and change change_profile_flags() to use it instead of doing it
itsself

Also add some tests for split_flags()

Cherry-picked from ce7ea062c5 + conflict
resolution
2018-09-02 16:55:45 +02:00
Christian Boltz
1c570118ed activate_repo_profiles(): use change_profile_flags
... instead of set_profile_flags() to keep possibly existing flags like
attach_disconnected.

Note that this function is unused (meant to be used with the
no-longer-existing profile repo), therefore nobody noticed that
set_profile_flags() was called with the wrong number of parameters ;-)
2018-09-02 16:50:17 +02:00
Vincas Dargis
ec0c5d470a 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.

(cherry picked from commit 94014c09f0)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-14 16:56:04 -07:00
Vincas Dargis
925cf94cdc 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.

(cherry picked from commit 7345f61e9c)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-14 16:55:42 -07:00
Vincas Dargis
090e9986f1 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.

(cherry picked from commit fae93f1b6c)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-14 16:55:16 -07:00
Vincas Dargis
2eb9ab0913 Add recent-documents-write abstraction
Add abstraction for updating recent documents list.

(cherry picked from commit 4fe8ae97c4)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-14 16:38:22 -07:00
Christian Boltz
7f0aed7fb8 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

(cherry picked from commit 2e8b902248)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-07 23:55:16 -07:00
Christian Boltz
3abf501527 Fix typo (double /) in opencl-pocl abstraction
(cherry picked from commit a054855433)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-07 03:13:01 -07:00
Vincas Dargis
a5eeed7c63 Add OpenCL abstractions
(cherry picked from commit 8237d6e776)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-07 03:13:01 -07:00
Christian Boltz
5070ba61e1 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
(cherry picked from commit 961e69afe5)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-07 03:04:18 -07:00
Steve Beattie
82bd9a390d coverity build: capture separate log files for each coverity invocation
Each coverity command writes its debugging output to
cov-int/build-log.txt, which means that multiple runs of cov-build
overwrite previous logs, resulting in only the last invocation's output
remaining at the end of the build, making debugging why failures to
capture coverity output difficult. Fix this by renaming the build-log to
per-directory log files.

(This would still be an issue even if we had a single build command
for the entire tree, as capturing python and other interpreted
files requires a second invocation of cov-build to scan for those
file types.)

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/145
(cherry picked from commit fed101920b)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-07 02:40:49 -07:00
Christian Boltz
acb40969b5 make message about notify-send package cross-distro compatible
PR: !144
References: https://bugzilla.opensuse.org/show_bug.cgi?id=1100779
(cherry picked from commit 44ee1d5090)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-07 02:29:30 -07:00
Christian Boltz
7473044d41 Fix unsetting filename in get_profile()
When creating a new profile with aa-genprof, get_profile() searches for
an inactive ("extra") profile and, if it finds one, removes the filename
from that profile so that it gets stored in /etc/apparmor.d/ later.

However, it used .pop() to remove the filename, which explodes since
ProfileStorage is a class now.

This patch fixes this (tested manually).

PR: !140
(cherry picked from commit 73b33bdf36)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-07 02:13:47 -07:00
John Johansen
56b8e16698 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
Signed-off-by: John Johansen <john.johansen@canonical.com>
2018-08-07 02:13:47 -07:00
Christian Boltz
b3dfe3366a 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

(cherry picked from commit 763a6787d8)

6a10f076 Allow /usr/local/lib/python3/dist-packages in abstractions/python
2018-08-06 18:11:50 +00:00
intrigeri
249b68c92e 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 23:42:09 +00:00
intrigeri
749d94297f 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-29 23:42:02 +00:00
intrigeri
8a8349d14d freedesktop.org abstraction: refactor (factorize) for consistency.
This change makes the @{home_local_share} rules similar to the
@{usr_share} ones.
2018-07-29 23:41:57 +00:00
intrigeri
7cc2c0dfad 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-29 23:41:53 +00:00
intrigeri
bb0a9c76e3 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-29 23:41:42 +00:00
intrigeri
b86917dc95 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-29 23:41:37 +00:00
intrigeri
9d8b6f4dbd freedesktop.org abstraction: DRY by factorizing duplicated path components with variables.
These alternations will need to grow quite a bit in order to support Flatpak
exports. Let's avoid repeating ourselves too much.
2018-07-29 23:41:28 +00:00
Dimitri John Ledkov
40ba8bf047 Profiles: Patch usr.sbin.useradd to support usr-merge.
(cherry picked from commit e99fa6c605)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/152
2018-07-27 10:33:47 -07:00
Steve Beattie
e24484c42e common/Version: update to show 2.13.1 would be next apparmor-2.13 release
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2018-07-25 16:11:35 -07:00
Christian Boltz
d9d3cae2aa adjust abstractions/python for python 3.7
Python 3.7 was released yesterday - and to make the abstraction
future-proof, also cover 3.8 and 3.9 in advance ;-)

(cherry picked from commit 01f41fbff8)

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/139/
2018-06-29 11:19:31 -07:00
Christian Boltz
35522677d3 Merge branch 'cboltz-nested-child-error' into 'master'
parse_profile_start(): Error out on nested child profiles

See merge request apparmor/apparmor!136

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

(cherry picked from commit b7a4f37cbb)

8462c39b parse_profile_start(): Error out on nested child profiles
2018-06-21 10:20:20 +00:00
Christian Boltz
90c0d2b3c3 profiles: update samba profiles
- allow smbd to load new shared libraries
- allow winbindd to read and write new kerberos cache location

Based on a patch by "Samuel Cabrero" <scabrero@suse.com>

(cherry picked from commit 23b5f29b80)

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1092099

Acked-by: Steve Beattie <steve@nxnw.org>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/121
2018-05-09 14:02:02 -07:00
Patrick Steinhardt
0361997506 parser: provide typedefs for comparison_fn_t and __free_fn_t
The POSIX standard never defines the typedefs `comparison_fn_t` and
`__free_fn_t`, but they are provided by glibc and user in the parsing
code. Provide the typedefs ourselves to fix compiling on musl based
systems.

(cherry picked from commit 655d3e7826)

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>

PR: https://gitlab.com/apparmor/apparmor/merge_requests/107
2018-05-09 13:28:47 -07:00
Patrick Steinhardt
14f622bc2b libapparmor: do not honor $LIBAPPARMOR_DEBUG when secure_getenv is undefined
The `secure_getenv` function is a non-POSIX compliant extension of
glibc. In contrast to the POSIX `getenv`, `secure_getenv` will return
`NULL` for all environment variables when the program is run with
escalated privileges due to an SUID or SGID bit. Some strictly
POSIX-compliant libc libraries, most notably musl libc, do not have this
function and do not wish to implement it. Thus, AppArmor cannot be
compiled on such systems.

In libapparmor, `secure_getenv` is only used to determine whether the
environment variable DEBUG_ENV_VAR has been set to enable debugging. In
case an unprivileged user runs a SUID/SGID executable linked against
libapparmor, we do not want that user to be able to get additional
information via debug output.

The fix here is to produce an error only in case where debug output is
enabled by defining ENABLE_DEBUG_OUTPUT. Otherwise, we simply define
`secure_getenv` to `NULL` to completely disable the debug output.

(cherry picked from commit 778176b9d8)

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Acked-by: Steve Beattie <steve@nxnw.org>

PR: https://gitlab.com/apparmor/apparmor/merge_requests/107
2018-05-09 13:27:20 -07:00
Patrick Steinhardt
a0b77b804b libapparmor: make aa_policy_cache_add_ro_dir function visible
While the parser makes use of the `aa_policy_cache_add_ro_dir` function,
it is not being declared as a global function in the libapparmor.map
file. Due to this, dynamic linking of apparmor_parser with
libapparmor.so is not possible.

[Fixed up to use 2.13.1 symbol section as when the
 `aa_policy_cache_add_ro_dir` was introduced -- @smb]

(cherry picked from commit 1506f2cf0e)

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>

PR: https://gitlab.com/apparmor/apparmor/merge_requests/107
2018-05-09 13:24:29 -07:00
Christian Boltz
26a3351552 utis: fix writing alias rules
write_pair() ignored the 'tail' parameter, which resulted in writing
invalid alias rules (without the trailing comma).

Also add an alias to test/cleanprof.* to ensure it doesn't break again.

(cherry picked from commit ae4ab62855)

Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/119
2018-05-08 07:50:09 -07:00
Christian Boltz
28586f7309 utils: fix writing "link subset" rules
Writing a "link subset" rule missed a space, which resulted in something
like
  link subset/foo -> /bar,

Also add a test rule to tests/cleanprof.* to ensure this doesn't break
again.

(cherry picked from commit 514535608f)

Acked-by: Steve Beattie <steve@nxnw.org>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/117
2018-05-06 22:32:40 -07:00
Steve Beattie
71d089b4fa libapparmor: do not purge PMurHash.h on maintainerclean
Commit 63b7cb0660 (libapparmor: convert
multicache from using djb2 hashing to murmur3 hash) mistakenly added
PmurHash.h to the list of files generated by the build process and thus
should be removed when the 'maintainerclean' make target is invoked.
This fixes the issue by removing PmurHash.h from the list of generated
files.

(cherry picked from commit 9f2959482f)

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>

PR: https://gitlab.com/apparmor/apparmor/merge_requests/112
2018-05-03 14:16:36 -07:00
John Johansen
9179b5cf17 Merge branch 'cboltz-utils-exclude-cache-d' into 'master'
is_skippable_dir(): add 'cache.d' to exclude list

See merge request apparmor/apparmor!110

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


(cherry picked from commit 67d84c8959)

5b9497a8 is_skippable_dir(): add 'cache.d' to exclude list
2018-04-30 20:56:40 +00:00
Steve Beattie
21ffea57f6 mount regression test: convert mount test to use MS_NODEV
The mount regression test passes MS_MANDLOCK to the mount(2) syscall in
the test program. When the kernel is configured without
CONFIG_MANDATORY_FILE_LOCKING set, attempting to mount a filesystem with
this option always fails with EPERM. To fix, convert the test program to
use the MS_NODEV option instead.

(cherry picked from commit 49ba6af2bf)

Bug: https://bugs.launchpad.net/apparmor/+bug/1765025
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>

PR: https://gitlab.com/apparmor/apparmor/merge_requests/109
2018-04-30 13:32:54 -07:00
John Johansen
313e0b4266 libapparmor: fix failure to create missing cache dir
The refactor unfortunately changed dirfd to fd on one mkdirat, but
fd is always invalid at this point resulting in the parser reporting

Failed setting up policy cache (../profiles/cache/): Bad file descriptor

(cherry picked from commit b08b327922)

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/103
2018-04-25 20:20:05 -07:00
John Johansen
f2914da00a libapparmor: Fix build failure when enable-debug-output=yes
The code refactoring didn't update some debug messages. Update to
keep the debug messages and add a few extra while we are at it.

(cherry picked from commit c82fcd227d)

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/103
2018-04-25 20:18:13 -07:00
Christian Boltz
6801c0d0d0 fix permissions of apparmor.systemd helper script
References: https://bugzilla.opensuse.org/show_bug.cgi?id=1090545
(cherry picked from commit f179612abe)

Acked-by: Steve Beattie <steve@nxnw.org>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/106/
2018-04-25 16:14:27 -07:00
Christian Boltz
2becda217b install aa-teardown to /usr/sbin, not /sbin
Looks like I used a wrong path when upstreaming aa-teardown :-(
(openSUSE always used /usr/sbin/aa-teardown)

(cherry picked from commit 62ecc2b574)
Acked-by: Steve Beattie <steve@nxnw.org>

PR: https://gitlab.com/apparmor/apparmor/merge_requests/97
2018-04-25 16:04:09 -07:00
Steve Beattie
8e63137612 libapparmor: fix reallocarray FTBFS w/older glibc
The recently added overlay cache directory support added to libapparmor
makes use of reallocarray(3) to resize memory allocations; however,
reallocarray() was only included in glibc 2.26. This commit adds a
configure check for reallocarray() and if it's not available, provides
it as a wrapper around realloc(3).

PR: https://gitlab.com/apparmor/apparmor/merge_requests/100
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2018-04-18 21:14:29 -07:00
419 changed files with 13295 additions and 7622 deletions

13
.gitignore vendored
View File

@@ -8,6 +8,7 @@ binutils/po/*.mo
parser/po/*.mo
parser/af_names.h
parser/cap_names.h
parser/generated_cap_names.h
parser/tst_lib
parser/tst_misc
parser/tst_regex
@@ -63,7 +64,8 @@ parser/techdoc.aux
parser/techdoc.log
parser/techdoc.pdf
parser/techdoc.toc
profiles/apparmor.d/local/*.*
profiles/apparmor.d/local/*
!profiles/apparmor.d/local/README
libraries/libapparmor/Makefile
libraries/libapparmor/Makefile.in
libraries/libapparmor/aclocal.m4
@@ -94,6 +96,8 @@ libraries/libapparmor/src/.deps
libraries/libapparmor/src/.libs
libraries/libapparmor/src/Makefile
libraries/libapparmor/src/Makefile.in
libraries/libapparmor/src/PMurHash.lo
libraries/libapparmor/src/PMurHash.o
libraries/libapparmor/src/af_protos.h
libraries/libapparmor/src/change_hat.lo
libraries/libapparmor/src/features.lo
@@ -160,8 +164,14 @@ libraries/libapparmor/swig/python/test/test-suite.log
libraries/libapparmor/swig/python/test/test_python.py
libraries/libapparmor/swig/python/test/test_python.py.log
libraries/libapparmor/swig/python/test/test_python.py.trs
libraries/libapparmor/swig/ruby/LibAppArmor.so
libraries/libapparmor/swig/ruby/LibAppArmor_wrap.c
libraries/libapparmor/swig/ruby/LibAppArmor_wrap.o
libraries/libapparmor/swig/ruby/Makefile
libraries/libapparmor/swig/ruby/Makefile.in
libraries/libapparmor/swig/ruby/Makefile.new
libraries/libapparmor/swig/ruby/Makefile.ruby
libraries/libapparmor/swig/ruby/mkmf.log
libraries/libapparmor/testsuite/.deps
libraries/libapparmor/testsuite/.libs
libraries/libapparmor/testsuite/Makefile
@@ -187,6 +197,7 @@ utils/*.tmp
utils/po/*.mo
utils/apparmor/*.pyc
utils/apparmor/rule/*.pyc
utils/test/common_test.pyc
utils/test/.coverage
utils/test/htmlcov/
utils/vim/apparmor.vim

54
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,54 @@
---
image: ubuntu:latest
before_script:
- export DEBIAN_FRONTEND=noninteractive && apt-get update -qq && apt-get install --no-install-recommends -y build-essential apache2-dev autoconf automake bison dejagnu flex libpam-dev libtool perl liblocale-gettext-perl pkg-config python-all-dev python3-all-dev pyflakes3 ruby-dev swig lsb-release python3-notify2 python3-psutil python3-setuptools zlib1g-dev
- lsb_release -a
- uname -a
# XXX - add a deploy stage to publish man pages, docs, and coverage
# reports
stages:
- build
- test
build-all:
stage: build
artifacts:
name: ${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
expire_in: 30 days
untracked: true
paths:
- libraries/libapparmor/
- parser/
- binutils/
- utils/
- changehat/mod_apparmor/
- changehat/pam_apparmor/
- profiles/
script:
- cd libraries/libapparmor && ./autogen.sh && PYTHON=/usr/bin/python3 ./configure --with-perl --with-python --prefix=/usr && make PYTHON=/usr/bin/python3 && cd ../.. || { cat config.log ; exit 1 ; }
- make -C parser
- make -C binutils
- make -C utils
- make -C changehat/mod_apparmor
- make -C changehat/pam_apparmor
- make -C profiles
test-all:
stage: test
script:
- make -C libraries/libapparmor check PYTHON=/usr/bin/python3
- make -C parser check
- make -C binutils check
- make -C utils check PYFLAKES=/usr/bin/pyflakes3 PYTHON_VERSIONS=/usr/bin/python3
- make -C changehat/mod_apparmor check
- make -C profiles check-parser
# Disabled due to aa-logprof dependency on /sbin/apparmor_parser existing
# - make -C profiles check-profiles
# test-pam_apparmor:
# - stage: test
# - script:
# - cd changehat/pam_apparmor && make check

View File

@@ -19,7 +19,7 @@ DIRS=libraries/libapparmor \
# with conversion to git, we don't export from the remote
REPO_URL?=git@gitlab.com:apparmor/apparmor.git
REPO_BRANCH?=master
REPO_BRANCH?=apparmor-2.13
COVERITY_DIR=cov-int
RELEASE_DIR=apparmor-${VERSION}
@@ -55,9 +55,11 @@ snapshot: clean
coverity: snapshot
cd $(SNAPSHOT_NAME)/libraries/libapparmor && ./configure --with-python
$(foreach dir, $(filter-out utils profiles tests, $(DIRS)), \
cov-build --dir $(COVERITY_DIR) -- $(MAKE) -C $(SNAPSHOT_NAME)/$(dir);)
cov-build --dir $(COVERITY_DIR) -- $(MAKE) -C $(SNAPSHOT_NAME)/$(dir); \
mv $(COVERITY_DIR)/build-log.txt $(COVERITY_DIR)/build-log-$(subst /,.,$(dir)).txt ;)
$(foreach dir, libraries/libapparmor utils, \
cov-build --dir $(COVERITY_DIR) --no-command --fs-capture-search $(SNAPSHOT_NAME)/$(dir);)
cov-build --dir $(COVERITY_DIR) --no-command --fs-capture-search $(SNAPSHOT_NAME)/$(dir); \
mv $(COVERITY_DIR)/build-log.txt $(COVERITY_DIR)/build-log-python-$(subst /,.,$(dir)).txt ;)
tar -cvzf $(SNAPSHOT_NAME)-$(COVERITY_DIR).tar.gz $(COVERITY_DIR)
.PHONY: export_dir

103
README.md
View File

@@ -23,9 +23,45 @@ library, available under the LGPL license, which allows change_hat(2)
and change_profile(2) to be used by non-GPL binaries).
For more information, you can read the techdoc.pdf (available after
building the parser) and by visiting the http://apparmor.net/ web
building the parser) and by visiting the https://apparmor.net/ web
site.
----------------
Getting in Touch
----------------
Please send all complaints, feature requests, rants about the software,
and questions to the
[AppArmor mailing list](https://lists.ubuntu.com/mailman/listinfo/apparmor).
Bug reports can be filed against the AppArmor project on
[launchpad](https://bugs.launchpad.net/apparmor) or reported to the mailing
list directly for those who wish not to register for an account on
launchpad. See the
[wiki page](https://gitlab.com/apparmor/apparmor/wikis/home#reporting-bugs)
for more information.
Security issues can be filed as security bugs on launchpad
or directed to `security@apparmor.net`. Additional details can be found
in the [wiki](https://gitlab.com/apparmor/apparmor/wikis/home#reporting-security-vulnerabilities).
--------------
Privacy Policy
--------------
The AppArmor security project respects users privacy and data and does not collect data from or on its users beyond what is required for a given component to function.
The AppArmor kernel security module will log violations to the audit subsystem, and those will be logged/forwarded/recorded on the user's system(s) according to how the administrator has logging configured. Again this is not forwarded to or collected by the AppArmor project.
The AppArmor userspace tools do not collect information on the system user beyond the logs and information needed to interact with the user. This is not forwarded to, nor collected by the AppArmor project.
Users may submit information as part of an email, bug report or merge request, etc. and that will be recorded as part of the mailing list, bug/issue tracker, or code repository but only as part of a user initiated action.
The AppArmor project does not collect information from contributors beyond their interactions with the AppArmor project, code, and community. However contributors are subject to the terms and conditions and privacy policy of the individual platforms (currently GitLab and LaunchPad) should they choose to contribute through those platforms. And those platforms may collect data on the user that the AppArmor project does not.
Currently both GitLab an LaunchPad require a user account to submit patches or report bugs and issues. If a contributor does not wish to create an account for these platforms the mailing list is available. Membership in the list is not required. Content from non-list members will be sent to moderation, to ensure that it is on topic, so there may be a delay in choosing to interact in this way.
-------------
Source Layout
@@ -33,6 +69,7 @@ Source Layout
AppArmor consists of several different parts:
```
binutils/ source for basic utilities written in compiled languages
changehat/ source for using changehat with Apache, PAM and Tomcat
common/ common makefile rules
@@ -43,6 +80,7 @@ parser/ source for parser/loader and corresponding documentation
profiles/ configuration files, reference profiles and abstractions
tests/ regression and stress testsuites
utils/ high-level utilities for working with AppArmor
```
--------------------------------------
Important note on AppArmor kernel code
@@ -67,63 +105,82 @@ the following order. Some systems may need to export various python-related
environment variables to complete the build. For example, before building
anything on these systems, use something along the lines of:
```
$ export PYTHONPATH=$(realpath libraries/libapparmor/swig/python)
$ export PYTHON=/usr/bin/python3
$ export PYTHON_VERSION=3
$ export PYTHON_VERSIONS=python3
```
libapparmor:
```
$ cd ./libraries/libapparmor
$ sh ./autogen.sh
$ sh ./configure --prefix=/usr --with-perl --with-python # see below
$ make
$ make check
$ make install
```
[an additional optional argument to libapparmor's configure is --with-ruby, to
generate Ruby bindings to libapparmor.]
Binary Utilities:
```
$ cd binutils
$ make
$ make check
$ make install
```
parser:
```
$ cd parser
$ make # depends on libapparmor having been built first
$ make check
$ make install
```
Utilities:
```
$ cd utils
$ make
$ make check
$ make check PYFLAKES=/usr/bin/pyflakes3
$ make install
```
Apache mod_apparmor:
```
$ cd changehat/mod_apparmor
$ make # depends on libapparmor having been built first
$ make install
```
PAM AppArmor:
```
$ cd changehat/pam_apparmor
$ make # depends on libapparmor having been built first
$ make install
```
Profiles:
```
$ cd profiles
$ make
$ make check # depends on the parser having been built first
$ make install
```
[Note that for the parser, binutils, and utils, if you only wish to build/use
some of the locale languages, you can override the default by passing
@@ -144,38 +201,50 @@ For details on structure and adding tests, see
tests/regression/apparmor/README.
To run:
```
$ cd tests/regression/apparmor (requires root)
$ make
$ sudo make tests
$ sudo bash open.sh -r # runs and saves the last testcase from open.sh
```
Parser tests
------------
For details on structure and adding tests, see parser/tst/README.
To run:
```
$ cd parser/tst
$ make
$ make tests
```
Libapparmor
-----------
For details on structure and adding tests, see libraries/libapparmor/README.
```
$ cd libraries/libapparmor
$ make check
```
Utils
-----
Tests for the Python utilities exist in the test/ subdirectory.
```
$ cd utils
$ make check
```
The aa-decode utility to be tested can be overridden by
setting up environment variable APPARMOR_DECODE; e.g.:
```
$ APPARMOR_DECODE=/usr/bin/aa-decode make check
```
Profile checks
--------------
@@ -183,29 +252,44 @@ A basic consistency check to ensure that the parser and aa-logprof parse
successfully the current set of shipped profiles. The system or other
parser and logprof can be passed in by overriding the PARSER and LOGPROF
variables.
```
$ cd profiles
$ make && make check
```
Stress Tests
------------
To run AppArmor stress tests:
```
$ make all
```
Use these:
```
$ ./change_hat
$ ./child
$ ./kill.sh
$ ./open
$ ./s.sh
```
Or run all at once:
```
$ ./stress.sh
```
Please note that the above will stress the system so much it may end up
invoking the OOM killer.
To run parser stress tests (requires /usr/bin/ruby):
```
$ ./stress.sh
```
(see stress.sh -h for options)
@@ -220,7 +304,10 @@ https://scan.coverity.com/download?tab=cxx to obtain a pre-built copy of
cov-build.
To generate a compressed tarball of an intermediate Coverity directory:
```
$ make coverity
```
The compressed tarball is written to
apparmor-<SNAPSHOT_VERSION>-cov-int.tar.gz, where <SNAPSHOT_VERSION>

View File

@@ -54,6 +54,10 @@ TOOLS = aa-enabled aa-exec
AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread
ifdef WITH_LIBINTL
AALIB += -lintl
endif
ifdef USE_SYSTEM
# Using the system libapparmor so Makefile dependencies can't be used
LIBAPPARMOR_A =

View File

@@ -89,6 +89,6 @@ L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
apparmor(7), apparmor.d(5), aa_is_enabled(2), and L<http://wiki.apparmor.net>.
apparmor(7), apparmor.d(5), aa_is_enabled(2), and L<https://wiki.apparmor.net>.
=cut

View File

@@ -88,6 +88,6 @@ L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
aa-stack(8), aa-namespace(8), apparmor(7), apparmor.d(5), aa_change_profile(3),
aa_change_onexec(3) and L<http://wiki.apparmor.net>.
aa_change_onexec(3) and L<https://wiki.apparmor.net>.
=cut

View File

@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Canonical Ltd
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: apparmor@lists.ubuntu.com\n"
"POT-Creation-Date: 2020-10-14 03:36-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../aa_enabled.c:21
#, c-format
msgid ""
"%s: [options]\n"
" options:\n"
" -q | --quiet Don't print out any messages\n"
" -h | --help Print help\n"
msgstr ""
#: ../aa_enabled.c:38
#, c-format
msgid "No - not available on this system.\n"
msgstr ""
#: ../aa_enabled.c:42
#, c-format
msgid "No - disabled at boot.\n"
msgstr ""
#: ../aa_enabled.c:46
#, c-format
msgid "Maybe - policy interface not available.\n"
msgstr ""
#: ../aa_enabled.c:51
#, c-format
msgid "Maybe - insufficient permissions to determine availability.\n"
msgstr ""
#: ../aa_enabled.c:56
#, c-format
msgid "Error - %s\n"
msgstr ""
#: ../aa_enabled.c:70
#, c-format
msgid "unknown or incompatible options\n"
msgstr ""
#: ../aa_enabled.c:80
#, c-format
msgid "unknown option '%s'\n"
msgstr ""
#: ../aa_enabled.c:90
#, c-format
msgid "Yes\n"
msgstr ""

52
binutils/po/aa_exec.pot Normal file
View File

@@ -0,0 +1,52 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Canonical Ltd
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: apparmor@lists.ubuntu.com\n"
"POT-Creation-Date: 2020-10-14 03:37-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../aa_exec.c:48
#, c-format
msgid ""
"USAGE: %s [OPTIONS] <prog> <args>\n"
"\n"
"Confine <prog> with the specified PROFILE.\n"
"\n"
"OPTIONS:\n"
" -p PROFILE, --profile=PROFILE\t\tPROFILE to confine <prog> with\n"
" -n NAMESPACE, --namespace=NAMESPACE\tNAMESPACE to confine <prog> in\n"
" -d, --debug\t\t\t\tshow messages with debugging information\n"
" -i, --immediate\t\t\tchange profile immediately instead of at exec\n"
" -v, --verbose\t\t\t\tshow messages with stats\n"
" -h, --help\t\t\t\tdisplay this help\n"
"\n"
msgstr ""
#: ../aa_exec.c:63
msgid "aa-exec: ERROR: "
msgstr ""
#: ../aa_exec.c:74
msgid "aa-exec: DEBUG: "
msgstr ""
#: ../aa_exec.c:87
msgid "\n"
msgstr ""
#: ../aa_exec.c:105
#, c-format
msgid "exec"
msgstr ""

View File

@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2018-02-11 05:14+0000\n"
"X-Generator: Launchpad (build 18544)\n"
"X-Launchpad-Export-Date: 2019-04-18 05:33+0000\n"
"X-Generator: Launchpad (build 18928)\n"
"Language: de\n"
#: ../aa_enabled.c:26

View File

@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2016-06-01 05:15+0000\n"
"X-Generator: Launchpad (build 18053)\n"
"X-Launchpad-Export-Date: 2019-04-18 05:33+0000\n"
"X-Generator: Launchpad (build 18928)\n"
"Language: en_GB\n"
#: ../aa_enabled.c:26

71
binutils/po/es.po Normal file
View File

@@ -0,0 +1,71 @@
# Spanish translation for apparmor
# Copyright (c) 2019 Rosetta Contributors and Canonical Ltd 2019
# This file is distributed under the same license as the apparmor package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmor\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2015-11-28 10:23-0800\n"
"PO-Revision-Date: 2019-06-09 14:01+0000\n"
"Last-Translator: Adolfo Jayme <fitoschido@gmail.com>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2019-06-10 04:32+0000\n"
"X-Generator: Launchpad (build 18978)\n"
#: ../aa_enabled.c:26
#, c-format
msgid ""
"%s: [options]\n"
" options:\n"
" -q | --quiet Don't print out any messages\n"
" -h | --help Print help\n"
msgstr ""
"%s: [opciones]\n"
" opciones:\n"
" -q | --quiet No emitir ningún mensaje\n"
" -h | --help Mostrar la ayuda\n"
#: ../aa_enabled.c:45
#, c-format
msgid "unknown or incompatible options\n"
msgstr "opciones desconocidas o incompatibles\n"
#: ../aa_enabled.c:55
#, c-format
msgid "unknown option '%s'\n"
msgstr "se desconoce la opción «%s»\n"
#: ../aa_enabled.c:64
#, c-format
msgid "Yes\n"
msgstr "Sí\n"
#: ../aa_enabled.c:71
#, c-format
msgid "No - not available on this system.\n"
msgstr "No; no disponible en este sistema.\n"
#: ../aa_enabled.c:74
#, c-format
msgid "No - disabled at boot.\n"
msgstr "No; desactivado durante el arranque.\n"
#: ../aa_enabled.c:77
#, c-format
msgid "Maybe - policy interface not available.\n"
msgstr "Quizá; interfaz de directiva no disponible.\n"
#: ../aa_enabled.c:81
#, c-format
msgid "Maybe - insufficient permissions to determine availability.\n"
msgstr "Quizá; permisos insuficientes para determinar disponibilidad.\n"
#: ../aa_enabled.c:84
#, c-format
msgid "Error - '%s'\n"
msgstr "Error: «%s»\n"

View File

@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2016-06-01 05:15+0000\n"
"X-Generator: Launchpad (build 18053)\n"
"X-Launchpad-Export-Date: 2019-04-18 05:33+0000\n"
"X-Generator: Launchpad (build 18928)\n"
"Language: id\n"
#: ../aa_enabled.c:26

View File

@@ -9,13 +9,13 @@ msgstr ""
"Report-Msgid-Bugs-To: AppArmor list <apparmor@lists.ubuntu.com>\n"
"POT-Creation-Date: 2015-11-28 10:23-0800\n"
"PO-Revision-Date: 2016-03-03 08:34+0000\n"
"Last-Translator: Ivo Xavier <ivoxavier.8@gmail.com>\n"
"Last-Translator: Ivo Xavier <ivofernandes12@gmail.com>\n"
"Language-Team: Portuguese <pt@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2016-06-01 05:15+0000\n"
"X-Generator: Launchpad (build 18053)\n"
"X-Launchpad-Export-Date: 2019-04-18 05:33+0000\n"
"X-Generator: Launchpad (build 18928)\n"
"Language: pt\n"
#: ../aa_enabled.c:26

View File

@@ -9,13 +9,13 @@ msgstr ""
"Report-Msgid-Bugs-To: AppArmor list <apparmor@lists.ubuntu.com>\n"
"POT-Creation-Date: 2015-11-28 10:23-0800\n"
"PO-Revision-Date: 2016-03-29 14:46+0000\n"
"Last-Translator: Eugene Marshal <Unknown>\n"
"Last-Translator: Eugene Roskin <Unknown>\n"
"Language-Team: Russian <ru@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2016-06-01 05:15+0000\n"
"X-Generator: Launchpad (build 18053)\n"
"X-Launchpad-Export-Date: 2019-04-18 05:33+0000\n"
"X-Generator: Launchpad (build 18928)\n"
"Language: ru\n"
#: ../aa_enabled.c:26

72
binutils/po/sv.po Normal file
View File

@@ -0,0 +1,72 @@
# Swedish translation for apparmor
# Copyright (c) 2018 Rosetta Contributors and Canonical Ltd 2018
# This file is distributed under the same license as the apparmor package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmor\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2015-11-28 10:23-0800\n"
"PO-Revision-Date: 2018-09-08 03:51+0000\n"
"Last-Translator: Jonatan Nyberg <Unknown>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2019-04-18 05:33+0000\n"
"X-Generator: Launchpad (build 18928)\n"
#: ../aa_enabled.c:26
#, c-format
msgid ""
"%s: [options]\n"
" options:\n"
" -q | --quiet Don't print out any messages\n"
" -h | --help Print help\n"
msgstr ""
"%s: [options]\n"
" flaggor:\n"
" -q | --quiet Skriv inte ut några meddelanden\n"
" -h | --help Skriv ut hjälp\n"
#: ../aa_enabled.c:45
#, c-format
msgid "unknown or incompatible options\n"
msgstr "okända eller inkompatibla flaggor\n"
#: ../aa_enabled.c:55
#, c-format
msgid "unknown option '%s'\n"
msgstr "okänd flagga '%s'\n"
#: ../aa_enabled.c:64
#, c-format
msgid "Yes\n"
msgstr "Ja\n"
#: ../aa_enabled.c:71
#, c-format
msgid "No - not available on this system.\n"
msgstr "Nej - inte tillgänglig på detta system.\n"
#: ../aa_enabled.c:74
#, c-format
msgid "No - disabled at boot.\n"
msgstr "Nej - inaktiverad vid uppstart.\n"
#: ../aa_enabled.c:77
#, c-format
msgid "Maybe - policy interface not available.\n"
msgstr "Kanske - policy gränssnitt inte tillgängliga.\n"
#: ../aa_enabled.c:81
#, c-format
msgid "Maybe - insufficient permissions to determine availability.\n"
msgstr ""
"Kanske - otillräckliga behörigheter för att bestämma tillgängligheten.\n"
#: ../aa_enabled.c:84
#, c-format
msgid "Error - '%s'\n"
msgstr "Fel - '%s'\n"

72
binutils/po/tr.po Normal file
View File

@@ -0,0 +1,72 @@
# Turkish translation for apparmor
# Copyright (c) 2018 Rosetta Contributors and Canonical Ltd 2018
# This file is distributed under the same license as the apparmor package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2018.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmor\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2015-11-28 10:23-0800\n"
"PO-Revision-Date: 2018-05-19 23:10+0000\n"
"Last-Translator: Kudret EMRE <kudretemre@hotmail.com>\n"
"Language-Team: Turkish <tr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2019-04-18 05:33+0000\n"
"X-Generator: Launchpad (build 18928)\n"
#: ../aa_enabled.c:26
#, c-format
msgid ""
"%s: [options]\n"
" options:\n"
" -q | --quiet Don't print out any messages\n"
" -h | --help Print help\n"
msgstr ""
"%s: [seçenekler]\n"
" seçenekler:\n"
" -q | --quiet Hiçbir mesajı gösterme\n"
" -h | --help Yardımı görüntüler\n"
#: ../aa_enabled.c:45
#, c-format
msgid "unknown or incompatible options\n"
msgstr "bilinmeyen veya uyumsuz seçenekler\n"
#: ../aa_enabled.c:55
#, c-format
msgid "unknown option '%s'\n"
msgstr "bilinmeyen seçenek '%s'\n"
#: ../aa_enabled.c:64
#, c-format
msgid "Yes\n"
msgstr "Evet\n"
#: ../aa_enabled.c:71
#, c-format
msgid "No - not available on this system.\n"
msgstr "Hayır - Bu sistemde kullanılabilir değil.\n"
#: ../aa_enabled.c:74
#, c-format
msgid "No - disabled at boot.\n"
msgstr "Hayır - önyüklemede devredışı bırakıldı.\n"
#: ../aa_enabled.c:77
#, c-format
msgid "Maybe - policy interface not available.\n"
msgstr "Belki - policy arayüzü kullanılabilir değil.\n"
#: ../aa_enabled.c:81
#, c-format
msgid "Maybe - insufficient permissions to determine availability.\n"
msgstr ""
"Belki - kullanılabilir olup olmadığını denetlemek için yetersiz yetki.\n"
#: ../aa_enabled.c:84
#, c-format
msgid "Error - '%s'\n"
msgstr "Hata - '%s'\n"

View File

@@ -140,6 +140,6 @@ them at L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
apparmor(7), subdomain.conf(5), apparmor_parser(8), aa_change_hat(2) and
L<http://wiki.apparmor.net>.
L<https://wiki.apparmor.net>.
=cut

View File

@@ -74,40 +74,6 @@ endif
pod_clean:
-rm -f ${MANPAGES} *.[0-9].gz ${HTMLMANPAGES} pod2htm*.tmp
# =====================
# generate list of capabilities based on
# /usr/include/linux/capabilities.h for use in multiple locations in
# the source tree
# =====================
# emits defined capabilities in a simple list, e.g. "CAP_NAME CAP_NAME2"
CAPABILITIES=$(shell echo "\#include <linux/capability.h>" | cpp -dM | LC_ALL=C sed -n -e '/CAP_EMPTY_SET/d' -e 's/^\#define[ \t]\+CAP_\([A-Z0-9_]\+\)[ \t]\+\([0-9xa-f]\+\)\(.*\)$$/CAP_\1/p' | LC_ALL=C sort)
.PHONY: list_capabilities
list_capabilities: /usr/include/linux/capability.h
@echo "$(CAPABILITIES)"
# =====================
# generate list of network protocols based on
# sys/socket.h for use in multiple locations in
# the source tree
# =====================
# These are the families that it doesn't make sense for apparmor
# to mediate. We use PF_ here since that is what is required in
# bits/socket.h, but we will rewrite these as AF_.
FILTER_FAMILIES=PF_UNIX
__FILTER=$(shell echo $(strip $(FILTER_FAMILIES)) | sed -e 's/ /\\\|/g')
# emits the AF names in a "AF_NAME NUMBER," pattern
AF_NAMES=$(shell echo "\#include <sys/socket.h>" | cpp -dM | LC_ALL=C sed -n -e '/$(__FILTER)/d' -e 's/PF_LOCAL/PF_UNIX/' -e 's/^\#define[ \t]\+PF_\([A-Z0-9_]\+\)[ \t]\+\([0-9]\+\).*$$/AF_\1 \2,/p' | sort -n -k2)
.PHONY: list_af_names
list_af_names:
@echo "$(AF_NAMES)"
# =====================
# manpages
# =====================

View File

@@ -1 +1 @@
2.13
2.13.7

19
common/list_af_names.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash -e
# =====================
# generate list of network protocols based on
# sys/socket.h for use in multiple locations in
# the source tree
# =====================
# It doesn't make sence for AppArmor to mediate PF_UNIX, filter it out. Search
# for "PF_" constants since that is what is required in bits/socket.h, but
# rewrite as "AF_".
echo "#include <sys/socket.h>" | \
cpp -dM | \
LC_ALL=C sed -n \
-e '/PF_UNIX/d' \
-e 's/PF_LOCAL/PF_UNIX/' \
-e 's/^#define[ \t]\+PF_\([A-Z0-9_]\+\)[ \t]\+\([0-9]\+\).*$/AF_\1 \2,/p' | \
sort -n -k2

14
common/list_capabilities.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash -e
# =====================
# generate list of capabilities based on
# /usr/include/linux/capabilities.h for use in multiple locations in
# the source tree
# =====================
echo "#include <linux/capability.h>" | \
cpp -dM | \
LC_ALL=C sed -n \
-e '/CAP_EMPTY_SET/d' \
-e 's/^\#define[ \t]\+CAP_\([A-Z0-9_]\+\)[ \t]\+\([0-9xa-f]\+\)\(.*\)$/CAP_\1/p' | \
LC_ALL=C sort

View File

@@ -138,7 +138,7 @@ my $ratelimit_saved = sysctl_read($ratelimit_sysctl);
END { sysctl_write($ratelimit_sysctl, $ratelimit_saved); }
sysctl_write($ratelimit_sysctl, 0);
UI_Info(gettext("\nBefore you begin, you may wish to check if a\nprofile already exists for the application you\nwish to confine. See the following wiki page for\nmore information:\nhttp://wiki.apparmor.net/index.php/Profiles"));
UI_Info(gettext("\nBefore you begin, you may wish to check if a\nprofile already exists for the application you\nwish to confine. See the following wiki page for\nmore information:\nhttps://gitlab.com/apparmor/apparmor/wikis/Profiles"));
UI_Important(gettext("Please start the application to be profiled in \nanother window and exercise its functionality now.\n\nOnce completed, select the \"Scan\" button below in \norder to scan the system logs for AppArmor events. \n\nFor each AppArmor event, you will be given the \nopportunity to choose whether the access should be \nallowed or denied."));
@@ -195,7 +195,7 @@ for my $p (sort keys %helpers) {
}
UI_Info(gettext("Reloaded AppArmor profiles in enforce mode."));
UI_Info(gettext("\nPlease consider contributing your new profile! See\nthe following wiki page for more information:\nhttp://wiki.apparmor.net/index.php/Profiles\n"));
UI_Info(gettext("\nPlease consider contributing your new profile! See\nthe following wiki page for more information:\nhttps://gitlab.com/apparmor/apparmor/wikis/Profiles\n"));
UI_Info(sprintf(gettext('Finished generating profile for %s.'), $fqdbin));
exit 0;

View File

@@ -58,7 +58,7 @@ if test "$with_perl" = "yes"; then
AC_PATH_PROG(PERL, perl)
test -z "$PERL" && AC_MSG_ERROR([perl is required when enabling perl bindings])
perl_includedir="`$PERL -e 'use Config; print $Config{archlib}'`/CORE"
AC_CHECK_FILE($perl_includedir/perl.h, enable_perl=yes, enable_perl=no)
AS_IF([test -e "$perl_includedir/perl.h"], enable_perl=yes, enable_perl=no)
fi
@@ -81,7 +81,7 @@ AM_CONDITIONAL(HAVE_RUBY, test x$with_ruby = xyes)
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h stdint.h syslog.h)
AC_CHECK_FUNCS([asprintf __secure_getenv secure_getenv])
AC_CHECK_FUNCS([asprintf __secure_getenv secure_getenv reallocarray])
AM_PROG_CC_C_O
AC_C_CONST

View File

@@ -257,6 +257,6 @@ should be used.
apparmor(7), apparmor.d(5), apparmor_parser(8), aa_change_profile(2),
aa_getcon(2) and
L<http://wiki.apparmor.net>.
L<https://wiki.apparmor.net>.
=cut

View File

@@ -204,6 +204,6 @@ separate processes should be used.
=head1 SEE ALSO
apparmor(7), apparmor.d(5), apparmor_parser(8), aa_change_hat(2) and
L<http://wiki.apparmor.net>.
L<https://wiki.apparmor.net>.
=cut

View File

@@ -161,6 +161,6 @@ L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
openat(2) and L<http://wiki.apparmor.net>.
openat(2) and L<https://wiki.apparmor.net>.
=cut

View File

@@ -115,6 +115,6 @@ L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
apparmor(7), apparmor.d(5), apparmor_parser(8), and
L<http://wiki.apparmor.net>.
L<https://wiki.apparmor.net>.
=cut

View File

@@ -132,6 +132,6 @@ L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
apparmor(7), apparmor.d(5), apparmor_parser(8), aa_change_profile(2),
aa_splitcon(3) and L<http://wiki.apparmor.net>.
aa_splitcon(3) and L<https://wiki.apparmor.net>.
=cut

View File

@@ -160,6 +160,6 @@ L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
aa_features(3), openat(2) and L<http://wiki.apparmor.net>.
aa_features(3), openat(2) and L<https://wiki.apparmor.net>.
=cut

View File

@@ -175,6 +175,6 @@ L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
aa_features(3), aa_kernel_interface(3), openat(2) and
L<http://wiki.apparmor.net>.
L<https://wiki.apparmor.net>.
=cut

View File

@@ -128,6 +128,6 @@ L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
apparmor(7), apparmor.d(5), apparmor_parser(8), aa_getcon(2), aa_splitcon(3)
and L<http://wiki.apparmor.net>.
and L<https://wiki.apparmor.net>.
=cut

View File

@@ -67,6 +67,6 @@ L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
aa_getcon(2) and L<http://wiki.apparmor.net>.
aa_getcon(2) and L<https://wiki.apparmor.net>.
=cut

View File

@@ -216,6 +216,6 @@ separate processes should be used.
=head1 SEE ALSO
apparmor(7), apparmor.d(5), apparmor_parser(8), aa_change_profile(2),
aa_getcon(2) and L<http://wiki.apparmor.net>.
aa_getcon(2) and L<https://wiki.apparmor.net>.
=cut

View File

@@ -20,6 +20,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <sys/socket.h>
#include <sys/types.h>
#ifdef __cplusplus
@@ -68,7 +69,7 @@ extern int aa_is_enabled(void);
extern int aa_find_mountpoint(char **mnt);
/* Prototypes for self directed domain transitions
* see <http://apparmor.net>
* see <https://apparmor.net>
* Please see the change_hat(2) manpage for information.
*/

View File

@@ -64,7 +64,7 @@ variable to configure. See ``configure --help'' for reference.
# Check if you have distutils, else fail
#
AC_MSG_CHECKING([for the distutils Python package])
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1 | grep -v DeprecationWarning`
if test -z "$ac_distutils_result"; then
AC_MSG_RESULT([yes])
else
@@ -75,12 +75,14 @@ $ac_distutils_result])
PYTHON_VERSION=""
fi
AC_PATH_TOOL([PYTHON_CONFIG],[`basename $PYTHON`-config])
#
# Check for Python include path
#
AC_MSG_CHECKING([for Python include path])
if type $PYTHON-config; then
PYTHON_CPPFLAGS=`$PYTHON-config --includes`
if test -n "$PYTHON_CONFIG"; then
PYTHON_CPPFLAGS=`$PYTHON_CONFIG --includes`
fi
if test -z "$PYTHON_CPPFLAGS"; then
python_path=`$PYTHON -c "import sys; import distutils.sysconfig;\
@@ -97,8 +99,8 @@ sys.stdout.write('%s\n' % distutils.sysconfig.get_python_inc());"`
# Check for Python library path
#
AC_MSG_CHECKING([for Python library path])
if type $PYTHON-config; then
PYTHON_LDFLAGS=`$PYTHON-config --ldflags`
if test -n "$PYTHON_CONFIG"; then
PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
fi
if test -z "$PYTHON_LDFLAGS"; then
# (makes two attempts to ensure we've got a version number
@@ -139,7 +141,7 @@ sys.stdout.write('%s\n' % distutils.sysconfig.get_python_lib(0,0));"`
if test -z "$PYTHON_EXTRA_LIBS"; then
PYTHON_EXTRA_LIBS=`$PYTHON -c "import sys; import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
sys.stdout.write('%s %s\n' % (conf('LOCALMODLIBS'), conf('LIBS')))"`
sys.stdout.write('%s %s %s\n' % (conf('BLDLIBRARY'), conf('LOCALMODLIBS'), conf('LIBS')))"`
fi
AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
AC_SUBST(PYTHON_EXTRA_LIBS)
@@ -164,7 +166,7 @@ sys.stdout.write('%s\n' % conf('LINKFORSHARED'))"`
# save current global flags
ac_save_LIBS="$LIBS"
ac_save_CPPFLAGS="$CPPFLAGS"
LIBS="$ac_save_LIBS $PYTHON_LDFLAGS"
LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS"
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
AC_TRY_LINK([
#include <Python.h>

View File

@@ -26,24 +26,24 @@ INCLUDES = $(all_includes)
# For more information, see:
# http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
#
AA_LIB_CURRENT = 6
AA_LIB_REVISION = 0
AA_LIB_AGE = 5
AA_LIB_CURRENT = 7
AA_LIB_REVISION = 3
AA_LIB_AGE = 6
SUFFIXES = .pc.in .pc
BUILT_SOURCES = grammar.h scanner.h af_protos.h PMurHash.h
BUILT_SOURCES = grammar.h scanner.h af_protos.h
AM_LFLAGS = -v
AM_YFLAGS = -d -p aalogparse_
AM_CFLAGS = -Wall
AM_CFLAGS = -Wall -flto-partition=none
AM_CPPFLAGS = -D_GNU_SOURCE -I$(top_srcdir)/include/
scanner.h: scanner.l
$(LEX) -v $<
scanner.c: scanner.l
af_protos.h: /usr/include/netinet/in.h
LC_ALL=C sed -n -e "/IPPROTO_MAX/d" -e "s/^\#define[ \\t]\\+IPPROTO_\\([A-Z0-9_]\\+\\)\\(.*\\)$$/AA_GEN_PROTO_ENT(\\UIPPROTO_\\1, \"\\L\\1\")/p" $< > $@
af_protos.h:
echo '#include <netinet/in.h>' | $(CC) -E -dM - | LC_ALL=C sed -n -e "/IPPROTO_MAX/d" -e "s/^\#define[ \\t]\\+IPPROTO_\\([A-Z0-9_]\\+\\)\\(.*\\)$$/AA_GEN_PROTO_ENT(\\UIPPROTO_\\1, \"\\L\\1\")/p" > $@
lib_LTLIBRARIES = libapparmor.la
noinst_HEADERS = grammar.h parser.h scanner.h af_protos.h private.h PMurHash.h

View File

@@ -219,7 +219,7 @@ static int init_features_hash(aa_features *features)
/* portable murmur3 hash
* https://github.com/aappleby/smhasher/wiki/MurmurHash3
*/
PMurHash32_Process(&hash, &carry, features, len);
PMurHash32_Process(&hash, &carry, string, len);
hash = PMurHash32_Result(hash, carry, len);
if (snprintf(features->hash, HASH_SIZE,

View File

@@ -19,7 +19,12 @@
%{
/* set the following to non-zero to get bison to emit debugging
* information about tokens given and rules matched. */
* information about tokens given and rules matched.
* Also:
* Uncomment the %defines
* parse.error
* parse.trace
*/
#define YYDEBUG 0
#include <string.h>
#include <aalogparse.h>
@@ -34,7 +39,9 @@ aa_log_record *ret_record;
* emit messages when asked for. */
void aalogparse_error(void *scanner, char const *s)
{
//printf("ERROR: %s\n", s);
#if (YYDEBUG != 0)
printf("ERROR: %s\n", s);
#endif
ret_record->event = AA_RECORD_INVALID;
}
@@ -68,6 +75,11 @@ aa_record_event_type lookup_aa_event(unsigned int type)
%}
%defines
/* uncomment for debugging
%define parse.error verbose
%define parse.trace
*/
%define api.pure
%lex-param{void *scanner}
%parse-param{void *scanner}
@@ -128,6 +140,8 @@ aa_record_event_type lookup_aa_event(unsigned int type)
%token TOK_KEY_PEER_PID
%token TOK_KEY_PROFILE
%token TOK_KEY_PEER_PROFILE
%token TOK_KEY_LABEL
%token TOK_KEY_PEER_LABEL
%token TOK_KEY_PEER
%token TOK_AUDIT
%token TOK_KEY_FAMILY
@@ -194,7 +208,7 @@ new_syntax:
| TOK_TYPE_AA_ERROR audit_msg key_list { ret_record->event = AA_RECORD_ERROR; }
| TOK_TYPE_UNKNOWN audit_msg key_list { ret_record->event = lookup_aa_event($1); }
| TOK_TYPE_LSM_AVC audit_msg key_list
| TOK_TYPE_USER_AVC audit_user_msg TOK_SINGLE_QUOTE key_list TOK_SINGLE_QUOTE
| TOK_TYPE_USER_AVC audit_user_msg
;
other_audit: TOK_TYPE_OTHER audit_msg TOK_MSG_REST
@@ -218,6 +232,11 @@ syslog_type:
{ ret_record->version = AA_RECORD_SYNTAX_V2; free($2); free($4); }
| syslog_date TOK_ID TOK_SYSLOG_KERNEL TOK_DMESG_STAMP key_type audit_id key_list
{ ret_record->version = AA_RECORD_SYNTAX_V2; free($2); free($4); }
/* needs update: hard newline in handling mutiline log messages */
| syslog_date TOK_ID TOK_SYSLOG_KERNEL TOK_DMESG_STAMP TOK_AUDIT TOK_COLON key_type audit_id audit_user_msg_partial_tail
{ ret_record->version = AA_RECORD_SYNTAX_V2; free($2); }
| syslog_date TOK_ID TOK_SYSLOG_KERNEL TOK_DMESG_STAMP TOK_AUDIT TOK_COLON key_type audit_id audit_user_msg_tail
{ ret_record->version = AA_RECORD_SYNTAX_V2; free($2); }
| syslog_date TOK_ID TOK_SYSLOG_KERNEL TOK_DMESG_STAMP TOK_AUDIT TOK_COLON key_type audit_id key_list
{ ret_record->version = AA_RECORD_SYNTAX_V2; free($2); free($4); }
| syslog_date TOK_ID TOK_SYSLOG_KERNEL TOK_AUDIT TOK_COLON key_type audit_id key_list
@@ -234,7 +253,13 @@ audit_dispatch:
audit_msg: TOK_KEY_MSG TOK_EQUALS audit_id
;
audit_user_msg: TOK_KEY_MSG TOK_EQUALS audit_id ignored_pid ignored_uid ignored_auid ignored_ses TOK_KEY_MSG TOK_EQUALS
audit_user_msg_partial_tail: ignored_pid ignored_uid ignored_auid ignored_ses TOK_KEY_MSG TOK_EQUALS TOK_SINGLE_QUOTE key_list
;
audit_user_msg_tail: audit_user_msg_partial_tail TOK_SINGLE_QUOTE
;
audit_user_msg: TOK_KEY_MSG TOK_EQUALS audit_id audit_user_msg_tail
;
audit_id: TOK_AUDIT TOK_OPEN_PAREN TOK_AUDIT_DIGITS TOK_PERIOD TOK_AUDIT_DIGITS TOK_COLON TOK_AUDIT_DIGITS TOK_CLOSE_PAREN TOK_COLON
@@ -292,6 +317,10 @@ key: TOK_KEY_OPERATION TOK_EQUALS TOK_QUOTED_STRING
{ ret_record->profile = $3;}
| TOK_KEY_PEER_PROFILE TOK_EQUALS safe_string
{ ret_record->peer_profile = $3;}
| TOK_KEY_LABEL TOK_EQUALS safe_string
{ ret_record->profile = $3;}
| TOK_KEY_PEER_LABEL TOK_EQUALS safe_string
{ ret_record->peer_profile = $3;}
| TOK_KEY_FAMILY TOK_EQUALS TOK_QUOTED_STRING
{ ret_record->net_family = $3;}
| TOK_KEY_SOCK_TYPE TOK_EQUALS TOK_QUOTED_STRING

View File

@@ -43,6 +43,7 @@
__asm__ (".symver " #real "," #name "@" #version)
#define default_symbol_version(real, name, version) \
__asm__ (".symver " #real "," #name "@@" #version)
#define DLLEXPORT __attribute__((visibility("default"),externally_visible))
#define UNCONFINED "unconfined"
#define UNCONFINED_SIZE strlen(UNCONFINED)
@@ -500,7 +501,7 @@ int aa_change_onexec(const char *profile)
}
/* create an alias for the old change_hat@IMMUNIX_1.0 symbol */
extern typeof((__change_hat)) __old_change_hat __attribute__((alias ("__change_hat")));
DLLEXPORT extern typeof((__change_hat)) __old_change_hat __attribute__((alias ("__change_hat")));
symbol_version(__old_change_hat, change_hat, IMMUNIX_1.0);
default_symbol_version(__change_hat, change_hat, APPARMOR_1.0);
@@ -889,7 +890,7 @@ int query_label(uint32_t mask, char *query, size_t size, int *allowed,
/* export multiple aa_query_label symbols to compensate for downstream
* releases with differing symbol versions. */
extern typeof((query_label)) __aa_query_label __attribute__((alias ("query_label")));
DLLEXPORT extern typeof((query_label)) __aa_query_label __attribute__((alias ("query_label")));
symbol_version(__aa_query_label, aa_query_label, APPARMOR_1.1);
default_symbol_version(query_label, aa_query_label, APPARMOR_2.9);

View File

@@ -6,14 +6,14 @@
IMMUNIX_1.0 {
global:
change_hat;
change_hat; __old_change_hat;
local:
*;
};
APPARMOR_1.0 {
global:
change_hat;
change_hat; __change_hat;
parse_record;
free_record;
local:
@@ -24,7 +24,7 @@ APPARMOR_1.1 {
global:
aa_is_enabled;
aa_find_mountpoint;
aa_change_hat;
aa_change_hat; __old_change_hat;
aa_change_hatv;
aa_change_hat_vargs;
aa_change_profile;
@@ -37,7 +37,7 @@ APPARMOR_1.1 {
free_record;
aa_getprocattr_raw;
aa_getprocattr;
aa_query_label;
aa_query_label; __aa_query_label;
# no more symbols here, please
@@ -47,7 +47,7 @@ APPARMOR_1.1 {
APPARMOR_2.9 {
global:
aa_query_label;
aa_query_label; query_label;
local:
*;
} APPARMOR_1.1;
@@ -108,9 +108,17 @@ APPARMOR_2.13 {
*;
} APPARMOR_2.11;
APPARMOR_2.13.1 {
global:
aa_policy_cache_add_ro_dir;
local:
*;
} APPARMOR_2.13;
PRIVATE {
global:
_aa_is_blacklisted;
_aa_asprintf;
_aa_autofree;
_aa_autoclose;
_aa_autofclose;

View File

@@ -301,8 +301,10 @@ static int cache_dir_from_path_and_features(char **cache_path,
PDEBUG("cache_dir_from_path_and_features() callback found '%s'\n", data.cache_name);
*cache_path = data.cache_name;
return 0;
} else if (rc)
} else if (rc) {
PDEBUG("cache_dir_from_path_and_features() callback returned an error'%m'\n");
return -1;
}
/* no dir found use 1 higher than highest dir n searched */
len = asprintf(&cache_dir, "%s/%s.%d", path, features_id, data.n + 1);
if (len == -1)
@@ -313,18 +315,20 @@ static int cache_dir_from_path_and_features(char **cache_path,
return 0;
}
/* will return the cache_dir or NULL */
static int open_or_create_cache_dir(aa_features *features, int dirfd,
const char *path, bool create)
const char *path, bool create,
char **cache_dir)
{
autofree char *cache_dir = NULL;
int fd;
if (cache_dir_from_path_and_features(&cache_dir, dirfd, path,
*cache_dir = NULL;
if (cache_dir_from_path_and_features(cache_dir, dirfd, path,
features))
return -1;
open:
fd = openat(dirfd, cache_dir, O_RDONLY | O_CLOEXEC | O_DIRECTORY);
fd = openat(dirfd, *cache_dir, O_RDONLY | O_CLOEXEC | O_DIRECTORY);
if (fd < 0) {
/* does the dir exist? */
if (create && errno == ENOENT) {
@@ -336,23 +340,24 @@ open:
* /etc/apparmor.d/cache.d/<features_id>/
* 3) Try to reopen the cache directory
*/
if (mkdirat(fd, path, 0700) == -1 &&
if (mkdirat(dirfd, path, 0700) == -1 &&
errno != EEXIST) {
PERROR("Can't create cache location '%s': %m\n",
path);
} else if (mkdirat(dirfd, cache_dir, 0700) == -1 &&
} else if (mkdirat(dirfd, *cache_dir, 0700) == -1 &&
errno != EEXIST) {
PERROR("Can't create cache directory '%s': %m\n",
cache_dir);
*cache_dir);
} else {
goto open;
}
} else if (create) {
PERROR("Can't update cache directory '%s': %m\n", cache_dir);
PERROR("Can't update cache directory '%s': %m\n", *cache_dir);
} else {
PDEBUG("Cache directory '%s' does not exist\n", cache_dir);
PDEBUG("Cache directory '%s' does not exist\n", *cache_dir);
}
PDEBUG("Could not open cache_dir: %m");
return -1;
}
@@ -380,6 +385,7 @@ int aa_policy_cache_new(aa_policy_cache **policy_cache,
aa_features *kernel_features,
int dirfd, const char *path, uint16_t max_caches)
{
autofree char *cache_dir = NULL;
aa_policy_cache *pc;
bool create = max_caches > 0;
autofree const char *features_id = NULL;
@@ -407,13 +413,16 @@ int aa_policy_cache_new(aa_policy_cache **policy_cache,
aa_features_ref(kernel_features);
} else if (aa_features_new_from_kernel(&kernel_features) == -1) {
aa_policy_cache_unref(pc);
PDEBUG("%s: Failed to obtain features %m\n", __FUNCTION__);
return -1;
}
pc->features = kernel_features;
fd = open_or_create_cache_dir(kernel_features, dirfd, path, create);
fd = open_or_create_cache_dir(kernel_features, dirfd, path, create,
&cache_dir);
if (fd == -1) {
aa_policy_cache_unref(pc);
PDEBUG("%s: Failed to open_or_create_dir %m\n", __FUNCTION__);
return -1;
}
pc->dirfd[0] = fd;
@@ -443,16 +452,20 @@ int aa_policy_cache_new(aa_policy_cache **policy_cache,
int aa_policy_cache_add_ro_dir(aa_policy_cache *policy_cache, int dirfd,
const char *path)
{
autofree char *cache_dir = NULL;
int fd;
if (policy_cache->n >= MAX_POLICY_CACHE_OVERLAY_DIRS) {
errno = ENOSPC;
PDEBUG("%s: exceeded number of supported cache overlays\n", __FUNCTION__);
return -1;
}
fd = open_or_create_cache_dir(policy_cache->features, dirfd, path,
false);
if (fd == -1)
false, &cache_dir);
if (fd == -1) {
PDEBUG("%s: failed to open_or_create_cache_dir %m\n", __FUNCTION__);
return -1;
}
policy_cache->dirfd[policy_cache->n++] = fd;
return 0;

View File

@@ -38,11 +38,24 @@
#ifndef HAVE_SECURE_GETENV
#ifdef HAVE___SECURE_GETENV
#define secure_getenv __secure_getenv
#elif ENABLE_DEBUG_OUTPUT
#error Debug output is not possible without a secure_getenv() implementation.
#else
#error neither secure_getenv nor __secure_getenv is available
#define secure_getenv(env) NULL
#endif
#endif
/**
* Allow libapparmor to build on older glibcs and other libcs that do
* not support reallocarray.
*/
#ifndef HAVE_REALLOCARRY
void *reallocarray(void *ptr, size_t nmemb, size_t size)
{
return realloc(ptr, nmemb * size);
}
#endif
struct ignored_suffix_t {
const char * text;
int len;
@@ -173,16 +186,6 @@ int _aa_asprintf(char **strp, const char *fmt, ...)
return rc;
}
static int dot_or_dot_dot_filter(const struct dirent *ent)
{
if (strcmp(ent->d_name, ".") == 0 ||
strcmp(ent->d_name, "..") == 0)
return 0;
return 1;
}
/* stops on first error, can use errno or return value to communicate
* the goal is to use this to replace _aa_dirat_for_each, but that will
* be a different patch.
@@ -191,6 +194,7 @@ int _aa_dirat_for_each2(int dirfd, const char *name, void *data,
int (* cb)(int, const struct dirent *, void *))
{
autoclose int cb_dirfd = -1;
int fd_for_dir = -1;
const struct dirent *ent;
DIR *dir;
int save, rc;
@@ -206,15 +210,16 @@ int _aa_dirat_for_each2(int dirfd, const char *name, void *data,
PDEBUG("could not open directory fd '%d' '%s': %m\n", dirfd, name);
return -1;
}
dir = fdopendir(cb_dirfd);
if (!dir) {
PDEBUG("could not open directory '%s' from fd '%d': %m\n", name, cb_dirfd);
/* dup cd_dirfd because fdopendir has claimed the fd passed to it */
fd_for_dir = dup(cb_dirfd);
if (fd_for_dir == -1) {
PDEBUG("could not dup directory fd '%s': %m\n", name);
return -1;
}
/* dup cd_dirfd because fdopendir has claimed the fd passed to it */
cb_dirfd = dup(cb_dirfd);
dir = fdopendir(fd_for_dir);
if (!dir) {
PDEBUG("could not dup directory fd '%s': %m\n", name);
PDEBUG("could not open directory '%s' from fd '%d': %m\n", name, fd_for_dir);
close(fd_for_dir);
return -1;
}
@@ -273,39 +278,112 @@ static int insert(struct overlaydir **overlayptr, int *max_size, int *size,
#define merge(overlay, n_overlay, max_size, list, n_list, dirfd) \
({ \
int i, j; \
int y, z; \
int rc = 0; \
\
for (i = 0, j = 0; i < n_overlay && j < n_list; ) { \
int res = strcmp(overlay[i].dent->d_name, list[j]->d_name);\
for (y = 0, z = 0; y < n_overlay && z < n_list; ) { \
int res = strcmp(overlay[y].dent->d_name, list[z]->d_name);\
if (res < 0) { \
i++; \
y++; \
continue; \
} else if (res == 0) { \
free(list[j]); \
list[j] = NULL; \
i++; \
j++; \
free(list[z]); \
list[z] = NULL; \
y++; \
z++; \
} else { \
if ((rc = insert(&overlay, &max_size, &n_overlay, i,\
n_list - j, dirfd, list[j]))) \
if ((rc = insert(&overlay, &max_size, &n_overlay, y,\
n_list - z, dirfd, list[z]))) \
goto fail; \
i++; \
list[j++] = NULL; \
y++; \
list[z++] = NULL; \
} \
} \
while (j < n_list) { \
if ((rc = insert(&overlay, &max_size, &n_overlay, i, \
n_list - j, dirfd,list[j]))) \
while (z < n_list) { \
if ((rc = insert(&overlay, &max_size, &n_overlay, y, \
n_list - z, dirfd,list[z]))) \
goto fail; \
i++; \
list[j++] = NULL; \
y++; \
list[z++] = NULL; \
} \
\
fail: \
rc; \
})
static ssize_t readdirfd(int dirfd, struct dirent ***out,
int (*dircmp)(const struct dirent **, const struct dirent **))
{
struct dirent **dents = NULL, *dent;
ssize_t n = 0;
size_t i;
int save;
DIR *dir;
*out = NULL;
/*
* closedir(dir) will close the underlying fd, so we need
* to dup first
*/
if ((dirfd = dup(dirfd)) < 0) {
PDEBUG("dup of dirfd failed: %m\n");
return -1;
}
if ((dir = fdopendir(dirfd)) == NULL) {
PDEBUG("fdopendir of dirfd failed: %m\n");
close(dirfd);
return -1;
}
/* Get number of directory entries */
while ((dent = readdir(dir)) != NULL) {
if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, ".."))
continue;
n++;
}
rewinddir(dir);
dents = calloc(n, sizeof(struct dirent *));
if (!dents)
goto fail;
for (i = 0; i < n; ) {
if ((dent = readdir(dir)) == NULL) {
PDEBUG("readdir of entry[%d] failed: %m\n", i);
goto fail;
}
if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, ".."))
continue;
dents[i] = malloc(sizeof(*dents[i]));
if (!dents[i])
goto fail;
memcpy(dents[i], dent, sizeof(*dent));
i++;
}
if (dircmp)
qsort(dents, n, sizeof(struct dirent *), (int (*)(const void *, const void *))dircmp);
*out = dents;
closedir(dir);
return n;
fail:
save = errno;
if (dents) {
for (i = 0; i < n; i++)
free(dents[i]);
}
free(dents);
closedir(dir);
errno = save;
return -1;
}
int _aa_overlaydirat_for_each(int dirfd[], int n, void *data,
int (* cb)(int, const char *, struct stat *, void *))
{
@@ -316,15 +394,14 @@ int _aa_overlaydirat_for_each(int dirfd[], int n, void *data,
int rc = 0;
for (i = 0; i < n; i++) {
n_list = scandirat(dirfd[i], ".", &list, dot_or_dot_dot_filter,
alphasort);
n_list = readdirfd(dirfd[i], &list, alphasort);
if (n_list == -1) {
PDEBUG("scandirat of dirfd[%d] failed: %m\n", i);
return -1;
}
if (merge(overlay, size, max_size, list, n_list, dirfd[i])) {
for (k = 0; k < n_list; k++)
free(list[i]);
free(list[k]);
for (k = 0; k < size; k++)
free(overlay[k].dent);
return -1;
@@ -398,8 +475,7 @@ int _aa_dirat_for_each(int dirfd, const char *name, void *data,
return -1;
}
num_dirs = scandirat(cb_dirfd, ".", &namelist,
dot_or_dot_dot_filter, NULL);
num_dirs = readdirfd(cb_dirfd, &namelist, NULL);
if (num_dirs == -1) {
PDEBUG("scandirat of directory '%s' failed: %m\n", name);
return -1;

View File

@@ -131,6 +131,8 @@ key_pid "pid"
key_peer_pid "peer_pid"
key_profile "profile"
key_peer_profile "peer_profile"
key_label "label"
key_peer_label "peer_label"
key_family "family"
key_sock_type "sock_type"
key_protocol "protocol"
@@ -314,6 +316,8 @@ yy_flex_debug = 0;
{key_peer_pid} { return(TOK_KEY_PEER_PID); }
{key_profile} { BEGIN(safe_string); return(TOK_KEY_PROFILE); }
{key_peer_profile} { BEGIN(safe_string); return(TOK_KEY_PEER_PROFILE); }
{key_label} { BEGIN(safe_string); return(TOK_KEY_LABEL); }
{key_peer_label} { BEGIN(safe_string); return(TOK_KEY_PEER_LABEL); }
{key_family} { return(TOK_KEY_FAMILY); }
{key_sock_type} { return(TOK_KEY_SOCK_TYPE); }
{key_protocol} { return(TOK_KEY_PROTOCOL); }

View File

@@ -12,6 +12,7 @@ LibAppArmor.pm: libapparmor_wrap.c
Makefile.perl: Makefile.PL LibAppArmor.pm
$(PERL) $< PREFIX=$(prefix) MAKEFILE=$@
sed -ie 's/LD_RUN_PATH="\x24(LD_RUN_PATH)"//g' Makefile.perl
sed -ie 's/^LD_RUN_PATH.*//g' Makefile.perl
LibAppArmor.so: libapparmor_wrap.c Makefile.perl

View File

@@ -5,7 +5,7 @@ setup(name = 'LibAppArmor',
version = '@VERSION@',
author = 'AppArmor Dev Team',
author_email = 'apparmor@lists.ubuntu.com',
url = 'http://wiki.apparmor.net',
url = 'https://wiki.apparmor.net',
description = 'AppArmor python bindings',
download_url = 'https://launchpad.net/apparmor/+download',
package_dir = {'LibAppArmor': '@srcdir@'},

View File

@@ -10,8 +10,7 @@ test_python.py: test_python.py.in $(top_builddir)/config.status
CLEANFILES = test_python.py
# bah, how brittle is this?
PYTHON_DIST_BUILD_PATH = '$(builddir)/../build/$$($(PYTHON) -c "import distutils.util; import platform; print(\"lib.%s-%s\" %(distutils.util.get_platform(), platform.python_version()[:3]))")'
PYTHON_DIST_BUILD_PATH = '$(builddir)/../build/$$($(PYTHON) buildpath.py)'
TESTS = test_python.py
TESTS_ENVIRONMENT = \

View File

@@ -0,0 +1,13 @@
#!/usr/bin/python3
# the build path has changed in setuptools 62.1:
# https://github.com/pypa/setuptools/commit/1c23f5e1e4b18b50081cbabb2dea22bf345f5894
import sys
import sysconfig
import setuptools
if tuple(map(int, setuptools.__version__.split("."))) >= (62, 1):
identifier = sys.implementation.cache_tag
else:
identifier = "%d.%d" % sys.version_info[:2]
print("lib.%s-%s" % (sysconfig.get_platform(), identifier))

View File

@@ -74,7 +74,7 @@ class AAPythonBindingsTests(unittest.TestCase):
libapparmor.free_record(swig_record)
expected = self.parse_output_file(outfile)
self.assertEquals(expected, record,
self.assertEqual(expected, record,
"expected records did not match\n" +
"expected = %s\nactual = %s" % (expected, record))
@@ -90,7 +90,7 @@ class AAPythonBindingsTests(unittest.TestCase):
line = l.rstrip('\n')
count += 1
if line == "START":
self.assertEquals(count, 1,
self.assertEqual(count, 1,
"Unexpected output format in %s" % (outfile))
continue
else:
@@ -109,7 +109,7 @@ class AAPythonBindingsTests(unittest.TestCase):
new_record = dict()
for key in [x for x in dir(record) if not (x.startswith('_') or x == 'this')]:
value = record.__getattr__(key)
value = getattr(record, key)
if key == "event" and value in EVENT_MAP:
new_record[key] = EVENT_MAP[value]
elif key == "version":

View File

@@ -14,6 +14,7 @@ int main(int argc, char **argv)
FILE *testcase;
char log_line[1024];
aa_log_record *test = NULL;
size_t size;
int ret = -1;
if (argc != 2)
@@ -32,14 +33,14 @@ int main(int argc, char **argv)
return(1);
}
if (fgets(log_line, 1023, testcase) == NULL)
{
size = fread(log_line, 1, 1023, testcase);
if (ferror(testcase)) {
fprintf(stderr, "Could not read testcase.\n");
fclose(testcase);
return(1);
}
fclose(testcase);
log_line[size] = 0;
test = parse_record(log_line);

View File

@@ -0,0 +1 @@
Aug 3 00:00:41 liuchao-virtual-machine kernel: [ 4362.615262] audit: type=1400 audit(1596384041.705:290): apparmor="DENIED" operation="symlink" profile="/home/test.sh" name="/home/b.c" pid=8016 comm="ln" requested_mask="c" denied_mask="c" fsuid=0 ouid=0

View File

@@ -0,0 +1,15 @@
START
File: symlink.in
Event type: AA_RECORD_DENIED
Audit ID: 1596384041.705:290
Operation: symlink
Mask: c
Denied Mask: c
fsuid: 0
ouid: 0
Profile: /home/test.sh
Name: /home/b.c
Command: ln
PID: 8016
Epoch: 1596384041
Audit subid: 290

View File

@@ -0,0 +1,4 @@
/home/test.sh {
owner /home/b.c w,
}

View File

@@ -0,0 +1 @@
Jun 20 17:57:06 ns1 kernel: [4835959.046111] audit: type=1107 audit(1561053426.749:186): pid=640 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="ALLOWED" operation="dbus_method_call" bus="system" path="/org/freedesktop/systemd1" interface="org.freedesktop.systemd1.Manager" member="LookupDynamicUserByName" mask="send" name="org.freedesktop.systemd1" pid=20596 label="/tmp/apparmor-2.8.0/tests/regression/apparmor/dbus_service" peer_pid=1 peer_label="unconfined" exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'

View File

@@ -0,0 +1,18 @@
START
File: testcase_dbus_08.in
Event type: AA_RECORD_ALLOWED
Audit ID: 1561053426.749:186
Operation: dbus_method_call
Denied Mask: send
Profile: /tmp/apparmor-2.8.0/tests/regression/apparmor/dbus_service
Peer profile: unconfined
Name: org.freedesktop.systemd1
Command: /usr/bin/dbus-daemon
PID: 20596
Peer PID: 1
DBus bus: system
DBus path: /org/freedesktop/systemd1
DBus interface: org.freedesktop.systemd1.Manager
DBus member: LookupDynamicUserByName
Epoch: 1561053426
Audit subid: 186

View File

@@ -0,0 +1,4 @@
/tmp/apparmor-2.8.0/tests/regression/apparmor/dbus_service {
dbus send bus=system path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=LookupDynamicUserByName peer=(label=unconfined),
}

View File

@@ -0,0 +1,2 @@
Jun 20 17:57:06 ns1 kernel: [4835959.046111] audit: type=1107 audit(1561053426.749:186): pid=640 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="ALLOWED" operation="dbus_method_call" bus="system" path="/org/freedesktop/systemd1" interface="org.freedesktop.systemd1.Manager" member="LookupDynamicUserByName" mask="send" name="org.freedesktop.systemd1" pid=20596 label="/tmp/apparmor-2.8.0/tests/regression/apparmor/dbus_service" peer_pid=1 peer_label="unconfined"
exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'

View File

@@ -0,0 +1,18 @@
START
File: testcase_dbus_09.in
Event type: AA_RECORD_ALLOWED
Audit ID: 1561053426.749:186
Operation: dbus_method_call
Denied Mask: send
Profile: /tmp/apparmor-2.8.0/tests/regression/apparmor/dbus_service
Peer profile: unconfined
Name: org.freedesktop.systemd1
Command: /usr/bin/dbus-daemon
PID: 20596
Peer PID: 1
DBus bus: system
DBus path: /org/freedesktop/systemd1
DBus interface: org.freedesktop.systemd1.Manager
DBus member: LookupDynamicUserByName
Epoch: 1561053426
Audit subid: 186

View File

@@ -0,0 +1,3 @@
/tmp/apparmor-2.8.0/tests/regression/apparmor/dbus_service {
dbus send bus=system path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=LookupDynamicUserByName peer=( name=org.freedesktop.systemd1, label=unconfined),
}

View File

@@ -0,0 +1 @@
Jun 20 17:57:06 ns1 kernel: [4835959.046111] audit: type=1107 audit(1561053426.749:186): pid=640 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="ALLOWED" operation="dbus_method_call" bus="system" path="/org/freedesktop/systemd1" interface="org.freedesktop.systemd1.Manager" member="LookupDynamicUserByName" mask="send" name="org.freedesktop.systemd1" pid=20596 label="/tmp/apparmor-2.8.0/tests/regression/apparmor/dbus_service" peer_pid=1 peer_label="unconfined"

View File

@@ -0,0 +1,17 @@
START
File: testcase_dbus_10.in
Event type: AA_RECORD_ALLOWED
Audit ID: 1561053426.749:186
Operation: dbus_method_call
Denied Mask: send
Profile: /tmp/apparmor-2.8.0/tests/regression/apparmor/dbus_service
Peer profile: unconfined
Name: org.freedesktop.systemd1
PID: 20596
Peer PID: 1
DBus bus: system
DBus path: /org/freedesktop/systemd1
DBus interface: org.freedesktop.systemd1.Manager
DBus member: LookupDynamicUserByName
Epoch: 1561053426
Audit subid: 186

View File

@@ -0,0 +1,4 @@
/tmp/apparmor-2.8.0/tests/regression/apparmor/dbus_service {
dbus send bus=system path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=LookupDynamicUserByName peer=(label=unconfined),
}

View File

@@ -0,0 +1 @@
type=AVC msg=audit(1562529588.082:3153): apparmor="DENIED" operation="open" profile="unbalanced_parenthesis" name="/dev/shm/test(me" pid=888 comm="cat" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000

View File

@@ -0,0 +1,15 @@
START
File: unbalanced_parenthesis.in
Event type: AA_RECORD_DENIED
Audit ID: 1562529588.082:3153
Operation: open
Mask: r
Denied Mask: r
fsuid: 1000
ouid: 1000
Profile: unbalanced_parenthesis
Name: /dev/shm/test(me
Command: cat
PID: 888
Epoch: 1562529588
Audit subid: 3153

View File

@@ -0,0 +1,4 @@
profile unbalanced_parenthesis {
owner /dev/shm/test(me r,
}

View File

@@ -24,15 +24,17 @@ include $(COMMONDIR)/Make.rules
DESTDIR=/
APPARMOR_BIN_PREFIX=${DESTDIR}/lib/apparmor
SBINDIR=${DESTDIR}/sbin
USR_SBINDIR=${DESTDIR}/usr/sbin
SYSTEMD_UNIT_DIR=${DESTDIR}/usr/lib/systemd/system
CONFDIR=/etc/apparmor
INSTALL_CONFDIR=${DESTDIR}${CONFDIR}
LOCALEDIR=/usr/share/locale
MANPAGES=apparmor.d.5 apparmor.7 apparmor_parser.8 subdomain.conf.5 aa-teardown.8
YACC := /usr/bin/bison
YACC := bison
YFLAGS := -d
LEX := /usr/bin/flex
LEX := flex
LEXFLAGS = -B -v
WARNINGS = -Wall
EXTRA_WARNINGS = -Wsign-compare -Wmissing-field-initializers -Wformat-security -Wunused-parameter
@@ -92,6 +94,10 @@ AAREOBJECTS = $(AAREOBJECT)
AARE_LDFLAGS = -static-libgcc -static-libstdc++ -L. $(LDFLAGS)
AALIB = -Wl,-Bstatic -lapparmor -Wl,-Bdynamic -lpthread
ifdef WITH_LIBINTL
AALIB += -lintl
endif
ifdef USE_SYSTEM
# Using the system libapparmor so Makefile dependencies can't be used
LIBAPPARMOR_A =
@@ -279,14 +285,23 @@ parser_version.h: Makefile
# as well as the filtering that occurs for network protocols that
# apparmor should not mediate.
.PHONY: af_names.h
af_names.h:
echo "$(AF_NAMES)" | LC_ALL=C sed -n -e 's/[ \t]\?AF_MAX[ \t]\+[0-9]\+,//g' -e 's/[ \t]\+\?AF_\([A-Z0-9_]\+\)[ \t]\+\([0-9]\+\),/#ifndef AF_\1\n# define AF_\1 \2\n#endif\nAA_GEN_NET_ENT("\L\1", \UAF_\1)\n\n/pg' > $@
echo "$(AF_NAMES)" | LC_ALL=C sed -n -e 's/.*,[ \t]\+AF_MAX[ \t]\+\([0-9]\+\),\?.*/#define AA_AF_MAX \1\n/p' >> $@
af_names.h: ../common/list_af_names.sh
../common/list_af_names.sh | LC_ALL=C sed -n -e 's/[ \t]\?AF_MAX[ \t]\+[0-9]\+,//g' -e 's/[ \t]\+\?AF_\([A-Z0-9_]\+\)[ \t]\+\([0-9]\+\),/#ifndef AF_\1\n# define AF_\1 \2\n#endif\nAA_GEN_NET_ENT("\L\1", \UAF_\1)\n/pg' > $@
../common/list_af_names.sh | LC_ALL=C sed -n -e 's/AF_MAX[ \t]\+\([0-9]\+\),\?.*/\n#define AA_AF_MAX \1\n/p' >> $@
# cat $@
cap_names.h: /usr/include/linux/capability.h
echo "$(CAPABILITIES)" | LC_ALL=C sed -n -e "s/[ \\t]\\?CAP_\\([A-Z0-9_]\\+\\)/\{\"\\L\\1\", \\UCAP_\\1\},\\n/pg" > $@
generated_cap_names.h: /usr/include/linux/capability.h
../common/list_capabilities.sh | LC_ALL=C sed -n -e "s/[ \\t]\\?CAP_\\([A-Z0-9_]\\+\\)/\{\"\\L\\1\", \\UCAP_\\1\},\\n/pg" > $@
cap_names.h: generated_cap_names.h base_cap_names.h
@LC_ALL=C sed -e 's/\([^,]*,[^,]*,\) CAP_[A-Z0-9_]\+,/\1 NO_BACKMAP_CAP,/g' base_cap_names.h | diff -u - generated_cap_names.h | grep '^\+[^+]' ; \
if [ $$? -eq 1 ] ; then \
cp base_cap_names.h $@ ; \
else \
echo "Error: new capabilities detected please update base_cap_names.h with values from generated_cap_names.h" ; \
LC_ALL=C sed -e 's/\([^,]*,[^,]*,\) CAP_[A-Z0-9_]\+,/\1 NO_BACKMAP_CAP,/g' base_cap_names.h | diff -u - generated_cap_names.h ; \
exit 1; \
fi
tst_lib: lib.c parser.h $(filter-out lib.o, ${TEST_OBJECTS})
$(CXX) $(TEST_CFLAGS) -o $@ $< $(filter-out $(<:.c=.o), ${TEST_OBJECTS}) $(TEST_LDFLAGS) $(TEST_LDLIBS)
@@ -302,10 +317,7 @@ tests: apparmor_parser ${TESTS}
sh -e -c 'for test in ${TESTS} ; do echo "*** running $${test}" && ./$${test}; done'
$(Q)$(MAKE) -s -C tst tests
# always need to rebuild.
.SILENT: $(AAREOBJECT)
.PHONY: $(AAREOBJECT)
$(AAREOBJECT):
$(AAREOBJECT): FORCE
$(MAKE) -C $(AAREDIR) CFLAGS="$(EXTRA_CXXFLAGS)"
.PHONY: install-rhel4
@@ -318,8 +330,8 @@ install-redhat:
.PHONY: install-suse
install-suse: install-systemd
install -m 755 -d $(DESTDIR)/sbin
ln -sf service $(DESTDIR)/sbin/rcapparmor
install -m 755 -d $(SBINDIR)
ln -sf service $(SBINDIR)/rcapparmor
.PHONY: install-slackware
install-slackware:
@@ -361,12 +373,14 @@ INSTALLDEPS+=install-$(DISTRO)
endif
.PHONY: install
install: install-indep install-arch
install:
$(MAKE) install-indep
$(MAKE) install-arch
.PHONY: install-arch
install-arch: $(INSTALLDEPS)
install -m 755 -d $(DESTDIR)/sbin
install -m 755 ${TOOLS} $(DESTDIR)/sbin
install -m 755 -d $(SBINDIR)
install -m 755 ${TOOLS} $(SBINDIR)
.PHONY: install-indep
install-indep: indep
@@ -383,9 +397,9 @@ install-indep: indep
install-systemd:
install -m 755 -d $(SYSTEMD_UNIT_DIR)
install -m 644 apparmor.service $(SYSTEMD_UNIT_DIR)
install -m 644 apparmor.systemd $(APPARMOR_BIN_PREFIX)
install -m 755 -d $(DESTDIR)/sbin
install -m 755 aa-teardown $(DESTDIR)/sbin
install -m 755 apparmor.systemd $(APPARMOR_BIN_PREFIX)
install -m 755 -d $(USR_SBINDIR)
install -m 755 aa-teardown $(USR_SBINDIR)
ifndef VERBOSE
.SILENT: clean
@@ -400,9 +414,10 @@ clean: pod_clean
rm -f parser_version.h
rm -f $(NAME)*.tar.gz $(NAME)*.tgz
rm -f af_names.h
rm -f cap_names.h
rm -f cap_names.h generated_cap_names.h
rm -rf techdoc.aux techdoc.out techdoc.log techdoc.pdf techdoc.toc techdoc.txt techdoc/
$(MAKE) -s -C $(AAREDIR) clean
$(MAKE) -s -C po clean
$(MAKE) -s -C tst clean
FORCE:

View File

@@ -2,19 +2,6 @@ The apparmor_parser allows you to add, replace, and remove AppArmor
policy through the use of command line options. The default is to add.
`apparmor_parser --help` shows what the command line options are.
You can also find more information at http://wiki.apparmor.net
Please send all complaints, feature requests, rants about the software,
and questions to the apparmor@lists.ubuntu.com mailing list. Bug
reports can be filed against the AppArmor project on launchpad.net at
https://launchpad.net/apparmor or reported to the mailing list directly
for those who wish not to register for an account on launchpad.
Security issues can be filed as security bugs on launchpad
or directed to security@ubuntu.com. We will attempt to
conform to the RFP vulnerability disclosure protocol:
http://www.wiretrip.net/rfp/policy.html
Thanks.
You can also find more information at https://wiki.apparmor.net
-- The AppArmor development team

View File

@@ -35,6 +35,6 @@ L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
apparmor(7), apparmor.d(5), and L<http://wiki.apparmor.net>.
apparmor(7), apparmor.d(5), and L<https://wiki.apparmor.net>.
=cut

View File

@@ -151,9 +151,11 @@ int unix_rule::expand_variables(void)
error = expand_entry_variables(&addr);
if (error)
return error;
filter_slashes(addr);
error = expand_entry_variables(&peer_addr);
if (error)
return error;
filter_slashes(peer_addr);
return 0;
}
@@ -202,14 +204,18 @@ void unix_rule::downgrade_rule(Profile &prof) {
yyerror(_("Memory allocation error."));
if (sock_type_n != -1)
mask = 1 << sock_type_n;
if (deny) {
prof.net.deny[AF_UNIX] |= mask;
if (!audit)
prof.net.quiet[AF_UNIX] |= mask;
} else {
if (!deny) {
prof.net.allow[AF_UNIX] |= mask;
if (audit)
prof.net.audit[AF_UNIX] |= mask;
} else {
/* deny rules have to be dropped because the downgrade makes
* the rule less specific meaning it will make the profile more
* restrictive and may end up denying accesses that might be
* allowed by the profile.
*/
if (warnflags & WARN_RULE_NOT_ENFORCED)
warn_once(prof.name, "deny unix socket rule not enforced, can't be downgraded to generic network rule\n");
}
}

View File

@@ -111,7 +111,7 @@ capabilities(7))
B<NETWORK RULE> = [ I<QUALIFIERS> ] 'network' [ I<DOMAIN> ] [ I<TYPE> | I<PROTOCOL> ]
B<DOMAIN> = ( 'inet' | 'ax25' | 'ipx' | 'appletalk' | 'netrom' | 'bridge' | 'atmpvc' | 'x25' | 'inet6' | 'rose' | 'netbeui' | 'security' | 'key' | 'packet' | 'ash' | 'econet' | 'atmsvc' | 'sna' | 'irda' | 'pppox' | 'wanpipe' | 'bluetooth' | 'netlink' | 'unix' | 'rds' | 'llc' | 'can' | 'tipc' | 'iucv' | 'rxrpc' | 'isdn' | 'phonet' | 'ieee802154' | 'caif' | 'alg' | 'nfc' | 'vsock' | 'mpls' | 'ib' | 'kcm' | 'smc' ) ','
B<DOMAIN> = ( 'unix' | 'inet' | 'ax25' | 'ipx' | 'appletalk' | 'netrom' | 'bridge' | 'atmpvc' | 'x25' | 'inet6' | 'rose' | 'netbeui' | 'security' | 'key' | 'netlink' | 'packet' | 'ash' | 'econet' | 'atmsvc' | 'rds' | 'sna' | 'irda' | 'pppox' | 'wanpipe' | 'llc' | 'ib' | 'mpls' | 'can' | 'tipc' | 'bluetooth' | 'iucv' | 'rxrpc' | 'isdn' | 'phonet' | 'ieee802154' | 'caif' | 'alg' | 'nfc' | 'vsock' | 'kcm' | 'qipcrtr' | 'smc' | 'xdp' ) ','
B<TYPE> = ( 'stream' | 'dgram' | 'seqpacket' | 'rdm' | 'raw' | 'packet' )
@@ -271,7 +271,7 @@ B<EXEC TRANSITION> = ( 'ix' | 'ux' | 'Ux' | 'px' | 'Px' | 'cx' | 'Cx' | 'pix' |
B<EXEC TARGET> = name
Requires I<EXEC TRANSITION> specified.
B<LINK RULE> = I<QUALIFIERS> [ 'owner' ] 'link' [ 'subset' ] I<FILEGLOB> ( 'to' | '-E<gt>' ) I<FILEGLOB>
B<LINK RULE> = I<QUALIFIERS> [ 'owner' ] 'link' [ 'subset' ] I<FILEGLOB> '-E<gt>' I<FILEGLOB>
B<ALPHA> = ('a', 'b', 'c', ... 'z', 'A', 'B', ... 'Z')
@@ -664,7 +664,7 @@ and other operations that are typically reserved for the root user.
AppArmor supports simple coarse grained network mediation. The network
rule restrict all socket(2) based operations. The mediation done is
a course grained check on whether a socket of a given type and family
a coarse-grained check on whether a socket of a given type and family
can be created, read, or written. There is no mediation based of port
number or protocol beyond tcp, udp, and raw. Network netlink(7) rules may
only specify type 'dgram' and 'raw'.
@@ -1047,7 +1047,7 @@ Example AppArmor DBus rules:
peer=(name=(com.example.ExampleName1|com.example.ExampleName2)),
# Allow receive access for all unconfined peers
dbus receive peer=(label=unconfined)),
dbus receive peer=(label=unconfined),
# Allow eavesdropping on the system bus
dbus eavesdrop bus=system,
@@ -1167,7 +1167,7 @@ E.G.
network unix stream, => unix stream,
Fine grained mediation rules however can not be lossly converted back
Fine grained mediation rules however can not be losslessly converted back
to the coarse grained network rule; e.g.
unix bind addr=@example,
@@ -1279,6 +1279,7 @@ provided AppArmor policy:
@{apparmorfs}
@{sys}
@{tid}
@{run}
@{XDG_DESKTOP_DIR}
@{XDG_DOWNLOAD_DIR}
@{XDG_TEMPLATES_DIR}
@@ -1611,6 +1612,6 @@ negative values match when specifying one or the other. Eg, 'rw' matches when
apparmor(7), apparmor_parser(8), aa-complain(1),
aa-enforce(1), aa_change_hat(2), mod_apparmor(5), and
L<http://wiki.apparmor.net>.
L<https://wiki.apparmor.net>.
=cut

View File

@@ -143,6 +143,56 @@ messages with the KERN facility. Thus, REJECTING and PERMITTING messages
may go to either F</var/log/audit/audit.log> or F</var/log/messages>,
depending upon local configuration.
=head1 DEBUGGING
AppArmor provides a few facilities to log more information,
which can help debugging profiles.
=head2 Enable debug mode
When debug mode is enabled, AppArmor will log a few extra messages to
dmesg (not via the audit subsystem). For example, the logs will tell
whether environment scrubbing has been applied.
To enable debug mode, run:
echo 1 > /sys/module/apparmor/parameters/debug
=head2 Turn off deny audit quieting
By default, operations that trigger C<deny> rules are not logged.
This is called I<deny audit quieting>.
To turn off deny audit quieting, run:
echo -n noquiet >/sys/module/apparmor/parameters/audit
=head2 Force audit mode
AppArmor can log a message for every operation that triggers a rule
configured in the policy. This is called I<force audit mode>.
B<Warning!> Force audit mode can be extremely noisy even for a single profile,
let alone when enabled globally.
To set a specific profile in force audit mode, add the C<audit> flag:
profile foo flags=(audit) { ... }
To enable force audit mode globally, run:
echo -n all > /sys/module/apparmor/parameters/audit
If auditd is not running, to avoid losing too many of the extra log
messages, you will likely have to turn off rate limiting by doing:
echo 0 > /proc/sys/kernel/printk_ratelimit
But even then the kernel ring buffer may overflow and you might
lose messages.
Else, if auditd is running, see auditd(8) and auditd.conf(5).
=head1 FILES
=over 4
@@ -165,6 +215,6 @@ apparmor_parser(8), aa_change_hat(2), apparmor.d(5),
subdomain.conf(5), aa-autodep(1), clean(1),
auditd(8),
aa-unconfined(8), aa-enforce(1), aa-complain(1), and
L<http://wiki.apparmor.net>.
L<https://wiki.apparmor.net>.
=cut

View File

@@ -19,7 +19,7 @@ APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions
aa_action()
{
echo $1
echo "$1"
shift
"$@"
return $?
@@ -27,12 +27,12 @@ aa_action()
aa_log_warning_msg()
{
echo "Warning: $@"
echo "Warning: $*"
}
aa_log_failure_msg()
{
echo "Error: $@"
echo "Error: $*"
}
aa_log_action_start()
@@ -42,7 +42,7 @@ aa_log_action_start()
aa_log_action_end()
{
echo -n
printf ""
}
aa_log_daemon_msg()
@@ -52,17 +52,18 @@ aa_log_daemon_msg()
aa_log_skipped_msg()
{
echo "Skipped: $@"
echo "Skipped: $*"
}
aa_log_end_msg()
{
echo -n
printf ""
}
# source apparmor function library
if [ -f "${APPARMOR_FUNCTIONS}" ]; then
. ${APPARMOR_FUNCTIONS}
# shellcheck source=rc.apparmor.functions
. "${APPARMOR_FUNCTIONS}"
else
aa_log_failure_msg "Unable to find AppArmor initscript functions"
exit 1
@@ -97,4 +98,4 @@ case "$1" in
exit 1
;;
esac
exit $rc
exit "$rc"

View File

@@ -247,7 +247,7 @@ If a cache directory name needs to have a comma as part of the name, it
can be specified by using a backslash to escape the comma character in
the directory name.
If not specified the cache location defaults to /etc/apparmor.d/cache.d
If not specified the cache location defaults to /var/cache/apparmor
=item --print-cache-dir
@@ -314,12 +314,15 @@ Eg.
-jx4 OR --jobs=x4 sets the jobs to # of cpus * 4
-jx1 is equivalent to -jauto
The default value is the number of cpus in the system.
The default value is the number of cpus in the system. Note that if jobs
is a positive integer number the --jobs-max parameter is automatically
set to the same value.
=item --max-jobs n
Set a hard cap on the value that can be specified by the --jobs flag.
It takes the same set of options available to the --jobs option, and
When --jobs is set to a scaling value (ie. auto or xN) the specify a
hard cap on the value that can be specified by the --jobs flag. It
takes the same set of options available to the --jobs option, and
defaults to 8*cpus
=item -O n, --optimize=n
@@ -355,6 +358,17 @@ This option tells the parser to not attempt to rebuild the cache on
failure, instead the parser continues on with processing the remaining
profiles.
=item --config-file
Specify the config file to use instead of
/etc/apparmor/parser.conf. This option will be processed early before
regular options regardless of the order it is specified in.
=item --print-config-file
Print the config file location that will be used.
=back
=head1 CONFIG FILE
@@ -397,6 +411,6 @@ L<https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
apparmor(7), apparmor.d(5), subdomain.conf(5), aa_change_hat(2), and
L<http://wiki.apparmor.net>.
L<https://wiki.apparmor.net>.
=cut

82
parser/base_cap_names.h Normal file
View File

@@ -0,0 +1,82 @@
{"audit_control", CAP_AUDIT_CONTROL},
{"audit_read", CAP_AUDIT_READ},
{"audit_write", CAP_AUDIT_WRITE},
{"block_suspend", CAP_BLOCK_SUSPEND},
{"bpf", CAP_BPF},
{"checkpoint_restore", CAP_CHECKPOINT_RESTORE},
{"chown", CAP_CHOWN},
{"dac_override", CAP_DAC_OVERRIDE},
{"dac_read_search", CAP_DAC_READ_SEARCH},
{"fowner", CAP_FOWNER},
{"fsetid", CAP_FSETID},
{"ipc_lock", CAP_IPC_LOCK},
{"ipc_owner", CAP_IPC_OWNER},
{"kill", CAP_KILL},
{"lease", CAP_LEASE},
{"linux_immutable", CAP_LINUX_IMMUTABLE},
{"mac_admin", CAP_MAC_ADMIN},
{"mac_override", CAP_MAC_OVERRIDE},
{"mknod", CAP_MKNOD},
{"net_admin", CAP_NET_ADMIN},
{"net_bind_service", CAP_NET_BIND_SERVICE},
{"net_broadcast", CAP_NET_BROADCAST},
{"net_raw", CAP_NET_RAW},
{"perfmon", CAP_PERFMON},
{"setfcap", CAP_SETFCAP},
{"setgid", CAP_SETGID},
{"setpcap", CAP_SETPCAP},
{"setuid", CAP_SETUID},
{"syslog", CAP_SYSLOG},
{"sys_admin", CAP_SYS_ADMIN},
{"sys_boot", CAP_SYS_BOOT},
{"sys_chroot", CAP_SYS_CHROOT},
{"sys_module", CAP_SYS_MODULE},
{"sys_nice", CAP_SYS_NICE},
{"sys_pacct", CAP_SYS_PACCT},
{"sys_ptrace", CAP_SYS_PTRACE},
{"sys_rawio", CAP_SYS_RAWIO},
{"sys_resource", CAP_SYS_RESOURCE},
{"sys_time", CAP_SYS_TIME},
{"sys_tty_config", CAP_SYS_TTY_CONFIG},
{"wake_alarm", CAP_WAKE_ALARM},

View File

@@ -179,6 +179,7 @@ int dbus_rule::expand_variables(void)
error = expand_entry_variables(&path);
if (error)
return error;
filter_slashes(path);
error = expand_entry_variables(&interface);
if (error)
return error;

View File

@@ -10,6 +10,7 @@ endif
TARGET=libapparmor_re.a
AR ?= ar
CFLAGS ?= -g -Wall -O2 ${EXTRA_CFLAGS} -std=gnu++0x
CXXFLAGS := ${CFLAGS} ${INCLUDE_APPARMOR}
@@ -22,7 +23,7 @@ all : ${TARGET}
UNITTESTS = tst_parse
libapparmor_re.a: parse.o expr-tree.o hfa.o chfa.o aare_rules.o
ar ${ARFLAGS} $@ $^
${AR} ${ARFLAGS} $@ $^
expr-tree.o: expr-tree.cc expr-tree.h

View File

@@ -126,9 +126,10 @@ bool aare_rules::add_rule_vec(int deny, uint32_t perms, uint32_t audit,
/* create a dfa from the ruleset
* returns: buffer contain dfa tables, @size set to the size of the tables
* else NULL on failure
* else NULL on failure, @min_match_len set to the shortest string
* that can match the dfa for determining xmatch priority.
*/
void *aare_rules::create_dfa(size_t *size, dfaflags_t flags)
void *aare_rules::create_dfa(size_t *size, int *min_match_len, dfaflags_t flags)
{
char *buffer = NULL;
@@ -150,6 +151,7 @@ void *aare_rules::create_dfa(size_t *size, dfaflags_t flags)
root = new AltNode(root, new CatNode(tmp, i->first));
}
}
*min_match_len = root->min_match_len();
/* dumping of the none simplified tree without -O no-expr-simplify
* is broken because we need to build the tree above first, and

View File

@@ -104,7 +104,7 @@ class aare_rules {
uint32_t audit, dfaflags_t flags);
bool add_rule_vec(int deny, uint32_t perms, uint32_t audit, int count,
const char **rulev, dfaflags_t flags);
void *create_dfa(size_t *size, dfaflags_t flags);
void *create_dfa(size_t *size, int *min_match_len, dfaflags_t flags);
};
#endif /* __LIBAA_RE_RULES_H */

View File

@@ -123,6 +123,19 @@ public:
virtual void compute_firstpos() = 0;
virtual void compute_lastpos() = 0;
virtual void compute_followpos() { }
/*
* min_match_len determines the smallest string that can match the
* syntax tree. This is used to determine the priority of a regex.
*/
virtual int min_match_len() { return 0; }
/*
* contains_null returns if the expression tree contains a null character.
* Null characters indicate that the rest of the DFA matches the xattrs and
* not the path. This is used to compute min_match_len.
*/
virtual bool contains_null() { return false; }
virtual int eq(Node *other) = 0;
virtual ostream &dump(ostream &os) = 0;
void dump_syntax_tree(ostream &os);
@@ -257,6 +270,17 @@ public:
return os << c;
}
int min_match_len()
{
if (c == 0) {
// Null character indicates end of string.
return 0;
}
return 1;
}
bool contains_null() { return c == 0; }
uchar c;
};
@@ -298,6 +322,24 @@ public:
return os << ']';
}
int min_match_len()
{
if (contains_null()) {
return 0;
}
return 1;
}
bool contains_null()
{
for (Chars::iterator i = chars.begin(); i != chars.end(); i++) {
if (*i == 0) {
return true;
}
}
return false;
}
Chars chars;
};
@@ -346,6 +388,24 @@ public:
return os << ']';
}
int min_match_len()
{
if (contains_null()) {
return 0;
}
return 1;
}
bool contains_null()
{
for (Chars::iterator i = chars.begin(); i != chars.end(); i++) {
if (*i == 0) {
return false;
}
}
return true;
}
Chars chars;
};
@@ -369,6 +429,8 @@ public:
return 0;
}
ostream &dump(ostream &os) { return os << "."; }
bool contains_null() { return true; }
};
/* Match a node zero or more times. (This is a unary operator.) */
@@ -396,6 +458,8 @@ public:
child[0]->dump(os);
return os << ")*";
}
bool contains_null() { return child[0]->contains_null(); }
};
/* Match a node one or more times. (This is a unary operator.) */
@@ -423,6 +487,8 @@ public:
child[0]->dump(os);
return os << ")+";
}
int min_match_len() { return child[0]->min_match_len(); }
bool contains_null() { return child[0]->contains_null(); }
};
/* Match a pair of consecutive nodes. */
@@ -470,6 +536,22 @@ public:
return os;
}
void normalize(int dir);
int min_match_len()
{
int len = child[0]->min_match_len();
if (child[0]->contains_null()) {
// Null characters are used to indicate when the DFA transitions
// from matching the path to matching the xattrs. If the left child
// contains a null character, the right side doesn't contribute to
// the path match.
return len;
}
return len + child[1]->min_match_len();
}
bool contains_null()
{
return child[0]->contains_null() || child[1]->contains_null();
}
};
/* Match one of two alternative nodes. */
@@ -507,6 +589,20 @@ public:
return os;
}
void normalize(int dir);
int min_match_len()
{
int m1, m2;
m1 = child[0]->min_match_len();
m2 = child[1]->min_match_len();
if (m1 < m2) {
return m1;
}
return m2;
}
bool contains_null()
{
return child[0]->contains_null() || child[1]->contains_null();
}
};
class SharedNode: public ImportantNode {

View File

@@ -486,18 +486,32 @@ ostream &mnt_rule::dump(ostream &os)
/* does not currently support expansion of vars in options */
int mnt_rule::expand_variables(void)
{
struct value_list *ent;
int error = 0;
error = expand_entry_variables(&mnt_point);
if (error)
return error;
filter_slashes(mnt_point);
error = expand_entry_variables(&device);
if (error)
return error;
filter_slashes(device);
error = expand_entry_variables(&trans);
if (error)
return error;
list_for_each(dev_type, ent) {
error = expand_entry_variables(&ent->value);
if (error)
return error;
}
list_for_each(opts, ent) {
error = expand_entry_variables(&ent->value);
if (error)
return error;
}
return 0;
}

View File

@@ -171,13 +171,23 @@ extern int preprocess_only;
#ifdef DEBUG
#define PDEBUG(fmt, args...) fprintf(stderr, "parser: " fmt, ## args)
#define PDEBUG(fmt, args...) \
do { \
int pdebug_error = errno; \
fprintf(stderr, "parser: " fmt, ## args); \
errno = pdebug_error; \
} while (0)
#else
#define PDEBUG(fmt, args...) /* Do nothing */
#endif
#define NPDEBUG(fmt, args...) /* Do nothing */
#define PERROR(fmt, args...) fprintf(stderr, fmt, ## args)
#define PERROR(fmt, args...) \
do { \
int perror_error = errno; \
fprintf(stderr, fmt, ## args); \
errno = perror_error; \
} while (0)
#ifndef TRUE
#define TRUE (1)
@@ -357,6 +367,7 @@ extern int post_process_entry(struct cod_entry *entry);
extern int process_policydb(Profile *prof);
extern int process_policy_ents(Profile *prof);
extern void filter_slashes(char *path);
/* parser_variable.c */
int expand_entry_variables(char **name);

View File

@@ -25,6 +25,8 @@
#include "parser.h"
#include "profile.h"
typedef int (*comparison_fn_t)(const void *, const void *);
struct alias_rule {
char *from;
char *to;

View File

@@ -24,6 +24,7 @@
%option noyywrap
%option nounput
%option stack
%option nodefault
%{
#include <stdio.h>
@@ -179,6 +180,7 @@ void include_filename(char *filename, int search, bool if_exists)
yypush_buffer_state(yy_create_buffer( yyin, YY_BUF_SIZE ));
} else if (S_ISDIR(my_stat.st_mode)) {
struct cb_struct data = { fullpath, filename };
update_mru_tstamp(include_file, fullpath);
fclose(include_file);
include_file = NULL;
if (dirat_for_each(AT_FDCWD, fullpath, &data, include_dir_cb)) {
@@ -240,7 +242,16 @@ ADD_ASSIGN \+=
ARROW ->
LT_EQUAL <=
/* IF adding new state please update state_names table at eof */
/* IF adding new state please update state_names table and default rule (just
* above the state_names table) at the eof.
*
* The nodefault option is set so missing adding to the default rule isn't
* fatal but can't take advantage of additional debug the default rule might
* have.
*
* If a state is not added to the default rule it can result in the message
* "flex scanner jammed"
*/
%x SUB_ID
%x SUB_ID_WS
%x SUB_VALUE
@@ -261,6 +272,7 @@ LT_EQUAL <=
%x CHANGE_PROFILE_MODE
%x INCLUDE
%x INCLUDE_EXISTS
%x ABI_MODE
%%
@@ -273,7 +285,7 @@ LT_EQUAL <=
}
%}
<INITIAL,SUB_ID_WS,INCLUDE,INCLUDE_EXISTS,LIST_VAL_MODE,EXTCOND_MODE,LIST_COND_VAL,LIST_COND_PAREN_VAL,LIST_COND_MODE,EXTCONDLIST_MODE,ASSIGN_MODE,NETWORK_MODE,CHANGE_PROFILE_MODE,RLIMIT_MODE,MOUNT_MODE,DBUS_MODE,SIGNAL_MODE,PTRACE_MODE,UNIX_MODE>{
<INITIAL,SUB_ID_WS,INCLUDE,INCLUDE_EXISTS,LIST_VAL_MODE,EXTCOND_MODE,LIST_COND_VAL,LIST_COND_PAREN_VAL,LIST_COND_MODE,EXTCONDLIST_MODE,ASSIGN_MODE,NETWORK_MODE,CHANGE_PROFILE_MODE,RLIMIT_MODE,MOUNT_MODE,DBUS_MODE,SIGNAL_MODE,PTRACE_MODE,UNIX_MODE,ABI_MODE>{
{WS}+ { DUMP_PREPROCESS; /* Ignoring whitespace */ }
}
@@ -315,6 +327,19 @@ LT_EQUAL <=
}
}
<ABI_MODE>{
(\<(([^"\>\t\r\n]+)|{QUOTED_ID})\>|{QUOTED_ID}|{IDS}) { /* <filename> | <"filename"> | "filename" | filename */
int lt = *yytext == '<' ? 1 : 0;
char *filename = processid(yytext + lt, yyleng - lt*2);
bool exists = YYSTATE == INCLUDE_EXISTS;
if (!filename)
yyerror(_("Failed to process filename\n"));
yylval.id = filename;
POP_AND_RETURN(TOK_ID);
}
}
<<EOF>> {
fclose(yyin);
pop_include_stack();
@@ -455,6 +480,7 @@ LT_EQUAL <=
\\\n { DUMP_PREPROCESS; current_lineno++ ; }
\r?\n {
/* don't use shared rule because we need POP() here */
DUMP_PREPROCESS;
current_lineno++;
POP();
@@ -591,7 +617,7 @@ include/{WS} {
{CARET} { PUSH_AND_RETURN(SUB_ID, TOK_CARET); }
{ARROW} { RETURN_TOKEN(TOK_ARROW); }
{ARROW} { PUSH_AND_RETURN(SUB_ID_WS, TOK_ARROW); }
{EQUALS} { PUSH_AND_RETURN(ASSIGN_MODE, TOK_EQUALS); }
@@ -666,6 +692,9 @@ include/{WS} {
case TOK_UNIX:
state = UNIX_MODE;
break;
case TOK_ABI:
state = ABI_MODE;
break;
default: /* nothing */
break;
}
@@ -678,18 +707,20 @@ include/{WS} {
POP_NODUMP();
RETURN_TOKEN(TOK_END_OF_RULE);
}
}
\r?\n {
<INITIAL,SUB_ID_WS,INCLUDE,INCLUDE_EXISTS,LIST_VAL_MODE,EXTCOND_MODE,LIST_COND_VAL,LIST_COND_PAREN_VAL,LIST_COND_MODE,EXTCONDLIST_MODE,NETWORK_MODE,CHANGE_PROFILE_MODE,RLIMIT_MODE,MOUNT_MODE,DBUS_MODE,SIGNAL_MODE,PTRACE_MODE,UNIX_MODE,ABI_MODE>{
\r?\n {
DUMP_PREPROCESS;
current_lineno++;
}
}
<INITIAL,SUB_ID,SUB_ID_WS,SUB_VALUE,LIST_VAL_MODE,EXTCOND_MODE,LIST_COND_VAL,LIST_COND_PAREN_VAL,LIST_COND_MODE,EXTCONDLIST_MODE,ASSIGN_MODE,NETWORK_MODE,CHANGE_PROFILE_MODE,MOUNT_MODE,DBUS_MODE,SIGNAL_MODE,PTRACE_MODE,UNIX_MODE>{
[^\n] {
<INITIAL,SUB_ID,SUB_ID_WS,SUB_VALUE,LIST_VAL_MODE,EXTCOND_MODE,LIST_COND_VAL,LIST_COND_PAREN_VAL,LIST_COND_MODE,EXTCONDLIST_MODE,ASSIGN_MODE,NETWORK_MODE,CHANGE_PROFILE_MODE,MOUNT_MODE,DBUS_MODE,SIGNAL_MODE,PTRACE_MODE,UNIX_MODE,RLIMIT_MODE,INCLUDE,INCLUDE_EXISTS,ABI_MODE>{
(.|\n) {
DUMP_PREPROCESS;
/* Something we didn't expect */
yyerror(_("Found unexpected character: '%s'"), yytext);
yyerror(_("Lexer found unexpected character: '%s' (0x%x) in state: %s"), yytext, yytext[0], state_names[YY_START].c_str());
}
}
%%
@@ -719,4 +750,5 @@ unordered_map<int, string> state_names = {
STATE_TABLE_ENT(CHANGE_PROFILE_MODE),
STATE_TABLE_ENT(INCLUDE),
STATE_TABLE_ENT(INCLUDE_EXISTS),
STATE_TABLE_ENT(ABI_MODE),
};

View File

@@ -59,6 +59,8 @@
#define PRIVILEGED_OPS (kernel_load)
#define UNPRIVILEGED_OPS (!(PRIVILEGED_OPS))
#define EARLY_ARG_CONFIG_FILE 141
const char *parser_title = "AppArmor parser";
const char *parser_copyright = "Copyright (C) 1999-2008 Novell Inc.\nCopyright 2009-2018 Canonical Ltd.";
@@ -102,13 +104,16 @@ bool debug_jobs = false;
struct timespec cache_tstamp, mru_policy_tstamp;
static char *apparmorfs = NULL;
static char *cacheloc[MAX_CACHE_LOCS];
static const char *cacheloc[MAX_CACHE_LOCS];
static int cacheloc_n = 0;
static bool print_cache_dir = false;
static aa_features *compile_features = NULL;
static aa_features *kernel_features = NULL;
static const char *config_file = "/etc/apparmor/parser.conf";
/* Make sure to update BOTH the short and long_options */
static const char *short_options = "ad::f:h::rRVvI:b:BCD:NSm:M:qQn:XKTWkL:O:po:j:";
struct option long_options[] = {
@@ -129,7 +134,6 @@ struct option long_options[] = {
{"ofile", 1, 0, 'o'},
{"match-string", 1, 0, 'm'},
{"features-file", 1, 0, 'M'},
{"kernel-features", 1, 0, 138}, /* no short option */
{"quiet", 0, 0, 'q'},
{"skip-kernel-load", 0, 0, 'Q'},
{"verbose", 0, 0, 'v'},
@@ -139,9 +143,6 @@ struct option long_options[] = {
{"skip-read-cache", 0, 0, 'T'},
{"write-cache", 0, 0, 'W'},
{"show-cache", 0, 0, 'k'},
{"skip-bad-cache", 0, 0, 129}, /* no short option */
{"purge-cache", 0, 0, 130}, /* no short option */
{"create-cache-dir", 0, 0, 131}, /* no short option */
{"cache-loc", 1, 0, 'L'},
{"debug", 2, 0, 'd'},
{"dump", 1, 0, 'D'},
@@ -149,13 +150,21 @@ struct option long_options[] = {
{"optimize", 1, 0, 'O'},
{"Optimize", 1, 0, 'O'},
{"preprocess", 0, 0, 'p'},
{"jobs", 1, 0, 'j'},
{"skip-bad-cache", 0, 0, 129}, /* no short option */
{"purge-cache", 0, 0, 130}, /* no short option */
{"create-cache-dir", 0, 0, 131}, /* no short option */
{"abort-on-error", 0, 0, 132}, /* no short option */
{"skip-bad-cache-rebuild", 0, 0, 133}, /* no short option */
{"warn", 1, 0, 134}, /* no short option */
{"debug-cache", 0, 0, 135}, /* no short option */
{"jobs", 1, 0, 'j'},
{"max-jobs", 1, 0, 136}, /* no short option */
{"print-cache-dir", 0, 0, 137}, /* no short option */
{"kernel-features", 1, 0, 138}, /* no short option */
{"compile-features", 1, 0, 139}, /* no short option */
{"print-config-file", 0, 0, 140}, /* no short option */
{"config-file", 1, 0, EARLY_ARG_CONFIG_FILE}, /* early option, no short option */
{NULL, 0, 0, 0},
};
@@ -185,7 +194,8 @@ static void display_usage(const char *command)
"-I n, --Include n Add n to the search path\n"
"-f n, --subdomainfs n Set location of apparmor filesystem\n"
"-m n, --match-string n Use only features n\n"
"-M n, --features-file n Compile features set in file n\n"
"-M n, --features-file n Set compile & kernel features to file n\n"
"--compile-features n Compile features set in file n\n"
"--kernel-features n Kernel features set in file n\n"
"-n n, --namespace n Set Namespace for the profile\n"
"-X, --readimpliesX Map profile read permissions to mr\n"
@@ -196,7 +206,7 @@ static void display_usage(const char *command)
" --skip-bad-cache Don't clear cache if out of sync\n"
" --purge-cache Clear cache regardless of its state\n"
" --debug-cache Debug cache file checks\n"
" --print-cache_dir Print the cache directory path\n"
" --print-cache-dir Print the cache directory path\n"
"-L, --cache-loc n Set the location of the profile caches\n"
"-q, --quiet Don't emit warnings\n"
"-v, --verbose Show profile names as they load\n"
@@ -211,6 +221,8 @@ static void display_usage(const char *command)
"--max-jobs n Hard cap on --jobs. Default 8*cpus\n"
"--abort-on-error Abort processing of profiles on first error\n"
"--skip-bad-cache-rebuild Do not try rebuilding the cache if it is rejected by the kernel\n"
"--config-file n Specify the parser config file location, processed early before other options.\n"
"--print-config Print config file location\n"
"--warn n Enable warnings (see --help=warn)\n"
,command);
}
@@ -232,7 +244,7 @@ void display_warn(const char *command)
}
/* Parse comma separated cachelocations. Commas can be escaped by \, */
static int parse_cacheloc(const char *arg, char **cacheloc, int max_size)
static int parse_cacheloc(const char *arg, const char **cacheloc, int max_size)
{
const char *s = arg;
const char *p = arg;
@@ -244,15 +256,17 @@ static int parse_cacheloc(const char *arg, char **cacheloc, int max_size)
p++;
} else if (*p == ',') {
if (p != s) {
char *tmp;
if (n == max_size) {
errno = E2BIG;
return -1;
}
cacheloc[n] = (char *) malloc(p - s + 1);
if (cacheloc[n] == NULL)
tmp = (char *) malloc(p - s + 1);
if (tmp == NULL)
return -1;
memcpy(cacheloc[n], s, p - s);
cacheloc[n][p - s] = 0;
memcpy(tmp, s, p - s);
tmp[p - s] = 0;
cacheloc[n] = tmp;
n++;
}
p++;
@@ -261,15 +275,17 @@ static int parse_cacheloc(const char *arg, char **cacheloc, int max_size)
p++;
}
if (p != s) {
char *tmp;
if (n == max_size) {
errno = E2BIG;
return -1;
}
cacheloc[n] = (char *) malloc(p - s + 1);
if (cacheloc[n] == NULL)
tmp = (char *) malloc(p - s + 1);
if (tmp == NULL)
return -1;
memcpy(cacheloc[n], s, p - s);
cacheloc[n][p - s] = 0;
memcpy(tmp, s, p - s);
tmp[p - s] = 0;
cacheloc[n] = tmp;
n++;
}
@@ -373,6 +389,16 @@ static long process_jobs_arg(const char *arg, const char *val) {
return n;
}
bool early_arg(int c) {
switch(c) {
case EARLY_ARG_CONFIG_FILE:
return true;
}
return false;
}
/* process a single argment from getopt_long
* Returns: 1 if an action arg, else 0
*/
@@ -492,8 +518,6 @@ static int process_arg(int c, char *optarg)
}
break;
case 'O':
skip_read_cache = 1;
if (!handle_flag_table(optflag_table, optarg,
&dfaflags)) {
PERROR("%s: Invalid --Optimize option %s\n",
@@ -510,14 +534,21 @@ static int process_arg(int c, char *optarg)
}
break;
case 'M':
if (compile_features)
aa_features_unref(compile_features);
if (kernel_features)
aa_features_unref(kernel_features);
if (aa_features_new(&compile_features, AT_FDCWD, optarg)) {
fprintf(stderr,
"Failed to load features from '%s': %m\n",
optarg);
exit(1);
}
kernel_features = aa_features_ref(compile_features);
break;
case 138:
if (kernel_features)
aa_features_unref(kernel_features);
if (aa_features_new(&kernel_features, AT_FDCWD, optarg)) {
fprintf(stderr,
"Failed to load kernel features from '%s': %m\n",
@@ -525,6 +556,16 @@ static int process_arg(int c, char *optarg)
exit(1);
}
break;
case 139:
if (compile_features)
aa_features_unref(compile_features);
if (aa_features_new(&compile_features, AT_FDCWD, optarg)) {
fprintf(stderr,
"Failed to load compile features from '%s': %m\n",
optarg);
exit(1);
}
break;
case 'q':
conf_verbose = 0;
conf_quiet = 1;
@@ -597,6 +638,8 @@ static int process_arg(int c, char *optarg)
break;
case 'j':
jobs = process_jobs_arg("-j", optarg);
if (jobs != JOBS_AUTO && jobs < LONG_MAX)
jobs_max = jobs;
break;
case 136:
jobs_max = process_jobs_arg("max-jobs", optarg);
@@ -605,6 +648,16 @@ static int process_arg(int c, char *optarg)
kernel_load = 0;
print_cache_dir = true;
break;
case EARLY_ARG_CONFIG_FILE:
config_file = strdup(optarg);
if (!config_file) {
PERROR("%s: %m", progname);
exit(1);
}
break;
case 140:
printf("%s\n", config_file);
break;
default:
/* 'unrecognized option' error message gets printed by getopt_long() */
exit(1);
@@ -614,15 +667,31 @@ static int process_arg(int c, char *optarg)
return count;
}
static void process_early_args(int argc, char *argv[])
{
int c, o;
while ((c = getopt_long(argc, argv, short_options, long_options, &o)) != -1)
{
if (early_arg(c))
process_arg(c, optarg);
}
/* reset args, so we are ready for a second pass */
optind = 1;
}
static int process_args(int argc, char *argv[])
{
int c, o;
int count = 0;
option = OPTION_ADD;
opterr = 1;
while ((c = getopt_long(argc, argv, short_options, long_options, &o)) != -1)
{
count += process_arg(c, optarg);
if (!early_arg(c))
count += process_arg(c, optarg);
}
if (count > 1) {
@@ -642,8 +711,10 @@ static int process_config_file(const char *name)
int c, o;
f = fopen(name, "r");
if (!f)
if (!f) {
pwarn("config file '%s' not found\n", name);
return 0;
}
while ((c = getopt_long_file(f, long_options, &optarg, &o)) != -1)
process_arg(c, optarg);
@@ -742,7 +813,7 @@ static bool do_print_cache_dir(aa_features *features, int dirfd, const char *pat
return true;
}
static bool do_print_cache_dirs(aa_features *features, char **cacheloc,
static bool do_print_cache_dirs(aa_features *features, const char **cacheloc,
int cacheloc_n)
{
int i;
@@ -858,7 +929,9 @@ int process_profile(int option, aa_kernel_interface *kernel_interface,
return errno;
}
} else {
pwarn("%s: cannot use or update cache, disable, or force-complain via stdin\n", progname);
if (write_cache)
pwarn("%s: cannot use or update cache, disable, or force-complain via stdin\n", progname);
skip_cache = write_cache = 0;
}
reset_parser(profilename);
@@ -1015,8 +1088,11 @@ do { \
work_sync_one(RESULT); \
} while (0)
/* returns -1 if work_spawn fails, not a return value of any unit of work */
#define work_spawn(WORK, RESULT) \
do { \
({ \
int localrc = 0; \
do { \
/* what to do to avoid fork() overhead when single threaded \
if (jobs == 1) { \
// no parallel work so avoid fork() overhead \
@@ -1053,11 +1129,17 @@ do { \
fprintf(stderr, " JOBS SPAWN: created %ld ...\n", njobs); \
} else { \
/* error */ \
if (debug_jobs) \
fprintf(stderr, " JOBS SPAWN: failed error: %d) ...\n", errno); \
if (debug_jobs) { \
int error = errno; \
fprintf(stderr, " JOBS SPAWN: failed error: %d) ...\n", errno); \
errno = error; \
} \
RESULT(errno); \
localrc = -1; \
} \
} while (0)
} while (0); \
localrc; \
})
/* sadly C forces us to do this with exit, long_jump or returning error
@@ -1103,6 +1185,8 @@ static void setup_parallel_compile(void)
if (maxn == -1)
/* unable to determine number of processors, default to 1 */
maxn = 1;
if (jobs < 0 || jobs == JOBS_AUTO)
jobs_scale = 1;
jobs = compute_jobs(n, jobs);
jobs_max = compute_jobs(maxn, jobs_max);
@@ -1110,7 +1194,7 @@ static void setup_parallel_compile(void)
pwarn("%s: Warning capping number of jobs to %ld * # of cpus == '%ld'",
progname, jobs_max, jobs);
jobs = jobs_max;
} else if (jobs < jobs_max)
} else if (jobs_scale && jobs < jobs_max)
/* the bigger the difference the more sample chances given */
jobs_scale = jobs_max + 1 - n;
@@ -1134,11 +1218,15 @@ static int profile_dir_cb(int dirfd unused, const char *name, struct stat *st,
if (!S_ISDIR(st->st_mode) && !is_blacklisted(name, NULL)) {
struct dir_cb_data *cb_data = (struct dir_cb_data *)data;
autofree char *path = NULL;
if (asprintf(&path, "%s/%s", cb_data->dirname, name) < 0)
if (asprintf(&path, "%s/%s", cb_data->dirname, name) < 0) {
PERROR(_("Out of memory"));
work_spawn(process_profile(option, cb_data->kernel_interface,
path, cb_data->policy_cache),
handle_work_result);
handle_work_result(errno);
return -1;
}
rc = work_spawn(process_profile(option,
cb_data->kernel_interface,
path, cb_data->policy_cache),
handle_work_result);
}
return rc;
}
@@ -1152,11 +1240,15 @@ static int binary_dir_cb(int dirfd unused, const char *name, struct stat *st,
if (!S_ISDIR(st->st_mode) && !is_blacklisted(name, NULL)) {
struct dir_cb_data *cb_data = (struct dir_cb_data *)data;
autofree char *path = NULL;
if (asprintf(&path, "%s/%s", cb_data->dirname, name) < 0)
if (asprintf(&path, "%s/%s", cb_data->dirname, name) < 0) {
PERROR(_("Out of memory"));
work_spawn(process_binary(option, cb_data->kernel_interface,
path),
handle_work_result);
handle_work_result(errno);
return -1;
}
rc = work_spawn(process_binary(option,
cb_data->kernel_interface,
path),
handle_work_result);
}
return rc;
}
@@ -1189,7 +1281,8 @@ int main(int argc, char *argv[])
init_base_dir();
process_config_file("/etc/apparmor/parser.conf");
process_early_args(argc, argv);
process_config_file(config_file);
optind = process_args(argc, argv);
setup_parallel_compile();
@@ -1221,13 +1314,7 @@ int main(int argc, char *argv[])
uint16_t max_caches = write_cache && cond_clear_cache ? (uint16_t) (-1) : 0;
if (!cacheloc[0]) {
char *tmp;
if (asprintf(&tmp, "%s/cache.d", basedir) == -1) {
PERROR(_("Memory allocation error."));
return 1;
}
cacheloc[0] = tmp;
cacheloc[0] = "/var/cache/apparmor";
cacheloc_n = 1;
}
if (print_cache_dir)
@@ -1247,7 +1334,6 @@ int main(int argc, char *argv[])
if (create_cache_dir)
pwarn(_("The --create-cache-dir option is deprecated. Please use --write-cache.\n"));
retval = aa_policy_cache_new(&policy_cache, kernel_features,
AT_FDCWD, cacheloc[0], max_caches);
if (retval) {
@@ -1292,11 +1378,14 @@ int main(int argc, char *argv[])
}
/* skip stdin if we've seen other command line arguments */
if (i == argc && optind != argc)
continue;
goto cleanup;
if (profilename && stat(profilename, &stat_file) == -1) {
last_error = errno;
PERROR("File %s not found, skipping...\n", profilename);
continue;
if (abort_on_error)
break;
goto cleanup;
}
if (profilename && S_ISDIR(stat_file.st_mode)) {
@@ -1311,20 +1400,27 @@ int main(int argc, char *argv[])
cb = binary_input ? binary_dir_cb : profile_dir_cb;
if ((retval = dirat_for_each(AT_FDCWD, profilename,
&cb_data, cb))) {
last_error = errno;
PDEBUG("Failed loading profiles from %s\n",
profilename);
if (abort_on_error)
break;
}
} else if (binary_input) {
/* ignore return as error is handled in work_spawn */
work_spawn(process_binary(option, kernel_interface,
profilename),
handle_work_result);
} else {
/* ignore return as error is handled in work_spawn */
work_spawn(process_profile(option, kernel_interface,
profilename, policy_cache),
handle_work_result);
}
if (profilename) free(profilename);
cleanup:
if (profilename)
free(profilename);
profilename = NULL;
}
work_sync(handle_work_result);

View File

@@ -61,9 +61,14 @@ int is_blacklisted(const char *name, const char *path)
return !retval ? 0 : 1;
}
/*
* WARNING: if the format of the following table is changed then
* the Makefile targets, cap_names.h and generated_cap_names.h
* must be updated.
*/
struct keyword_table {
const char *keyword;
int token;
unsigned int token;
};
static struct keyword_table keyword_table[] = {
@@ -111,6 +116,7 @@ static struct keyword_table keyword_table[] = {
{"trace", TOK_TRACE},
{"tracedby", TOK_TRACEDBY},
{"readby", TOK_READBY},
{"abi", TOK_ABI},
/* terminate */
{NULL, 0}
@@ -164,12 +170,59 @@ static int get_table_token(const char *name unused, struct keyword_table *table,
return -1;
}
#ifndef CAP_AUDIT_WRITE
#define CAP_AUDIT_WRITE 29
#endif
#ifndef CAP_AUDIT_CONTROL
#define CAP_AUDIT_CONTROL 30
#endif
#ifndef CAP_SETFCAP
#define CAP_SETFCAP 31
#endif
#ifndef CAP_MAC_OVERRIDE
#define CAP_MAC_OVERRIDE 32
#endif
#ifndef CAP_MAC_ADMIN
#define CAP_MAC_ADMIN 33
#endif
#ifndef CAP_SYSLOG
#define CAP_SYSLOG 34
#endif
#ifndef CAP_WAKE_ALARM
#define CAP_WAKE_ALARM 35
#endif
#ifndef CAP_BLOCK_SUSPEND
#define CAP_BLOCK_SUSPEND 36
#endif
#ifndef CAP_AUDIT_READ
#define CAP_AUDIT_READ 37
#endif
#ifndef CAP_PERFMON
#define CAP_PERFMON 38
#endif
#ifndef CAP_BPF
#define CAP_BPF 39
#endif
#ifndef CAP_CHECKPOINT_RESTORE
#define CAP_CHECKPOINT_RESTORE 40
#endif
static struct keyword_table capability_table[] = {
/* capabilities */
#include "cap_names.h"
#ifndef CAP_SYSLOG
{"syslog", 34},
#endif
/* terminate */
{NULL, 0}
};
@@ -831,52 +884,16 @@ void debug_cod_entries(struct cod_entry *list)
}
}
static const char *capnames[] = {
"chown",
"dac_override",
"dac_read_search",
"fowner",
"fsetid",
"kill",
"setgid",
"setuid",
"setpcap",
"linux_immutable",
"net_bind_service",
"net_broadcast",
"net_admin",
"net_raw",
"ipc_lock",
"ipc_owner",
"sys_module",
"sys_rawio",
"sys_chroot",
"sys_ptrace",
"sys_pacct",
"sys_admin",
"sys_boot",
"sys_nice",
"sys_resource",
"sys_time",
"sys_tty_config",
"mknod",
"lease",
"audit_write",
"audit_control",
"setfcap",
"mac_override",
"syslog",
};
const char *capability_to_name(unsigned int cap)
{
const char *capname;
int i;
capname = (cap < (sizeof(capnames) / sizeof(char *))
? capnames[cap] : "invalid-capability");
for (i = 0; capability_table[i].keyword; i++) {
if (capability_table[i].token == cap)
return capability_table[i].keyword;
}
return capname;
return "invalid-capability";
}
void __debug_capabilities(uint64_t capset, const char *name)
@@ -884,10 +901,10 @@ void __debug_capabilities(uint64_t capset, const char *name)
unsigned int i;
printf("%s:", name);
for (i = 0; i < (sizeof(capnames)/sizeof(char *)); i++) {
if (((1ull << i) & capset) != 0) {
printf (" %s", capability_to_name(i));
}
for (i = 0; capability_table[i].keyword; i++) {
if ((1ull << capability_table[i].token) & capset)
printf (" %s", capability_table[i].keyword);
}
printf("\n");
}

View File

@@ -204,9 +204,8 @@ static int profile_add_hat_rules(Profile *prof)
{
struct cod_entry *entry;
/* TODO: ??? fix logic for when to add to hat/base vs. local */
/* don't add hat rules for local_profiles or base profiles */
if (prof->local || prof->hat_table.empty())
/* don't add hat rules if not hat or profile doesn't have hats */
if (!prof->flags.hat || !prof->hat_table.empty())
return 0;
/* add entry to hat */

View File

@@ -47,7 +47,7 @@ enum error_type {
* that's a distinct namespace in linux) and trailing slashes.
* NOTE: modifies in place the contents of the path argument */
static void filter_slashes(char *path)
void filter_slashes(char *path)
{
char *sptr, *dptr;
BOOL seen_slash = 0;
@@ -473,17 +473,13 @@ static int process_profile_name_xmatch(Profile *prof)
ptype = convert_aaregex_to_pcre(alt->name, 0,
glob_default,
tbuf, &len);
if (ptype == ePatternBasic)
len = strlen(alt->name);
if (len < prof->xmatch_len)
prof->xmatch_len = len;
if (!rules->add_rule(tbuf.c_str(), 0, AA_MAY_EXEC, 0, dfaflags)) {
delete rules;
return FALSE;
}
}
}
prof->xmatch = rules->create_dfa(&prof->xmatch_size, dfaflags);
prof->xmatch = rules->create_dfa(&prof->xmatch_size, &prof->xmatch_len, dfaflags);
delete rules;
if (!prof->xmatch)
return FALSE;
@@ -568,6 +564,7 @@ static int process_dfa_entry(aare_rules *dfarules, struct cod_entry *entry)
int pos;
vec[0] = tbuf.c_str();
if (entry->link_name) {
filter_slashes(entry->link_name);
ptype = convert_aaregex_to_pcre(entry->link_name, 0, glob_default, lbuf, &pos);
if (ptype == ePatternInvalid)
return FALSE;
@@ -679,8 +676,9 @@ int process_profile_regex(Profile *prof)
goto out;
if (prof->dfa.rules->rule_count > 0) {
int xmatch_len = 0;
prof->dfa.dfa = prof->dfa.rules->create_dfa(&prof->dfa.size,
dfaflags);
&xmatch_len, dfaflags);
delete prof->dfa.rules;
prof->dfa.rules = NULL;
if (!prof->dfa.dfa)
@@ -815,7 +813,9 @@ int process_profile_policydb(Profile *prof)
goto out;
if (prof->policy.rules->rule_count > 0) {
prof->policy.dfa = prof->policy.rules->create_dfa(&prof->policy.size, dfaflags);
int xmatch_len = 0;
prof->policy.dfa = prof->policy.rules->create_dfa(&prof->policy.size,
&xmatch_len, dfaflags);
delete prof->policy.rules;
prof->policy.rules = NULL;

View File

@@ -25,6 +25,9 @@
#include "immunix.h"
#include "parser.h"
typedef int (*comparison_fn_t)(const void *, const void *);
typedef void (*__free_fn_t)(void *);
enum var_type {
sd_boolean,
sd_set,

View File

@@ -152,6 +152,7 @@ void add_local_entry(Profile *prof);
%token TOK_TRACE
%token TOK_TRACEDBY
%token TOK_READBY
%token TOK_ABI
/* rlimits */
%token TOK_RLIMIT
@@ -400,6 +401,7 @@ hat: hat_start profile_base
preamble: { /* nothing */ }
| preamble alias { /* nothing */ };
| preamble varassign { /* nothing */ };
| preamble abi_rule { /* nothing */ };
alias: TOK_ALIAS TOK_ID TOK_ARROW TOK_ID TOK_END_OF_RULE
{
@@ -615,6 +617,8 @@ rules: { /* nothing */
$$ = prof;
};
rules: rules abi_rule { /* nothing */ }
rules: rules opt_prefix rule
{
PDEBUG("matched: rules rule\n");
@@ -1065,6 +1069,12 @@ opt_named_transition: { /* nothing */ $$ = NULL; }
rule: file_rule { $$ = $1; }
| link_rule { $$ = $1; }
abi_rule: TOK_ABI TOK_ID TOK_END_OF_RULE
{
pwarn(_("%s: Profile abi not supported, falling back to system abi.\n"), progname);
free($2);
};
opt_exec_mode: { /* nothing */ $$ = EXEC_MODE_EMPTY; }
| TOK_UNSAFE { $$ = EXEC_MODE_UNSAFE; };
| TOK_SAFE { $$ = EXEC_MODE_SAFE; };

View File

@@ -14,15 +14,15 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2016-06-01 05:14+0000\n"
"X-Generator: Launchpad (build 18053)\n"
"X-Launchpad-Export-Date: 2019-04-18 05:32+0000\n"
"X-Generator: Launchpad (build 18928)\n"
"Language: af\n"
#: ../parser_include.c:113
#: ../parser_include.c:113 ../parser_include.c:111
msgid "Error: Out of memory.\n"
msgstr ""
#: ../parser_include.c:123
#: ../parser_include.c:123 ../parser_include.c:121
#, c-format
msgid "Error: basedir %s is not a directory, skipping.\n"
msgstr ""
@@ -32,97 +32,106 @@ msgstr ""
msgid "Error: Could not add directory %s to search path.\n"
msgstr ""
#: ../parser_include.c:147
#: ../parser_include.c:147 ../parser_include.c:151
msgid "Error: Could not allocate memory.\n"
msgstr ""
#: ../parser_interface.c:69 ../parser_interface.c:72
#: ../parser_interface.c:69 ../parser_interface.c:72 ../parser_interface.c:49
msgid "Bad write position\n"
msgstr "Slegte skryfposisie\n"
#: ../parser_interface.c:72 ../parser_interface.c:75
#: ../parser_interface.c:72 ../parser_interface.c:75 ../parser_interface.c:52
msgid "Permission denied\n"
msgstr "Toelating geweier\n"
#: ../parser_interface.c:75 ../parser_interface.c:78
#: ../parser_interface.c:75 ../parser_interface.c:78 ../parser_interface.c:55
msgid "Out of memory\n"
msgstr "Geheue is opgebruik\n"
#: ../parser_interface.c:78 ../parser_interface.c:81
#: ../parser_interface.c:78 ../parser_interface.c:81 ../parser_interface.c:58
msgid "Couldn't copy profile: Bad memory address\n"
msgstr ""
#: ../parser_interface.c:81 ../parser_interface.c:84
#: ../parser_interface.c:81 ../parser_interface.c:84 ../parser_interface.c:61
msgid "Profile doesn't conform to protocol\n"
msgstr "Profiel pas nie aan by protokol nie\n"
#: ../parser_interface.c:84 ../parser_interface.c:87
#: ../parser_interface.c:84 ../parser_interface.c:87 ../parser_interface.c:64
msgid "Profile does not match signature\n"
msgstr "Profiel stem nie ooreen met handtekening nie\n"
#: ../parser_interface.c:87 ../parser_interface.c:90
#: ../parser_interface.c:87 ../parser_interface.c:90 ../parser_interface.c:67
msgid "Profile version not supported by Apparmor module\n"
msgstr ""
#: ../parser_interface.c:90 ../parser_interface.c:93
#: ../parser_interface.c:90 ../parser_interface.c:93 ../parser_interface.c:70
msgid "Profile already exists\n"
msgstr "Profiel bestaan reeds\n"
#: ../parser_interface.c:93 ../parser_interface.c:96
#: ../parser_interface.c:93 ../parser_interface.c:96 ../parser_interface.c:73
msgid "Profile doesn't exist\n"
msgstr "Profiel bestaan nie\n"
#: ../parser_interface.c:96 ../parser_interface.c:99
#: ../parser_interface.c:96 ../parser_interface.c:99 ../parser_interface.c:76
msgid "Permission denied; attempted to load a profile while confined?\n"
msgstr ""
#: ../parser_interface.c:99 ../parser_interface.c:102
#: ../parser_interface.c:99 ../parser_interface.c:102 ../parser_interface.c:79
#, c-format
msgid "Unknown error (%d): %s\n"
msgstr ""
#: ../parser_interface.c:116 ../parser_interface.c:119
#: ../parser_interface.c:96
#, c-format
msgid "%s: Unable to add \"%s\". "
msgstr "%s: Kan \"%s\" nie byvoeg nie. "
#: ../parser_interface.c:121 ../parser_interface.c:124
#: ../parser_interface.c:101
#, c-format
msgid "%s: Unable to replace \"%s\". "
msgstr "%s: Kan \"%s\" nie vervang nie. "
#: ../parser_interface.c:126 ../parser_interface.c:129
#: ../parser_interface.c:106
#, c-format
msgid "%s: Unable to remove \"%s\". "
msgstr "%s: Kan \"%s\" nie verskuif nie. "
#: ../parser_interface.c:131 ../parser_interface.c:134
#: ../parser_interface.c:111
#, c-format
msgid "%s: Unable to write to stdout\n"
msgstr "%s: Kan nie na stdout toe skryf nie\n"
#: ../parser_interface.c:135 ../parser_interface.c:138
#: ../parser_interface.c:115
#, c-format
msgid "%s: Unable to write to output file\n"
msgstr ""
#: ../parser_interface.c:138 ../parser_interface.c:162
#: ../parser_interface.c:141 ../parser_interface.c:165
#: ../parser_interface.c:118 ../parser_interface.c:142
#, c-format
msgid "%s: ASSERT: Invalid option: %d\n"
msgstr "%s: BEWEER: Ongeldige opsie: %d\n"
#: ../parser_interface.c:147 ../parser_interface.c:150
#: ../parser_interface.c:127
#, c-format
msgid "Addition succeeded for \"%s\".\n"
msgstr "Byvoeging vir \"%s\" was suksesvol.\n"
#: ../parser_interface.c:151 ../parser_interface.c:154
#: ../parser_interface.c:131
#, c-format
msgid "Replacement succeeded for \"%s\".\n"
msgstr "Vervanging van \"%s\" was suksesvol.\n"
#: ../parser_interface.c:155 ../parser_interface.c:158
#: ../parser_interface.c:135
#, c-format
msgid "Removal succeeded for \"%s\".\n"
msgstr "Verwydering van \"%s\" was suksesvol.\n"
@@ -133,6 +142,7 @@ msgid "PANIC bad increment buffer %p pos %p ext %p size %d res %p\n"
msgstr "PANIEK slegs inkrementbuffer %p pos %p uitbr %p grootte %d res %p\n"
#: ../parser_interface.c:656 ../parser_interface.c:658
#: ../parser_interface.c:446
#, c-format
msgid "profile %s network rules not enforced\n"
msgstr ""
@@ -143,16 +153,19 @@ msgstr ""
#: ../parser_interface.c:750 ../parser_interface.c:902
#: ../parser_interface.c:743 ../parser_interface.c:894
#: ../parser_interface.c:518 ../parser_interface.c:669
#, c-format
msgid "Unable to open %s - %s\n"
msgstr "Kan %s - %s nie open nie\n"
#: ../parser_interface.c:776 ../parser_interface.c:768
#: ../parser_interface.c:543
#, c-format
msgid "Memory Allocation Error: Unable to remove ^%s\n"
msgstr ""
#: ../parser_interface.c:789 ../parser_interface.c:781
#: ../parser_interface.c:556
#, c-format
msgid "Memory Allocation Error: Unable to remove %s:%s."
msgstr ""
@@ -168,21 +181,23 @@ msgstr "kan profiel nie seriemaak nie %s\n"
#: ../parser_interface.c:829 ../parser_interface.c:916
#: ../parser_interface.c:821 ../parser_interface.c:908
#: ../parser_interface.c:582
#, c-format
msgid "%s: Unable to write entire profile entry\n"
msgstr "%s: Kan nie volledige profielinskrywing skryf nie\n"
#: ../parser_interface.c:839 ../parser_interface.c:831
#: ../parser_interface.c:593
#, c-format
msgid "%s: Unable to write entire profile entry to cache\n"
msgstr ""
#: parser_lex.l:100 parser_lex.l:163
#: parser_lex.l:100 parser_lex.l:163 parser_lex.l:169
#, c-format
msgid "Could not open '%s'"
msgstr ""
#: parser_lex.l:104 parser_lex.l:167
#: parser_lex.l:104 parser_lex.l:167 parser_lex.l:173
#, c-format
msgid "fstat failed for '%s'"
msgstr ""
@@ -197,18 +212,18 @@ msgstr ""
msgid "stat failed for '%s'"
msgstr ""
#: parser_lex.l:155 parser_lex.l:133
#: parser_lex.l:155 parser_lex.l:133 parser_lex.l:139
#, c-format
msgid "Could not open '%s' in '%s'"
msgstr ""
#: parser_lex.l:284 parser_lex.l:322 parser_lex.l:362 parser_lex.l:399
#: parser_lex.l:469 parser_lex.l:655 parser_lex.l:586
#: parser_lex.l:469 parser_lex.l:655 parser_lex.l:586 parser_lex.l:638
#, c-format
msgid "Found unexpected character: '%s'"
msgstr "Onverwagte karakter gevind: '%s'"
#: parser_lex.l:386 parser_lex.l:418
#: parser_lex.l:386 parser_lex.l:418 parser_lex.l:428
msgid "Variable declarations do not accept trailing commas"
msgstr ""
@@ -217,7 +232,7 @@ msgstr ""
msgid "(network_mode) Found unexpected character: '%s'"
msgstr ""
#: ../parser_main.c:333 ../parser_common.c:61
#: ../parser_main.c:333 ../parser_common.c:61 ../parser_common.c:106
#, c-format
msgid "Warning from %s (%s%sline %d): %s"
msgstr ""
@@ -227,21 +242,21 @@ msgstr ""
msgid "%s: Could not allocate memory for subdomainbase mount point\n"
msgstr "%s: Kon geheue vir subdomeinbasis-hegpunt nie toeken nie\n"
#: ../parser_main.c:577 ../parser_main.c:616
#: ../parser_main.c:577 ../parser_main.c:616 ../parser_main.c:479
#, c-format
msgid ""
"Warning: unable to find a suitable fs in %s, is it mounted?\n"
"Use --subdomainfs to override.\n"
msgstr ""
#: ../parser_main.c:597 ../parser_main.c:635
#: ../parser_main.c:597 ../parser_main.c:635 ../parser_main.c:498
#, c-format
msgid ""
"%s: Sorry. You need root privileges to run this program.\n"
"\n"
msgstr ""
#: ../parser_main.c:604 ../parser_main.c:642
#: ../parser_main.c:604 ../parser_main.c:642 ../parser_main.c:505
#, c-format
msgid ""
"%s: Warning! You've set this program setuid root.\n"
@@ -250,7 +265,7 @@ msgid ""
msgstr ""
#: ../parser_main.c:704 ../parser_main.c:813 ../parser_main.c:836
#: ../parser_main.c:946
#: ../parser_main.c:946 ../parser_main.c:860
#, c-format
msgid "Error: Could not read profile %s: %s.\n"
msgstr ""
@@ -266,42 +281,49 @@ msgstr ""
#: parser_yacc.y:1042 parser_yacc.y:1078 parser_yacc.y:1082 parser_yacc.y:1092
#: parser_yacc.y:1102 parser_yacc.y:1201 parser_yacc.y:1223 parser_yacc.y:1234
#: parser_yacc.y:1309 parser_yacc.y:1327 parser_yacc.y:1334 parser_yacc.y:1385
#: ../parser_main.c:735 ../parser_main.c:923 ../parser_main.c:1133
#: ../parser_main.c:1187 parser_yacc.y:311 parser_yacc.y:462 parser_yacc.y:472
#: parser_yacc.y:583 parser_yacc.y:662 parser_yacc.y:669 parser_yacc.y:1130
#: parser_yacc.y:1166 parser_yacc.y:1170 parser_yacc.y:1180 parser_yacc.y:1190
#: parser_yacc.y:1298 parser_yacc.y:1376 parser_yacc.y:1479 parser_yacc.y:1490
#: parser_yacc.y:1565 parser_yacc.y:1583 parser_yacc.y:1590 parser_yacc.y:1639
#: ../network.c:314 ../af_unix.cc:203
msgid "Memory allocation error."
msgstr "Geheuetoekenningsfout."
#: ../parser_main.c:740 ../parser_main.c:872
#: ../parser_main.c:740 ../parser_main.c:872 ../parser_main.c:757
#, c-format
msgid "Cached load succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:744 ../parser_main.c:876
#: ../parser_main.c:744 ../parser_main.c:876 ../parser_main.c:761
#, c-format
msgid "Cached reload succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:910 ../parser_main.c:1058
#: ../parser_main.c:910 ../parser_main.c:1058 ../parser_main.c:967
#, c-format
msgid "%s: Errors found in file. Aborting.\n"
msgstr "%s: Foute in lêer gevind. Staking.\n"
#: ../parser_misc.c:426 ../parser_misc.c:597
#: ../parser_misc.c:426 ../parser_misc.c:597 ../parser_misc.c:339
msgid ""
"Uppercase qualifiers \"RWLIMX\" are deprecated, please convert to lowercase\n"
"See the apparmor.d(5) manpage for details.\n"
msgstr ""
#: ../parser_misc.c:467 ../parser_misc.c:474 ../parser_misc.c:638
#: ../parser_misc.c:645
#: ../parser_misc.c:645 ../parser_misc.c:380 ../parser_misc.c:387
msgid "Conflict 'a' and 'w' perms are mutually exclusive."
msgstr ""
#: ../parser_misc.c:491 ../parser_misc.c:662
#: ../parser_misc.c:491 ../parser_misc.c:662 ../parser_misc.c:404
msgid "Exec qualifier 'i' invalid, conflicting qualifier already specified"
msgstr ""
"Uitvoerende kwalifiseerder 'i' is ongeldig, konflikterende kwalifiseerder "
"reeds gespesifisieer"
#: ../parser_misc.c:502 ../parser_misc.c:673
#: ../parser_misc.c:502 ../parser_misc.c:673 ../parser_misc.c:415
#, c-format
msgid ""
"Unconfined exec qualifier (%c%c) allows some dangerous environment variables "
@@ -309,24 +331,24 @@ msgid ""
msgstr ""
#: ../parser_misc.c:510 ../parser_misc.c:551 ../parser_misc.c:681
#: ../parser_misc.c:722
#: ../parser_misc.c:722 ../parser_misc.c:423 ../parser_misc.c:464
#, c-format
msgid "Exec qualifier '%c' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:537 ../parser_misc.c:545 ../parser_misc.c:708
#: ../parser_misc.c:716
#: ../parser_misc.c:716 ../parser_misc.c:450 ../parser_misc.c:458
#, c-format
msgid ""
"Exec qualifier '%c%c' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:593 ../parser_misc.c:764
#: ../parser_misc.c:593 ../parser_misc.c:764 ../parser_misc.c:506
#, c-format
msgid "Internal: unexpected mode character '%c' in input"
msgstr ""
#: ../parser_misc.c:615 ../parser_misc.c:786
#: ../parser_misc.c:615 ../parser_misc.c:786 ../parser_misc.c:528
#, c-format
msgid "Internal error generated invalid perm 0x%llx\n"
msgstr ""
@@ -337,131 +359,133 @@ msgstr ""
msgid "AppArmor parser error: %s\n"
msgstr ""
#: ../parser_merge.c:92 ../parser_merge.c:91
#: ../parser_merge.c:92 ../parser_merge.c:91 ../parser_merge.c:83
msgid "Couldn't merge entries. Out of Memory\n"
msgstr "Kon inskrywings nie saamvleg nie. Geheue is opgebruik\n"
#: ../parser_merge.c:111 ../parser_merge.c:113
#: ../parser_merge.c:111 ../parser_merge.c:113 ../parser_merge.c:105
#, c-format
msgid "profile %s: has merged rule %s with conflicting x modifiers\n"
msgstr ""
#: parser_yacc.y:236 parser_yacc.y:277
#: parser_yacc.y:236 parser_yacc.y:277 parser_yacc.y:320
msgid "Profile attachment must begin with a '/'."
msgstr ""
#: parser_yacc.y:260 parser_yacc.y:302
#: parser_yacc.y:260 parser_yacc.y:302 parser_yacc.y:348
msgid ""
"Profile names must begin with a '/', namespace or keyword 'profile' or 'hat'."
msgstr ""
#: parser_yacc.y:296 parser_yacc.y:338
#: parser_yacc.y:296 parser_yacc.y:338 parser_yacc.y:384
#, c-format
msgid "Failed to create alias %s -> %s\n"
msgstr ""
#: parser_yacc.y:417 parser_yacc.y:460
#: parser_yacc.y:417 parser_yacc.y:460 parser_yacc.y:506
msgid "Profile flag chroot_relative conflicts with namespace_relative"
msgstr ""
#: parser_yacc.y:421 parser_yacc.y:464
#: parser_yacc.y:421 parser_yacc.y:464 parser_yacc.y:510
msgid "Profile flag mediate_deleted conflicts with delegate_deleted"
msgstr ""
#: parser_yacc.y:424 parser_yacc.y:467
#: parser_yacc.y:424 parser_yacc.y:467 parser_yacc.y:513
msgid ""
"Profile flag attach_disconnected conflicts with no_attach_disconnected"
msgstr ""
#: parser_yacc.y:427 parser_yacc.y:470
#: parser_yacc.y:427 parser_yacc.y:470 parser_yacc.y:516
msgid "Profile flag chroot_attach conflicts with chroot_no_attach"
msgstr ""
#: parser_yacc.y:441 parser_yacc.y:484
#: parser_yacc.y:441 parser_yacc.y:484 parser_yacc.y:530
msgid "Profile flag 'debug' is no longer valid."
msgstr ""
#: parser_yacc.y:463 parser_yacc.y:506
#: parser_yacc.y:463 parser_yacc.y:506 parser_yacc.y:552
#, c-format
msgid "Invalid profile flag: %s."
msgstr ""
#: parser_yacc.y:498 parser_yacc.y:520 parser_yacc.y:548
#: parser_yacc.y:498 parser_yacc.y:520 parser_yacc.y:548 parser_yacc.y:594
msgid "Assert: `rule' returned NULL."
msgstr "Beweer: `reël' het NUL teruggestuur."
#: parser_yacc.y:501 parser_yacc.y:546 parser_yacc.y:552 parser_yacc.y:584
#: parser_yacc.y:598 parser_yacc.y:630
msgid ""
"Invalid mode, in deny rules 'x' must not be preceded by exec qualifier 'i', "
"'p', or 'u'"
msgstr ""
#: parser_yacc.y:524 parser_yacc.y:556
#: parser_yacc.y:524 parser_yacc.y:556 parser_yacc.y:602
msgid ""
"Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', 'c', or 'u'"
msgstr ""
#: parser_yacc.y:549 parser_yacc.y:587
#: parser_yacc.y:549 parser_yacc.y:587 parser_yacc.y:633
msgid "Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', or 'u'"
msgstr ""
#: parser_yacc.y:574 parser_yacc.y:612 parser_yacc.y:614
#: parser_yacc.y:574 parser_yacc.y:612 parser_yacc.y:614 parser_yacc.y:660
msgid "Assert: `network_rule' return invalid protocol."
msgstr ""
#: parser_yacc.y:649 parser_yacc.y:696
#: parser_yacc.y:649 parser_yacc.y:696 parser_yacc.y:786
msgid "Assert: `change_profile' returned NULL."
msgstr ""
#: parser_yacc.y:680 parser_yacc.y:720
#: parser_yacc.y:680 parser_yacc.y:720 parser_yacc.y:810
msgid "Assert: 'hat rule' returned NULL."
msgstr "Beweer: `hat-reël' het NUL teruggestuur."
#: parser_yacc.y:689 parser_yacc.y:729
#: parser_yacc.y:689 parser_yacc.y:729 parser_yacc.y:819
msgid "Assert: 'local_profile rule' returned NULL."
msgstr ""
#: parser_yacc.y:824 parser_yacc.y:885
#: parser_yacc.y:824 parser_yacc.y:885 parser_yacc.y:992
#, c-format
msgid "Unset boolean variable %s used in if-expression"
msgstr ""
#: parser_yacc.y:882 parser_yacc.y:986
#: parser_yacc.y:882 parser_yacc.y:986 parser_yacc.y:1092
msgid "unsafe rule missing exec permissions"
msgstr ""
#: parser_yacc.y:901 parser_yacc.y:954
#: parser_yacc.y:901 parser_yacc.y:954 parser_yacc.y:1060
msgid "subset can only be used with link rules."
msgstr ""
#: parser_yacc.y:903 parser_yacc.y:956
#: parser_yacc.y:903 parser_yacc.y:956 parser_yacc.y:1062
msgid "link and exec perms conflict on a file rule using ->"
msgstr ""
#: parser_yacc.y:905 parser_yacc.y:958
#: parser_yacc.y:905 parser_yacc.y:958 parser_yacc.y:1064
msgid "link perms are not allowed on a named profile transition.\n"
msgstr ""
#: parser_yacc.y:921 parser_yacc.y:1003
#: parser_yacc.y:921 parser_yacc.y:1003 parser_yacc.y:1109
#, c-format
msgid "missing an end of line character? (entry: %s)"
msgstr "ontbreek daar n reëleindkarakter? (inskrywing: %s)"
#: parser_yacc.y:975 parser_yacc.y:985 parser_yacc.y:1057 parser_yacc.y:1067
#: parser_yacc.y:1145 parser_yacc.y:1155
msgid "Invalid network entry."
msgstr ""
#: parser_yacc.y:1039 parser_yacc.y:1048 parser_yacc.y:1254
#: parser_yacc.y:1039 parser_yacc.y:1048 parser_yacc.y:1254 parser_yacc.y:1510
#, c-format
msgid "Invalid capability %s."
msgstr ""
#: parser_yacc.y:1066 parser_yacc.y:1269
#: parser_yacc.y:1066 parser_yacc.y:1269 parser_yacc.y:1525
#, c-format
msgid "AppArmor parser error for %s%s%s at line %d: %s\n"
msgstr ""
#: parser_yacc.y:1072 parser_yacc.y:1275
#: parser_yacc.y:1072 parser_yacc.y:1275 parser_yacc.y:1531
#, c-format
msgid "AppArmor parser error,%s%s line %d: %s\n"
msgstr ""
@@ -471,12 +495,12 @@ msgstr ""
msgid "%s: Illegal open {, nesting groupings not allowed\n"
msgstr "%s: Onwettige open {, nesting van groeperings nie toegelaat nie\n"
#: ../parser_regex.c:265 ../parser_regex.c:274
#: ../parser_regex.c:265 ../parser_regex.c:274 ../parser_regex.c:278
#, c-format
msgid "%s: Regex grouping error: Invalid number of items between {}\n"
msgstr "%s: Regex-groeperingsfout: Ongeldige aantal items tussen {}\n"
#: ../parser_regex.c:271 ../parser_regex.c:280
#: ../parser_regex.c:271 ../parser_regex.c:280 ../parser_regex.c:284
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close }, no matching open { detected\n"
@@ -484,7 +508,7 @@ msgstr ""
"%s: Regex-groeperingsfout: Ongeldige sluiting }, geen ooreenstemmende oop "
"nie { bespeur\n"
#: ../parser_regex.c:337 ../parser_regex.c:343
#: ../parser_regex.c:337 ../parser_regex.c:343 ../parser_regex.c:361
#, c-format
msgid ""
"%s: Regex grouping error: Unclosed grouping or character class, expecting "
@@ -496,17 +520,17 @@ msgstr ""
msgid "%s: Internal buffer overflow detected, %d characters exceeded\n"
msgstr "%s: Interne bufferoorvloei bespeur, %d karakters oorskry\n"
#: ../parser_regex.c:355 ../parser_regex.c:361
#: ../parser_regex.c:355 ../parser_regex.c:361 ../parser_regex.c:377
#, c-format
msgid "%s: Unable to parse input line '%s'\n"
msgstr "%s: Kan insetreël '%s' nie ontleed nie\n"
#: ../parser_regex.c:397 ../parser_regex.c:405
#: ../parser_regex.c:397 ../parser_regex.c:405 ../parser_regex.c:421
#, c-format
msgid "%s: Invalid profile name '%s' - bad regular expression\n"
msgstr ""
#: ../parser_policy.c:202 ../parser_policy.c:402
#: ../parser_policy.c:202 ../parser_policy.c:402 ../parser_policy.c:375
#, c-format
msgid "ERROR merging rules for profile %s, failed to load\n"
msgstr ""
@@ -519,17 +543,17 @@ msgid ""
"\t'**' may only be used at the end of a rule.\n"
msgstr ""
#: ../parser_policy.c:279 ../parser_policy.c:359
#: ../parser_policy.c:279 ../parser_policy.c:359 ../parser_policy.c:332
#, c-format
msgid "ERROR processing regexs for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:306 ../parser_policy.c:389
#: ../parser_policy.c:306 ../parser_policy.c:389 ../parser_policy.c:362
#, c-format
msgid "ERROR expanding variables for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:390 ../parser_policy.c:382
#: ../parser_policy.c:390 ../parser_policy.c:382 ../parser_policy.c:355
#, c-format
msgid "ERROR adding hat access rule for profile %s\n"
msgstr ""
@@ -560,30 +584,31 @@ msgid "%s: Errors found in combining rules postprocessing. Aborting.\n"
msgstr ""
"%s: Foute gevind in die kombineer van reëls tydens naprosessering. Staking.\n"
#: parser_lex.l:180
#: parser_lex.l:180 parser_lex.l:186
#, c-format
msgid "Could not process include directory '%s' in '%s'"
msgstr ""
#: ../parser_main.c:660
#: ../parser_main.c:660 ../parser_main.c:523
msgid "Feature buffer full."
msgstr ""
#: ../parser_main.c:1115 ../parser_main.c:1132
#: ../parser_main.c:1115 ../parser_main.c:1132 ../parser_main.c:1024
#: ../parser_main.c:1041
msgid "Out of memory"
msgstr ""
#: ../parser_main.c:1182
#: ../parser_main.c:1182 ../parser_main.c:1091
#, c-format
msgid "Can't create cache directory: %s\n"
msgstr ""
#: ../parser_main.c:1185
#: ../parser_main.c:1185 ../parser_main.c:1094
#, c-format
msgid "File in cache directory location: %s\n"
msgstr ""
#: ../parser_main.c:1188
#: ../parser_main.c:1188 ../parser_main.c:1097
#, c-format
msgid "Can't update cache directory: %s\n"
msgstr ""
@@ -598,11 +623,11 @@ msgstr ""
msgid "Internal error generated invalid DBus perm 0x%x\n"
msgstr ""
#: parser_yacc.y:575
#: parser_yacc.y:575 parser_yacc.y:621
msgid "deny prefix not allowed"
msgstr ""
#: parser_yacc.y:612
#: parser_yacc.y:612 parser_yacc.y:658
msgid "owner prefix not allowed"
msgstr ""
@@ -618,41 +643,41 @@ msgstr ""
msgid "owner prefix not allow on capability rules"
msgstr ""
#: parser_yacc.y:1357
#: parser_yacc.y:1357 parser_yacc.y:1613
#, c-format
msgid "invalid mount conditional %s%s"
msgstr ""
#: parser_yacc.y:1374
#: parser_yacc.y:1374 parser_yacc.y:1628
msgid "bad mount rule"
msgstr ""
#: parser_yacc.y:1381
#: parser_yacc.y:1381 parser_yacc.y:1635
msgid "mount point conditions not currently supported"
msgstr ""
#: parser_yacc.y:1398
#: parser_yacc.y:1398 parser_yacc.y:1650
#, c-format
msgid "invalid pivotroot conditional '%s'"
msgstr ""
#: ../parser_regex.c:241
#: ../parser_regex.c:241 ../parser_regex.c:236
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close ], no matching open [ detected\n"
msgstr ""
#: ../parser_regex.c:257
#: ../parser_regex.c:257 ../parser_regex.c:256
#, c-format
msgid "%s: Regex grouping error: Exceeded maximum nesting of {}\n"
msgstr ""
#: ../parser_policy.c:366
#: ../parser_policy.c:366 ../parser_policy.c:339
#, c-format
msgid "ERROR processing policydb rules for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:396
#: ../parser_policy.c:396 ../parser_policy.c:369
#, c-format
msgid "ERROR replacing aliases for profile %s, failed to load\n"
msgstr ""

View File

@@ -1,5 +1,5 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR NOVELL, Inc.
# Copyright (C) YEAR Canonical Ltd
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: apparmor@lists.ubuntu.com\n"
"POT-Creation-Date: 2014-09-13 00:11-0700\n"
"POT-Creation-Date: 2020-10-14 03:35-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,95 +17,106 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../parser_include.c:113 ../parser_include.c:111
#: ../parser_include.c:113 ../parser_include.c:111 ../parser_include.c:114
msgid "Error: Out of memory.\n"
msgstr ""
#: ../parser_include.c:123 ../parser_include.c:121
#: ../parser_include.c:123 ../parser_include.c:121 ../parser_include.c:124
#, c-format
msgid "Error: basedir %s is not a directory, skipping.\n"
msgstr ""
#: ../parser_include.c:137
#: ../parser_include.c:137 ../parser_include.c:140
#, c-format
msgid "Error: Could not add directory %s to search path.\n"
msgstr ""
#: ../parser_include.c:147 ../parser_include.c:151
#: ../parser_include.c:147 ../parser_include.c:151 ../parser_include.c:154
msgid "Error: Could not allocate memory.\n"
msgstr ""
#: ../parser_interface.c:69 ../parser_interface.c:72 ../parser_interface.c:49
#: ../parser_interface.c:52
msgid "Bad write position\n"
msgstr ""
#: ../parser_interface.c:72 ../parser_interface.c:75 ../parser_interface.c:52
#: ../parser_interface.c:55
msgid "Permission denied\n"
msgstr ""
#: ../parser_interface.c:75 ../parser_interface.c:78 ../parser_interface.c:55
#: ../parser_interface.c:58
msgid "Out of memory\n"
msgstr ""
#: ../parser_interface.c:78 ../parser_interface.c:81 ../parser_interface.c:58
#: ../parser_interface.c:61
msgid "Couldn't copy profile: Bad memory address\n"
msgstr ""
#: ../parser_interface.c:81 ../parser_interface.c:84 ../parser_interface.c:61
#: ../parser_interface.c:64
msgid "Profile doesn't conform to protocol\n"
msgstr ""
#: ../parser_interface.c:84 ../parser_interface.c:87 ../parser_interface.c:64
#: ../parser_interface.c:67
msgid "Profile does not match signature\n"
msgstr ""
#: ../parser_interface.c:87 ../parser_interface.c:90 ../parser_interface.c:67
#: ../parser_interface.c:70
msgid "Profile version not supported by Apparmor module\n"
msgstr ""
#: ../parser_interface.c:90 ../parser_interface.c:93 ../parser_interface.c:70
#: ../parser_interface.c:73
msgid "Profile already exists\n"
msgstr ""
#: ../parser_interface.c:93 ../parser_interface.c:96 ../parser_interface.c:73
#: ../parser_interface.c:76
msgid "Profile doesn't exist\n"
msgstr ""
#: ../parser_interface.c:96 ../parser_interface.c:99 ../parser_interface.c:76
#: ../parser_interface.c:79
msgid "Permission denied; attempted to load a profile while confined?\n"
msgstr ""
#: ../parser_interface.c:99 ../parser_interface.c:102 ../parser_interface.c:79
#: ../parser_interface.c:82
#, c-format
msgid "Unknown error (%d): %s\n"
msgstr ""
#: ../parser_interface.c:116 ../parser_interface.c:119
#: ../parser_interface.c:96
#: ../parser_interface.c:116 ../parser_interface.c:119 ../parser_interface.c:96
#: ../parser_interface.c:100
#, c-format
msgid "%s: Unable to add \"%s\". "
msgstr ""
#: ../parser_interface.c:121 ../parser_interface.c:124
#: ../parser_interface.c:101
#: ../parser_interface.c:101 ../parser_interface.c:105
#, c-format
msgid "%s: Unable to replace \"%s\". "
msgstr ""
#: ../parser_interface.c:126 ../parser_interface.c:129
#: ../parser_interface.c:106
#: ../parser_interface.c:106 ../parser_interface.c:110
#, c-format
msgid "%s: Unable to remove \"%s\". "
msgstr ""
#: ../parser_interface.c:131 ../parser_interface.c:134
#: ../parser_interface.c:111
#: ../parser_interface.c:111 ../parser_interface.c:115
#, c-format
msgid "%s: Unable to write to stdout\n"
msgstr ""
#: ../parser_interface.c:135 ../parser_interface.c:138
#: ../parser_interface.c:115
#: ../parser_interface.c:115 ../parser_interface.c:119
#, c-format
msgid "%s: Unable to write to output file\n"
msgstr ""
@@ -113,24 +124,25 @@ msgstr ""
#: ../parser_interface.c:138 ../parser_interface.c:162
#: ../parser_interface.c:141 ../parser_interface.c:165
#: ../parser_interface.c:118 ../parser_interface.c:142
#: ../parser_interface.c:122 ../parser_interface.c:146
#, c-format
msgid "%s: ASSERT: Invalid option: %d\n"
msgstr ""
#: ../parser_interface.c:147 ../parser_interface.c:150
#: ../parser_interface.c:127
#: ../parser_interface.c:127 ../parser_interface.c:131
#, c-format
msgid "Addition succeeded for \"%s\".\n"
msgstr ""
#: ../parser_interface.c:151 ../parser_interface.c:154
#: ../parser_interface.c:131
#: ../parser_interface.c:131 ../parser_interface.c:135
#, c-format
msgid "Replacement succeeded for \"%s\".\n"
msgstr ""
#: ../parser_interface.c:155 ../parser_interface.c:158
#: ../parser_interface.c:135
#: ../parser_interface.c:135 ../parser_interface.c:139
#, c-format
msgid "Removal succeeded for \"%s\".\n"
msgstr ""
@@ -141,7 +153,7 @@ msgid "PANIC bad increment buffer %p pos %p ext %p size %d res %p\n"
msgstr ""
#: ../parser_interface.c:656 ../parser_interface.c:658
#: ../parser_interface.c:446
#: ../parser_interface.c:446 ../parser_interface.c:448
#, c-format
msgid "profile %s network rules not enforced\n"
msgstr ""
@@ -186,12 +198,12 @@ msgid "%s: Unable to write entire profile entry\n"
msgstr ""
#: ../parser_interface.c:839 ../parser_interface.c:831
#: ../parser_interface.c:593
#: ../parser_interface.c:593 ../parser_interface.c:551
#, c-format
msgid "%s: Unable to write entire profile entry to cache\n"
msgstr ""
#: parser_lex.l:100 parser_lex.l:163 parser_lex.l:169
#: parser_lex.l:100 parser_lex.l:163 parser_lex.l:169 parser_lex.l:168
#, c-format
msgid "Could not open '%s'"
msgstr ""
@@ -211,7 +223,7 @@ msgstr ""
msgid "stat failed for '%s'"
msgstr ""
#: parser_lex.l:155 parser_lex.l:133 parser_lex.l:139
#: parser_lex.l:155 parser_lex.l:133 parser_lex.l:139 parser_lex.l:138
#, c-format
msgid "Could not open '%s' in '%s'"
msgstr ""
@@ -222,7 +234,7 @@ msgstr ""
msgid "Found unexpected character: '%s'"
msgstr ""
#: parser_lex.l:386 parser_lex.l:418 parser_lex.l:428
#: parser_lex.l:386 parser_lex.l:418 parser_lex.l:428 parser_lex.l:477
msgid "Variable declarations do not accept trailing commas"
msgstr ""
@@ -232,6 +244,7 @@ msgid "(network_mode) Found unexpected character: '%s'"
msgstr ""
#: ../parser_main.c:333 ../parser_common.c:61 ../parser_common.c:106
#: ../parser_common.c:107
#, c-format
msgid "Warning from %s (%s%sline %d): %s"
msgstr ""
@@ -242,6 +255,7 @@ msgid "%s: Could not allocate memory for subdomainbase mount point\n"
msgstr ""
#: ../parser_main.c:577 ../parser_main.c:616 ../parser_main.c:479
#: ../parser_main.c:1302
#, c-format
msgid ""
"Warning: unable to find a suitable fs in %s, is it mounted?\n"
@@ -249,6 +263,7 @@ msgid ""
msgstr ""
#: ../parser_main.c:597 ../parser_main.c:635 ../parser_main.c:498
#: ../parser_main.c:730
#, c-format
msgid ""
"%s: Sorry. You need root privileges to run this program.\n"
@@ -256,6 +271,7 @@ msgid ""
msgstr ""
#: ../parser_main.c:604 ../parser_main.c:642 ../parser_main.c:505
#: ../parser_main.c:736
#, c-format
msgid ""
"%s: Warning! You've set this program setuid root.\n"
@@ -264,7 +280,7 @@ msgid ""
msgstr ""
#: ../parser_main.c:704 ../parser_main.c:813 ../parser_main.c:836
#: ../parser_main.c:946 ../parser_main.c:860
#: ../parser_main.c:946 ../parser_main.c:860 ../parser_main.c:925
#, c-format
msgid "Error: Could not read profile %s: %s.\n"
msgstr ""
@@ -286,26 +302,36 @@ msgstr ""
#: parser_yacc.y:1166 parser_yacc.y:1170 parser_yacc.y:1180 parser_yacc.y:1190
#: parser_yacc.y:1298 parser_yacc.y:1376 parser_yacc.y:1479 parser_yacc.y:1490
#: parser_yacc.y:1565 parser_yacc.y:1583 parser_yacc.y:1590 parser_yacc.y:1639
#: ../network.c:314 ../af_unix.cc:203
#: ../network.c:314 ../af_unix.cc:203 ../parser_misc.c:729 parser_yacc.y:315
#: parser_yacc.y:339 parser_yacc.y:493 parser_yacc.y:503 parser_yacc.y:614
#: parser_yacc.y:695 parser_yacc.y:702 parser_yacc.y:1116 parser_yacc.y:1164
#: parser_yacc.y:1200 parser_yacc.y:1204 parser_yacc.y:1214 parser_yacc.y:1224
#: parser_yacc.y:1318 parser_yacc.y:1396 parser_yacc.y:1529 parser_yacc.y:1534
#: parser_yacc.y:1608 parser_yacc.y:1626 parser_yacc.y:1633 parser_yacc.y:1682
#: ../network.c:315 ../af_unix.cc:204
msgid "Memory allocation error."
msgstr ""
#: ../parser_main.c:740 ../parser_main.c:872 ../parser_main.c:757
#: ../parser_main.c:866
#, c-format
msgid "Cached load succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:744 ../parser_main.c:876 ../parser_main.c:761
#: ../parser_main.c:870
#, c-format
msgid "Cached reload succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:910 ../parser_main.c:1058 ../parser_main.c:967
#: ../parser_main.c:1019
#, c-format
msgid "%s: Errors found in file. Aborting.\n"
msgstr ""
#: ../parser_misc.c:426 ../parser_misc.c:597 ../parser_misc.c:339
#: ../parser_misc.c:322
msgid ""
"Uppercase qualifiers \"RWLIMX\" are deprecated, please convert to lowercase\n"
"See the apparmor.d(5) manpage for details.\n"
@@ -313,14 +339,17 @@ msgstr ""
#: ../parser_misc.c:467 ../parser_misc.c:474 ../parser_misc.c:638
#: ../parser_misc.c:645 ../parser_misc.c:380 ../parser_misc.c:387
#: ../parser_misc.c:363 ../parser_misc.c:370
msgid "Conflict 'a' and 'w' perms are mutually exclusive."
msgstr ""
#: ../parser_misc.c:491 ../parser_misc.c:662 ../parser_misc.c:404
#: ../parser_misc.c:387
msgid "Exec qualifier 'i' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:502 ../parser_misc.c:673 ../parser_misc.c:415
#: ../parser_misc.c:398
#, c-format
msgid ""
"Unconfined exec qualifier (%c%c) allows some dangerous environment variables "
@@ -329,22 +358,26 @@ msgstr ""
#: ../parser_misc.c:510 ../parser_misc.c:551 ../parser_misc.c:681
#: ../parser_misc.c:722 ../parser_misc.c:423 ../parser_misc.c:464
#: ../parser_misc.c:406 ../parser_misc.c:447
#, c-format
msgid "Exec qualifier '%c' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:537 ../parser_misc.c:545 ../parser_misc.c:708
#: ../parser_misc.c:716 ../parser_misc.c:450 ../parser_misc.c:458
#: ../parser_misc.c:433 ../parser_misc.c:441
#, c-format
msgid "Exec qualifier '%c%c' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:593 ../parser_misc.c:764 ../parser_misc.c:506
#: ../parser_misc.c:489
#, c-format
msgid "Internal: unexpected mode character '%c' in input"
msgstr ""
#: ../parser_misc.c:615 ../parser_misc.c:786 ../parser_misc.c:528
#: ../parser_misc.c:511
#, c-format
msgid "Internal error generated invalid perm 0x%llx\n"
msgstr ""
@@ -356,10 +389,12 @@ msgid "AppArmor parser error: %s\n"
msgstr ""
#: ../parser_merge.c:92 ../parser_merge.c:91 ../parser_merge.c:83
#: ../parser_merge.c:71
msgid "Couldn't merge entries. Out of Memory\n"
msgstr ""
#: ../parser_merge.c:111 ../parser_merge.c:113 ../parser_merge.c:105
#: ../parser_merge.c:93
#, c-format
msgid "profile %s: has merged rule %s with conflicting x modifiers\n"
msgstr ""
@@ -368,119 +403,122 @@ msgstr ""
msgid "Profile attachment must begin with a '/'."
msgstr ""
#: parser_yacc.y:260 parser_yacc.y:302 parser_yacc.y:348
#: parser_yacc.y:260 parser_yacc.y:302 parser_yacc.y:348 parser_yacc.y:373
msgid ""
"Profile names must begin with a '/', namespace or keyword 'profile' or 'hat'."
msgstr ""
#: parser_yacc.y:296 parser_yacc.y:338 parser_yacc.y:384
#: parser_yacc.y:296 parser_yacc.y:338 parser_yacc.y:384 parser_yacc.y:409
#, c-format
msgid "Failed to create alias %s -> %s\n"
msgstr ""
#: parser_yacc.y:417 parser_yacc.y:460 parser_yacc.y:506
#: parser_yacc.y:417 parser_yacc.y:460 parser_yacc.y:506 parser_yacc.y:537
msgid "Profile flag chroot_relative conflicts with namespace_relative"
msgstr ""
#: parser_yacc.y:421 parser_yacc.y:464 parser_yacc.y:510
#: parser_yacc.y:421 parser_yacc.y:464 parser_yacc.y:510 parser_yacc.y:541
msgid "Profile flag mediate_deleted conflicts with delegate_deleted"
msgstr ""
#: parser_yacc.y:424 parser_yacc.y:467 parser_yacc.y:513
#: parser_yacc.y:424 parser_yacc.y:467 parser_yacc.y:513 parser_yacc.y:544
msgid "Profile flag attach_disconnected conflicts with no_attach_disconnected"
msgstr ""
#: parser_yacc.y:427 parser_yacc.y:470 parser_yacc.y:516
#: parser_yacc.y:427 parser_yacc.y:470 parser_yacc.y:516 parser_yacc.y:547
msgid "Profile flag chroot_attach conflicts with chroot_no_attach"
msgstr ""
#: parser_yacc.y:441 parser_yacc.y:484 parser_yacc.y:530
#: parser_yacc.y:441 parser_yacc.y:484 parser_yacc.y:530 parser_yacc.y:561
msgid "Profile flag 'debug' is no longer valid."
msgstr ""
#: parser_yacc.y:463 parser_yacc.y:506 parser_yacc.y:552
#: parser_yacc.y:463 parser_yacc.y:506 parser_yacc.y:552 parser_yacc.y:583
#, c-format
msgid "Invalid profile flag: %s."
msgstr ""
#: parser_yacc.y:498 parser_yacc.y:520 parser_yacc.y:548 parser_yacc.y:594
#: parser_yacc.y:627
msgid "Assert: `rule' returned NULL."
msgstr ""
#: parser_yacc.y:501 parser_yacc.y:546 parser_yacc.y:552 parser_yacc.y:584
#: parser_yacc.y:598 parser_yacc.y:630
#: parser_yacc.y:598 parser_yacc.y:630 parser_yacc.y:631 parser_yacc.y:663
msgid ""
"Invalid mode, in deny rules 'x' must not be preceded by exec qualifier 'i', "
"'p', or 'u'"
msgstr ""
#: parser_yacc.y:524 parser_yacc.y:556 parser_yacc.y:602
#: parser_yacc.y:524 parser_yacc.y:556 parser_yacc.y:602 parser_yacc.y:635
msgid ""
"Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', 'c', or 'u'"
msgstr ""
#: parser_yacc.y:549 parser_yacc.y:587 parser_yacc.y:633
#: parser_yacc.y:549 parser_yacc.y:587 parser_yacc.y:633 parser_yacc.y:666
msgid "Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', or 'u'"
msgstr ""
#: parser_yacc.y:574 parser_yacc.y:612 parser_yacc.y:614 parser_yacc.y:660
#: parser_yacc.y:693
msgid "Assert: `network_rule' return invalid protocol."
msgstr ""
#: parser_yacc.y:649 parser_yacc.y:696 parser_yacc.y:786
#: parser_yacc.y:649 parser_yacc.y:696 parser_yacc.y:786 parser_yacc.y:819
msgid "Assert: `change_profile' returned NULL."
msgstr ""
#: parser_yacc.y:680 parser_yacc.y:720 parser_yacc.y:810
#: parser_yacc.y:680 parser_yacc.y:720 parser_yacc.y:810 parser_yacc.y:857
msgid "Assert: 'hat rule' returned NULL."
msgstr ""
#: parser_yacc.y:689 parser_yacc.y:729 parser_yacc.y:819
#: parser_yacc.y:689 parser_yacc.y:729 parser_yacc.y:819 parser_yacc.y:866
msgid "Assert: 'local_profile rule' returned NULL."
msgstr ""
#: parser_yacc.y:824 parser_yacc.y:885 parser_yacc.y:992
#: parser_yacc.y:824 parser_yacc.y:885 parser_yacc.y:992 parser_yacc.y:1029
#, c-format
msgid "Unset boolean variable %s used in if-expression"
msgstr ""
#: parser_yacc.y:882 parser_yacc.y:986 parser_yacc.y:1092
#: parser_yacc.y:882 parser_yacc.y:986 parser_yacc.y:1092 parser_yacc.y:1126
msgid "unsafe rule missing exec permissions"
msgstr ""
#: parser_yacc.y:901 parser_yacc.y:954 parser_yacc.y:1060
#: parser_yacc.y:901 parser_yacc.y:954 parser_yacc.y:1060 parser_yacc.y:1093
msgid "subset can only be used with link rules."
msgstr ""
#: parser_yacc.y:903 parser_yacc.y:956 parser_yacc.y:1062
#: parser_yacc.y:903 parser_yacc.y:956 parser_yacc.y:1062 parser_yacc.y:1095
msgid "link and exec perms conflict on a file rule using ->"
msgstr ""
#: parser_yacc.y:905 parser_yacc.y:958 parser_yacc.y:1064
#: parser_yacc.y:905 parser_yacc.y:958 parser_yacc.y:1064 parser_yacc.y:1097
msgid "link perms are not allowed on a named profile transition.\n"
msgstr ""
#: parser_yacc.y:921 parser_yacc.y:1003 parser_yacc.y:1109
#: parser_yacc.y:921 parser_yacc.y:1003 parser_yacc.y:1109 parser_yacc.y:1143
#, c-format
msgid "missing an end of line character? (entry: %s)"
msgstr ""
#: parser_yacc.y:975 parser_yacc.y:985 parser_yacc.y:1057 parser_yacc.y:1067
#: parser_yacc.y:1145 parser_yacc.y:1155
#: parser_yacc.y:1145 parser_yacc.y:1155 parser_yacc.y:1179 parser_yacc.y:1189
msgid "Invalid network entry."
msgstr ""
#: parser_yacc.y:1039 parser_yacc.y:1048 parser_yacc.y:1254 parser_yacc.y:1510
#: parser_yacc.y:1554
#, c-format
msgid "Invalid capability %s."
msgstr ""
#: parser_yacc.y:1066 parser_yacc.y:1269 parser_yacc.y:1525
#: parser_yacc.y:1066 parser_yacc.y:1269 parser_yacc.y:1525 parser_yacc.y:1569
#, c-format
msgid "AppArmor parser error for %s%s%s at line %d: %s\n"
msgstr ""
#: parser_yacc.y:1072 parser_yacc.y:1275 parser_yacc.y:1531
#: parser_yacc.y:1072 parser_yacc.y:1275 parser_yacc.y:1531 parser_yacc.y:1575
#, c-format
msgid "AppArmor parser error,%s%s line %d: %s\n"
msgstr ""
@@ -491,17 +529,20 @@ msgid "%s: Illegal open {, nesting groupings not allowed\n"
msgstr ""
#: ../parser_regex.c:265 ../parser_regex.c:274 ../parser_regex.c:278
#: ../parser_regex.c:295
#, c-format
msgid "%s: Regex grouping error: Invalid number of items between {}\n"
msgstr ""
#: ../parser_regex.c:271 ../parser_regex.c:280 ../parser_regex.c:284
#: ../parser_regex.c:301
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close }, no matching open { detected\n"
msgstr ""
#: ../parser_regex.c:337 ../parser_regex.c:343 ../parser_regex.c:361
#: ../parser_regex.c:392
#, c-format
msgid ""
"%s: Regex grouping error: Unclosed grouping or character class, expecting "
@@ -514,16 +555,19 @@ msgid "%s: Internal buffer overflow detected, %d characters exceeded\n"
msgstr ""
#: ../parser_regex.c:355 ../parser_regex.c:361 ../parser_regex.c:377
#: ../parser_regex.c:408
#, c-format
msgid "%s: Unable to parse input line '%s'\n"
msgstr ""
#: ../parser_regex.c:397 ../parser_regex.c:405 ../parser_regex.c:421
#: ../parser_regex.c:452
#, c-format
msgid "%s: Invalid profile name '%s' - bad regular expression\n"
msgstr ""
#: ../parser_policy.c:202 ../parser_policy.c:402 ../parser_policy.c:375
#: ../parser_policy.c:378
#, c-format
msgid "ERROR merging rules for profile %s, failed to load\n"
msgstr ""
@@ -537,16 +581,19 @@ msgid ""
msgstr ""
#: ../parser_policy.c:279 ../parser_policy.c:359 ../parser_policy.c:332
#: ../parser_policy.c:335
#, c-format
msgid "ERROR processing regexs for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:306 ../parser_policy.c:389 ../parser_policy.c:362
#: ../parser_policy.c:365
#, c-format
msgid "ERROR expanding variables for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:390 ../parser_policy.c:382 ../parser_policy.c:355
#: ../parser_policy.c:358
#, c-format
msgid "ERROR adding hat access rule for profile %s\n"
msgstr ""
@@ -586,7 +633,7 @@ msgid "Feature buffer full."
msgstr ""
#: ../parser_main.c:1115 ../parser_main.c:1132 ../parser_main.c:1024
#: ../parser_main.c:1041
#: ../parser_main.c:1041 ../parser_main.c:1218 ../parser_main.c:1240
msgid "Out of memory"
msgstr ""
@@ -615,11 +662,11 @@ msgstr ""
msgid "Internal error generated invalid DBus perm 0x%x\n"
msgstr ""
#: parser_yacc.y:575 parser_yacc.y:621
#: parser_yacc.y:575 parser_yacc.y:621 parser_yacc.y:654
msgid "deny prefix not allowed"
msgstr ""
#: parser_yacc.y:612 parser_yacc.y:658
#: parser_yacc.y:612 parser_yacc.y:658 parser_yacc.y:691
msgid "owner prefix not allowed"
msgstr ""
@@ -635,41 +682,41 @@ msgstr ""
msgid "owner prefix not allow on capability rules"
msgstr ""
#: parser_yacc.y:1357 parser_yacc.y:1613
#: parser_yacc.y:1357 parser_yacc.y:1613 parser_yacc.y:1656
#, c-format
msgid "invalid mount conditional %s%s"
msgstr ""
#: parser_yacc.y:1374 parser_yacc.y:1628
#: parser_yacc.y:1374 parser_yacc.y:1628 parser_yacc.y:1671
msgid "bad mount rule"
msgstr ""
#: parser_yacc.y:1381 parser_yacc.y:1635
#: parser_yacc.y:1381 parser_yacc.y:1635 parser_yacc.y:1678
msgid "mount point conditions not currently supported"
msgstr ""
#: parser_yacc.y:1398 parser_yacc.y:1650
#: parser_yacc.y:1398 parser_yacc.y:1650 parser_yacc.y:1693
#, c-format
msgid "invalid pivotroot conditional '%s'"
msgstr ""
#: ../parser_regex.c:241 ../parser_regex.c:236
#: ../parser_regex.c:241 ../parser_regex.c:236 ../parser_regex.c:253
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close ], no matching open [ detected\n"
msgstr ""
#: ../parser_regex.c:257 ../parser_regex.c:256
#: ../parser_regex.c:257 ../parser_regex.c:256 ../parser_regex.c:273
#, c-format
msgid "%s: Regex grouping error: Exceeded maximum nesting of {}\n"
msgstr ""
#: ../parser_policy.c:366 ../parser_policy.c:339
#: ../parser_policy.c:366 ../parser_policy.c:339 ../parser_policy.c:342
#, c-format
msgid "ERROR processing policydb rules for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:396 ../parser_policy.c:369
#: ../parser_policy.c:396 ../parser_policy.c:369 ../parser_policy.c:372
#, c-format
msgid "ERROR replacing aliases for profile %s, failed to load\n"
msgstr ""
@@ -689,51 +736,170 @@ msgstr ""
msgid "Error: Could not read cache file '%s', skipping...\n"
msgstr ""
#: ../parser_misc.c:575
#: ../parser_misc.c:575 ../parser_misc.c:558
#, c-format
msgid "Internal: unexpected %s mode character '%c' in input"
msgstr ""
#: ../parser_misc.c:599
#: ../parser_misc.c:599 ../parser_misc.c:582
#, c-format
msgid "Internal error generated invalid %s perm 0x%x\n"
msgstr ""
#: parser_yacc.y:703
#: parser_yacc.y:703 parser_yacc.y:736
msgid "owner prefix not allowed on mount rules"
msgstr ""
#: parser_yacc.y:720
#: parser_yacc.y:720 parser_yacc.y:753
msgid "owner prefix not allowed on dbus rules"
msgstr ""
#: parser_yacc.y:736
#: parser_yacc.y:736 parser_yacc.y:769
msgid "owner prefix not allowed on signal rules"
msgstr ""
#: parser_yacc.y:752
#: parser_yacc.y:752 parser_yacc.y:785
msgid "owner prefix not allowed on ptrace rules"
msgstr ""
#: parser_yacc.y:768
#: parser_yacc.y:768 parser_yacc.y:801 parser_yacc.y:821
msgid "owner prefix not allowed on unix rules"
msgstr ""
#: parser_yacc.y:794
#: parser_yacc.y:794 parser_yacc.y:837
msgid "owner prefix not allowed on capability rules"
msgstr ""
#: parser_yacc.y:1293
#: parser_yacc.y:1293 parser_yacc.y:1313
#, c-format
msgid "dbus rule: invalid conditional group %s=()"
msgstr ""
#: parser_yacc.y:1371
#: parser_yacc.y:1371 parser_yacc.y:1391
#, c-format
msgid "unix rule: invalid conditional group %s=()"
msgstr ""
#: ../parser_regex.c:368
#: ../parser_regex.c:368 ../parser_regex.c:399
#, c-format
msgid "%s: Regex error: trailing '\\' escape character\n"
msgstr ""
#: ../parser_interface.c:496
#, c-format
msgid "Unable to open stdout - %s\n"
msgstr ""
#: ../parser_interface.c:505
#, c-format
msgid "Unable to open output file - %s\n"
msgstr ""
#: parser_lex.l:337
msgid "Failed to process filename\n"
msgstr ""
#: parser_lex.l:723
#, c-format
msgid "Lexer found unexpected character: '%s' (0x%x) in state: %s"
msgstr ""
#: ../parser_main.c:806
#, c-format
msgid "Unable to print the cache directory: %m\n"
msgstr ""
#: ../parser_main.c:842
#, c-format
msgid "Error: Could not load profile %s: %s\n"
msgstr ""
#: ../parser_main.c:852
#, c-format
msgid "Error: Could not replace profile %s: %s\n"
msgstr ""
#: ../parser_main.c:857
#, c-format
msgid "Error: Invalid load option specified: %d\n"
msgstr ""
#: ../parser_main.c:964
#, c-format
msgid "Could not get cachename for '%s'\n"
msgstr ""
#: ../parser_main.c:1323
#, c-format
msgid "Failed to clear cache files (%s): %s\n"
msgstr ""
#: ../parser_main.c:1332
msgid ""
"The --create-cache-dir option is deprecated. Please use --write-cache.\n"
msgstr ""
#: ../parser_main.c:1337
#, c-format
msgid "Failed setting up policy cache (%s): %s\n"
msgstr ""
#: ../parser_misc.c:694
#, c-format
msgid "Namespace not terminated: %s\n"
msgstr ""
#: ../parser_misc.c:696
#, c-format
msgid "Empty namespace: %s\n"
msgstr ""
#: ../parser_misc.c:698
#, c-format
msgid "Empty named transition profile name: %s\n"
msgstr ""
#: ../parser_misc.c:700
#, c-format
msgid "Unknown error while parsing label: %s\n"
msgstr ""
#: parser_yacc.y:322
msgid "Profile names must begin with a '/' or a namespace"
msgstr ""
#: parser_yacc.y:344
msgid "Profile attachment must begin with a '/' or variable."
msgstr ""
#: parser_yacc.y:906
msgid "RLIMIT 'cpu' no units specified using default units of seconds\n"
msgstr ""
#: parser_yacc.y:918
msgid ""
"RLIMIT 'rttime' no units specified using default units of microseconds\n"
msgstr ""
#: parser_yacc.y:1074
#, c-format
msgid "%s: Profile abi not supported, falling back to system abi.\n"
msgstr ""
#: parser_yacc.y:1519
msgid "Exec condition is required when unsafe or safe keywords are present"
msgstr ""
#: parser_yacc.y:1521
msgid "Exec condition must begin with '/'."
msgstr ""
#: ../parser_regex.c:98
#, c-format
msgid "%s: Invalid glob type %d\n"
msgstr ""
#: ../parser_regex.c:615
#, c-format
msgid "The current kernel does not support stacking of named transitions: %s\n"
msgstr ""

View File

@@ -12,15 +12,15 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2016-06-01 05:14+0000\n"
"X-Generator: Launchpad (build 18053)\n"
"X-Launchpad-Export-Date: 2019-04-18 05:32+0000\n"
"X-Generator: Launchpad (build 18928)\n"
"Language: ar\n"
#: ../parser_include.c:113
#: ../parser_include.c:113 ../parser_include.c:111
msgid "Error: Out of memory.\n"
msgstr "خطأ: نفدت الذاكرة.\n"
#: ../parser_include.c:123
#: ../parser_include.c:123 ../parser_include.c:121
#, c-format
msgid "Error: basedir %s is not a directory, skipping.\n"
msgstr "خطأ: basedir %s ليس دليلاً، يتم الآن التخطي.\n"
@@ -30,97 +30,106 @@ msgstr "خطأ: basedir %s ليس دليلاً، يتم الآن التخطي.\n
msgid "Error: Could not add directory %s to search path.\n"
msgstr "خطأ: تعذرت إضافة الدليل %s إلى مسار البحث.\n"
#: ../parser_include.c:147
#: ../parser_include.c:147 ../parser_include.c:151
msgid "Error: Could not allocate memory.\n"
msgstr "خطأ: تعذر تخصيص الذاكرة.\n"
#: ../parser_interface.c:69 ../parser_interface.c:72
#: ../parser_interface.c:69 ../parser_interface.c:72 ../parser_interface.c:49
msgid "Bad write position\n"
msgstr "موضع كتابة غير صالح\n"
#: ../parser_interface.c:72 ../parser_interface.c:75
#: ../parser_interface.c:72 ../parser_interface.c:75 ../parser_interface.c:52
msgid "Permission denied\n"
msgstr "الإذن مرفوض\n"
#: ../parser_interface.c:75 ../parser_interface.c:78
#: ../parser_interface.c:75 ../parser_interface.c:78 ../parser_interface.c:55
msgid "Out of memory\n"
msgstr "نفدت الذاكرة\n"
#: ../parser_interface.c:78 ../parser_interface.c:81
#: ../parser_interface.c:78 ../parser_interface.c:81 ../parser_interface.c:58
msgid "Couldn't copy profile: Bad memory address\n"
msgstr ""
#: ../parser_interface.c:81 ../parser_interface.c:84
#: ../parser_interface.c:81 ../parser_interface.c:84 ../parser_interface.c:61
msgid "Profile doesn't conform to protocol\n"
msgstr "ملف التعريف غير متوافق مع البروتوكول\n"
#: ../parser_interface.c:84 ../parser_interface.c:87
#: ../parser_interface.c:84 ../parser_interface.c:87 ../parser_interface.c:64
msgid "Profile does not match signature\n"
msgstr "ملف التعريف غير متوافق مع التوقيع\n"
#: ../parser_interface.c:87 ../parser_interface.c:90
#: ../parser_interface.c:87 ../parser_interface.c:90 ../parser_interface.c:67
msgid "Profile version not supported by Apparmor module\n"
msgstr "لا تدعم الوحدة النمطية Apparmor إصدار ملف التعريف\n"
#: ../parser_interface.c:90 ../parser_interface.c:93
#: ../parser_interface.c:90 ../parser_interface.c:93 ../parser_interface.c:70
msgid "Profile already exists\n"
msgstr "ملف التعريف موجود بالفعل\n"
#: ../parser_interface.c:93 ../parser_interface.c:96
#: ../parser_interface.c:93 ../parser_interface.c:96 ../parser_interface.c:73
msgid "Profile doesn't exist\n"
msgstr "ملف التعريف غير موجود\n"
#: ../parser_interface.c:96 ../parser_interface.c:99
#: ../parser_interface.c:96 ../parser_interface.c:99 ../parser_interface.c:76
msgid "Permission denied; attempted to load a profile while confined?\n"
msgstr ""
#: ../parser_interface.c:99 ../parser_interface.c:102
#: ../parser_interface.c:99 ../parser_interface.c:102 ../parser_interface.c:79
#, c-format
msgid "Unknown error (%d): %s\n"
msgstr ""
#: ../parser_interface.c:116 ../parser_interface.c:119
#: ../parser_interface.c:96
#, c-format
msgid "%s: Unable to add \"%s\". "
msgstr "%s: تعذرت إضافة \"%s\". "
#: ../parser_interface.c:121 ../parser_interface.c:124
#: ../parser_interface.c:101
#, c-format
msgid "%s: Unable to replace \"%s\". "
msgstr "%s: تعذر استبدال \"%s\". "
#: ../parser_interface.c:126 ../parser_interface.c:129
#: ../parser_interface.c:106
#, c-format
msgid "%s: Unable to remove \"%s\". "
msgstr "%s: تعذرت إزالة \"%s\". "
#: ../parser_interface.c:131 ../parser_interface.c:134
#: ../parser_interface.c:111
#, c-format
msgid "%s: Unable to write to stdout\n"
msgstr "%s: تعذرت الكتابة إلى stdout\n"
#: ../parser_interface.c:135 ../parser_interface.c:138
#: ../parser_interface.c:115
#, c-format
msgid "%s: Unable to write to output file\n"
msgstr ""
#: ../parser_interface.c:138 ../parser_interface.c:162
#: ../parser_interface.c:141 ../parser_interface.c:165
#: ../parser_interface.c:118 ../parser_interface.c:142
#, c-format
msgid "%s: ASSERT: Invalid option: %d\n"
msgstr "%s: تأكيد: خيار غير صالح: %d\n"
#: ../parser_interface.c:147 ../parser_interface.c:150
#: ../parser_interface.c:127
#, c-format
msgid "Addition succeeded for \"%s\".\n"
msgstr "نجحت الإضافة لـ \"%s\".\n"
#: ../parser_interface.c:151 ../parser_interface.c:154
#: ../parser_interface.c:131
#, c-format
msgid "Replacement succeeded for \"%s\".\n"
msgstr "نجح الاستبدال لـ \"%s\".\n"
#: ../parser_interface.c:155 ../parser_interface.c:158
#: ../parser_interface.c:135
#, c-format
msgid "Removal succeeded for \"%s\".\n"
msgstr "نجحت الإزالة لـ \"%s\".\n"
@@ -132,6 +141,7 @@ msgstr ""
"PANIC ذاكرة وسيطة للزيادة غير صالحة %p pos %p ext %p size %d res %p\n"
#: ../parser_interface.c:656 ../parser_interface.c:658
#: ../parser_interface.c:446
#, c-format
msgid "profile %s network rules not enforced\n"
msgstr ""
@@ -142,16 +152,19 @@ msgstr ""
#: ../parser_interface.c:750 ../parser_interface.c:902
#: ../parser_interface.c:743 ../parser_interface.c:894
#: ../parser_interface.c:518 ../parser_interface.c:669
#, c-format
msgid "Unable to open %s - %s\n"
msgstr "تعذر فتح %s - %s\n"
#: ../parser_interface.c:776 ../parser_interface.c:768
#: ../parser_interface.c:543
#, c-format
msgid "Memory Allocation Error: Unable to remove ^%s\n"
msgstr "خطأ في تخصيص الذاكرة: تعذرت إزالة ^%s\n"
#: ../parser_interface.c:789 ../parser_interface.c:781
#: ../parser_interface.c:556
#, c-format
msgid "Memory Allocation Error: Unable to remove %s:%s."
msgstr "خطأ في تخصيص الذاكرة: تعذرت إزالة %s:%s."
@@ -167,21 +180,23 @@ msgstr "تعذر تعيين تسلسل ملف التعريف %s\n"
#: ../parser_interface.c:829 ../parser_interface.c:916
#: ../parser_interface.c:821 ../parser_interface.c:908
#: ../parser_interface.c:582
#, c-format
msgid "%s: Unable to write entire profile entry\n"
msgstr "%s: تعذرت كتابة إدخال ملف التعريف بالكامل\n"
#: ../parser_interface.c:839 ../parser_interface.c:831
#: ../parser_interface.c:593
#, c-format
msgid "%s: Unable to write entire profile entry to cache\n"
msgstr ""
#: parser_lex.l:100 parser_lex.l:163
#: parser_lex.l:100 parser_lex.l:163 parser_lex.l:169
#, c-format
msgid "Could not open '%s'"
msgstr ""
#: parser_lex.l:104 parser_lex.l:167
#: parser_lex.l:104 parser_lex.l:167 parser_lex.l:173
#, c-format
msgid "fstat failed for '%s'"
msgstr ""
@@ -196,18 +211,18 @@ msgstr ""
msgid "stat failed for '%s'"
msgstr ""
#: parser_lex.l:155 parser_lex.l:133
#: parser_lex.l:155 parser_lex.l:133 parser_lex.l:139
#, c-format
msgid "Could not open '%s' in '%s'"
msgstr ""
#: parser_lex.l:284 parser_lex.l:322 parser_lex.l:362 parser_lex.l:399
#: parser_lex.l:469 parser_lex.l:655 parser_lex.l:586
#: parser_lex.l:469 parser_lex.l:655 parser_lex.l:586 parser_lex.l:638
#, c-format
msgid "Found unexpected character: '%s'"
msgstr "تم العثور على حرف غير متوقع: '%s'"
#: parser_lex.l:386 parser_lex.l:418
#: parser_lex.l:386 parser_lex.l:418 parser_lex.l:428
msgid "Variable declarations do not accept trailing commas"
msgstr ""
@@ -216,7 +231,7 @@ msgstr ""
msgid "(network_mode) Found unexpected character: '%s'"
msgstr "(network_mode) تم العثور على حرف غير متوقع: '%s'"
#: ../parser_main.c:333 ../parser_common.c:61
#: ../parser_main.c:333 ../parser_common.c:61 ../parser_common.c:106
#, c-format
msgid "Warning from %s (%s%sline %d): %s"
msgstr ""
@@ -226,7 +241,7 @@ msgstr ""
msgid "%s: Could not allocate memory for subdomainbase mount point\n"
msgstr "%s: تعذر تخصيص ذاكرة لنقطة توصيل قاعدة المجال الفرعي\n"
#: ../parser_main.c:577 ../parser_main.c:616
#: ../parser_main.c:577 ../parser_main.c:616 ../parser_main.c:479
#, c-format
msgid ""
"Warning: unable to find a suitable fs in %s, is it mounted?\n"
@@ -235,7 +250,7 @@ msgstr ""
"تحذير: تعذر العثور على نظام ملفات مناسب في %s، هل تم توصيله؟\n"
"استخدم --subdomainfs لتجاوزه.\n"
#: ../parser_main.c:597 ../parser_main.c:635
#: ../parser_main.c:597 ../parser_main.c:635 ../parser_main.c:498
#, c-format
msgid ""
"%s: Sorry. You need root privileges to run this program.\n"
@@ -245,7 +260,7 @@ msgstr ""
"البرنامج.\n"
"\n"
#: ../parser_main.c:604 ../parser_main.c:642
#: ../parser_main.c:604 ../parser_main.c:642 ../parser_main.c:505
#, c-format
msgid ""
"%s: Warning! You've set this program setuid root.\n"
@@ -257,7 +272,7 @@ msgstr ""
"\n"
#: ../parser_main.c:704 ../parser_main.c:813 ../parser_main.c:836
#: ../parser_main.c:946
#: ../parser_main.c:946 ../parser_main.c:860
#, c-format
msgid "Error: Could not read profile %s: %s.\n"
msgstr "خطأ: تعذرت قراءة ملف التعريف %s: %s.\n"
@@ -273,25 +288,32 @@ msgstr "خطأ: تعذرت قراءة ملف التعريف %s: %s.\n"
#: parser_yacc.y:1042 parser_yacc.y:1078 parser_yacc.y:1082 parser_yacc.y:1092
#: parser_yacc.y:1102 parser_yacc.y:1201 parser_yacc.y:1223 parser_yacc.y:1234
#: parser_yacc.y:1309 parser_yacc.y:1327 parser_yacc.y:1334 parser_yacc.y:1385
#: ../parser_main.c:735 ../parser_main.c:923 ../parser_main.c:1133
#: ../parser_main.c:1187 parser_yacc.y:311 parser_yacc.y:462 parser_yacc.y:472
#: parser_yacc.y:583 parser_yacc.y:662 parser_yacc.y:669 parser_yacc.y:1130
#: parser_yacc.y:1166 parser_yacc.y:1170 parser_yacc.y:1180 parser_yacc.y:1190
#: parser_yacc.y:1298 parser_yacc.y:1376 parser_yacc.y:1479 parser_yacc.y:1490
#: parser_yacc.y:1565 parser_yacc.y:1583 parser_yacc.y:1590 parser_yacc.y:1639
#: ../network.c:314 ../af_unix.cc:203
msgid "Memory allocation error."
msgstr "خطأ في تخصيص الذاكرة."
#: ../parser_main.c:740 ../parser_main.c:872
#: ../parser_main.c:740 ../parser_main.c:872 ../parser_main.c:757
#, c-format
msgid "Cached load succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:744 ../parser_main.c:876
#: ../parser_main.c:744 ../parser_main.c:876 ../parser_main.c:761
#, c-format
msgid "Cached reload succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:910 ../parser_main.c:1058
#: ../parser_main.c:910 ../parser_main.c:1058 ../parser_main.c:967
#, c-format
msgid "%s: Errors found in file. Aborting.\n"
msgstr "%s: تم العثور على أخطاء في الملف. يتم الآن الإيقاف.\n"
#: ../parser_misc.c:426 ../parser_misc.c:597
#: ../parser_misc.c:426 ../parser_misc.c:597 ../parser_misc.c:339
msgid ""
"Uppercase qualifiers \"RWLIMX\" are deprecated, please convert to lowercase\n"
"See the apparmor.d(5) manpage for details.\n"
@@ -300,15 +322,15 @@ msgstr ""
"راجع صفحة الدليل apparmor.d(5) للحصول على التفاصيل.\n"
#: ../parser_misc.c:467 ../parser_misc.c:474 ../parser_misc.c:638
#: ../parser_misc.c:645
#: ../parser_misc.c:645 ../parser_misc.c:380 ../parser_misc.c:387
msgid "Conflict 'a' and 'w' perms are mutually exclusive."
msgstr "لا يمكن استخدام الإذنين 'a' و'w' المتعارضين معًا."
#: ../parser_misc.c:491 ../parser_misc.c:662
#: ../parser_misc.c:491 ../parser_misc.c:662 ../parser_misc.c:404
msgid "Exec qualifier 'i' invalid, conflicting qualifier already specified"
msgstr "المؤهل التنفيذي 'i' غير صالح، تم تحديد مؤهل متعارض بالفعل"
#: ../parser_misc.c:502 ../parser_misc.c:673
#: ../parser_misc.c:502 ../parser_misc.c:673 ../parser_misc.c:415
#, c-format
msgid ""
"Unconfined exec qualifier (%c%c) allows some dangerous environment variables "
@@ -318,24 +340,24 @@ msgstr ""
"العملية غير المقيدة؛ راجع 'man 5 apparmor.d' للحصول على التفاصيل.\n"
#: ../parser_misc.c:510 ../parser_misc.c:551 ../parser_misc.c:681
#: ../parser_misc.c:722
#: ../parser_misc.c:722 ../parser_misc.c:423 ../parser_misc.c:464
#, c-format
msgid "Exec qualifier '%c' invalid, conflicting qualifier already specified"
msgstr "المؤهل التنفيذي '%c' غير صالح، تم تحديد المؤهل المتعارض بالفعل"
#: ../parser_misc.c:537 ../parser_misc.c:545 ../parser_misc.c:708
#: ../parser_misc.c:716
#: ../parser_misc.c:716 ../parser_misc.c:450 ../parser_misc.c:458
#, c-format
msgid ""
"Exec qualifier '%c%c' invalid, conflicting qualifier already specified"
msgstr "المؤهل التنفيذي '%c%c' غير صالح، تم تحديد مؤهل متعارض بالفعل"
#: ../parser_misc.c:593 ../parser_misc.c:764
#: ../parser_misc.c:593 ../parser_misc.c:764 ../parser_misc.c:506
#, c-format
msgid "Internal: unexpected mode character '%c' in input"
msgstr "داخلي: حرف وضع غير متوقع '%c' في الإدخال"
#: ../parser_misc.c:615 ../parser_misc.c:786
#: ../parser_misc.c:615 ../parser_misc.c:786 ../parser_misc.c:528
#, c-format
msgid "Internal error generated invalid perm 0x%llx\n"
msgstr "تسبب خطأ داخلي في إنشاء إذن غير صالح 0x%llx\n"
@@ -346,60 +368,61 @@ msgstr "تسبب خطأ داخلي في إنشاء إذن غير صالح 0x%llx
msgid "AppArmor parser error: %s\n"
msgstr "خطأ في محلل AppArmor: %s\n"
#: ../parser_merge.c:92 ../parser_merge.c:91
#: ../parser_merge.c:92 ../parser_merge.c:91 ../parser_merge.c:83
msgid "Couldn't merge entries. Out of Memory\n"
msgstr "تعذر دمج الإدخالات. نفدت الذاكرة\n"
#: ../parser_merge.c:111 ../parser_merge.c:113
#: ../parser_merge.c:111 ../parser_merge.c:113 ../parser_merge.c:105
#, c-format
msgid "profile %s: has merged rule %s with conflicting x modifiers\n"
msgstr ""
#: parser_yacc.y:236 parser_yacc.y:277
#: parser_yacc.y:236 parser_yacc.y:277 parser_yacc.y:320
msgid "Profile attachment must begin with a '/'."
msgstr ""
#: parser_yacc.y:260 parser_yacc.y:302
#: parser_yacc.y:260 parser_yacc.y:302 parser_yacc.y:348
msgid ""
"Profile names must begin with a '/', namespace or keyword 'profile' or 'hat'."
msgstr ""
#: parser_yacc.y:296 parser_yacc.y:338
#: parser_yacc.y:296 parser_yacc.y:338 parser_yacc.y:384
#, c-format
msgid "Failed to create alias %s -> %s\n"
msgstr "فشل إنشاء الاسم المستعار %s -> %s\n"
#: parser_yacc.y:417 parser_yacc.y:460
#: parser_yacc.y:417 parser_yacc.y:460 parser_yacc.y:506
msgid "Profile flag chroot_relative conflicts with namespace_relative"
msgstr ""
#: parser_yacc.y:421 parser_yacc.y:464
#: parser_yacc.y:421 parser_yacc.y:464 parser_yacc.y:510
msgid "Profile flag mediate_deleted conflicts with delegate_deleted"
msgstr ""
#: parser_yacc.y:424 parser_yacc.y:467
#: parser_yacc.y:424 parser_yacc.y:467 parser_yacc.y:513
msgid ""
"Profile flag attach_disconnected conflicts with no_attach_disconnected"
msgstr ""
#: parser_yacc.y:427 parser_yacc.y:470
#: parser_yacc.y:427 parser_yacc.y:470 parser_yacc.y:516
msgid "Profile flag chroot_attach conflicts with chroot_no_attach"
msgstr ""
#: parser_yacc.y:441 parser_yacc.y:484
#: parser_yacc.y:441 parser_yacc.y:484 parser_yacc.y:530
msgid "Profile flag 'debug' is no longer valid."
msgstr "لم تعد علامة ملف التعريف 'تصحيح الأخطاء' صالحة."
#: parser_yacc.y:463 parser_yacc.y:506
#: parser_yacc.y:463 parser_yacc.y:506 parser_yacc.y:552
#, c-format
msgid "Invalid profile flag: %s."
msgstr "علامة ملف تعريف غير صالحة: %s."
#: parser_yacc.y:498 parser_yacc.y:520 parser_yacc.y:548
#: parser_yacc.y:498 parser_yacc.y:520 parser_yacc.y:548 parser_yacc.y:594
msgid "Assert: `rule' returned NULL."
msgstr "تأكيد: أرجعت \"القاعدة\" قيمة خالية."
#: parser_yacc.y:501 parser_yacc.y:546 parser_yacc.y:552 parser_yacc.y:584
#: parser_yacc.y:598 parser_yacc.y:630
msgid ""
"Invalid mode, in deny rules 'x' must not be preceded by exec qualifier 'i', "
"'p', or 'u'"
@@ -407,74 +430,75 @@ msgstr ""
"وضع غير صالح، في قواعد الرفض يجب وضع 'x' قبل المؤهل التنفيذي 'i' أو 'p' أو "
"'u'"
#: parser_yacc.y:524 parser_yacc.y:556
#: parser_yacc.y:524 parser_yacc.y:556 parser_yacc.y:602
msgid ""
"Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', 'c', or 'u'"
msgstr ""
"وضع غير صالح، يجب وضع 'x' بعد المؤهل التنفيذي 'i' أو 'p' أو 'c' أو 'u'"
#: parser_yacc.y:549 parser_yacc.y:587
#: parser_yacc.y:549 parser_yacc.y:587 parser_yacc.y:633
msgid "Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', or 'u'"
msgstr "وضع غير صالح، يجب وضع المؤهل التنفيذي 'i' أو 'p' أو 'u' قبل 'x'"
#: parser_yacc.y:574 parser_yacc.y:612 parser_yacc.y:614
#: parser_yacc.y:574 parser_yacc.y:612 parser_yacc.y:614 parser_yacc.y:660
msgid "Assert: `network_rule' return invalid protocol."
msgstr "تأكيد: أرجعت `network_rule' بروتوكولاً غير صالح."
#: parser_yacc.y:649 parser_yacc.y:696
#: parser_yacc.y:649 parser_yacc.y:696 parser_yacc.y:786
msgid "Assert: `change_profile' returned NULL."
msgstr "تأكيد: أرجع `change_profile' قيمة خالية."
#: parser_yacc.y:680 parser_yacc.y:720
#: parser_yacc.y:680 parser_yacc.y:720 parser_yacc.y:810
msgid "Assert: 'hat rule' returned NULL."
msgstr "تأكيد: أرجعت \"hat rule\" قيمة خالية."
#: parser_yacc.y:689 parser_yacc.y:729
#: parser_yacc.y:689 parser_yacc.y:729 parser_yacc.y:819
msgid "Assert: 'local_profile rule' returned NULL."
msgstr "تأكيد: أرجعت `local_profile rule' قيمة خالية."
#: parser_yacc.y:824 parser_yacc.y:885
#: parser_yacc.y:824 parser_yacc.y:885 parser_yacc.y:992
#, c-format
msgid "Unset boolean variable %s used in if-expression"
msgstr "إلغاء تعيين المتغير المنطقي %s المستخدم في تعبير if"
#: parser_yacc.y:882 parser_yacc.y:986
#: parser_yacc.y:882 parser_yacc.y:986 parser_yacc.y:1092
msgid "unsafe rule missing exec permissions"
msgstr "قاعدة غير آمنة بدون أذونات تنفيذ"
#: parser_yacc.y:901 parser_yacc.y:954
#: parser_yacc.y:901 parser_yacc.y:954 parser_yacc.y:1060
msgid "subset can only be used with link rules."
msgstr "لا يمكن استخدام المجموعة الفرعية إلا مع قواعد الارتباط."
#: parser_yacc.y:903 parser_yacc.y:956
#: parser_yacc.y:903 parser_yacc.y:956 parser_yacc.y:1062
msgid "link and exec perms conflict on a file rule using ->"
msgstr "تعارض بين الارتباط والأذونات التنفيذية في قاعدة ملف عند استخدام ->"
#: parser_yacc.y:905 parser_yacc.y:958
#: parser_yacc.y:905 parser_yacc.y:958 parser_yacc.y:1064
msgid "link perms are not allowed on a named profile transition.\n"
msgstr ""
"لا يُسمح باستخدام أذونات الارتباط في عملية انتقال ملف تعريف معروفة.\n"
#: parser_yacc.y:921 parser_yacc.y:1003
#: parser_yacc.y:921 parser_yacc.y:1003 parser_yacc.y:1109
#, c-format
msgid "missing an end of line character? (entry: %s)"
msgstr "حرف نهاية سطر مفقود؟ (إدخال: %s)"
#: parser_yacc.y:975 parser_yacc.y:985 parser_yacc.y:1057 parser_yacc.y:1067
#: parser_yacc.y:1145 parser_yacc.y:1155
msgid "Invalid network entry."
msgstr "إدخال الشبكة غير صالح."
#: parser_yacc.y:1039 parser_yacc.y:1048 parser_yacc.y:1254
#: parser_yacc.y:1039 parser_yacc.y:1048 parser_yacc.y:1254 parser_yacc.y:1510
#, c-format
msgid "Invalid capability %s."
msgstr "إمكانية غير صالحة %s."
#: parser_yacc.y:1066 parser_yacc.y:1269
#: parser_yacc.y:1066 parser_yacc.y:1269 parser_yacc.y:1525
#, c-format
msgid "AppArmor parser error for %s%s%s at line %d: %s\n"
msgstr ""
#: parser_yacc.y:1072 parser_yacc.y:1275
#: parser_yacc.y:1072 parser_yacc.y:1275 parser_yacc.y:1531
#, c-format
msgid "AppArmor parser error,%s%s line %d: %s\n"
msgstr ""
@@ -484,19 +508,19 @@ msgstr ""
msgid "%s: Illegal open {, nesting groupings not allowed\n"
msgstr "%s: فتح غير شرعي (، غير مسموح بتجميعات متداخلة\n"
#: ../parser_regex.c:265 ../parser_regex.c:274
#: ../parser_regex.c:265 ../parser_regex.c:274 ../parser_regex.c:278
#, c-format
msgid "%s: Regex grouping error: Invalid number of items between {}\n"
msgstr "%s: خطأ في تجميع Regex: عدد غير صالح للبنود بين {}\n"
#: ../parser_regex.c:271 ../parser_regex.c:280
#: ../parser_regex.c:271 ../parser_regex.c:280 ../parser_regex.c:284
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close }, no matching open { detected\n"
msgstr ""
"%s: خطأ في تجميع Regex: إغلاق غير صالح }، لا يوجد فتح متوافق ( تم اكتشافه\n"
#: ../parser_regex.c:337 ../parser_regex.c:343
#: ../parser_regex.c:337 ../parser_regex.c:343 ../parser_regex.c:361
#, c-format
msgid ""
"%s: Regex grouping error: Unclosed grouping or character class, expecting "
@@ -511,17 +535,17 @@ msgid "%s: Internal buffer overflow detected, %d characters exceeded\n"
msgstr ""
"%s: تم اكتشاف تجاوز سعة الذاكرة الوسيطة الداخلية، %d تم تجاوز الأحرف\n"
#: ../parser_regex.c:355 ../parser_regex.c:361
#: ../parser_regex.c:355 ../parser_regex.c:361 ../parser_regex.c:377
#, c-format
msgid "%s: Unable to parse input line '%s'\n"
msgstr "%s: تعذر تحليل سطر الإدخال '%s'\n"
#: ../parser_regex.c:397 ../parser_regex.c:405
#: ../parser_regex.c:397 ../parser_regex.c:405 ../parser_regex.c:421
#, c-format
msgid "%s: Invalid profile name '%s' - bad regular expression\n"
msgstr ""
#: ../parser_policy.c:202 ../parser_policy.c:402
#: ../parser_policy.c:202 ../parser_policy.c:402 ../parser_policy.c:375
#, c-format
msgid "ERROR merging rules for profile %s, failed to load\n"
msgstr "خطأ أثناء دمج القواعد لملف التعريف %s، فشل التحميل\n"
@@ -538,17 +562,17 @@ msgstr ""
"\tغير مسموح باستخدام '*' و'?' ونطاقات الأحرف والتبديلات.\n"
"\tلا يمكن استخدام '**' إلا في نهاية القاعدة.\n"
#: ../parser_policy.c:279 ../parser_policy.c:359
#: ../parser_policy.c:279 ../parser_policy.c:359 ../parser_policy.c:332
#, c-format
msgid "ERROR processing regexs for profile %s, failed to load\n"
msgstr "خطأ أثناء معالجة تعبيرات regex لملف التعريف %s، فشل التحميل\n"
#: ../parser_policy.c:306 ../parser_policy.c:389
#: ../parser_policy.c:306 ../parser_policy.c:389 ../parser_policy.c:362
#, c-format
msgid "ERROR expanding variables for profile %s, failed to load\n"
msgstr "خطأ أثناء توسيع متغيرات ملف التعريف %s، فشل التحميل\n"
#: ../parser_policy.c:390 ../parser_policy.c:382
#: ../parser_policy.c:390 ../parser_policy.c:382 ../parser_policy.c:355
#, c-format
msgid "ERROR adding hat access rule for profile %s\n"
msgstr "خطأ أثناء إضافة قاعدة وصول hat لملف التعريف %s\n"
@@ -581,30 +605,31 @@ msgstr ""
"%s: تم العثور على أخطاء أثناء المعالجة اللاحقة لقواعد الدمج. يتم الآن "
"الإيقاف.\n"
#: parser_lex.l:180
#: parser_lex.l:180 parser_lex.l:186
#, c-format
msgid "Could not process include directory '%s' in '%s'"
msgstr ""
#: ../parser_main.c:660
#: ../parser_main.c:660 ../parser_main.c:523
msgid "Feature buffer full."
msgstr ""
#: ../parser_main.c:1115 ../parser_main.c:1132
#: ../parser_main.c:1115 ../parser_main.c:1132 ../parser_main.c:1024
#: ../parser_main.c:1041
msgid "Out of memory"
msgstr ""
#: ../parser_main.c:1182
#: ../parser_main.c:1182 ../parser_main.c:1091
#, c-format
msgid "Can't create cache directory: %s\n"
msgstr ""
#: ../parser_main.c:1185
#: ../parser_main.c:1185 ../parser_main.c:1094
#, c-format
msgid "File in cache directory location: %s\n"
msgstr ""
#: ../parser_main.c:1188
#: ../parser_main.c:1188 ../parser_main.c:1097
#, c-format
msgid "Can't update cache directory: %s\n"
msgstr ""
@@ -619,11 +644,11 @@ msgstr ""
msgid "Internal error generated invalid DBus perm 0x%x\n"
msgstr ""
#: parser_yacc.y:575
#: parser_yacc.y:575 parser_yacc.y:621
msgid "deny prefix not allowed"
msgstr ""
#: parser_yacc.y:612
#: parser_yacc.y:612 parser_yacc.y:658
msgid "owner prefix not allowed"
msgstr ""
@@ -639,41 +664,41 @@ msgstr ""
msgid "owner prefix not allow on capability rules"
msgstr ""
#: parser_yacc.y:1357
#: parser_yacc.y:1357 parser_yacc.y:1613
#, c-format
msgid "invalid mount conditional %s%s"
msgstr ""
#: parser_yacc.y:1374
#: parser_yacc.y:1374 parser_yacc.y:1628
msgid "bad mount rule"
msgstr ""
#: parser_yacc.y:1381
#: parser_yacc.y:1381 parser_yacc.y:1635
msgid "mount point conditions not currently supported"
msgstr ""
#: parser_yacc.y:1398
#: parser_yacc.y:1398 parser_yacc.y:1650
#, c-format
msgid "invalid pivotroot conditional '%s'"
msgstr ""
#: ../parser_regex.c:241
#: ../parser_regex.c:241 ../parser_regex.c:236
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close ], no matching open [ detected\n"
msgstr ""
#: ../parser_regex.c:257
#: ../parser_regex.c:257 ../parser_regex.c:256
#, c-format
msgid "%s: Regex grouping error: Exceeded maximum nesting of {}\n"
msgstr ""
#: ../parser_policy.c:366
#: ../parser_policy.c:366 ../parser_policy.c:339
#, c-format
msgid "ERROR processing policydb rules for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:396
#: ../parser_policy.c:396 ../parser_policy.c:369
#, c-format
msgid "ERROR replacing aliases for profile %s, failed to load\n"
msgstr ""

View File

@@ -15,15 +15,15 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2016-06-01 05:14+0000\n"
"X-Generator: Launchpad (build 18053)\n"
"X-Launchpad-Export-Date: 2019-04-18 05:32+0000\n"
"X-Generator: Launchpad (build 18928)\n"
"Language: bg\n"
#: ../parser_include.c:113
#: ../parser_include.c:113 ../parser_include.c:111
msgid "Error: Out of memory.\n"
msgstr ""
#: ../parser_include.c:123
#: ../parser_include.c:123 ../parser_include.c:121
#, c-format
msgid "Error: basedir %s is not a directory, skipping.\n"
msgstr ""
@@ -33,97 +33,106 @@ msgstr ""
msgid "Error: Could not add directory %s to search path.\n"
msgstr ""
#: ../parser_include.c:147
#: ../parser_include.c:147 ../parser_include.c:151
msgid "Error: Could not allocate memory.\n"
msgstr ""
#: ../parser_interface.c:69 ../parser_interface.c:72
#: ../parser_interface.c:69 ../parser_interface.c:72 ../parser_interface.c:49
msgid "Bad write position\n"
msgstr ""
#: ../parser_interface.c:72 ../parser_interface.c:75
#: ../parser_interface.c:72 ../parser_interface.c:75 ../parser_interface.c:52
msgid "Permission denied\n"
msgstr ""
#: ../parser_interface.c:75 ../parser_interface.c:78
#: ../parser_interface.c:75 ../parser_interface.c:78 ../parser_interface.c:55
msgid "Out of memory\n"
msgstr ""
#: ../parser_interface.c:78 ../parser_interface.c:81
#: ../parser_interface.c:78 ../parser_interface.c:81 ../parser_interface.c:58
msgid "Couldn't copy profile: Bad memory address\n"
msgstr ""
#: ../parser_interface.c:81 ../parser_interface.c:84
#: ../parser_interface.c:81 ../parser_interface.c:84 ../parser_interface.c:61
msgid "Profile doesn't conform to protocol\n"
msgstr ""
#: ../parser_interface.c:84 ../parser_interface.c:87
#: ../parser_interface.c:84 ../parser_interface.c:87 ../parser_interface.c:64
msgid "Profile does not match signature\n"
msgstr ""
#: ../parser_interface.c:87 ../parser_interface.c:90
#: ../parser_interface.c:87 ../parser_interface.c:90 ../parser_interface.c:67
msgid "Profile version not supported by Apparmor module\n"
msgstr ""
#: ../parser_interface.c:90 ../parser_interface.c:93
#: ../parser_interface.c:90 ../parser_interface.c:93 ../parser_interface.c:70
msgid "Profile already exists\n"
msgstr ""
#: ../parser_interface.c:93 ../parser_interface.c:96
#: ../parser_interface.c:93 ../parser_interface.c:96 ../parser_interface.c:73
msgid "Profile doesn't exist\n"
msgstr ""
#: ../parser_interface.c:96 ../parser_interface.c:99
#: ../parser_interface.c:96 ../parser_interface.c:99 ../parser_interface.c:76
msgid "Permission denied; attempted to load a profile while confined?\n"
msgstr ""
#: ../parser_interface.c:99 ../parser_interface.c:102
#: ../parser_interface.c:99 ../parser_interface.c:102 ../parser_interface.c:79
#, c-format
msgid "Unknown error (%d): %s\n"
msgstr ""
#: ../parser_interface.c:116 ../parser_interface.c:119
#: ../parser_interface.c:96
#, c-format
msgid "%s: Unable to add \"%s\". "
msgstr ""
#: ../parser_interface.c:121 ../parser_interface.c:124
#: ../parser_interface.c:101
#, c-format
msgid "%s: Unable to replace \"%s\". "
msgstr ""
#: ../parser_interface.c:126 ../parser_interface.c:129
#: ../parser_interface.c:106
#, c-format
msgid "%s: Unable to remove \"%s\". "
msgstr ""
#: ../parser_interface.c:131 ../parser_interface.c:134
#: ../parser_interface.c:111
#, c-format
msgid "%s: Unable to write to stdout\n"
msgstr ""
#: ../parser_interface.c:135 ../parser_interface.c:138
#: ../parser_interface.c:115
#, c-format
msgid "%s: Unable to write to output file\n"
msgstr ""
#: ../parser_interface.c:138 ../parser_interface.c:162
#: ../parser_interface.c:141 ../parser_interface.c:165
#: ../parser_interface.c:118 ../parser_interface.c:142
#, c-format
msgid "%s: ASSERT: Invalid option: %d\n"
msgstr ""
#: ../parser_interface.c:147 ../parser_interface.c:150
#: ../parser_interface.c:127
#, c-format
msgid "Addition succeeded for \"%s\".\n"
msgstr ""
#: ../parser_interface.c:151 ../parser_interface.c:154
#: ../parser_interface.c:131
#, c-format
msgid "Replacement succeeded for \"%s\".\n"
msgstr ""
#: ../parser_interface.c:155 ../parser_interface.c:158
#: ../parser_interface.c:135
#, c-format
msgid "Removal succeeded for \"%s\".\n"
msgstr ""
@@ -134,6 +143,7 @@ msgid "PANIC bad increment buffer %p pos %p ext %p size %d res %p\n"
msgstr ""
#: ../parser_interface.c:656 ../parser_interface.c:658
#: ../parser_interface.c:446
#, c-format
msgid "profile %s network rules not enforced\n"
msgstr ""
@@ -144,16 +154,19 @@ msgstr ""
#: ../parser_interface.c:750 ../parser_interface.c:902
#: ../parser_interface.c:743 ../parser_interface.c:894
#: ../parser_interface.c:518 ../parser_interface.c:669
#, c-format
msgid "Unable to open %s - %s\n"
msgstr ""
#: ../parser_interface.c:776 ../parser_interface.c:768
#: ../parser_interface.c:543
#, c-format
msgid "Memory Allocation Error: Unable to remove ^%s\n"
msgstr ""
#: ../parser_interface.c:789 ../parser_interface.c:781
#: ../parser_interface.c:556
#, c-format
msgid "Memory Allocation Error: Unable to remove %s:%s."
msgstr ""
@@ -169,21 +182,23 @@ msgstr ""
#: ../parser_interface.c:829 ../parser_interface.c:916
#: ../parser_interface.c:821 ../parser_interface.c:908
#: ../parser_interface.c:582
#, c-format
msgid "%s: Unable to write entire profile entry\n"
msgstr ""
#: ../parser_interface.c:839 ../parser_interface.c:831
#: ../parser_interface.c:593
#, c-format
msgid "%s: Unable to write entire profile entry to cache\n"
msgstr ""
#: parser_lex.l:100 parser_lex.l:163
#: parser_lex.l:100 parser_lex.l:163 parser_lex.l:169
#, c-format
msgid "Could not open '%s'"
msgstr ""
#: parser_lex.l:104 parser_lex.l:167
#: parser_lex.l:104 parser_lex.l:167 parser_lex.l:173
#, c-format
msgid "fstat failed for '%s'"
msgstr ""
@@ -198,18 +213,18 @@ msgstr ""
msgid "stat failed for '%s'"
msgstr ""
#: parser_lex.l:155 parser_lex.l:133
#: parser_lex.l:155 parser_lex.l:133 parser_lex.l:139
#, c-format
msgid "Could not open '%s' in '%s'"
msgstr ""
#: parser_lex.l:284 parser_lex.l:322 parser_lex.l:362 parser_lex.l:399
#: parser_lex.l:469 parser_lex.l:655 parser_lex.l:586
#: parser_lex.l:469 parser_lex.l:655 parser_lex.l:586 parser_lex.l:638
#, c-format
msgid "Found unexpected character: '%s'"
msgstr ""
#: parser_lex.l:386 parser_lex.l:418
#: parser_lex.l:386 parser_lex.l:418 parser_lex.l:428
msgid "Variable declarations do not accept trailing commas"
msgstr ""
@@ -218,7 +233,7 @@ msgstr ""
msgid "(network_mode) Found unexpected character: '%s'"
msgstr ""
#: ../parser_main.c:333 ../parser_common.c:61
#: ../parser_main.c:333 ../parser_common.c:61 ../parser_common.c:106
#, c-format
msgid "Warning from %s (%s%sline %d): %s"
msgstr ""
@@ -228,21 +243,21 @@ msgstr ""
msgid "%s: Could not allocate memory for subdomainbase mount point\n"
msgstr ""
#: ../parser_main.c:577 ../parser_main.c:616
#: ../parser_main.c:577 ../parser_main.c:616 ../parser_main.c:479
#, c-format
msgid ""
"Warning: unable to find a suitable fs in %s, is it mounted?\n"
"Use --subdomainfs to override.\n"
msgstr ""
#: ../parser_main.c:597 ../parser_main.c:635
#: ../parser_main.c:597 ../parser_main.c:635 ../parser_main.c:498
#, c-format
msgid ""
"%s: Sorry. You need root privileges to run this program.\n"
"\n"
msgstr ""
#: ../parser_main.c:604 ../parser_main.c:642
#: ../parser_main.c:604 ../parser_main.c:642 ../parser_main.c:505
#, c-format
msgid ""
"%s: Warning! You've set this program setuid root.\n"
@@ -251,7 +266,7 @@ msgid ""
msgstr ""
#: ../parser_main.c:704 ../parser_main.c:813 ../parser_main.c:836
#: ../parser_main.c:946
#: ../parser_main.c:946 ../parser_main.c:860
#, c-format
msgid "Error: Could not read profile %s: %s.\n"
msgstr ""
@@ -267,40 +282,47 @@ msgstr ""
#: parser_yacc.y:1042 parser_yacc.y:1078 parser_yacc.y:1082 parser_yacc.y:1092
#: parser_yacc.y:1102 parser_yacc.y:1201 parser_yacc.y:1223 parser_yacc.y:1234
#: parser_yacc.y:1309 parser_yacc.y:1327 parser_yacc.y:1334 parser_yacc.y:1385
#: ../parser_main.c:735 ../parser_main.c:923 ../parser_main.c:1133
#: ../parser_main.c:1187 parser_yacc.y:311 parser_yacc.y:462 parser_yacc.y:472
#: parser_yacc.y:583 parser_yacc.y:662 parser_yacc.y:669 parser_yacc.y:1130
#: parser_yacc.y:1166 parser_yacc.y:1170 parser_yacc.y:1180 parser_yacc.y:1190
#: parser_yacc.y:1298 parser_yacc.y:1376 parser_yacc.y:1479 parser_yacc.y:1490
#: parser_yacc.y:1565 parser_yacc.y:1583 parser_yacc.y:1590 parser_yacc.y:1639
#: ../network.c:314 ../af_unix.cc:203
msgid "Memory allocation error."
msgstr ""
#: ../parser_main.c:740 ../parser_main.c:872
#: ../parser_main.c:740 ../parser_main.c:872 ../parser_main.c:757
#, c-format
msgid "Cached load succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:744 ../parser_main.c:876
#: ../parser_main.c:744 ../parser_main.c:876 ../parser_main.c:761
#, c-format
msgid "Cached reload succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:910 ../parser_main.c:1058
#: ../parser_main.c:910 ../parser_main.c:1058 ../parser_main.c:967
#, c-format
msgid "%s: Errors found in file. Aborting.\n"
msgstr ""
#: ../parser_misc.c:426 ../parser_misc.c:597
#: ../parser_misc.c:426 ../parser_misc.c:597 ../parser_misc.c:339
msgid ""
"Uppercase qualifiers \"RWLIMX\" are deprecated, please convert to lowercase\n"
"See the apparmor.d(5) manpage for details.\n"
msgstr ""
#: ../parser_misc.c:467 ../parser_misc.c:474 ../parser_misc.c:638
#: ../parser_misc.c:645
#: ../parser_misc.c:645 ../parser_misc.c:380 ../parser_misc.c:387
msgid "Conflict 'a' and 'w' perms are mutually exclusive."
msgstr ""
#: ../parser_misc.c:491 ../parser_misc.c:662
#: ../parser_misc.c:491 ../parser_misc.c:662 ../parser_misc.c:404
msgid "Exec qualifier 'i' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:502 ../parser_misc.c:673
#: ../parser_misc.c:502 ../parser_misc.c:673 ../parser_misc.c:415
#, c-format
msgid ""
"Unconfined exec qualifier (%c%c) allows some dangerous environment variables "
@@ -308,24 +330,24 @@ msgid ""
msgstr ""
#: ../parser_misc.c:510 ../parser_misc.c:551 ../parser_misc.c:681
#: ../parser_misc.c:722
#: ../parser_misc.c:722 ../parser_misc.c:423 ../parser_misc.c:464
#, c-format
msgid "Exec qualifier '%c' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:537 ../parser_misc.c:545 ../parser_misc.c:708
#: ../parser_misc.c:716
#: ../parser_misc.c:716 ../parser_misc.c:450 ../parser_misc.c:458
#, c-format
msgid ""
"Exec qualifier '%c%c' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:593 ../parser_misc.c:764
#: ../parser_misc.c:593 ../parser_misc.c:764 ../parser_misc.c:506
#, c-format
msgid "Internal: unexpected mode character '%c' in input"
msgstr ""
#: ../parser_misc.c:615 ../parser_misc.c:786
#: ../parser_misc.c:615 ../parser_misc.c:786 ../parser_misc.c:528
#, c-format
msgid "Internal error generated invalid perm 0x%llx\n"
msgstr ""
@@ -336,131 +358,133 @@ msgstr ""
msgid "AppArmor parser error: %s\n"
msgstr ""
#: ../parser_merge.c:92 ../parser_merge.c:91
#: ../parser_merge.c:92 ../parser_merge.c:91 ../parser_merge.c:83
msgid "Couldn't merge entries. Out of Memory\n"
msgstr ""
#: ../parser_merge.c:111 ../parser_merge.c:113
#: ../parser_merge.c:111 ../parser_merge.c:113 ../parser_merge.c:105
#, c-format
msgid "profile %s: has merged rule %s with conflicting x modifiers\n"
msgstr ""
#: parser_yacc.y:236 parser_yacc.y:277
#: parser_yacc.y:236 parser_yacc.y:277 parser_yacc.y:320
msgid "Profile attachment must begin with a '/'."
msgstr ""
#: parser_yacc.y:260 parser_yacc.y:302
#: parser_yacc.y:260 parser_yacc.y:302 parser_yacc.y:348
msgid ""
"Profile names must begin with a '/', namespace or keyword 'profile' or 'hat'."
msgstr ""
#: parser_yacc.y:296 parser_yacc.y:338
#: parser_yacc.y:296 parser_yacc.y:338 parser_yacc.y:384
#, c-format
msgid "Failed to create alias %s -> %s\n"
msgstr ""
#: parser_yacc.y:417 parser_yacc.y:460
#: parser_yacc.y:417 parser_yacc.y:460 parser_yacc.y:506
msgid "Profile flag chroot_relative conflicts with namespace_relative"
msgstr ""
#: parser_yacc.y:421 parser_yacc.y:464
#: parser_yacc.y:421 parser_yacc.y:464 parser_yacc.y:510
msgid "Profile flag mediate_deleted conflicts with delegate_deleted"
msgstr ""
#: parser_yacc.y:424 parser_yacc.y:467
#: parser_yacc.y:424 parser_yacc.y:467 parser_yacc.y:513
msgid ""
"Profile flag attach_disconnected conflicts with no_attach_disconnected"
msgstr ""
#: parser_yacc.y:427 parser_yacc.y:470
#: parser_yacc.y:427 parser_yacc.y:470 parser_yacc.y:516
msgid "Profile flag chroot_attach conflicts with chroot_no_attach"
msgstr ""
#: parser_yacc.y:441 parser_yacc.y:484
#: parser_yacc.y:441 parser_yacc.y:484 parser_yacc.y:530
msgid "Profile flag 'debug' is no longer valid."
msgstr ""
#: parser_yacc.y:463 parser_yacc.y:506
#: parser_yacc.y:463 parser_yacc.y:506 parser_yacc.y:552
#, c-format
msgid "Invalid profile flag: %s."
msgstr ""
#: parser_yacc.y:498 parser_yacc.y:520 parser_yacc.y:548
#: parser_yacc.y:498 parser_yacc.y:520 parser_yacc.y:548 parser_yacc.y:594
msgid "Assert: `rule' returned NULL."
msgstr ""
#: parser_yacc.y:501 parser_yacc.y:546 parser_yacc.y:552 parser_yacc.y:584
#: parser_yacc.y:598 parser_yacc.y:630
msgid ""
"Invalid mode, in deny rules 'x' must not be preceded by exec qualifier 'i', "
"'p', or 'u'"
msgstr ""
#: parser_yacc.y:524 parser_yacc.y:556
#: parser_yacc.y:524 parser_yacc.y:556 parser_yacc.y:602
msgid ""
"Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', 'c', or 'u'"
msgstr ""
#: parser_yacc.y:549 parser_yacc.y:587
#: parser_yacc.y:549 parser_yacc.y:587 parser_yacc.y:633
msgid "Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', or 'u'"
msgstr ""
#: parser_yacc.y:574 parser_yacc.y:612 parser_yacc.y:614
#: parser_yacc.y:574 parser_yacc.y:612 parser_yacc.y:614 parser_yacc.y:660
msgid "Assert: `network_rule' return invalid protocol."
msgstr ""
#: parser_yacc.y:649 parser_yacc.y:696
#: parser_yacc.y:649 parser_yacc.y:696 parser_yacc.y:786
msgid "Assert: `change_profile' returned NULL."
msgstr ""
#: parser_yacc.y:680 parser_yacc.y:720
#: parser_yacc.y:680 parser_yacc.y:720 parser_yacc.y:810
msgid "Assert: 'hat rule' returned NULL."
msgstr ""
#: parser_yacc.y:689 parser_yacc.y:729
#: parser_yacc.y:689 parser_yacc.y:729 parser_yacc.y:819
msgid "Assert: 'local_profile rule' returned NULL."
msgstr ""
#: parser_yacc.y:824 parser_yacc.y:885
#: parser_yacc.y:824 parser_yacc.y:885 parser_yacc.y:992
#, c-format
msgid "Unset boolean variable %s used in if-expression"
msgstr ""
#: parser_yacc.y:882 parser_yacc.y:986
#: parser_yacc.y:882 parser_yacc.y:986 parser_yacc.y:1092
msgid "unsafe rule missing exec permissions"
msgstr ""
#: parser_yacc.y:901 parser_yacc.y:954
#: parser_yacc.y:901 parser_yacc.y:954 parser_yacc.y:1060
msgid "subset can only be used with link rules."
msgstr ""
#: parser_yacc.y:903 parser_yacc.y:956
#: parser_yacc.y:903 parser_yacc.y:956 parser_yacc.y:1062
msgid "link and exec perms conflict on a file rule using ->"
msgstr ""
#: parser_yacc.y:905 parser_yacc.y:958
#: parser_yacc.y:905 parser_yacc.y:958 parser_yacc.y:1064
msgid "link perms are not allowed on a named profile transition.\n"
msgstr ""
#: parser_yacc.y:921 parser_yacc.y:1003
#: parser_yacc.y:921 parser_yacc.y:1003 parser_yacc.y:1109
#, c-format
msgid "missing an end of line character? (entry: %s)"
msgstr ""
#: parser_yacc.y:975 parser_yacc.y:985 parser_yacc.y:1057 parser_yacc.y:1067
#: parser_yacc.y:1145 parser_yacc.y:1155
msgid "Invalid network entry."
msgstr ""
#: parser_yacc.y:1039 parser_yacc.y:1048 parser_yacc.y:1254
#: parser_yacc.y:1039 parser_yacc.y:1048 parser_yacc.y:1254 parser_yacc.y:1510
#, c-format
msgid "Invalid capability %s."
msgstr ""
#: parser_yacc.y:1066 parser_yacc.y:1269
#: parser_yacc.y:1066 parser_yacc.y:1269 parser_yacc.y:1525
#, c-format
msgid "AppArmor parser error for %s%s%s at line %d: %s\n"
msgstr ""
#: parser_yacc.y:1072 parser_yacc.y:1275
#: parser_yacc.y:1072 parser_yacc.y:1275 parser_yacc.y:1531
#, c-format
msgid "AppArmor parser error,%s%s line %d: %s\n"
msgstr ""
@@ -470,18 +494,18 @@ msgstr ""
msgid "%s: Illegal open {, nesting groupings not allowed\n"
msgstr ""
#: ../parser_regex.c:265 ../parser_regex.c:274
#: ../parser_regex.c:265 ../parser_regex.c:274 ../parser_regex.c:278
#, c-format
msgid "%s: Regex grouping error: Invalid number of items between {}\n"
msgstr ""
#: ../parser_regex.c:271 ../parser_regex.c:280
#: ../parser_regex.c:271 ../parser_regex.c:280 ../parser_regex.c:284
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close }, no matching open { detected\n"
msgstr ""
#: ../parser_regex.c:337 ../parser_regex.c:343
#: ../parser_regex.c:337 ../parser_regex.c:343 ../parser_regex.c:361
#, c-format
msgid ""
"%s: Regex grouping error: Unclosed grouping or character class, expecting "
@@ -493,17 +517,17 @@ msgstr ""
msgid "%s: Internal buffer overflow detected, %d characters exceeded\n"
msgstr ""
#: ../parser_regex.c:355 ../parser_regex.c:361
#: ../parser_regex.c:355 ../parser_regex.c:361 ../parser_regex.c:377
#, c-format
msgid "%s: Unable to parse input line '%s'\n"
msgstr ""
#: ../parser_regex.c:397 ../parser_regex.c:405
#: ../parser_regex.c:397 ../parser_regex.c:405 ../parser_regex.c:421
#, c-format
msgid "%s: Invalid profile name '%s' - bad regular expression\n"
msgstr ""
#: ../parser_policy.c:202 ../parser_policy.c:402
#: ../parser_policy.c:202 ../parser_policy.c:402 ../parser_policy.c:375
#, c-format
msgid "ERROR merging rules for profile %s, failed to load\n"
msgstr ""
@@ -516,17 +540,17 @@ msgid ""
"\t'**' may only be used at the end of a rule.\n"
msgstr ""
#: ../parser_policy.c:279 ../parser_policy.c:359
#: ../parser_policy.c:279 ../parser_policy.c:359 ../parser_policy.c:332
#, c-format
msgid "ERROR processing regexs for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:306 ../parser_policy.c:389
#: ../parser_policy.c:306 ../parser_policy.c:389 ../parser_policy.c:362
#, c-format
msgid "ERROR expanding variables for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:390 ../parser_policy.c:382
#: ../parser_policy.c:390 ../parser_policy.c:382 ../parser_policy.c:355
#, c-format
msgid "ERROR adding hat access rule for profile %s\n"
msgstr ""
@@ -556,30 +580,31 @@ msgstr ""
msgid "%s: Errors found in combining rules postprocessing. Aborting.\n"
msgstr ""
#: parser_lex.l:180
#: parser_lex.l:180 parser_lex.l:186
#, c-format
msgid "Could not process include directory '%s' in '%s'"
msgstr ""
#: ../parser_main.c:660
#: ../parser_main.c:660 ../parser_main.c:523
msgid "Feature buffer full."
msgstr ""
#: ../parser_main.c:1115 ../parser_main.c:1132
#: ../parser_main.c:1115 ../parser_main.c:1132 ../parser_main.c:1024
#: ../parser_main.c:1041
msgid "Out of memory"
msgstr ""
#: ../parser_main.c:1182
#: ../parser_main.c:1182 ../parser_main.c:1091
#, c-format
msgid "Can't create cache directory: %s\n"
msgstr ""
#: ../parser_main.c:1185
#: ../parser_main.c:1185 ../parser_main.c:1094
#, c-format
msgid "File in cache directory location: %s\n"
msgstr ""
#: ../parser_main.c:1188
#: ../parser_main.c:1188 ../parser_main.c:1097
#, c-format
msgid "Can't update cache directory: %s\n"
msgstr ""
@@ -594,11 +619,11 @@ msgstr ""
msgid "Internal error generated invalid DBus perm 0x%x\n"
msgstr ""
#: parser_yacc.y:575
#: parser_yacc.y:575 parser_yacc.y:621
msgid "deny prefix not allowed"
msgstr ""
#: parser_yacc.y:612
#: parser_yacc.y:612 parser_yacc.y:658
msgid "owner prefix not allowed"
msgstr ""
@@ -614,41 +639,41 @@ msgstr ""
msgid "owner prefix not allow on capability rules"
msgstr ""
#: parser_yacc.y:1357
#: parser_yacc.y:1357 parser_yacc.y:1613
#, c-format
msgid "invalid mount conditional %s%s"
msgstr ""
#: parser_yacc.y:1374
#: parser_yacc.y:1374 parser_yacc.y:1628
msgid "bad mount rule"
msgstr ""
#: parser_yacc.y:1381
#: parser_yacc.y:1381 parser_yacc.y:1635
msgid "mount point conditions not currently supported"
msgstr ""
#: parser_yacc.y:1398
#: parser_yacc.y:1398 parser_yacc.y:1650
#, c-format
msgid "invalid pivotroot conditional '%s'"
msgstr ""
#: ../parser_regex.c:241
#: ../parser_regex.c:241 ../parser_regex.c:236
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close ], no matching open [ detected\n"
msgstr ""
#: ../parser_regex.c:257
#: ../parser_regex.c:257 ../parser_regex.c:256
#, c-format
msgid "%s: Regex grouping error: Exceeded maximum nesting of {}\n"
msgstr ""
#: ../parser_policy.c:366
#: ../parser_policy.c:366 ../parser_policy.c:339
#, c-format
msgid "ERROR processing policydb rules for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:396
#: ../parser_policy.c:396 ../parser_policy.c:369
#, c-format
msgid "ERROR replacing aliases for profile %s, failed to load\n"
msgstr ""

View File

@@ -9,15 +9,15 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2016-06-01 05:14+0000\n"
"X-Generator: Launchpad (build 18053)\n"
"X-Launchpad-Export-Date: 2019-04-18 05:32+0000\n"
"X-Generator: Launchpad (build 18928)\n"
"Language: bn\n"
#: ../parser_include.c:113
#: ../parser_include.c:113 ../parser_include.c:111
msgid "Error: Out of memory.\n"
msgstr ""
#: ../parser_include.c:123
#: ../parser_include.c:123 ../parser_include.c:121
#, c-format
msgid "Error: basedir %s is not a directory, skipping.\n"
msgstr ""
@@ -27,97 +27,106 @@ msgstr ""
msgid "Error: Could not add directory %s to search path.\n"
msgstr ""
#: ../parser_include.c:147
#: ../parser_include.c:147 ../parser_include.c:151
msgid "Error: Could not allocate memory.\n"
msgstr ""
#: ../parser_interface.c:69 ../parser_interface.c:72
#: ../parser_interface.c:69 ../parser_interface.c:72 ../parser_interface.c:49
msgid "Bad write position\n"
msgstr "লেখার খারাপ অবস্থান\n"
#: ../parser_interface.c:72 ../parser_interface.c:75
#: ../parser_interface.c:72 ../parser_interface.c:75 ../parser_interface.c:52
msgid "Permission denied\n"
msgstr "অনুমতি অস্বীকার করা হয়েছে\n"
#: ../parser_interface.c:75 ../parser_interface.c:78
#: ../parser_interface.c:75 ../parser_interface.c:78 ../parser_interface.c:55
msgid "Out of memory\n"
msgstr "স্মৃতি পরিপূর্ণ\n"
#: ../parser_interface.c:78 ../parser_interface.c:81
#: ../parser_interface.c:78 ../parser_interface.c:81 ../parser_interface.c:58
msgid "Couldn't copy profile: Bad memory address\n"
msgstr ""
#: ../parser_interface.c:81 ../parser_interface.c:84
#: ../parser_interface.c:81 ../parser_interface.c:84 ../parser_interface.c:61
msgid "Profile doesn't conform to protocol\n"
msgstr "প্রোফাইল প্রোটোকল মেনে চলে না\n"
#: ../parser_interface.c:84 ../parser_interface.c:87
#: ../parser_interface.c:84 ../parser_interface.c:87 ../parser_interface.c:64
msgid "Profile does not match signature\n"
msgstr "প্রোফাইল স্বাক্ষরের সাথে মেলে না\n"
#: ../parser_interface.c:87 ../parser_interface.c:90
#: ../parser_interface.c:87 ../parser_interface.c:90 ../parser_interface.c:67
msgid "Profile version not supported by Apparmor module\n"
msgstr ""
#: ../parser_interface.c:90 ../parser_interface.c:93
#: ../parser_interface.c:90 ../parser_interface.c:93 ../parser_interface.c:70
msgid "Profile already exists\n"
msgstr "প্রোফাইল ইতোমধ্যেই বিদ্যমান\n"
#: ../parser_interface.c:93 ../parser_interface.c:96
#: ../parser_interface.c:93 ../parser_interface.c:96 ../parser_interface.c:73
msgid "Profile doesn't exist\n"
msgstr "প্রোফাইলের অস্তিত্ব নেই\n"
#: ../parser_interface.c:96 ../parser_interface.c:99
#: ../parser_interface.c:96 ../parser_interface.c:99 ../parser_interface.c:76
msgid "Permission denied; attempted to load a profile while confined?\n"
msgstr ""
#: ../parser_interface.c:99 ../parser_interface.c:102
#: ../parser_interface.c:99 ../parser_interface.c:102 ../parser_interface.c:79
#, c-format
msgid "Unknown error (%d): %s\n"
msgstr ""
#: ../parser_interface.c:116 ../parser_interface.c:119
#: ../parser_interface.c:96
#, c-format
msgid "%s: Unable to add \"%s\". "
msgstr "%s: \"%s\" যোগ করতে পারে নি। "
#: ../parser_interface.c:121 ../parser_interface.c:124
#: ../parser_interface.c:101
#, c-format
msgid "%s: Unable to replace \"%s\". "
msgstr "%s: \"%s\" প্রতিস্থাপন করতে পারে নি। "
#: ../parser_interface.c:126 ../parser_interface.c:129
#: ../parser_interface.c:106
#, c-format
msgid "%s: Unable to remove \"%s\". "
msgstr "%s: \"%s\" অপসারণ করতে পারে নি। "
#: ../parser_interface.c:131 ../parser_interface.c:134
#: ../parser_interface.c:111
#, c-format
msgid "%s: Unable to write to stdout\n"
msgstr "%s: stdout এ লিখতে অক্ষম\n"
#: ../parser_interface.c:135 ../parser_interface.c:138
#: ../parser_interface.c:115
#, c-format
msgid "%s: Unable to write to output file\n"
msgstr ""
#: ../parser_interface.c:138 ../parser_interface.c:162
#: ../parser_interface.c:141 ../parser_interface.c:165
#: ../parser_interface.c:118 ../parser_interface.c:142
#, c-format
msgid "%s: ASSERT: Invalid option: %d\n"
msgstr "%s: ASSERT: অবৈধ বিকল্প: %d\n"
#: ../parser_interface.c:147 ../parser_interface.c:150
#: ../parser_interface.c:127
#, c-format
msgid "Addition succeeded for \"%s\".\n"
msgstr "\"%s\" এর ক্ষেত্রে যোগ করা সফল হয়েছে।\n"
#: ../parser_interface.c:151 ../parser_interface.c:154
#: ../parser_interface.c:131
#, c-format
msgid "Replacement succeeded for \"%s\".\n"
msgstr "\"%s\" এর ক্ষেত্রে প্রতিস্থাপন সফল হয়েছে।\n"
#: ../parser_interface.c:155 ../parser_interface.c:158
#: ../parser_interface.c:135
#, c-format
msgid "Removal succeeded for \"%s\".\n"
msgstr "\"%s\"এর ক্ষেত্রে অপসারণ সফল হয়েছে।\n"
@@ -128,6 +137,7 @@ msgid "PANIC bad increment buffer %p pos %p ext %p size %d res %p\n"
msgstr "PANIC খারাপ ইনক্রিমেন্ট বাফার %p pos %p ext %p size %d res %p\n"
#: ../parser_interface.c:656 ../parser_interface.c:658
#: ../parser_interface.c:446
#, c-format
msgid "profile %s network rules not enforced\n"
msgstr ""
@@ -138,16 +148,19 @@ msgstr ""
#: ../parser_interface.c:750 ../parser_interface.c:902
#: ../parser_interface.c:743 ../parser_interface.c:894
#: ../parser_interface.c:518 ../parser_interface.c:669
#, c-format
msgid "Unable to open %s - %s\n"
msgstr "%s খুলতে পারে নি - %s\n"
#: ../parser_interface.c:776 ../parser_interface.c:768
#: ../parser_interface.c:543
#, c-format
msgid "Memory Allocation Error: Unable to remove ^%s\n"
msgstr ""
#: ../parser_interface.c:789 ../parser_interface.c:781
#: ../parser_interface.c:556
#, c-format
msgid "Memory Allocation Error: Unable to remove %s:%s."
msgstr ""
@@ -163,21 +176,23 @@ msgstr "%s প্রোফাইল ক্রমিক করতে পারে
#: ../parser_interface.c:829 ../parser_interface.c:916
#: ../parser_interface.c:821 ../parser_interface.c:908
#: ../parser_interface.c:582
#, c-format
msgid "%s: Unable to write entire profile entry\n"
msgstr "%s: সমগ্র প্রোফাইল এনট্রি লিখতে অক্ষম\n"
#: ../parser_interface.c:839 ../parser_interface.c:831
#: ../parser_interface.c:593
#, c-format
msgid "%s: Unable to write entire profile entry to cache\n"
msgstr ""
#: parser_lex.l:100 parser_lex.l:163
#: parser_lex.l:100 parser_lex.l:163 parser_lex.l:169
#, c-format
msgid "Could not open '%s'"
msgstr ""
#: parser_lex.l:104 parser_lex.l:167
#: parser_lex.l:104 parser_lex.l:167 parser_lex.l:173
#, c-format
msgid "fstat failed for '%s'"
msgstr ""
@@ -192,18 +207,18 @@ msgstr ""
msgid "stat failed for '%s'"
msgstr ""
#: parser_lex.l:155 parser_lex.l:133
#: parser_lex.l:155 parser_lex.l:133 parser_lex.l:139
#, c-format
msgid "Could not open '%s' in '%s'"
msgstr ""
#: parser_lex.l:284 parser_lex.l:322 parser_lex.l:362 parser_lex.l:399
#: parser_lex.l:469 parser_lex.l:655 parser_lex.l:586
#: parser_lex.l:469 parser_lex.l:655 parser_lex.l:586 parser_lex.l:638
#, c-format
msgid "Found unexpected character: '%s'"
msgstr "অপ্রত্যাশিত অক্ষর পাওয়া গেছে: '%s'"
#: parser_lex.l:386 parser_lex.l:418
#: parser_lex.l:386 parser_lex.l:418 parser_lex.l:428
msgid "Variable declarations do not accept trailing commas"
msgstr ""
@@ -212,7 +227,7 @@ msgstr ""
msgid "(network_mode) Found unexpected character: '%s'"
msgstr ""
#: ../parser_main.c:333 ../parser_common.c:61
#: ../parser_main.c:333 ../parser_common.c:61 ../parser_common.c:106
#, c-format
msgid "Warning from %s (%s%sline %d): %s"
msgstr ""
@@ -222,21 +237,21 @@ msgstr ""
msgid "%s: Could not allocate memory for subdomainbase mount point\n"
msgstr "%s: সাবডোমেনবেস মাউন্ট পয়েন্টের জন্যে স্মৃতি বন্টন করতে পারে নি\n"
#: ../parser_main.c:577 ../parser_main.c:616
#: ../parser_main.c:577 ../parser_main.c:616 ../parser_main.c:479
#, c-format
msgid ""
"Warning: unable to find a suitable fs in %s, is it mounted?\n"
"Use --subdomainfs to override.\n"
msgstr ""
#: ../parser_main.c:597 ../parser_main.c:635
#: ../parser_main.c:597 ../parser_main.c:635 ../parser_main.c:498
#, c-format
msgid ""
"%s: Sorry. You need root privileges to run this program.\n"
"\n"
msgstr ""
#: ../parser_main.c:604 ../parser_main.c:642
#: ../parser_main.c:604 ../parser_main.c:642 ../parser_main.c:505
#, c-format
msgid ""
"%s: Warning! You've set this program setuid root.\n"
@@ -245,7 +260,7 @@ msgid ""
msgstr ""
#: ../parser_main.c:704 ../parser_main.c:813 ../parser_main.c:836
#: ../parser_main.c:946
#: ../parser_main.c:946 ../parser_main.c:860
#, c-format
msgid "Error: Could not read profile %s: %s.\n"
msgstr ""
@@ -261,40 +276,47 @@ msgstr ""
#: parser_yacc.y:1042 parser_yacc.y:1078 parser_yacc.y:1082 parser_yacc.y:1092
#: parser_yacc.y:1102 parser_yacc.y:1201 parser_yacc.y:1223 parser_yacc.y:1234
#: parser_yacc.y:1309 parser_yacc.y:1327 parser_yacc.y:1334 parser_yacc.y:1385
#: ../parser_main.c:735 ../parser_main.c:923 ../parser_main.c:1133
#: ../parser_main.c:1187 parser_yacc.y:311 parser_yacc.y:462 parser_yacc.y:472
#: parser_yacc.y:583 parser_yacc.y:662 parser_yacc.y:669 parser_yacc.y:1130
#: parser_yacc.y:1166 parser_yacc.y:1170 parser_yacc.y:1180 parser_yacc.y:1190
#: parser_yacc.y:1298 parser_yacc.y:1376 parser_yacc.y:1479 parser_yacc.y:1490
#: parser_yacc.y:1565 parser_yacc.y:1583 parser_yacc.y:1590 parser_yacc.y:1639
#: ../network.c:314 ../af_unix.cc:203
msgid "Memory allocation error."
msgstr "স্মৃতি বন্টনে ত্রুটি।"
#: ../parser_main.c:740 ../parser_main.c:872
#: ../parser_main.c:740 ../parser_main.c:872 ../parser_main.c:757
#, c-format
msgid "Cached load succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:744 ../parser_main.c:876
#: ../parser_main.c:744 ../parser_main.c:876 ../parser_main.c:761
#, c-format
msgid "Cached reload succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:910 ../parser_main.c:1058
#: ../parser_main.c:910 ../parser_main.c:1058 ../parser_main.c:967
#, c-format
msgid "%s: Errors found in file. Aborting.\n"
msgstr "%s: ফাইলে ত্রুটি পাওয়া গেছে। বাতিল করছে।\n"
#: ../parser_misc.c:426 ../parser_misc.c:597
#: ../parser_misc.c:426 ../parser_misc.c:597 ../parser_misc.c:339
msgid ""
"Uppercase qualifiers \"RWLIMX\" are deprecated, please convert to lowercase\n"
"See the apparmor.d(5) manpage for details.\n"
msgstr ""
#: ../parser_misc.c:467 ../parser_misc.c:474 ../parser_misc.c:638
#: ../parser_misc.c:645
#: ../parser_misc.c:645 ../parser_misc.c:380 ../parser_misc.c:387
msgid "Conflict 'a' and 'w' perms are mutually exclusive."
msgstr ""
#: ../parser_misc.c:491 ../parser_misc.c:662
#: ../parser_misc.c:491 ../parser_misc.c:662 ../parser_misc.c:404
msgid "Exec qualifier 'i' invalid, conflicting qualifier already specified"
msgstr "Exec কোয়ালিফায়ার 'i' অবৈধ, বিবাদমান কোয়ালিফায়ার ইতোমধ্যেই বিদ্যমান"
#: ../parser_misc.c:502 ../parser_misc.c:673
#: ../parser_misc.c:502 ../parser_misc.c:673 ../parser_misc.c:415
#, c-format
msgid ""
"Unconfined exec qualifier (%c%c) allows some dangerous environment variables "
@@ -302,24 +324,24 @@ msgid ""
msgstr ""
#: ../parser_misc.c:510 ../parser_misc.c:551 ../parser_misc.c:681
#: ../parser_misc.c:722
#: ../parser_misc.c:722 ../parser_misc.c:423 ../parser_misc.c:464
#, c-format
msgid "Exec qualifier '%c' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:537 ../parser_misc.c:545 ../parser_misc.c:708
#: ../parser_misc.c:716
#: ../parser_misc.c:716 ../parser_misc.c:450 ../parser_misc.c:458
#, c-format
msgid ""
"Exec qualifier '%c%c' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:593 ../parser_misc.c:764
#: ../parser_misc.c:593 ../parser_misc.c:764 ../parser_misc.c:506
#, c-format
msgid "Internal: unexpected mode character '%c' in input"
msgstr ""
#: ../parser_misc.c:615 ../parser_misc.c:786
#: ../parser_misc.c:615 ../parser_misc.c:786 ../parser_misc.c:528
#, c-format
msgid "Internal error generated invalid perm 0x%llx\n"
msgstr ""
@@ -330,131 +352,133 @@ msgstr ""
msgid "AppArmor parser error: %s\n"
msgstr ""
#: ../parser_merge.c:92 ../parser_merge.c:91
#: ../parser_merge.c:92 ../parser_merge.c:91 ../parser_merge.c:83
msgid "Couldn't merge entries. Out of Memory\n"
msgstr "এনট্রিগুলি একীভূত করতে পারে নি।স্মৃতি পরিপূর্ণ\n"
#: ../parser_merge.c:111 ../parser_merge.c:113
#: ../parser_merge.c:111 ../parser_merge.c:113 ../parser_merge.c:105
#, c-format
msgid "profile %s: has merged rule %s with conflicting x modifiers\n"
msgstr ""
#: parser_yacc.y:236 parser_yacc.y:277
#: parser_yacc.y:236 parser_yacc.y:277 parser_yacc.y:320
msgid "Profile attachment must begin with a '/'."
msgstr ""
#: parser_yacc.y:260 parser_yacc.y:302
#: parser_yacc.y:260 parser_yacc.y:302 parser_yacc.y:348
msgid ""
"Profile names must begin with a '/', namespace or keyword 'profile' or 'hat'."
msgstr ""
#: parser_yacc.y:296 parser_yacc.y:338
#: parser_yacc.y:296 parser_yacc.y:338 parser_yacc.y:384
#, c-format
msgid "Failed to create alias %s -> %s\n"
msgstr ""
#: parser_yacc.y:417 parser_yacc.y:460
#: parser_yacc.y:417 parser_yacc.y:460 parser_yacc.y:506
msgid "Profile flag chroot_relative conflicts with namespace_relative"
msgstr ""
#: parser_yacc.y:421 parser_yacc.y:464
#: parser_yacc.y:421 parser_yacc.y:464 parser_yacc.y:510
msgid "Profile flag mediate_deleted conflicts with delegate_deleted"
msgstr ""
#: parser_yacc.y:424 parser_yacc.y:467
#: parser_yacc.y:424 parser_yacc.y:467 parser_yacc.y:513
msgid ""
"Profile flag attach_disconnected conflicts with no_attach_disconnected"
msgstr ""
#: parser_yacc.y:427 parser_yacc.y:470
#: parser_yacc.y:427 parser_yacc.y:470 parser_yacc.y:516
msgid "Profile flag chroot_attach conflicts with chroot_no_attach"
msgstr ""
#: parser_yacc.y:441 parser_yacc.y:484
#: parser_yacc.y:441 parser_yacc.y:484 parser_yacc.y:530
msgid "Profile flag 'debug' is no longer valid."
msgstr ""
#: parser_yacc.y:463 parser_yacc.y:506
#: parser_yacc.y:463 parser_yacc.y:506 parser_yacc.y:552
#, c-format
msgid "Invalid profile flag: %s."
msgstr ""
#: parser_yacc.y:498 parser_yacc.y:520 parser_yacc.y:548
#: parser_yacc.y:498 parser_yacc.y:520 parser_yacc.y:548 parser_yacc.y:594
msgid "Assert: `rule' returned NULL."
msgstr "দৃঢ় ঘোষণা: `rule' NULL ফেরত পাঠিয়েছে।"
#: parser_yacc.y:501 parser_yacc.y:546 parser_yacc.y:552 parser_yacc.y:584
#: parser_yacc.y:598 parser_yacc.y:630
msgid ""
"Invalid mode, in deny rules 'x' must not be preceded by exec qualifier 'i', "
"'p', or 'u'"
msgstr ""
#: parser_yacc.y:524 parser_yacc.y:556
#: parser_yacc.y:524 parser_yacc.y:556 parser_yacc.y:602
msgid ""
"Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', 'c', or 'u'"
msgstr ""
#: parser_yacc.y:549 parser_yacc.y:587
#: parser_yacc.y:549 parser_yacc.y:587 parser_yacc.y:633
msgid "Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', or 'u'"
msgstr ""
#: parser_yacc.y:574 parser_yacc.y:612 parser_yacc.y:614
#: parser_yacc.y:574 parser_yacc.y:612 parser_yacc.y:614 parser_yacc.y:660
msgid "Assert: `network_rule' return invalid protocol."
msgstr ""
#: parser_yacc.y:649 parser_yacc.y:696
#: parser_yacc.y:649 parser_yacc.y:696 parser_yacc.y:786
msgid "Assert: `change_profile' returned NULL."
msgstr ""
#: parser_yacc.y:680 parser_yacc.y:720
#: parser_yacc.y:680 parser_yacc.y:720 parser_yacc.y:810
msgid "Assert: 'hat rule' returned NULL."
msgstr "দৃঢ় ঘোষণা: `hat rule' NULL ফেরত পাঠিয়েছে।"
#: parser_yacc.y:689 parser_yacc.y:729
#: parser_yacc.y:689 parser_yacc.y:729 parser_yacc.y:819
msgid "Assert: 'local_profile rule' returned NULL."
msgstr ""
#: parser_yacc.y:824 parser_yacc.y:885
#: parser_yacc.y:824 parser_yacc.y:885 parser_yacc.y:992
#, c-format
msgid "Unset boolean variable %s used in if-expression"
msgstr ""
#: parser_yacc.y:882 parser_yacc.y:986
#: parser_yacc.y:882 parser_yacc.y:986 parser_yacc.y:1092
msgid "unsafe rule missing exec permissions"
msgstr ""
#: parser_yacc.y:901 parser_yacc.y:954
#: parser_yacc.y:901 parser_yacc.y:954 parser_yacc.y:1060
msgid "subset can only be used with link rules."
msgstr ""
#: parser_yacc.y:903 parser_yacc.y:956
#: parser_yacc.y:903 parser_yacc.y:956 parser_yacc.y:1062
msgid "link and exec perms conflict on a file rule using ->"
msgstr ""
#: parser_yacc.y:905 parser_yacc.y:958
#: parser_yacc.y:905 parser_yacc.y:958 parser_yacc.y:1064
msgid "link perms are not allowed on a named profile transition.\n"
msgstr ""
#: parser_yacc.y:921 parser_yacc.y:1003
#: parser_yacc.y:921 parser_yacc.y:1003 parser_yacc.y:1109
#, c-format
msgid "missing an end of line character? (entry: %s)"
msgstr "লাইন সমাপ্তির অক্ষর অনুপস্থিত? (এনট্রি: %s)"
#: parser_yacc.y:975 parser_yacc.y:985 parser_yacc.y:1057 parser_yacc.y:1067
#: parser_yacc.y:1145 parser_yacc.y:1155
msgid "Invalid network entry."
msgstr ""
#: parser_yacc.y:1039 parser_yacc.y:1048 parser_yacc.y:1254
#: parser_yacc.y:1039 parser_yacc.y:1048 parser_yacc.y:1254 parser_yacc.y:1510
#, c-format
msgid "Invalid capability %s."
msgstr ""
#: parser_yacc.y:1066 parser_yacc.y:1269
#: parser_yacc.y:1066 parser_yacc.y:1269 parser_yacc.y:1525
#, c-format
msgid "AppArmor parser error for %s%s%s at line %d: %s\n"
msgstr ""
#: parser_yacc.y:1072 parser_yacc.y:1275
#: parser_yacc.y:1072 parser_yacc.y:1275 parser_yacc.y:1531
#, c-format
msgid "AppArmor parser error,%s%s line %d: %s\n"
msgstr ""
@@ -464,19 +488,19 @@ msgstr ""
msgid "%s: Illegal open {, nesting groupings not allowed\n"
msgstr "%s: অবৈধ খোলা {, নেস্টিং গ্রুপিংয়ের অনুমতি নেই\n"
#: ../parser_regex.c:265 ../parser_regex.c:274
#: ../parser_regex.c:265 ../parser_regex.c:274 ../parser_regex.c:278
#, c-format
msgid "%s: Regex grouping error: Invalid number of items between {}\n"
msgstr "%s: Regex দলবদ্ধকরণের ত্রুটি: {} এর মধ্যে অবৈধ সংখ্যক বস্তু\n"
#: ../parser_regex.c:271 ../parser_regex.c:280
#: ../parser_regex.c:271 ../parser_regex.c:280 ../parser_regex.c:284
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close }, no matching open { detected\n"
msgstr ""
"%s: Regex দলবদ্ধকরণের ত্রুটি: অবৈধ বন্ধ }, কোন মিলযুক্ত খোলা{ পাওয়া যায় নি\n"
#: ../parser_regex.c:337 ../parser_regex.c:343
#: ../parser_regex.c:337 ../parser_regex.c:343 ../parser_regex.c:361
#, c-format
msgid ""
"%s: Regex grouping error: Unclosed grouping or character class, expecting "
@@ -489,17 +513,17 @@ msgid "%s: Internal buffer overflow detected, %d characters exceeded\n"
msgstr ""
"%s: অভ্যন্তরীণ বাফার অতিপ্রবাহের সন্ধান পাওয়া গেছে, %d গুলি অক্ষর বেশি\n"
#: ../parser_regex.c:355 ../parser_regex.c:361
#: ../parser_regex.c:355 ../parser_regex.c:361 ../parser_regex.c:377
#, c-format
msgid "%s: Unable to parse input line '%s'\n"
msgstr "%s: ইনপুট ফাইল '%s' পার্স করতে অক্ষম\n"
#: ../parser_regex.c:397 ../parser_regex.c:405
#: ../parser_regex.c:397 ../parser_regex.c:405 ../parser_regex.c:421
#, c-format
msgid "%s: Invalid profile name '%s' - bad regular expression\n"
msgstr ""
#: ../parser_policy.c:202 ../parser_policy.c:402
#: ../parser_policy.c:202 ../parser_policy.c:402 ../parser_policy.c:375
#, c-format
msgid "ERROR merging rules for profile %s, failed to load\n"
msgstr ""
@@ -512,17 +536,17 @@ msgid ""
"\t'**' may only be used at the end of a rule.\n"
msgstr ""
#: ../parser_policy.c:279 ../parser_policy.c:359
#: ../parser_policy.c:279 ../parser_policy.c:359 ../parser_policy.c:332
#, c-format
msgid "ERROR processing regexs for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:306 ../parser_policy.c:389
#: ../parser_policy.c:306 ../parser_policy.c:389 ../parser_policy.c:362
#, c-format
msgid "ERROR expanding variables for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:390 ../parser_policy.c:382
#: ../parser_policy.c:390 ../parser_policy.c:382 ../parser_policy.c:355
#, c-format
msgid "ERROR adding hat access rule for profile %s\n"
msgstr ""
@@ -553,30 +577,31 @@ msgid "%s: Errors found in combining rules postprocessing. Aborting.\n"
msgstr ""
"%s: পোস্টপ্রসেসিং নিয়মাবলী একীভূত করায় ত্রুটি পাওয়া গেছে। বাতিল করছে।\n"
#: parser_lex.l:180
#: parser_lex.l:180 parser_lex.l:186
#, c-format
msgid "Could not process include directory '%s' in '%s'"
msgstr ""
#: ../parser_main.c:660
#: ../parser_main.c:660 ../parser_main.c:523
msgid "Feature buffer full."
msgstr ""
#: ../parser_main.c:1115 ../parser_main.c:1132
#: ../parser_main.c:1115 ../parser_main.c:1132 ../parser_main.c:1024
#: ../parser_main.c:1041
msgid "Out of memory"
msgstr ""
#: ../parser_main.c:1182
#: ../parser_main.c:1182 ../parser_main.c:1091
#, c-format
msgid "Can't create cache directory: %s\n"
msgstr ""
#: ../parser_main.c:1185
#: ../parser_main.c:1185 ../parser_main.c:1094
#, c-format
msgid "File in cache directory location: %s\n"
msgstr ""
#: ../parser_main.c:1188
#: ../parser_main.c:1188 ../parser_main.c:1097
#, c-format
msgid "Can't update cache directory: %s\n"
msgstr ""
@@ -591,11 +616,11 @@ msgstr ""
msgid "Internal error generated invalid DBus perm 0x%x\n"
msgstr ""
#: parser_yacc.y:575
#: parser_yacc.y:575 parser_yacc.y:621
msgid "deny prefix not allowed"
msgstr ""
#: parser_yacc.y:612
#: parser_yacc.y:612 parser_yacc.y:658
msgid "owner prefix not allowed"
msgstr ""
@@ -611,41 +636,41 @@ msgstr ""
msgid "owner prefix not allow on capability rules"
msgstr ""
#: parser_yacc.y:1357
#: parser_yacc.y:1357 parser_yacc.y:1613
#, c-format
msgid "invalid mount conditional %s%s"
msgstr ""
#: parser_yacc.y:1374
#: parser_yacc.y:1374 parser_yacc.y:1628
msgid "bad mount rule"
msgstr ""
#: parser_yacc.y:1381
#: parser_yacc.y:1381 parser_yacc.y:1635
msgid "mount point conditions not currently supported"
msgstr ""
#: parser_yacc.y:1398
#: parser_yacc.y:1398 parser_yacc.y:1650
#, c-format
msgid "invalid pivotroot conditional '%s'"
msgstr ""
#: ../parser_regex.c:241
#: ../parser_regex.c:241 ../parser_regex.c:236
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close ], no matching open [ detected\n"
msgstr ""
#: ../parser_regex.c:257
#: ../parser_regex.c:257 ../parser_regex.c:256
#, c-format
msgid "%s: Regex grouping error: Exceeded maximum nesting of {}\n"
msgstr ""
#: ../parser_policy.c:366
#: ../parser_policy.c:366 ../parser_policy.c:339
#, c-format
msgid "ERROR processing policydb rules for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:396
#: ../parser_policy.c:396 ../parser_policy.c:369
#, c-format
msgid "ERROR replacing aliases for profile %s, failed to load\n"
msgstr ""

View File

@@ -14,15 +14,15 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2016-06-01 05:14+0000\n"
"X-Generator: Launchpad (build 18053)\n"
"X-Launchpad-Export-Date: 2019-04-18 05:32+0000\n"
"X-Generator: Launchpad (build 18928)\n"
"Language: bs\n"
#: ../parser_include.c:113
#: ../parser_include.c:113 ../parser_include.c:111
msgid "Error: Out of memory.\n"
msgstr "Greška: Nema više memorije.\n"
#: ../parser_include.c:123
#: ../parser_include.c:123 ../parser_include.c:121
#, c-format
msgid "Error: basedir %s is not a directory, skipping.\n"
msgstr "Greška: osnovni direktorij %s nije direktorij, preskačem.\n"
@@ -32,97 +32,106 @@ msgstr "Greška: osnovni direktorij %s nije direktorij, preskačem.\n"
msgid "Error: Could not add directory %s to search path.\n"
msgstr "Greška: Ne mogu dodati direktorij %s u stazu koja se traži.\n"
#: ../parser_include.c:147
#: ../parser_include.c:147 ../parser_include.c:151
msgid "Error: Could not allocate memory.\n"
msgstr "Greška: Ne mogu alocirati memoriju.\n"
#: ../parser_interface.c:69 ../parser_interface.c:72
#: ../parser_interface.c:69 ../parser_interface.c:72 ../parser_interface.c:49
msgid "Bad write position\n"
msgstr "Neipravan položaj za zapisivanje\n"
#: ../parser_interface.c:72 ../parser_interface.c:75
#: ../parser_interface.c:72 ../parser_interface.c:75 ../parser_interface.c:52
msgid "Permission denied\n"
msgstr "Odobrenje odbijeno\n"
#: ../parser_interface.c:75 ../parser_interface.c:78
#: ../parser_interface.c:75 ../parser_interface.c:78 ../parser_interface.c:55
msgid "Out of memory\n"
msgstr "Nedostaje mi slobodne memorije\n"
#: ../parser_interface.c:78 ../parser_interface.c:81
#: ../parser_interface.c:78 ../parser_interface.c:81 ../parser_interface.c:58
msgid "Couldn't copy profile: Bad memory address\n"
msgstr "Ne mogu kopirati profil: Loša memorijska adresa\n"
#: ../parser_interface.c:81 ../parser_interface.c:84
#: ../parser_interface.c:81 ../parser_interface.c:84 ../parser_interface.c:61
msgid "Profile doesn't conform to protocol\n"
msgstr "Profil ne odgovara protokolu\n"
#: ../parser_interface.c:84 ../parser_interface.c:87
#: ../parser_interface.c:84 ../parser_interface.c:87 ../parser_interface.c:64
msgid "Profile does not match signature\n"
msgstr "Profil ne odgovara potpisu\n"
#: ../parser_interface.c:87 ../parser_interface.c:90
#: ../parser_interface.c:87 ../parser_interface.c:90 ../parser_interface.c:67
msgid "Profile version not supported by Apparmor module\n"
msgstr "Verzija profila nije podržana Apparmor modulom\n"
#: ../parser_interface.c:90 ../parser_interface.c:93
#: ../parser_interface.c:90 ../parser_interface.c:93 ../parser_interface.c:70
msgid "Profile already exists\n"
msgstr "Profil već postoji\n"
#: ../parser_interface.c:93 ../parser_interface.c:96
#: ../parser_interface.c:93 ../parser_interface.c:96 ../parser_interface.c:73
msgid "Profile doesn't exist\n"
msgstr "Profil ne postoji\n"
#: ../parser_interface.c:96 ../parser_interface.c:99
#: ../parser_interface.c:96 ../parser_interface.c:99 ../parser_interface.c:76
msgid "Permission denied; attempted to load a profile while confined?\n"
msgstr "Dozvola odbijena; pokušao da učita profil, dok je zatvoren?\n"
#: ../parser_interface.c:99 ../parser_interface.c:102
#: ../parser_interface.c:99 ../parser_interface.c:102 ../parser_interface.c:79
#, c-format
msgid "Unknown error (%d): %s\n"
msgstr "Nepoznata greška (%d): %s\n"
#: ../parser_interface.c:116 ../parser_interface.c:119
#: ../parser_interface.c:96
#, c-format
msgid "%s: Unable to add \"%s\". "
msgstr "%s: Ne mogu dodati \"%s\". "
#: ../parser_interface.c:121 ../parser_interface.c:124
#: ../parser_interface.c:101
#, c-format
msgid "%s: Unable to replace \"%s\". "
msgstr "%s: Ne mogu zamijeniti \"%s\". "
#: ../parser_interface.c:126 ../parser_interface.c:129
#: ../parser_interface.c:106
#, c-format
msgid "%s: Unable to remove \"%s\". "
msgstr "%s : Ne mogu ukloniti \"%s\". "
#: ../parser_interface.c:131 ../parser_interface.c:134
#: ../parser_interface.c:111
#, c-format
msgid "%s: Unable to write to stdout\n"
msgstr "%s: Ne mogu pisati na stdout\n"
#: ../parser_interface.c:135 ../parser_interface.c:138
#: ../parser_interface.c:115
#, c-format
msgid "%s: Unable to write to output file\n"
msgstr "%s: Ne mogu pisati u izlaznu datoteku\n"
#: ../parser_interface.c:138 ../parser_interface.c:162
#: ../parser_interface.c:141 ../parser_interface.c:165
#: ../parser_interface.c:118 ../parser_interface.c:142
#, c-format
msgid "%s: ASSERT: Invalid option: %d\n"
msgstr "%s: PROVJERA: Neispravan izbor: %d\n"
#: ../parser_interface.c:147 ../parser_interface.c:150
#: ../parser_interface.c:127
#, c-format
msgid "Addition succeeded for \"%s\".\n"
msgstr "Dodavanje je uspjelo za \"%s\".\n"
#: ../parser_interface.c:151 ../parser_interface.c:154
#: ../parser_interface.c:131
#, c-format
msgid "Replacement succeeded for \"%s\".\n"
msgstr "Zamjena je uspjela za \"%s\".\n"
#: ../parser_interface.c:155 ../parser_interface.c:158
#: ../parser_interface.c:135
#, c-format
msgid "Removal succeeded for \"%s\".\n"
msgstr "Uklanjanje je uspjelo za \"%s\".\n"
@@ -134,6 +143,7 @@ msgstr ""
"PANIKA neispravan inkrementalni spremnik %p pol %p ekst %p vel %d raz %p\n"
#: ../parser_interface.c:656 ../parser_interface.c:658
#: ../parser_interface.c:446
#, c-format
msgid "profile %s network rules not enforced\n"
msgstr "profil %s mrežna pravila nisu primijenjena\n"
@@ -144,16 +154,19 @@ msgstr "Nepoznat tip uzorka\n"
#: ../parser_interface.c:750 ../parser_interface.c:902
#: ../parser_interface.c:743 ../parser_interface.c:894
#: ../parser_interface.c:518 ../parser_interface.c:669
#, c-format
msgid "Unable to open %s - %s\n"
msgstr "Ne mogu otvoriti %s - %s\n"
#: ../parser_interface.c:776 ../parser_interface.c:768
#: ../parser_interface.c:543
#, c-format
msgid "Memory Allocation Error: Unable to remove ^%s\n"
msgstr "Greška memorijske alokacije: Ne mogu ukloniti ^%s\n"
#: ../parser_interface.c:789 ../parser_interface.c:781
#: ../parser_interface.c:556
#, c-format
msgid "Memory Allocation Error: Unable to remove %s:%s."
msgstr "Greška memorijske alokacije: Ne mogu ukloniti %s:%s."
@@ -169,21 +182,23 @@ msgstr ""
#: ../parser_interface.c:829 ../parser_interface.c:916
#: ../parser_interface.c:821 ../parser_interface.c:908
#: ../parser_interface.c:582
#, c-format
msgid "%s: Unable to write entire profile entry\n"
msgstr ""
#: ../parser_interface.c:839 ../parser_interface.c:831
#: ../parser_interface.c:593
#, c-format
msgid "%s: Unable to write entire profile entry to cache\n"
msgstr ""
#: parser_lex.l:100 parser_lex.l:163
#: parser_lex.l:100 parser_lex.l:163 parser_lex.l:169
#, c-format
msgid "Could not open '%s'"
msgstr ""
#: parser_lex.l:104 parser_lex.l:167
#: parser_lex.l:104 parser_lex.l:167 parser_lex.l:173
#, c-format
msgid "fstat failed for '%s'"
msgstr ""
@@ -198,18 +213,18 @@ msgstr ""
msgid "stat failed for '%s'"
msgstr ""
#: parser_lex.l:155 parser_lex.l:133
#: parser_lex.l:155 parser_lex.l:133 parser_lex.l:139
#, c-format
msgid "Could not open '%s' in '%s'"
msgstr ""
#: parser_lex.l:284 parser_lex.l:322 parser_lex.l:362 parser_lex.l:399
#: parser_lex.l:469 parser_lex.l:655 parser_lex.l:586
#: parser_lex.l:469 parser_lex.l:655 parser_lex.l:586 parser_lex.l:638
#, c-format
msgid "Found unexpected character: '%s'"
msgstr ""
#: parser_lex.l:386 parser_lex.l:418
#: parser_lex.l:386 parser_lex.l:418 parser_lex.l:428
msgid "Variable declarations do not accept trailing commas"
msgstr ""
@@ -218,7 +233,7 @@ msgstr ""
msgid "(network_mode) Found unexpected character: '%s'"
msgstr ""
#: ../parser_main.c:333 ../parser_common.c:61
#: ../parser_main.c:333 ../parser_common.c:61 ../parser_common.c:106
#, c-format
msgid "Warning from %s (%s%sline %d): %s"
msgstr ""
@@ -228,21 +243,21 @@ msgstr ""
msgid "%s: Could not allocate memory for subdomainbase mount point\n"
msgstr ""
#: ../parser_main.c:577 ../parser_main.c:616
#: ../parser_main.c:577 ../parser_main.c:616 ../parser_main.c:479
#, c-format
msgid ""
"Warning: unable to find a suitable fs in %s, is it mounted?\n"
"Use --subdomainfs to override.\n"
msgstr ""
#: ../parser_main.c:597 ../parser_main.c:635
#: ../parser_main.c:597 ../parser_main.c:635 ../parser_main.c:498
#, c-format
msgid ""
"%s: Sorry. You need root privileges to run this program.\n"
"\n"
msgstr ""
#: ../parser_main.c:604 ../parser_main.c:642
#: ../parser_main.c:604 ../parser_main.c:642 ../parser_main.c:505
#, c-format
msgid ""
"%s: Warning! You've set this program setuid root.\n"
@@ -251,7 +266,7 @@ msgid ""
msgstr ""
#: ../parser_main.c:704 ../parser_main.c:813 ../parser_main.c:836
#: ../parser_main.c:946
#: ../parser_main.c:946 ../parser_main.c:860
#, c-format
msgid "Error: Could not read profile %s: %s.\n"
msgstr ""
@@ -267,40 +282,47 @@ msgstr ""
#: parser_yacc.y:1042 parser_yacc.y:1078 parser_yacc.y:1082 parser_yacc.y:1092
#: parser_yacc.y:1102 parser_yacc.y:1201 parser_yacc.y:1223 parser_yacc.y:1234
#: parser_yacc.y:1309 parser_yacc.y:1327 parser_yacc.y:1334 parser_yacc.y:1385
#: ../parser_main.c:735 ../parser_main.c:923 ../parser_main.c:1133
#: ../parser_main.c:1187 parser_yacc.y:311 parser_yacc.y:462 parser_yacc.y:472
#: parser_yacc.y:583 parser_yacc.y:662 parser_yacc.y:669 parser_yacc.y:1130
#: parser_yacc.y:1166 parser_yacc.y:1170 parser_yacc.y:1180 parser_yacc.y:1190
#: parser_yacc.y:1298 parser_yacc.y:1376 parser_yacc.y:1479 parser_yacc.y:1490
#: parser_yacc.y:1565 parser_yacc.y:1583 parser_yacc.y:1590 parser_yacc.y:1639
#: ../network.c:314 ../af_unix.cc:203
msgid "Memory allocation error."
msgstr ""
#: ../parser_main.c:740 ../parser_main.c:872
#: ../parser_main.c:740 ../parser_main.c:872 ../parser_main.c:757
#, c-format
msgid "Cached load succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:744 ../parser_main.c:876
#: ../parser_main.c:744 ../parser_main.c:876 ../parser_main.c:761
#, c-format
msgid "Cached reload succeeded for \"%s\".\n"
msgstr ""
#: ../parser_main.c:910 ../parser_main.c:1058
#: ../parser_main.c:910 ../parser_main.c:1058 ../parser_main.c:967
#, c-format
msgid "%s: Errors found in file. Aborting.\n"
msgstr ""
#: ../parser_misc.c:426 ../parser_misc.c:597
#: ../parser_misc.c:426 ../parser_misc.c:597 ../parser_misc.c:339
msgid ""
"Uppercase qualifiers \"RWLIMX\" are deprecated, please convert to lowercase\n"
"See the apparmor.d(5) manpage for details.\n"
msgstr ""
#: ../parser_misc.c:467 ../parser_misc.c:474 ../parser_misc.c:638
#: ../parser_misc.c:645
#: ../parser_misc.c:645 ../parser_misc.c:380 ../parser_misc.c:387
msgid "Conflict 'a' and 'w' perms are mutually exclusive."
msgstr ""
#: ../parser_misc.c:491 ../parser_misc.c:662
#: ../parser_misc.c:491 ../parser_misc.c:662 ../parser_misc.c:404
msgid "Exec qualifier 'i' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:502 ../parser_misc.c:673
#: ../parser_misc.c:502 ../parser_misc.c:673 ../parser_misc.c:415
#, c-format
msgid ""
"Unconfined exec qualifier (%c%c) allows some dangerous environment variables "
@@ -308,24 +330,24 @@ msgid ""
msgstr ""
#: ../parser_misc.c:510 ../parser_misc.c:551 ../parser_misc.c:681
#: ../parser_misc.c:722
#: ../parser_misc.c:722 ../parser_misc.c:423 ../parser_misc.c:464
#, c-format
msgid "Exec qualifier '%c' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:537 ../parser_misc.c:545 ../parser_misc.c:708
#: ../parser_misc.c:716
#: ../parser_misc.c:716 ../parser_misc.c:450 ../parser_misc.c:458
#, c-format
msgid ""
"Exec qualifier '%c%c' invalid, conflicting qualifier already specified"
msgstr ""
#: ../parser_misc.c:593 ../parser_misc.c:764
#: ../parser_misc.c:593 ../parser_misc.c:764 ../parser_misc.c:506
#, c-format
msgid "Internal: unexpected mode character '%c' in input"
msgstr ""
#: ../parser_misc.c:615 ../parser_misc.c:786
#: ../parser_misc.c:615 ../parser_misc.c:786 ../parser_misc.c:528
#, c-format
msgid "Internal error generated invalid perm 0x%llx\n"
msgstr ""
@@ -336,131 +358,133 @@ msgstr ""
msgid "AppArmor parser error: %s\n"
msgstr ""
#: ../parser_merge.c:92 ../parser_merge.c:91
#: ../parser_merge.c:92 ../parser_merge.c:91 ../parser_merge.c:83
msgid "Couldn't merge entries. Out of Memory\n"
msgstr ""
#: ../parser_merge.c:111 ../parser_merge.c:113
#: ../parser_merge.c:111 ../parser_merge.c:113 ../parser_merge.c:105
#, c-format
msgid "profile %s: has merged rule %s with conflicting x modifiers\n"
msgstr ""
#: parser_yacc.y:236 parser_yacc.y:277
#: parser_yacc.y:236 parser_yacc.y:277 parser_yacc.y:320
msgid "Profile attachment must begin with a '/'."
msgstr ""
#: parser_yacc.y:260 parser_yacc.y:302
#: parser_yacc.y:260 parser_yacc.y:302 parser_yacc.y:348
msgid ""
"Profile names must begin with a '/', namespace or keyword 'profile' or 'hat'."
msgstr ""
#: parser_yacc.y:296 parser_yacc.y:338
#: parser_yacc.y:296 parser_yacc.y:338 parser_yacc.y:384
#, c-format
msgid "Failed to create alias %s -> %s\n"
msgstr ""
#: parser_yacc.y:417 parser_yacc.y:460
#: parser_yacc.y:417 parser_yacc.y:460 parser_yacc.y:506
msgid "Profile flag chroot_relative conflicts with namespace_relative"
msgstr ""
#: parser_yacc.y:421 parser_yacc.y:464
#: parser_yacc.y:421 parser_yacc.y:464 parser_yacc.y:510
msgid "Profile flag mediate_deleted conflicts with delegate_deleted"
msgstr ""
#: parser_yacc.y:424 parser_yacc.y:467
#: parser_yacc.y:424 parser_yacc.y:467 parser_yacc.y:513
msgid ""
"Profile flag attach_disconnected conflicts with no_attach_disconnected"
msgstr ""
#: parser_yacc.y:427 parser_yacc.y:470
#: parser_yacc.y:427 parser_yacc.y:470 parser_yacc.y:516
msgid "Profile flag chroot_attach conflicts with chroot_no_attach"
msgstr ""
#: parser_yacc.y:441 parser_yacc.y:484
#: parser_yacc.y:441 parser_yacc.y:484 parser_yacc.y:530
msgid "Profile flag 'debug' is no longer valid."
msgstr ""
#: parser_yacc.y:463 parser_yacc.y:506
#: parser_yacc.y:463 parser_yacc.y:506 parser_yacc.y:552
#, c-format
msgid "Invalid profile flag: %s."
msgstr ""
#: parser_yacc.y:498 parser_yacc.y:520 parser_yacc.y:548
#: parser_yacc.y:498 parser_yacc.y:520 parser_yacc.y:548 parser_yacc.y:594
msgid "Assert: `rule' returned NULL."
msgstr ""
#: parser_yacc.y:501 parser_yacc.y:546 parser_yacc.y:552 parser_yacc.y:584
#: parser_yacc.y:598 parser_yacc.y:630
msgid ""
"Invalid mode, in deny rules 'x' must not be preceded by exec qualifier 'i', "
"'p', or 'u'"
msgstr ""
#: parser_yacc.y:524 parser_yacc.y:556
#: parser_yacc.y:524 parser_yacc.y:556 parser_yacc.y:602
msgid ""
"Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', 'c', or 'u'"
msgstr ""
#: parser_yacc.y:549 parser_yacc.y:587
#: parser_yacc.y:549 parser_yacc.y:587 parser_yacc.y:633
msgid "Invalid mode, 'x' must be preceded by exec qualifier 'i', 'p', or 'u'"
msgstr ""
#: parser_yacc.y:574 parser_yacc.y:612 parser_yacc.y:614
#: parser_yacc.y:574 parser_yacc.y:612 parser_yacc.y:614 parser_yacc.y:660
msgid "Assert: `network_rule' return invalid protocol."
msgstr ""
#: parser_yacc.y:649 parser_yacc.y:696
#: parser_yacc.y:649 parser_yacc.y:696 parser_yacc.y:786
msgid "Assert: `change_profile' returned NULL."
msgstr ""
#: parser_yacc.y:680 parser_yacc.y:720
#: parser_yacc.y:680 parser_yacc.y:720 parser_yacc.y:810
msgid "Assert: 'hat rule' returned NULL."
msgstr ""
#: parser_yacc.y:689 parser_yacc.y:729
#: parser_yacc.y:689 parser_yacc.y:729 parser_yacc.y:819
msgid "Assert: 'local_profile rule' returned NULL."
msgstr ""
#: parser_yacc.y:824 parser_yacc.y:885
#: parser_yacc.y:824 parser_yacc.y:885 parser_yacc.y:992
#, c-format
msgid "Unset boolean variable %s used in if-expression"
msgstr ""
#: parser_yacc.y:882 parser_yacc.y:986
#: parser_yacc.y:882 parser_yacc.y:986 parser_yacc.y:1092
msgid "unsafe rule missing exec permissions"
msgstr ""
#: parser_yacc.y:901 parser_yacc.y:954
#: parser_yacc.y:901 parser_yacc.y:954 parser_yacc.y:1060
msgid "subset can only be used with link rules."
msgstr ""
#: parser_yacc.y:903 parser_yacc.y:956
#: parser_yacc.y:903 parser_yacc.y:956 parser_yacc.y:1062
msgid "link and exec perms conflict on a file rule using ->"
msgstr ""
#: parser_yacc.y:905 parser_yacc.y:958
#: parser_yacc.y:905 parser_yacc.y:958 parser_yacc.y:1064
msgid "link perms are not allowed on a named profile transition.\n"
msgstr ""
#: parser_yacc.y:921 parser_yacc.y:1003
#: parser_yacc.y:921 parser_yacc.y:1003 parser_yacc.y:1109
#, c-format
msgid "missing an end of line character? (entry: %s)"
msgstr ""
#: parser_yacc.y:975 parser_yacc.y:985 parser_yacc.y:1057 parser_yacc.y:1067
#: parser_yacc.y:1145 parser_yacc.y:1155
msgid "Invalid network entry."
msgstr ""
#: parser_yacc.y:1039 parser_yacc.y:1048 parser_yacc.y:1254
#: parser_yacc.y:1039 parser_yacc.y:1048 parser_yacc.y:1254 parser_yacc.y:1510
#, c-format
msgid "Invalid capability %s."
msgstr ""
#: parser_yacc.y:1066 parser_yacc.y:1269
#: parser_yacc.y:1066 parser_yacc.y:1269 parser_yacc.y:1525
#, c-format
msgid "AppArmor parser error for %s%s%s at line %d: %s\n"
msgstr ""
#: parser_yacc.y:1072 parser_yacc.y:1275
#: parser_yacc.y:1072 parser_yacc.y:1275 parser_yacc.y:1531
#, c-format
msgid "AppArmor parser error,%s%s line %d: %s\n"
msgstr ""
@@ -470,18 +494,18 @@ msgstr ""
msgid "%s: Illegal open {, nesting groupings not allowed\n"
msgstr ""
#: ../parser_regex.c:265 ../parser_regex.c:274
#: ../parser_regex.c:265 ../parser_regex.c:274 ../parser_regex.c:278
#, c-format
msgid "%s: Regex grouping error: Invalid number of items between {}\n"
msgstr ""
#: ../parser_regex.c:271 ../parser_regex.c:280
#: ../parser_regex.c:271 ../parser_regex.c:280 ../parser_regex.c:284
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close }, no matching open { detected\n"
msgstr ""
#: ../parser_regex.c:337 ../parser_regex.c:343
#: ../parser_regex.c:337 ../parser_regex.c:343 ../parser_regex.c:361
#, c-format
msgid ""
"%s: Regex grouping error: Unclosed grouping or character class, expecting "
@@ -493,17 +517,17 @@ msgstr ""
msgid "%s: Internal buffer overflow detected, %d characters exceeded\n"
msgstr ""
#: ../parser_regex.c:355 ../parser_regex.c:361
#: ../parser_regex.c:355 ../parser_regex.c:361 ../parser_regex.c:377
#, c-format
msgid "%s: Unable to parse input line '%s'\n"
msgstr ""
#: ../parser_regex.c:397 ../parser_regex.c:405
#: ../parser_regex.c:397 ../parser_regex.c:405 ../parser_regex.c:421
#, c-format
msgid "%s: Invalid profile name '%s' - bad regular expression\n"
msgstr ""
#: ../parser_policy.c:202 ../parser_policy.c:402
#: ../parser_policy.c:202 ../parser_policy.c:402 ../parser_policy.c:375
#, c-format
msgid "ERROR merging rules for profile %s, failed to load\n"
msgstr ""
@@ -516,17 +540,17 @@ msgid ""
"\t'**' may only be used at the end of a rule.\n"
msgstr ""
#: ../parser_policy.c:279 ../parser_policy.c:359
#: ../parser_policy.c:279 ../parser_policy.c:359 ../parser_policy.c:332
#, c-format
msgid "ERROR processing regexs for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:306 ../parser_policy.c:389
#: ../parser_policy.c:306 ../parser_policy.c:389 ../parser_policy.c:362
#, c-format
msgid "ERROR expanding variables for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:390 ../parser_policy.c:382
#: ../parser_policy.c:390 ../parser_policy.c:382 ../parser_policy.c:355
#, c-format
msgid "ERROR adding hat access rule for profile %s\n"
msgstr ""
@@ -556,30 +580,31 @@ msgstr ""
msgid "%s: Errors found in combining rules postprocessing. Aborting.\n"
msgstr ""
#: parser_lex.l:180
#: parser_lex.l:180 parser_lex.l:186
#, c-format
msgid "Could not process include directory '%s' in '%s'"
msgstr ""
#: ../parser_main.c:660
#: ../parser_main.c:660 ../parser_main.c:523
msgid "Feature buffer full."
msgstr ""
#: ../parser_main.c:1115 ../parser_main.c:1132
#: ../parser_main.c:1115 ../parser_main.c:1132 ../parser_main.c:1024
#: ../parser_main.c:1041
msgid "Out of memory"
msgstr ""
#: ../parser_main.c:1182
#: ../parser_main.c:1182 ../parser_main.c:1091
#, c-format
msgid "Can't create cache directory: %s\n"
msgstr ""
#: ../parser_main.c:1185
#: ../parser_main.c:1185 ../parser_main.c:1094
#, c-format
msgid "File in cache directory location: %s\n"
msgstr ""
#: ../parser_main.c:1188
#: ../parser_main.c:1188 ../parser_main.c:1097
#, c-format
msgid "Can't update cache directory: %s\n"
msgstr ""
@@ -594,11 +619,11 @@ msgstr ""
msgid "Internal error generated invalid DBus perm 0x%x\n"
msgstr ""
#: parser_yacc.y:575
#: parser_yacc.y:575 parser_yacc.y:621
msgid "deny prefix not allowed"
msgstr ""
#: parser_yacc.y:612
#: parser_yacc.y:612 parser_yacc.y:658
msgid "owner prefix not allowed"
msgstr ""
@@ -614,41 +639,41 @@ msgstr ""
msgid "owner prefix not allow on capability rules"
msgstr ""
#: parser_yacc.y:1357
#: parser_yacc.y:1357 parser_yacc.y:1613
#, c-format
msgid "invalid mount conditional %s%s"
msgstr ""
#: parser_yacc.y:1374
#: parser_yacc.y:1374 parser_yacc.y:1628
msgid "bad mount rule"
msgstr ""
#: parser_yacc.y:1381
#: parser_yacc.y:1381 parser_yacc.y:1635
msgid "mount point conditions not currently supported"
msgstr ""
#: parser_yacc.y:1398
#: parser_yacc.y:1398 parser_yacc.y:1650
#, c-format
msgid "invalid pivotroot conditional '%s'"
msgstr ""
#: ../parser_regex.c:241
#: ../parser_regex.c:241 ../parser_regex.c:236
#, c-format
msgid ""
"%s: Regex grouping error: Invalid close ], no matching open [ detected\n"
msgstr ""
#: ../parser_regex.c:257
#: ../parser_regex.c:257 ../parser_regex.c:256
#, c-format
msgid "%s: Regex grouping error: Exceeded maximum nesting of {}\n"
msgstr ""
#: ../parser_policy.c:366
#: ../parser_policy.c:366 ../parser_policy.c:339
#, c-format
msgid "ERROR processing policydb rules for profile %s, failed to load\n"
msgstr ""
#: ../parser_policy.c:396
#: ../parser_policy.c:396 ../parser_policy.c:369
#, c-format
msgid "ERROR replacing aliases for profile %s, failed to load\n"
msgstr ""

Some files were not shown because too many files have changed in this diff Show More