Commit graph

155 commits

Author SHA1 Message Date
Steve Beattie
461d9c2294
treewide: spelling/typo fixes in comments and docs
With the exception of the documentation fixes, these should all be
invisible to users.

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/687
2020-12-01 12:47:11 -08:00
John Johansen
b32501003a pam_apparmor: fix unused parameter warnings
Tag unused parameters so the -Wunused-parameter won't complain about
them.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/561
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2020-06-03 16:29:40 -07:00
John Johansen
1305dfcecf mod_apparmor: fix unused parameter warnings
Tag unused parameters so the -Wunused-parameter won't complain about
them.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/561
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2020-06-03 16:29:36 -07:00
Steve Beattie
e093815ab1
build: add and use global EXTRA_WARNINGS from common/Make.rules
Define EXTRA_WARNINGS in the common/Make.rules helper so that adding
additional warnings can be done in one(-ish) location, and replace
locally defined C compiler warning flags with EXTRA_WARNINGS in most
locations in the build tree.

v2: issue a warning for any compiler option that the compiler does not
    support

Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2020-05-28 16:55:50 -07:00
Steve Beattie
5250ca079d
C Makefiles: make C warning flag usage consistent
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/549
2020-05-28 09:24:56 -07:00
John Johansen
c386d93581 docs: update documentation to point bug reporting to gitlab
Move suggested bug reporting from launchpad to gitlab

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve.beattie@canonical.com>
2020-05-05 00:10:53 -07:00
John Johansen
94ff870f78 remove subdomainfs support
It has been over 10 years since transition from subdomainfs to
using securityfs. Lets drop this deprecated code.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/258
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: seth.arnold@canonical.com
2018-11-08 18:23:21 -08:00
Tyler Hicks
eb8975e0cc all: Use HTTPS links for apparmor.net
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2018-09-13 16:41:32 +00:00
intrigeri
6ab19ea82f Install pam_apparmor.so with write permission for its owner.
I could not find the reason why the upstream Makefile has been installing it
with permissions 555: this predates the migration from SVN.

Regardless, at least on Debian and derivatives, dh_fixperms has been
changing these permissions to 755 forever so it was causing problems,
likely we would know about it by now.

The initial motivation for this change is supporting rootless builds on Debian
and derivatives, also known as "Rules-Requires-Root:  no":

 - /usr/share/doc/dpkg-dev/rootless-builds.txt* on a Debian system
   with a sufficiently recent dpkg-dev installed
 - https://nthykier.wordpress.com/2017/10/29/building-packages-without-fakeroot/
 - https://lists.debian.org/debian-devel/2017/10/msg00520.html

With this change applied upstream, Debian-based downstreams don't need to adjust
their debian/rules to make this work with "Rules-Requires-Root: no":

	chrpath -d $(CURDIR)/debian/tmp/lib/security/pam_apparmor.so
2018-01-19 08:22:35 +00:00
Tyler Hicks
19c6c3310b all: Use the MAKE variable
https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html

We should be using the $(MAKE) variable when calling the make command
from Makefiles since we use Makefile recursion.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2017-11-01 23:22:53 +00:00
Kees Cook
f5384469b5 pass LDFLAGS fully into build
Acked-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2017-01-19 23:04:34 +00:00
Steve Beattie
106396289a build: make documentation at tarball creation time, not during build
The latex based techdoc in the parser/ tree adds a number of build
dependencies for downstreams to create it; it also is the primary
element to make the builds unrepeatable. Creating the techdoc and other
documentation when generating a tarball for distribution avoids all
that.

* Makefile: build documentation as part of the tarball creation. Skip
  the libraries/libapparmor directory as it needs to have configure run
  before the manpages can be made.
* changehat/mod_apparmor/Makefile, changehat/mod_apparmor/Makefile,
  utils/Makefile, profiles/Makefile: create separate docs target,
  some of them dummies.
* parser/Makefile: pull the techdoc out of the default build target, add
  an extra_docs target to create it.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2016-12-10 10:25:31 -08:00
