Commit graph

3168 commits

Author SHA1 Message Date
Steve Beattie
79fe4cbfb5 Merge updated parser translation template as well as other commits from
trunk.
2014-09-13 00:21:14 -07:00
Steve Beattie
ff1ae04853 Regenerate the parser's string translation template file. 2014-09-13 00:14:06 -07:00
Steve Beattie
3ca8bbe6a7 parser: make flags defintion consistent
In profile.h, flagvals is declared to be class, but then in the
Profile class, the flags field declares it as a struct. This patch
makes the field declaration type consistent.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-09-12 23:53:39 -07:00
Steve Beattie
b80559ab20 parser: fixup af_xxxx.o make dependencies
In trunk commit 2615, make targets for af_rule.o and af_unix.o were
added. Unfortunately, the af_rule.o target's dependency on rule.h was
missing the .h suffix. This patch fixes the issue and adds some other
headers that the source file are dependent on.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-09-12 23:51:26 -07:00
Launchpad Translations on behalf of apparmor-dev
8418703863 Launchpad automatic translations update. 2014-09-13 05:57:25 +00:00
Steve Beattie
b421cf7c1a Merge back in the German launchpad translations that got dropped due to
the last merge having a conflict.
2014-09-11 23:56:27 -07:00
Launchpad Translations on behalf of apparmor-dev
e67f6561c4 Launchpad automatic translations update. 2014-09-12 05:53:50 +00:00
Steve Beattie
cd539e0a21 Periodic merge from lp:apparmor (trunk). 2014-09-11 10:42:00 -07:00
Steve Beattie
b099168e6b Merge translation updates back from launchpad. 2014-09-11 10:35:47 -07:00
Launchpad Translations on behalf of apparmor-dev
298df16292 Launchpad automatic translations update. 2014-09-11 05:48:53 +00:00
Tyler Hicks
4d93599568 tests: Update dbus.inc for af_unix mediation
Put a bare unix rule in the core gendbusprofile() function that all
dbus_*.sh use. We aren't interested in testing AF_UNIX mediation in the
dbus tests, since that's already done elsewhere, so we'll
unconditionally allow full AF_UNIX access to prevent test breakage
caused by any future changes in libdbus.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-10 21:30:29 -05:00
Tyler Hicks
0371afa3fc tests: Update unix_fd_server.sh for af_unix mediation
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-10 21:30:27 -05:00
Tyler Hicks
2f85b775d3 tests: Update socketpair.sh for af_unix mediation
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-10 21:30:24 -05:00
Tyler Hicks
f2e4a44191 tests: Update deleted.sh for af_unix mediation
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-10 21:30:20 -05:00
Christian Boltz
47ec6707e5 fix syntax error
Pre-Acked-by: Steve Beattie <steve@nxnw.org>
2014-09-11 01:09:07 +02:00
Seth Arnold
d3bf71c20a intrigeri@boum.org 2014-09-10 audio abstraction: allow reading /etc/wildmidi/wildmidi.cfg.
Needed for at least pidgin.
2014-09-10 16:07:42 -07:00
intrigeri
c9bf33e17f audio abstraction: allow reading /etc/wildmidi/wildmidi.cfg. 2014-09-10 15:40:43 -07:00
Christian Boltz
40a829ef6b merge in some translations from old utils de.po
A side effect of not including utils/apparmor/*.py in the .pot file was
that some translations were lost. This patch includes backported (or
forward-ported?) translations from r2186. It's not a simple merge, I 
reviewed everything I merged and changed it if necessary.

I also removed the outdated 
    "Language-Team: Novell Language <language@novell.com>\n"


Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-11 00:10:03 +02:00
Steve Beattie
525451de43 Periodic merge from lp:apparmor (trunk). 2014-09-10 11:18:18 -07:00
Steve Beattie
251a8a9650 Regenerate the utils translation template (.pot) file, both to prepare
for the upcoming release and to compensate for the previous commit that
fixed an issue with missing translatable strings.
2014-09-10 11:15:56 -07:00
Steve Beattie
2f54f0d97a utils: search python modules for translatable strings
In the conversion from perl to python, it got overlooked to add the
python-apparmor modules to the set of things to search for translatable
strings in. This patch addresses the issue.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-10 11:13:59 -07:00
Seth Arnold
70119a81d8 The AppArmor parser failed to build on the x32 architecture due to a
missing <sys/sysctl.h> header. This header is included by accident, a
vestige of earlier days, and wasn't removed when the sysctls were removed.
(Think Linux 2.0 or Linux 2.2 days.)

See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760378

Thanks to Thorsten Glaser for the discovery and initial fix.
2014-09-10 10:28:00 -07:00
Steve Beattie
0e7c2e4296 Merge added Chechen po template and meta info updates from launchpad
translations branch.
2014-09-09 16:27:07 -07:00
Steve Beattie
4e7dbabd61 With 2.9 beta 2 released, prepare for possible beta 3. 2014-09-09 16:25:14 -07:00
Jamie Strandboge
63976b49d4 Miscellaneous updates for phpsysinfo on Ubuntu 14.10
Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-08 20:42:50 -05:00
Jamie Strandboge
575d75eca8 Update phpsysinfo instructions in usr.sbin.apache2. Incorporate feedback from
Simon Deziel.

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-08 20:39:34 -05:00
Christian Boltz
e9fbdbf74b abstractions/ruby: add /usr/local/ and vendor_ruby paths
The Debian and Ubuntu Ruby 1.9.1 package is configured like this:
--with-vendordir='/usr/lib/ruby/vendor_ruby' --with-sitedir='/usr/local/lib/site_ruby

These paths are missing in the ruby abstraction.

Patch by Felix Geyer <debfx@ubuntu.com>


Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-08 21:36:47 +02:00
Christian Boltz
3035660716 add missing --display to aa-notify.pod
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-08 20:40:33 +02:00
Christian Boltz
4985e50a41 Fix for commit trunk r2657:
> Allow dnsmasq read access to IPv6 config

The commit did not match this part of the commit message  
> slightly modified (../conf/**/mtu -> ../conf/*/mtu)
which I'm fixing now.
2014-09-08 20:35:31 +02:00
Kshitij Gupta
f63f08d79a Fix incorrect options being displayed for capabilites in aa.py
The following patch:
- ensures the options are passed correctly in the expected form.

Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-08 18:01:18 +05:30
John Johansen
e5528ff87b Remove unnecessary include of libintl.h
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-07 12:42:47 -07:00
Christian Boltz
ce8fbf63fd Allow dnsmasq read access to IPv6 config
The IPv6 Neighbor Discovery protocol (RFC 2461) suggests
implementations provide MTU in Router Advertisement (RA)
messages.  From section 4.2

MTU    SHOULD be sent on links that have a variable MTU
       (as specified in the document that describes how to
       run IP over the particular link type).  MAY be sent
       on other links.

dnsmasq supports this option and should have read access
to an interface's MTU.

Patch by James Fehlig <jfehlig@suse.com>


slightly modified (../conf/**/mtu -> ../conf/*/mtu)


Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-06 23:06:46 +02:00
Christian Boltz
6bc1b6ef43 replace copy_netrules_other with list(netrules_other[...]) in
delete_net_duplicates()

Also remove the now unused "import copy".

Acked-by: Kshitij Gupta <kgupta8592@gmail.com>.
2014-09-05 23:21:00 +02:00
Jamie Strandboge
bafb5ff2b4 The base abstraction for unix sockets uses peer=(addr=none) with getattr,
getopt, setopt and shutdown. This was added based on incorrect logging in early
iterations of the abstract kernel patches which have since been fixed. These
options don't make sense with peer=(addr=none), so drop that.

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-09-05 13:08:55 -05:00
Tyler Hicks
79698cdbfe tests: Update mkprofile.pl to accept unix rules
Example gen_unix() inputs and outputs:

  "unix:ALL" -> "  unix,\n"

  "unix:(create,bind,listen,accept):addr=@foo:peer=(label=bar)" ->
    "  unix (create,bind,listen accept) addr=@foo peer=(label=bar),\n"

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
2014-09-05 09:43:49 -05:00
Tyler Hicks
cdd23798bb tests: Add dbus tests for unrequested reply messages
Unrequested replies are message types that are typically replies, such
as error and method_return message types, but have not been requested by
the recipient.

The AppArmor mediation code in dbus-daemon allows requested reply
messages through if the original message was allowed. However,
unrequested reply messages should be checked against the system policy
to make certain that they should be allowed.

This test verifies that the dbus-daemon is properly querying system
policy when it detects that a message is an unrequested reply.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-05 09:43:05 -05:00
John Johansen
2259857281 parser: Fix the permission encoding output of getopt/setopt
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
2014-09-04 12:40:47 -07:00
Steve Beattie
c2f7e5ff80 bison grammers: use pure.api directive instead of pure-parser variants
This patch adjusts the bison grammer in libapparmor and the parser
to use the %define api.pure directive instead of the deprecated
%pure_parser and %pure-parser keywords.  Bison had been warning about
the former:

  libraries/libapparmor/src/grammar.y:71.1-12: warning: deprecated directive, use ‘%pure-parser’ [-Wdeprecated]
  %pure_parser
  ^^^^^^^^^^^^

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-04 11:37:33 -07:00
Jamie Strandboge
5bd93faf73 man page updates for abstract, anonymous and netlink sockets
- fix typo
- fix whitespace
- add netlink
- update for change from path to addr
- remove TODO items
- add and document examples
- remove undocumented 'unix server addr=@foo,' example

Signed-off-by: Jamie Strandboge <jamie@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-04 10:53:13 -07:00
Steve Beattie
d99222b1b9 libaalogparse: support missing mount keywords
This patch adds support for the mount and pivotroot related keywords,
fstype, flags, and srcname.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-04 10:10:56 -07:00
Steve Beattie
4dd76b704e libaalogparse: add signal and peer keyword support
When signals and ptrace mediation were added to apparmor, the aalogparse
routines were not adjusted to compensate. This patch adds support for
the signal and peer keywords.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-04 09:57:32 -07:00
Steve Beattie
049cb96106 libaalogparse: fix for new kernel dmesg format
The upstream kernel at some point between the 3.13 and 3.16 kernel
adjusted the output of audit messages to include an additional "audit:"
keyword. e.g. a 3.13 message would look like:

  kernel: [182243.243324] type=1400 audit(1409684003.960:273342): [SNIP]

whereas in 3.16, it looks like:

  kernel: [182243.243324] audit: type=1400 audit(1409684003.960:273342): [SNIP]
                          ^^^^^^

This patch adjust the libapparmor aalogparse grammar and lexer to
compensate for this change.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-04 09:51:18 -07:00
Christian Boltz
826e9d998b fix "dictionary changed size during iteration" in cleanprof.py
delete_net_duplicates()

Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-09-04 13:19:39 +02:00
Steve Beattie
3a5106527c utils tests: restructure signal parse tests
Convert the signal parse tests to use common AAParseTest super class in
common_test.py.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-03 18:36:11 -07:00
Steve Beattie
b05cc0f36f utils tests: restructure ptrace parse tests
Convert the ptrace parse tests to use common AAParseTest super class
in common_test.py.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-03 18:32:59 -07:00
Steve Beattie
e8d7dcd321 utils tests: restructure pivotroot parse tests
Convert the pivotroot parse tests to use common AAParseTest super
class in common_test.py.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-03 18:31:09 -07:00
Steve Beattie
37adff769c utils tests: restructure mount parse tests
Convert the mount parse tests to use common AAParseTest super class in
common_test.py.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-03 18:28:18 -07:00
Steve Beattie
59b5b8bab6 Subject: utils tests: restructure DBUS parse tests
Convert the DBUS parse tests to use common AAParseTest super class in
common_test.py.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-03 18:26:19 -07:00
Steve Beattie
365b6d603c utils tests: restructure Unix Parse tests
This patch abstracts out parse tests into a super class to inherit from
and converts the af_unix parse tests to use the super class.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-03 18:24:57 -07:00
Steve Beattie
74da13e7a3 utils: convert raw rules classes to subclass from _Raw_Rule
The patch that adds support for af_unix rules added a _Raw_Rule base
class to inherit from in rules.py. This patch converts the rest of the
raw rules classes to use the same.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-03 18:23:38 -07:00