Commit graph

41 commits

Author SHA1 Message Date
Steve Beattie
abcd1f2975 This patch makes the parser's makefile honor CFLAGS that have been
exported in the environment. Without it, merely setting the CFLAGS
environment variable would not affect the compilation of the parser,
though it was still possible to override it by passing the variable
as an argument (e.g. make all CFLAGS="-Oinsane -Wextra-special").

It also makes the default CFLAGS for the parser consistent with
the default for the C++ dfa library, and passes the flags on to
the library.

An audit of the other bits of C showed that they either supported
CFLAGS during configure or were otherwise honoring CFLAGS when set
as environment variable.
2010-10-09 14:15:59 -07:00
John Johansen
b5c780d2a1 Remove pcre and update tests where necessary 2010-07-31 16:00:52 -07:00
Steve Beattie
4e039d07f3 - Break out make targets so that distributors that don't want full docs
can pick targets they want. Patch from Arkadiusz Miskiewicz <arekm at
  maven.pl>.

- Comment out debug dump of generate af_names.h
2010-03-16 15:18:55 -07:00
Steve Beattie
3b9b2158c1 Fix strict aliasing issue that triggered a bug in the parser_symtab unit
tests. I don't like the solution because it exposes a data structure
definition outside of the only file that should know it's layout.