intrigeri
4536281a90 mod_apparmor manpage: fix "documenation" typo. 2016-06-24 09:10:15 +02:00
Tyler Hicks
195dfe1cf2 pam_apparmor: Don't leak /dev/urandom fd
If reading /dev/urandom failed, the corresponding file descriptor was
leaked through the error path.

Coverity CID #56012

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
2016-02-01 10:34:18 -06:00
Felix Geyer
95cbbe32e0 Respect $CPPFLAGS
Some parts of the AppArmor build system don't respect $CPPFLAGS.
The attached patch fixes this.

Acked-by: Steve Beattie <steve@nxnw.org>
2015-06-10 12:36:15 -07:00
Tyler Hicks
011777f483 mod_apparmor: Update code to correctly use the terms context and label
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2015-02-09 18:46:49 -06:00
Christian Boltz
9f1ba65471 rename _clean to pod_clean in Makefiles
Since the Makefile cleanup, the _clean target is only used to delete
manpages etc. generated from *.pod files.

This patch renames the _clean target to pod_clean to make it obvious
what it does.


Acked-by: John Johansen <john.johansen@canonical.com>
2015-01-30 22:15:53 +01:00
Steve Beattie
f19eb31f23 Entire tree: makefile cruft removal
- drop the symlink magic of the common/ directory, and just include
  files directly from there.
- update comments indicating required steps to take when including
  common/Make.rules
- drop make clean steps that refer to no longer generated tarballs,
  specfiles, and symlinks to the common directory/Make.rules.
- don't silence clean steps if VERBOSE is set

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Christian "Ghostbuster" Boltz <apparmor@cboltz.de>
2015-01-23 15:52:09 -08:00
Christian Boltz
3e222f4b42 delete outdated *.spec{,.in} files
Those *.spec{,.in} files were not updated for years (last change
2006/2007) and don't fit the current "one tarball for everything" model.


Acked-by: Steve Beattie <steve@nxnw.org>
2014-12-08 22:21:47 +01:00
Steve Beattie
ada96afd84 mod_apparmor: revert apache 2.4 api fix from commit 2555
This patch reverts commit 2131 which added support for the newer apache
2.4 ap_hook_check_access_ex() api, based on a report from Christian that
it broke apache's simple authentication.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-10-09 12:52:31 -07:00
Steve Beattie
a44b6ce0a2 C tools: rename __unused macro to unused
Bug: https://bugzilla.novell.com/show_bug.cgi?id=895495

We define the __unused macro as a shortcut for __attribute__((unused))
to quiet compiler warnings for functions where an argument is unused,
for whatever reason. However, on 64 bit architectures, older glibc's
bits/stat.h header defines an array variable with the name __unused
that collides with our macro and causes the parser to fail to build,
because the resulting macro expansion generates invalid C code.

This commit fixes the issue by removing the __unused macro where it's
not needed (mod_apparmor) and renaming it to 'unused' elsewhere. It also
in some instances reorders the arguments so that the unused macro
appears last consistently.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Tyler Hicks <tyhicks@canonical.com>
2014-10-02 12:58:54 -07:00
Steve Beattie
c48d7dc71f manpages: incorporate podchecker; fix errors and (most) warnings
This patch adds a 'check_pod_files' make target to the common make
rules, and then fixes the errors it highlighted as well as most of
the warnings. It will cause 'make check' in most of the directories to
fail if there are errors in a pod file (but not if there are warnings).

Common issues were:

  - using an '=over/=back' pair for code-like snippets that did not
    contain any =items therein; the =over keyword is intended for
    indenting lists of =item entries, and generates a warning if
    there isn't any.

  - not escaping '<' or '>'

  - blank lines that contained spaces or tabs

The second -warnings flag passed to podchecker is to add additional
warnings, un-escaped '<' and '>' being of them.

