Tests abstract UNIX domain sockets with various combinations of implied
permissions, explicit permissions, and conditionals. It also tests with
bad permissions and conditionals.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket.sh | 176 ---
1 file
ned-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket.sh | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/tests/regression/apparmor/unix_socket.sh
b/tests/regression/apparmor/unix_socket.sh
index 10fa59d..8fd70dd 100755
--- a/tests/regression/apparmor/unix
: Tyler Hicks
---
tests/regression/apparmor/unix_socket.c| 43 +++---
tests/regression/apparmor/unix_socket.sh | 13 +---
tests/regression/apparmor/unix_socket_client.c | 34
3 files changed, 75 insertions(+), 15 deletions(-)
diff --git a
This patch set creates regression tests for abstract and unnamed UNIX
domain sockets for the soon-to-land AppArmor unix rule type. It does
this by modifying tests/regression/apparmor/unix_socket{.sh,c,_client.c}.
In hindsight, I think it was a good idea to put all of the logic needed
for pathname,
.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket.sh | 90 +---
1 file changed, 35 insertions(+), 55 deletions(-)
diff --git a/tests/regression/apparmor/unix_socket.sh
b/tests/regression/apparmor/unix_socket.sh
index 3d70886..b4fd59d 100755
--- a
Update the test server program to use socketpair() and pass the socket
fd to the client program.
Make the test script aware of the special "none" keyword for unnamed
UNIX domain sockets.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket.c
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
---
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_fd_server.sh | 27 ---
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/tests/regression/apparmor/unix_fd_server.sh
b/tests/regression/apparmor/unix_fd_server.sh
index 6bc5158..b38ec68 100755
ture changes in libdbus.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/dbus.inc | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/regression/apparmor/dbus.inc
b/tests/regression/apparmor/dbus.inc
index 539d128..038ccf2 100755
--- a/tests/regression/apparmor/dbus.inc
+++ b/t
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/socketpair.sh | 39 -
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/tests/regression/apparmor/socketpair.sh
b/tests/regression/apparmor/socketpair.sh
index 8af3be2..802657c 100755
--- a
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/deleted.sh | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/regression/apparmor/deleted.sh
b/tests/regression/apparmor/deleted.sh
index a058b39..84a51fc 100755
--- a/tests/regression/apparmor
On 2014-08-28 14:07:48, Seth Arnold wrote:
> On Thu, Aug 28, 2014 at 02:41:21AM -0500, Tyler Hicks wrote:
> > 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.
On 2014-09-05 09:25:03, John Johansen wrote:
> Do not output local permissions for rules that have peer_conditionals
>
> while it is not possible to specify a rule with local conditionals with
> peer conditionals
> eg.
>unix listen peer=(addr=@foo),
>
> a rule such as
>unix peer=(addr=@fo
On 2014-09-05 10:36:32, John Johansen wrote:
> On 09/05/2014 10:23 AM, Tyler Hicks wrote:
> > On 2014-09-05 09:25:03, John Johansen wrote:
> >> Do not output local permissions for rules that have peer_conditionals
> >>
> >> while it is not possible to specify
On 2014-09-10 18:31:27, Seth Arnold wrote:
> On Thu, Sep 04, 2014 at 05:43:22PM -0500, Tyler Hicks wrote:
> > Signed-off-by: Tyler Hicks
>
> Acked-by: Seth Arnold
Thanks!
>
> Is the 'getopt' permission in af_unix_create still necessary?
It is. The serve
On 2014-09-10 18:53:27, Seth Arnold wrote:
> On Thu, Sep 04, 2014 at 05:43:23PM -0500, Tyler Hicks wrote:
> > Signed-off-by: Tyler Hicks
>
> Acked-by: Seth Arnold
Thanks again!
>
> Though I noticed that the unix:create is being passed along to the
> -> confined
describe the two sets
of socket permissions and fixes an example rule that resulted in a
parser error after the change described above.
Signed-off-by: Tyler Hicks
---
parser/af_unix.cc | 8 ++--
parser/apparmor.d.pod | 17 +
2 files changed, 11 insertions(+), 14 deletions
having each address type be tested in their own file.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket.sh | 171 --
tests/regression/apparmor/unix_socket_pathname.sh | 129
2 files changed, 129 insertions(+), 171 deletions
.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket.c| 13 +++--
tests/regression/apparmor/unix_socket_client.c | 13 +++--
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/tests/regression/apparmor/unix_socket.c
b/tests/regression
: Tyler Hicks
Acked-by: Seth Arnold
---
tests/regression/apparmor/unix_socket.c | 43 +--
tests/regression/apparmor/unix_socket_client.c| 34 ++
tests/regression/apparmor/unix_socket_pathname.sh | 4 ++-
3 files changed, 69 insertions(+), 12
Use the sendto()/recvfrom() functions when dealing with dgram sockets in
unix_socket_client.
This allows us to test different interfaces besides the typical
write()/read() and will allow for a smaller permissions set for
unix_socket_client.
Signed-off-by: Tyler Hicks
---
tests/regression
The server will now do a shutdown() on its socket in order to test the
AppArmor 'shutdown' unix rule permission.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tests/regression/apparmor/unix_socket.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/regression/apparmor/unix_socket.c
b/tests/regression/apparmor/unix_socket.c
index b6dc0dd..3d86225 100644
--- a/tests/regression/apparmor
Tests abstract UNIX domain sockets with various combinations of implied
permissions, explicit permissions, and conditionals. It also tests with
bad permissions and conditionals.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket.c | 89 +-
tests
ned-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket_pathname.sh | 40 ++-
1 file changed, 32 insertions(+), 8 deletions(-)
diff --git a/tests/regression/apparmor/unix_socket_pathname.sh
b/tests/regression/apparmor/unix_socket_pathname.sh
index b6f6b69..45d74b9 10
Tests abstract UNIX domain sockets with various combinations of implied
permissions, explicit permissions, and conditionals. It also tests with
bad permissions and conditionals.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket.inc | 179 ++
tests
The client will now do a getsockname() on its socket in order to test
the AppArmor 'getattr' unix rule permission.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket_client.c| 19 +++
tests/regression/apparmor/unix_socket_pathname.sh | 3 ++
string ".client" will be added to the end of the server's address.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket_client.c| 29 ++--
tests/regression/apparmor/unix_socket_pathname.sh | 40 +--
2 files changed, 49 insertions(+
On 2014-09-15 22:47:50, Christian Boltz wrote:
> Hello,
>
> Am Montag, 15. September 2014 schrieb Tyler Hicks:
> > +applies to the combination of a local and peer socket. It is required
> > +that create, bind, listen, shutdown, getattr, setattr, getopt, and
> > +
describe the two sets
of socket permissions and fixes an example rule that resulted in a
parser error after the change described above.
Signed-off-by: Tyler Hicks
---
* Changes from v1
- Rewrote the blurb in apparmor.d.pod
+ Define the 3 sets of permissions (local, peer, and combination) to
On 2014-09-16 16:52:12, Steve Beattie wrote:
> On Mon, Sep 15, 2014 at 02:55:59PM -0500, Tyler Hicks wrote:
> > The unix_socket_client test program was using an abstract socket, which
> > was set up using the autobind feature, when testing any socket address
> > types.
> &
additional tests that
> are expected to fail when they are not present, to try to ensure that
> if our crosscheck behavior changes, we catch it.
>
> Signed-off-by: Steve Beattie
Acked-by: Tyler Hicks
Thanks!
> ---
> tests/regression/apparmor/socketpair.sh | 27 ++
socket. Which may indeed be the
> behavior if we wish to enforce that the socket was created in another
> process and passed in. Is this what we want to do?
>
> Signed-off-by: John Johansen
Acked-by: Tyler Hicks
I've been testing this patch quite a bit, too.
I'm going to
On 2014-09-21 04:04:48, John Johansen wrote:
> On 09/19/2014 06:48 PM, Seth Arnold wrote:
> > On Fri, Sep 19, 2014 at 01:48:09PM -0700, John Johansen wrote:
> >> On 09/19/2014 12:37 PM, John Johansen wrote:
> >>
> >> fix: if the apparmor parser fails to load the cache try rebuilding
> >>
> >> v2. C
test
policy to test setopt without an addr= conditional and to test getopt
with an addr= conditional.
Additionally, the wrapper functions that call setsockopt()/getsockopt()
are moved into a new file that both unix_socket.c and
unix_socket_client.c can reuse.
Signed-off-by: Tyler Hicks
---
* New
Use the sendto()/recvfrom() functions when dealing with dgram sockets in
unix_socket_client.
This allows us to test different interfaces besides the typical
write()/read() and will allow for a smaller permissions set for
unix_socket_client.
Signed-off-by: Tyler Hicks
---
* No changes since v2
The server will now do a shutdown() on its socket in order to test the
AppArmor 'shutdown' unix rule permission.
Signed-off-by: Tyler Hicks
---
* No changes since v2
tests/regression/apparmor/unix_socket.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tests/regressio
Tests abstract UNIX domain sockets with various combinations of implied
permissions, explicit permissions, and conditionals. It also tests with
bad permissions and conditionals.
Signed-off-by: Tyler Hicks
---
* Changes since v2:
- Added unix_socket_unnamed to the TESTS variable in the
unnamed AF_UNIX socket
mediation. The do_test() function is conditionalized in a way that it
can test confined servers and confined clients depending on the
arguments passed in.
Signed-off-by: Tyler Hicks
---
* Changes since v2:
- Added unix_socket_abstract to the TESTS variable in the
I've committed the v2 patches that received acks. This v3 patch set
contains the remaining patches that have not yet received acks plus a
new patch (PATCH 5/7).
--
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/apparm
string ".client" will be added to the end of the server's address.
Signed-off-by: Tyler Hicks
---
* Changes since v2:
- Added missing $client_sockpath argument to a removesockets() call
+ Found by sbeattie's last review
tests/regression/apparmor/unix_soc
The client will now do a getsockname() on its socket in order to test
the AppArmor 'getattr' unix rule permission.
Signed-off-by: Tyler Hicks
---
* No changes since v2
tests/regression/apparmor/unix_socket_client.c| 19 +++
tests/regression/apparmor/unix_socket_p
On 2014-09-24 11:32:33, John Johansen wrote:
> Fix: Parser error when using regex profile names in IPC rules
>
> BugLink: http://bugs.launchpad.net/bugs/1373085
>
> The parser fails to accept certain characters, even when escaped or quoted
> as part of the profile or label name in ipc rules. This
On 2014-09-24 15:00:27, Tyler Hicks wrote:
> On 2014-09-24 11:32:33, John Johansen wrote:
> > Fix: Parser error when using regex profile names in IPC rules
> >
> > BugLink: http://bugs.launchpad.net/bugs/1373085
> >
> > The parser fails to accept certain charac
The client and server programs require a different set of AF_UNIX
permissions. This patch makes it so that the unix rules are constructed
differently depending on the program under test.
Signed-off-by: Tyler Hicks
---
* New patch to address feedback from sbeattie
tests/regression/apparmor
Iterate through the individual client and server AF_UNIX pathname
permissions and remove them, one-by-one, to verify that the test fails.
Signed-off-by: Tyler Hicks
---
* New patch to address feedback from sbeattie
tests/regression/apparmor/unix_socket_pathname.sh | 23
On 2014-09-25 03:19:08, Steve Beattie wrote:
> On Mon, Sep 22, 2014 at 07:09:14PM -0500, Tyler Hicks wrote:
> > The client will now do a getsockname() on its socket in order to test
> > the AppArmor 'getattr' unix rule permission.
> >
> > Signed-off-by: Tyle
filesystem path. The getopt
permission is one of those socket operations.
To account for this lack of mediation, the getopt permission should be
removed from the server permissions list.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/unix_socket_pathname.sh | 2 +-
1 file changed, 1
On 2014-09-30 11:36:55, John Johansen wrote:
> On 09/30/2014 10:28 AM, Steve Beattie wrote:
> > On Wed, Sep 24, 2014 at 04:00:12PM -0700, Seth Arnold wrote:
> >> On Wed, Sep 24, 2014 at 03:45:46PM -0700, Steve Beattie wrote:
> >>> Not at all. Honestly, my preferences are:
> >>>
> >>> 1) __unused —
On 2014-10-02 05:07:40, Steve Beattie wrote:
> On Wed, Oct 01, 2014 at 09:59:43AM -0700, Steve Beattie wrote:
> > On Tue, Sep 30, 2014 at 11:36:55AM -0700, John Johansen wrote:
> > > What do people think about using just the bare word?
> > > unused
> >
> > I'm fine with either the bare word or C
On 2014-10-07 20:19:15, Christian Boltz wrote:
> Hello,
>
> YaST still uses AppArmor.pm, and now errors out when starting the
> profile editor because it doesn't know about signal, unix, ptrace and
> dbus rules.
>
> This patch adds basic support for those rules to AppArmor.pm by adding
> them
is given as only
> the confining profile (the stream and seqpacket dgram tests/permissions
> don't seem to trigger this revalidation rejection).
>
> Until this bug is diagnosed and addressed, mark these tests as failing
> but expected to pass (i.e. 'xpass').
>
>
sible reminder is probably for the best.
>
> [0] The test infrastructure does give an alert if there is a test that
> has been marked xpass or xfail but has started behaving correctly.
>
> Signed-off-by: Steve Beattie
This seems like a good idea to me.
Acked-by: Tyler
On 2014-10-20 12:25:42, John Johansen wrote:
> Document the ability for apparmor_parser to load profiles from a dir
>
> Update the apparmor_parser documentation for the new ability to load
> profiles from a specified directory.
>
> Signed-off-by: John Johansen
Acked-by: T
error because LSMs must be
built-in and SECURITY_APPARMOR and SECURITY_APPARMOR_HASH are both
bools.
Selecting CRYPTO solves the problem by enforcing that the crypto
subsystem and the SHA-1 code are built-in when
CONFIG_SECURITY_APPARMOR_HASH is selected.
Signed-off-by: Tyler Hicks
---
security
On 2014-10-23 11:50:28, Seth Arnold wrote:
> On Thu, Oct 23, 2014 at 11:21:22AM -0400, Tyler Hicks wrote:
> > The AppArmor profile hashing feature, configured by
> > CONFIG_SECURITY_APPARMOR_HASH, uses SHA-1 as the hashing algorithm and
> > selects CRYPTO_SHA1. However, b
; Signed-off-by: John Johansen
Looks good!
Acked-by: Tyler Hicks
Tyler
> ---
> security/apparmor/include/apparmor.h | 1 +
> security/apparmor/lsm.c | 4
> security/apparmor/policy_unpack.c| 5 +++--
> 3 files changed, 8 insertions(+), 2 deletions(-)
>
&
On 2014-10-23 12:35:29, John Johansen wrote:
> From e81978b2341136b8abdd3669f011c053309a5129 Mon Sep 17 00:00:00 2001
> From: John Johansen
> Date: Thu, 23 Oct 2014 12:33:08 -0400
> Subject: [PATCH] apparmor: add parameter to control whether policy hashing is
> used
>
> v2. Add kconfig option to
.
Signed-off-by: Tyler Hicks
---
tests/regression/apparmor/ptrace_v6.inc | 9 +
1 file changed, 9 insertions(+)
diff --git a/tests/regression/apparmor/ptrace_v6.inc
b/tests/regression/apparmor/ptrace_v6.inc
index d691b4e..3778155 100644
--- a/tests/regression/apparmor/ptrace_v6.inc
On 2014-11-07 17:52:19, Christian Boltz wrote:
> Hello,
>
> now that the severity tests are part of make coverage, we should extend
> the dependencies to the files needed by test-severity.py.
>
> Another (easier) option would be to use
> .coverage: $(wildcard ../aa-* ../apparmor/*.py *)
>
>
There's no need to date ourselves.
Signed-off-by: Tyler Hicks
---
libraries/libapparmor/m4/ac_pod2man.m4 | 5 -
1 file changed, 5 deletions(-)
diff --git a/libraries/libapparmor/m4/ac_pod2man.m4
b/libraries/libapparmor/m4/ac_pod2man.m4
index 45ab82c..98eea70 100644
--- a/libr
Modify the build instructions and project requirements to reflect the
utils rewrite from Perl to Python.
Signed-off-by: Tyler Hicks
---
README | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/README b/README
index 83dec86..b8e1303 100644
--- a/README
+++ b
The rewrite of the utils from Perl to Python allows us to update the
libapparmor build system and the README to not require the libapparmor Perl
wrapper.
This patch set updates the libapparmor autoconf tooling to not require
--with-perl to build the man pages. This means that Perl is still require
The configure script fails if pod2man isn't available since PROG_POD2MAN
is called unconditionally so it is safe to split man page generation out
of the --with-perl configure option.
Signed-off-by: Tyler Hicks
---
libraries/libapparmor/doc/Makefile.am | 5 -
1 file changed, 5 dele
Signed-off-by: Tyler Hicks
---
libraries/libapparmor/configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libraries/libapparmor/configure.ac
b/libraries/libapparmor/configure.ac
index 1a317ce..27c0c55 100644
--- a/libraries/libapparmor/configure.ac
+++ b
Point to the site for Perl the language and not Perl news.
Signed-off-by: Tyler Hicks
---
libraries/libapparmor/m4/ac_pod2man.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libraries/libapparmor/m4/ac_pod2man.m4
b/libraries/libapparmor/m4/ac_pod2man.m4
index 98eea70
Fail the configure stage if podchecker is not available since man page
generation always happens.
Signed-off-by: Tyler Hicks
---
libraries/libapparmor/configure.ac| 3 +++
libraries/libapparmor/m4/ac_podchecker.m4 | 11 +++
2 files changed, 14 insertions(+)
create mode 100644
On 2014-11-17 14:33:38, Steve Beattie wrote:
> On Mon, Nov 17, 2014 at 03:05:19PM -0600, Tyler Hicks wrote:
> > Fail the configure stage if podchecker is not available since man page
> > generation always happens.
>
> I think I disagree with this patch and the first patch.
This patch adds the --enable-man-pages option, defaulting to "yes", to
libapparmor's configure stage so that libapparmor can be built on
systems lacking Perl.
Signed-off-by: Tyler Hicks
---
libraries/libapparmor/configure.ac| 19 ++-
libraries/libapparmor/
On 2014-11-18 00:56:31, Christian Boltz wrote:
> Hello,
>
> Am Montag, 17. November 2014 schrieb Tyler Hicks:
> > Modify the build instructions and project requirements to reflect the
> > utils rewrite from Perl to Python.
>
> > --- a/README
> > +++ b/README
&
Modify the build instructions and project requirements to reflect the
utils rewrite from Perl to Python.
Signed-off-by: Tyler Hicks
---
* Changes since v1:
- Recommend --with-perl since some tools still use the Perl
libapparmor wrapper
- Leave a mention of Perl in 'Required ve
From: John Johansen
Signed-off-by: John Johansen
[tyhicks: Don't move globals in favor of lifting those out later]
Signed-off-by: Tyler Hicks
---
parser/Makefile | 14 +++--
parser/parser.h | 16 +-
parser/parser_lex.l | 1 +
parser/parser_main.c
option, and that
the cache file timestamp is set first so that we can output
a deug message for each file that causes a cache check failure.
Signed-off-by: John Johansen
[tyhicks: Forward ported to trunk and minor cleanups]
Signed-off-by: Tyler Hicks
---
parser/parser.h | 2 +-
parser
directory will soon be two different paths. The cache location will
typically be the parent of the cache directory.
Signed-off-by: Tyler Hicks
---
parser/parser_main.c | 37 +
parser/policy_cache.c | 30 ++
parser/policy_cache.h | 5
From: John Johansen
While some of these allocations will go away as we convert to C++,
some of these need to stay C as the are going to be moved into a
library to support loading cache from init daemons etc.
For the bits that will eventually be C++ this helps clean things up,
in the interim.
TO
From: John Johansen
While some of these allocations will go away as we convert to C++,
some of these need to stay C as the are going to be moved into a
library to support loading cache from init daemons etc.
For the bits that will eventually be C++ this helps clean things up,
in the interim.
TO
From: John Johansen
Signed-off-by: John Johansen
---
parser/parser_main.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/parser/parser_main.c b/parser/parser_main.c
index 58456e4..091eaa5 100644
--- a/parser/parser_main.c
+++ b/parser/parser_main.c
@@ -964,8 +964
In addition, define MATCH_STRING_SIZE macro instead of using a magic
number.
Signed-off-by: Tyler Hicks
---
parser/Makefile | 10 +++---
parser/features.c| 19 ---
parser/features.h| 1 -
parser/match.c | 46
path.
The return value is changed to an int so an error code can be returned
instead of using exit().
Signed-off-by: Tyler Hicks
---
parser/parser_main.c | 17 +
parser/policy_cache.c | 30 +++---
parser/policy_cache.h | 2 +-
3 files changed, 25 inserti
apparmorfs.
A temporary convenience function, aa_features_get_string(), is provided
while code that uses aa_features is migrated from expecting raw features
string access to something more abstract. The function will be removed
in an upcoming patch.
Signed-off-by: Tyler Hicks
---
parser/features.c
functions static]
Signed-off-by: Tyler Hicks
---
parser/Makefile | 12 ++-
parser/kernel_interface.c | 206 ++
parser/kernel_interface.h | 25 ++
parser/lib.c | 2 +-
parser/lib.h | 2 +-
parser
This patch set is the precursor to moving the cache loading code into
libapparmor. It sets up a clean, supportable interface for external
programs to interact with match files, feature files, the policy cache,
and the kernel interface (apparmorfs). It doesn't provide an API for
individual binary ca
From: John Johansen
Signed-off-by: John Johansen
[tyhicks: Forward ported patch to trunk]
Signed-off-by: Tyler Hicks
---
parser/parser_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parser/parser_main.c b/parser/parser_main.c
index c7f8f33..7ef74e7 100644
--- a
These operations will be used for grabbing and releasing references to
objects. They leverage the GCC builtins for atomic operations.
Signed-off-by: Tyler Hicks
---
parser/lib.c | 10 ++
parser/lib.h | 3 +++
2 files changed, 13 insertions(+)
diff --git a/parser/lib.c b/parser/lib.c
This keeps us from having to use the force_clear_cache global in
policy_cache.c.
Signed-off-by: Tyler Hicks
---
parser/parser_main.c | 10 ++
parser/policy_cache.c | 3 ---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/parser/parser_main.c b/parser/parser_main.c
This patch moves the logic that sets up the policy into a new function
in policy_cache.c
Signed-off-by: Tyler Hicks
---
parser/Makefile | 2 +-
parser/parser_main.c | 48 ++--
parser/policy_cache.c | 49
From: John Johansen
Signed-off-by: John Johansen
[tyhicks: Forward ported patch to trunk]
[tyhicks: Don't move set_supported_features()]
Signed-off-by: Tyler Hicks
---
parser/Makefile | 8 ++-
parser/features.c| 196 +++
p
e ref count hits zero, all
allocated memory is freed. Like with free(), aa_match_unref() can be
called with a NULL pointer for convenience.
A set of aa_match_supports_*() functions are added for checking the
features represented by a match file.
Signed-off-by: Tyler Hicks
---
parser/match.c
o snprintf().
Signed-off-by: Tyler Hicks
---
parser/features.c | 45 +++--
1 file changed, 23 insertions(+), 22 deletions(-)
diff --git a/parser/features.c b/parser/features.c
index 1464ac5..5f43c44 100644
--- a/parser/features.c
+++ b/parser/features.c
@@ -4
From: John Johansen
Signed-off-by: John Johansen
[tyhicks: Fixed build failures]
[tyhicks: Fixed bug where a warning was being printed when it shouldn't]
[tyhicks: Forward ported to trunk]
Signed-off-by: Tyler Hicks
---
parser/parser.h | 6 ++--
parser/parser_interface.c
__sd_serialize_profile() had a duplicated implementation for writing to
apparmorfs interface files after a profile compilation. This patch
migrates it to the new aa_kernel_interface API.
Signed-off-by: Tyler Hicks
---
parser/parser_interface.c | 56
This option adds unneeded complexity to the parser CLI and the upcoming
aa_policy_cache API. Get rid of it and simply create the cache dir if
--write-cache is specified.
Signed-off-by: Tyler Hicks
---
parser/parser_main.c | 6 --
parser/policy_cache.c | 2 +-
2 files changed, 5 insertions
From: John Johansen
Signed-off-by: John Johansen
[tyhicks: Forward ported patch to trunk]
[tyhicks: remove commented out code]
Signed-off-by: Tyler Hicks
---
parser/kernel_interface.c | 23 +++
parser/kernel_interface.h | 1 +
parser/parser_interface.c | 46
This may be useful for something like an init daemon that simply wants
to load all cached binaries without worrying about any sort of policy
compilation.
Signed-off-by: Tyler Hicks
---
parser/policy_cache.c | 61 +++
parser/policy_cache.h | 3
isted() is
moved into libapparmor.
The purpose of a private libapparmor API is to prevent duplicated code
between the parser and libapparmor. This becomes an issue as we prepare
to move chunks of the parser into libapparmor.
Signed-off-by: Tyler Hicks
---
libraries/libapparmor/include/sys/M
This is done in preparation for moving the features code to a library.
Signed-off-by: Tyler Hicks
---
parser/features.c | 33 +++--
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/parser/features.c b/parser/features.c
index 5f43c44..f3bdcd0 100644
This function allows for a policy cache to be removed without having a
previously instatiated aa_policy_cache object. It simply works off of a
path.
Signed-off-by: Tyler Hicks
---
parser/parser_main.c | 2 +-
parser/policy_cache.c | 18 --
parser/policy_cache.h | 2 +-
3
o be
discovered once instead of during every policy load.
Signed-off-by: Tyler Hicks
---
parser/kernel_interface.c | 183 +++---
parser/kernel_interface.h | 32 ++--
parser/parser.h | 12 ++-
parser/parser_common.c| 1 -
parser/pars
Defines a set of functions that can be called to test features support.
The use of global variables in the parser to store and check features
support is still preserved. The parser should probably move over to
passing the aa_features object around but that's left for later.
Signed-off-by:
s file doesn't match the kernel features file), then a new
aa_policy_cache object is still created but a call to
aa_policy_cache_is_valid() will return false. The caller can then decide
what to do (create a new valid cache, stop, etc.)
Signed-off-by: Tyler Hicks
---
parser/parser_main.c |
1 - 100 of 963 matches
Mail list logo