Also, fixed the Makefile to fail the build when one of the unit test
programs fails. :-(
2010-03-12 14:41:58 -08:00
Kees Cook
4173f0a558 deal with socket types to ignore, handle backward compat for earlier AF_MAX value 2009-11-11 10:58:57 -08:00
Kees Cook
6fa3406b0e update more documentation, update Debian start-up script for LSB, flip logprof repo 2009-11-11 10:51:05 -08:00
Jamie Strandboge
b0ae3243d5 use bits/socket.h rather than linux/socket.h, fixing FTBFS with newer
kernels (ie >= 2.6.32)
2009-11-04 17:40:20 -06:00
Steve Beattie
b8cde97ab7 Bah, the whole using linux/socket.h get AF_* tokens versus sys/socket.h
thing again. Fix to use the kernel's definition of AF_MAX in
linux/socket.h if it's larger than glibc's AF_MAX definition in
sys/socket.h and add a wrapper function so that we don't have include
af_names.h everywhere.

Also, fix memory leaks around the handling of network entries of
policies.
2009-07-24 17:24:41 +00:00
John Johansen
0137b992b4 move -D_GNU_SOURCE to Makefile for parser_lex.l to gain it
Signed-Off-By: Kees Cook <kees.cook@canonical.com>
2009-07-24 07:33:39 +00:00
Steve Beattie
5a2b875b81 parser/Makefile:
* move network families to filter out into a separate variable to
   so that the list doesn't get lost in a complex sed invocation
 * pull out the actual macro definitions from linux/socket.h and use
   them if glibc's sys/socket.h (really bit/socket.h) hasn't caught up
   with the family definitions.
2009-06-10 19:20:51 +00:00
Steve Beattie
6cfcb1a823 Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Description: fix compile on build

Patch from Gentoo community:
  - fix up a couple of missing semicolons in syntax (bison compensates
    by emitting it's own)
  - Fix yet another variable tyop in rc.apparmor.functions
  - dump stderr of ls in rc.apparmor.functions to /dev/null
  - add an install-unknown make target
2008-11-18 17:33:38 +00:00
Steve Beattie
96e124bf8d Bah, the last commit message was wrong; it added support for mixing
alias rules and variable declarations within the preamble of a profile.

This commit adds another testcase for alias rules; one in which there is
an overlapping pair of aliases. The parser parses it, but based on -dd
output, I don't believe it's treating it properly.
2008-11-14 16:46:16 +00:00
Steve Beattie
b07ec7d81b - Add AF_ISDN to filtered list of AF tags
- Restructure filter sed script to be shorter
- Add a make check target which is equiv to make tests
2008-11-13 23:28:38 +00:00
John Johansen
84cd045d53 exclude AF_CAN for now 2008-05-26 10:22:56 +00:00
Steve Beattie
c0275d06eb Fix up some dependencies in parser_misc.c's unit test build. 2008-04-16 16:27:23 +00:00
Steve Beattie
e41a326ef5 Add a flag so that 'make check V=1' will turn on verbose output. 2008-04-16 16:09:36 +00:00
John Johansen
78590d1823 allow for simpe alias rules 2008-04-09 09:03:17 +00:00
John Johansen
50284e8aad autogenerate the capability names file 2007-11-16 09:32:38 +00:00
Steve Beattie
815c103488 lock mode bit tests from jjohansen@suse.de
Also, make 'check' toplevel target be an alias for 'tests'

Acked-By: Steve Beattie <steve@nxnw.org>
2007-10-01 06:12:26 +00:00
Dominic Reynolds
cfb52c03f8 Added AF_RXRPC to the list of ignored net families from socket.h that
are used in the generation of af_names.h.
2007-08-06 18:48:26 +00:00
Steve Beattie
2e46c37bf2 Patch from S.Çağlar Onur <caglar@pardus.org.tr>
Turkish has 4 letter "I"s. English has only two, a lowercase dotted i and an 
uppercase dotless I. Turkish has lowercase and uppercase forms of both dotted 
and dotless I. So tolower(I) != i and toupper(i) != I for us.

Althought this situation is not a apparmor bug (sed can't convert these
properly) its directly affected.  But these must locale independent. So
please apply following simple patch to solve this issue.

Acked-By: Steve Beattie <sbeattie@suse.de>
2007-08-02 15:19:36 +00:00
Steve Beattie
2737f6bc97 Patch by jjohansen@suse.de
Acked-By: Steve Beattie <sbeattie@suse.de>

Support for basic network mediation keywords.
2007-07-27 20:29:47 +00:00
Steve Beattie
42acd17489 Quiet techdoc build output when not building in verbose mode. 2007-05-15 20:02:15 +00:00
Steve Beattie
c8eb1e4c42 Move the techdoc to the apparmor-parser package. 2007-04-12 06:01:40 +00:00
John Johansen
cd79c1ac77 update copyright dates 2007-04-11 08:12:51 +00:00
Steve Beattie
feb167c51a Move some common manpage cleanup to common/Make.rules (and clean up
pod2html tmpfiles). Also mark manpages to be ignored by svn.
2007-04-03 20:12:16 +00:00
Steve Beattie
24606ec70b Subject: Add manpages to the parser package
Move the apparmor.d(5), apparmor(7), apparmor_parser(8),
subdomain.conf(5) and apparmor.vim(5) (for lack of a better location)
into the apparmor-parser package.
2007-04-03 19:04:10 +00:00
Steve Beattie
7a4b823826 Always traverse subdirs to determine whether things need to be rebuilt
or not.
2007-03-30 16:26:50 +00:00
Jesse Michael
bef39bbff8 Add an empty install-debian: target to keep the makefile from blowing up
when running on Debian/Ubuntu systems and also make the init script skip
*.dpkg-new files when loading profiles.
2007-03-30 16:09:50 +00:00
Steve Beattie
1afc2eee2b Add build dependency on g++ compiler
Pass on extra warning flags to pcre lib.
No need for recursive delete on the libstdc++ line.
2007-03-23 20:48:29 +00:00
John Johansen
f3ba454d8c Add dfa support to the parser 2007-02-27 02:29:16 +00:00
John Johansen
20dbc4d8cb fix miss break #240986. Back out partial commit of dfa matcher support (that was mistakenly submitted) 2007-02-01 21:45:39 +00:00
John Johansen
d1f8df2fa5 dfa patches for the parser 2007-02-01 20:18:50 +00:00
Steve Beattie
1ca1329522 Add an aaeventd initscript for redhat derived distros. 2007-01-18 04:55:53 +00:00
Steve Beattie
6b54cce437 This patch removes using the libcap-devel capability header, and only
uses the linux kernel definitions of them.

(It also adds to the simple capbilities regression tests verifying the
parser can parse the new audit capiability names.)
2006-11-08 10:59:09 +00:00
Steve Beattie
af33afe8f7 Convert the rest of the packages to symlinking in the common directory
so that 'make dist' will work.
2006-11-04 21:34:47 +00:00
Steve Beattie
34437da2a3 Eliminate obsolete /subdomain (#160020)
Also add some history to the changelog in the specfile, clean up some
whitespace issues, eliminate no longer needed bogus LC_MESSAGES dir to
work around SUSE autobuild, seems to have been addressed.
2006-10-12 18:36:43 +00:00
Steve Beattie
865b21c761 Two changes:
* patch from SUSE autobuild team to not strip binaries
* convert rpm release for the parser and mod_apparmor packages to
  correspond to the svn repository number.
2006-05-31 22:38:30 +00:00
Steve Beattie
dd2d41bae8 Make the build process significantly quieter with respect to the unit
and regression tests to avoid developer confusion.
2006-05-31 21:30:50 +00:00
Steve Beattie
6b0de8f6bc Update keywords attribute, svn:ignore attribute, update Makefile to
point to the new location of the common/ dir.
2006-04-12 03:09:10 +00:00
Steve Beattie
6d3e74907d Import the rest of the core functionality of the internal apparmor
development tree (trunk branch). From svn repo version 6381.
2006-04-11 21:52:54 +00:00