I did not fix all of the warnings in apparmor.d.pod, as I have not come
up with a good warning-free way to express the BNF of the language
similar in format to what is currently generated. The existing
libapparmor warnings (complaints about duplicate =item definition
names) are actually a result of passing the second -warnings flag.
The integration into libapparmor is suboptimal due to automake's
expectation that there will be a test driver program(s) for make check
targets; that's why I added the podchecker call to the manpage
generation point.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
---
 changehat/mod_apparmor/Makefile         |    3 
 changehat/mod_apparmor/mod_apparmor.pod |   28 ++-
 common/Make.rules                       |    4 
 libraries/libapparmor/doc/Makefile.am   |    7 
 parser/Makefile                         |    2 
 parser/apparmor.d.pod                   |  275
+++++++++++++-------------------
 utils/Makefile                          |    3 
 utils/aa-cleanprof.pod                  |    2 
 utils/aa-complain.pod                   |    2 
 utils/aa-decode.pod                     |    2 
 utils/aa-easyprof.pod                   |   69 +++-----
 utils/aa-enforce.pod                    |    2 
 utils/aa-genprof.pod                    |    2 
 utils/aa-logprof.pod                    |    6 
 utils/aa-sandbox.pod                    |   64 ++-----
 utils/logprof.conf.pod                  |    2 
 utils/vim/Makefile                      |    2 
 17 files changed, 212 insertions(+), 263 deletions(-)
2014-09-15 11:30:47 -07:00
Steve Beattie
dd41f0ff87 mod_apparmor: for apache 2.4, use new access control hook
Use ap_hook_check_access_ex() instead of
ap_hook_access_checker() for apache 2.4; see
http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html#http_request

Signed-off-by: Steve Beattie <steve@nxnw.org>
2014-07-09 14:15:11 -07:00
Steve Beattie
c42bc173ac mod_apparmor: whitespace cleanups
This patch is cosmetic; it cleans up a lot of whitespace issues:
removing trailing spaces, converting tabs into spaces, and removing
unneeded spaces around function arguments.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-07-08 00:46:13 -07:00
Steve Beattie
495b4c2c36 mod_apparmor: remove immunixisms from code
This patch is a cosmetic set of changes to remove references to immunix
from the source code (except in the case of handling deprecated
keywords), as well as correcting my email address.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-07-08 00:44:44 -07:00
Steve Beattie
8b79c9beb1 mod_apparmor: add 'servername-uri' hat
This patch adds an additional hat to try in the mod_apparmor processing
sequence, constructed from the host's ServerName + '-' + URI
(e.g. 'www.example.com-/some/uri'). This hat is attempted before the raw
URI hat is attempted, leaving the ordering as follows:

  (1) to a hatname in a location/directory directive
  (2) to the server name or a defined per-server default
  (3) to the server name + "-" + uri
  (4) to the uri
  (5) to DEFAULT_URI
  (6) back to the parent profile

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-07-08 00:41:58 -07:00
Steve Beattie
372764355a mod_apparmor: try uri hat after AADefaultHatName, not before
In trunk revno 2335, a bug was fixed in mod_apparmor that corrected
the storage location for AADefaultHatName.  The incorrect storage
caused the hat specified by the AADefaultHatName keyword to be the
default value for AAHatName, and meant that if both an AAHatName and
an AADefaultHatName entry were given in a vhost, mod_apparmor would
not fall back to trying AADefaultHatName if the hat specified in
AAHatName did not exist in the apache apparmor profile.

However, because the value specified in AADefaultHatName was the
default, if no AAHatName was specified, it would be attempted first,
before a hat based on the passed URI, rather than after as the
documentation stated and the code intended. By fixing the storage bug,
the attempted hat ordering now matched the documentation. But a number
of users came to rely on AADefaultHatName being attempted before
the URI. For trunk, this issue is less severe because mod_apparmor
passes a vector of hats to aa_change_hatv(), and thus missing URI
hats are not logged by the kernel apparmor bits. It still represents
a behavioral change to users, though.

This patch re-adjusts the ordering so that the URI-based hat is
attempted after the hat specified by AADefaultHatName is attempted,
thus maintaining the actual behavior before the bug addressed in
revno 2335 was fixed.

Patch history:
  v1: initial revision
  v2: no code changes; adjust comments and improve the man page
      documentation

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-07-08 00:39:05 -07:00
Steve Beattie
61fb0e9cea Makefiles: add ${nl} for errors, apply when failing to find libapparmor
Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-03-11 14:42:23 -07:00
Seth Arnold
8e5f15c603 Author: Jamie Strandboge <jamie@canonical.com>
Description: update mod_apparmor man page for Apache 2.4 and add new
 apparmor.d/usr.sbin.apache2 profile (based on the prefork profile)
Acked-by: Steve Beattie <steve@nxnw.org>

Differs from original 0036-libapache2-mod-apparmor-profile-2.4.patch
ubuntu patch -- I've deleted the "delete the apache 2.2 profile" part of
the patch. So apache 2.2's profile is also still supported.
2014-02-13 17:21:41 -08:00
Steve Beattie
52b3458972 mod_apparmor: include errno in log messages for failures
This patch includes the errno in the log messages generated by two
different failed aa_change_hat() calls and the failure to open
/dev/urandom to get the random token, to further ease failure
diagnosis.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 14:50:07 -08:00
Steve Beattie
016e1f1b19 mod_apparmor: eliminate unnecessary back out aa_change_hat() calls
This patch removes unnecessary back out aa_change_hat() calls that occur
if the prior call to aa_change_hat() call failed. It used to be case
that an aa_change_hat() call that failed would result in the task being
placed in a profile with no permissions except the ability to
aa_change_hat() back out, but this behavior has been removed from
apparmor for many, many years now.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 14:44:24 -08:00
Steve Beattie
6fd2f36bd8 mod_apparmor: add logging for AAHatName/AADefaultHatName policy misconfig
This patch adds code that checks the resulting hat that apache gets
placed into, and verifies that if the apache configuration specified
that an AAHatName or AADefaultHatName should have been the resulting
hat. If it wasn't, emit a warning message to the apache log, as this
likely indicates a mismatch between the apache configuration and its
apparmor policy (i.e. why define AAHatName if you aren't going to
create the corresponding hat in the apparmor policy?)

Note for AADefaultHatName, a message is not logged if a defined
AAHatName would also apply or if there is a hat defined for the uri,
as each of those come first in the order of attempted hats.

Also note that the way the hat name is manually calculated will break
for nested profiles and stacking. It should be fine for all current
deployments as we don't allow nesting beyond the first subprofile level
in policy yet. And stacking will likely only be used between namespaces
where aa_getcon() will not report parent namespace info. However, when
libapparmor adds functionality to query the hatname, the code that
computes it here should be replaced by a call to that library function.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 14:42:00 -08:00
Steve Beattie
c98f54ecdc mod_apparmor: convert aa_change_hat()s into single aa_change_hatv()
This patch converts the request entry point from using multiple (if
necessary) aa_change_hat() calls into a single aa_change_hatv() call,
simplifying the code a bit, requiring fewer round trips between
mod_apparmor and the kernel for each request, as well as providing more
information when the apache profile is in complain mode.

Patch history:
  v1: initial version
  v2: - the server config (scfg) code accidentally re-added the
        directory config (dcfg) hat to the vector of hats, fix that
      - actually add the DEFAULT_URI hat to the vector of hats, instead
	of only logging that that is happening.
      - pass errno to ap_log_rerror() if aa_change_hatv() call fails.
      - don't call aa_change_hat again if aa_change_hatv() call fails,
	as this is no longer necessary.
  v3: - Based on feedback from jjohansen, convert exit point
        aa_change_hat() call to aa_change_hatv(), in order to work
        around aa_change_hat() bug addressed in trunk rev 2329,
        which causes the exiting aa_change_hat() call to fail and
        results in the apache process being killed by the kernel.
        When it's no longer likely that mod_apparmor could run into
        a system libapparmor that still contains this bug, this can
        be converted back.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 14:08:46 -08:00
Steve Beattie
8250e061d4 mod_apparmor: make the ServerName be the default AADefaultHatName
Bug: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1207424

This patch makes the default value for AADefaultHatName be the
server/vhost name, which can be specified in apache via the ServerName
configuration declaration. It can be overridden by setting
AADefaultHatName directly. Thus, with this patch applied, the order of
attempted hats will be:

  1. try to aa_change_hat(2) into a matching AAHatName hat if it exists
     and applies, otherwise
  2. try to aa_change_hat(2) into the URI itself, otherwise
  3. try to aa_change_hat(2) into the value of ServerName, unless
     AADefaultHatName has been explicitly set for this server/vhost, in
     which case that value will be used, otherwise
  4. try to aa_change_hat(2) into the DEFAULT_URI hat, if it exists,
     otherwise
  5. fall back to the global Apache policy

This should eliminate the need for most admins to define both
ServerName and AADefaultHatName, unless there's a specific need for
the values to deviate.

Man page documentation is updated as well, though probably more
wordsmithing is needed there for clarity.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 13:51:34 -08:00
Steve Beattie
1a008da295 mod_apparmor: fix AADefaultHatName storage
When defining an AADefaultHatName entry, it was being stored in the
passed mconfig location, which is not the module specific server
config, but instead the top level (i.e. no path defined) default
directory/location config. This would be superceded by a more specific
directory config if it applied to the request. Thus, if an AAHatName was
defined that applied, but the named hat was not defined in the apparmor
policy, mod_apparmor would not attempt to fall back to the defined
AADefaultHatName, but instead jump directly to trying the DEFAULT_URI
hat.

This patch fixes it by storing the defined AADefaultHatName correctly in
the module specific storage in the related server data structure. It
also adds a bit of developer debugging statements.

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


Bug: https://launchpad.net/bugs/1207424
2014-01-23 13:46:17 -08:00
Steve Beattie
124f598090 mod_apparmor: improve initial and exit aa_change_hat call log message
This patch adds the name of the hat to the log message about the
initial aa_change_hat call, just to be explicit about what's happening
when debugging and changes the formatting slightly of the exiting
change_hat log message.

Patch history:
  v1: initial version
  v2: tweak output of exit trace message

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 13:45:00 -08:00
Steve Beattie
3d155a3016 mod_apparmor: convert change_hat to aa_change_hat()
mod_apparmor never got converted to use the renamed aa_change_hat()
call (there's a compatibility macro in sys/apparmor.h); this patch does
that as well as converting the type of the magic_token to long from int.

(This patch is somewhat mooted by a later patch in the series to
convert to using aa_change_hatv(), but would be a safer candidate
for e.g. the 2.8 branch.)

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 13:43:36 -08:00
Steve Beattie
eff2a32082 Subject: mod_apparmor: convert debug_dump_uri to use trace loglevel
This patch converts the debug_dump_uri() function to use the trace
loglevels and enable it all the time, rather than just when DEBUG is
defined at compile time.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 13:41:57 -08:00
Steve Beattie
087ec5e1ce mod_apparmor: use trace1 loglevel for developer-oriented debug messages
Apache 2.4 added addition logging levels. This patch converts some of
the log messages that are more intended for mod_apparmor development
and debugging than for sysadmins configuring mod_apparmor to use trace1
(APLOG_TRACE1) level instead. Since apache 2.2. does not contain this
level (or define), we define it back to APLOG_DEBUG.

Patch history:
  v1: initial version
  v2: mark a couple of additional log messages as trace1 level

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 13:40:19 -08:00
Steve Beattie
637a6bfe9f mod_apparmor: fix logging
The apache2 mod_apparmor module was failing to log debugging messages
when the apache loglevel was set to debug or lower (i.e. traceN). This
patch fixes it by using ap_log_rerror() (for request specific messages,
with the request passed for context) and ap_log_error() (more general
messages outside of a request context).

Also, the APLOG_USE_MODULE macro is called, to mark the log messages as
belonging to the apparmor module, so that the apache 2.4 feature of
enabling debug logging for just the apparmor module will work, with an
apache configuration entry like:

  LogLevel apparmor:debug

See

  http://ci.apache.org/projects/httpd/trunk/doxygen/group__APACHE__CORE__LOG.html

for specific about the ap_log_*error() and APLOG_USE_MODULE functions
and macros, and

  http://httpd.apache.org/docs/2.4/mod/core.html.en#loglevel

for the bits about module specific logging.

Patch history:
  v1: initial version
  v2: - revert to using ap_log_error with (the 2.4 specific)
        ap_server_conf outside of a request specific context, as the
        pool specific ap_log_perror messages weren't being reported.
      - add compatibility workaround for apache 2.2
  v3: keep commented out merge function's log call consistent with the
      others

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2014-01-23 13:38:31 -08:00
Steve Beattie
c6f1034177 Convert make errors finding libapparmor to only occur when building
By raising an error for being unable to find libapparmor any time
a make command is run, we break things like make clean and other
targets that don't strictly depend on libapparmor existing (note that
Tyler's implementation for the parser did not do this). This patch
fixes this for the regression tests, mod_apparmor and pam_apparmor
by making a separate libapparmor_check target that looks to see if
an error message should be generated.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-01-09 12:11:19 -08:00
Steve Beattie
598f7a0b5b mod_apparmor/pam_apparmor: fix libapparmor search path and add USE_SYSTEM support
This patch adds support for the USE_SYSTEM make flag and adjusts
search paths for mod_apparmor and pam_apparmor, as well as fixing up
a couple of the (probably ought to be deprecated) tomcat locations
where apparmor.h is included.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
2014-01-09 11:57:13 -08:00
Christian Boltz
198f660ee8 fix broken URLs in various utils/*.pod files.
(The broken URLs were introduced in r1582.)

for utils/*.pod:
  Acked-by: Steve Beattie <steve@nxnw.org> 

for the other directories:
  Patch by Steve Beattie
  Acked-by: Christian Boltz <apparmor@cboltz.de>
2013-09-19 21:17:39 +02:00
Kees Cook
25f7aa6621 adjust documentation "release" name to match other manpages.
Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-05-27 15:04:42 -07:00
Steve Beattie
0edae73a9a This fixes the apparmor apache2 module to link correctly against the
built libapparmor, as well as working around libtool so that the
libapparmor library build directory does not get added as an rpath to
the module.

Bug: https://launchpad.net/bugs/737074
2011-03-17 23:32:34 -07:00
Steve Beattie
788bdcafb9 From: Jeff Mahoney <jeffm@suse.com>
Fix up tomcat build, also use in-tree libapparmor.
2011-02-08 08:22:46 -08:00
Steve Beattie
0cfa2b2cf8 From: Jeff Mahoney <jeffm@suse.com>
Rip out a little bit of crufty old compatibility code with immunix.h and
support directly building with in-tree libapparmor.
2011-02-08 08:18:36 -08:00
Steve Beattie
37ac8ede4f From: Jeff Mahoney <jeffm@suse.com>
Subject: adjust includes for pam_apparmor to point at the intree version
of libapparmor, rather than depend on an external version to be
installed.
2011-02-08 07:21:20 -08:00
Kees Cook
723a20ba7d as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
Jamie Strandboge
49f27414e0 update the man pages to:
* add Canonical to the headers of the pod files touched
  * use aa_change_hat() instead of change_hat() (LP: #692216)
  * use http://wiki.apparmor.net in the SEE ALSO
  * use http://https://bugs.launchpad.net/apparmor/+filebug for bugs
  * prefix 'aa-' in SEE ALSO section for utilities (eg, 'aa-complain' for
    'complain')
2010-12-20 13:47:09 -06:00