2006-04-11 21:52:54 +00:00
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Copyright (C) 2004-2006 Novell/SUSE
|
2014-08-20 19:14:24 -05:00
|
|
|
# Copyright (C) 2014 Canonical Ltd.
|
2006-04-11 21:52:54 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
|
|
# License published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
|
2007-04-25 21:06:52 +00:00
|
|
|
[settings]
|
|
|
|
profiledir = /etc/apparmor.d /etc/subdomain.d
|
2024-03-31 18:53:12 +02:00
|
|
|
inactive_profiledir = /usr/share/apparmor/extra-profiles
|
2011-08-18 18:17:22 -05:00
|
|
|
logfiles = /var/log/audit/audit.log /var/log/syslog /var/log/messages
|
2007-04-25 21:06:52 +00:00
|
|
|
|
|
|
|
parser = /sbin/apparmor_parser /sbin/subdomain_parser
|
2007-08-14 22:07:40 +00:00
|
|
|
logger = /bin/logger /usr/bin/logger
|
2007-04-25 21:06:52 +00:00
|
|
|
|
2008-04-18 21:16:15 +00:00
|
|
|
# customize how file ownership permissions are presented
|
|
|
|
# 0 - off
|
|
|
|
# 1 - default of what ever mode the log reported
|
|
|
|
# 2 - force the new permissions to be user
|
|
|
|
# 3 - force all perms on the rule to be user
|
|
|
|
default_owner_prompt = 1
|
|
|
|
|
2007-04-25 21:06:52 +00:00
|
|
|
# custom directory locations to look for #includes
|
|
|
|
#
|
|
|
|
# each name should be a valid directory containing possible #include
|
|
|
|
# candidate files under the profile dir which by default is /etc/apparmor.d.
|
|
|
|
#
|
|
|
|
# So an entry of my-includes will allow /etc/apparmor.d/my-includes to
|
|
|
|
# be used by the yast UI and profiling tools as a source of #include
|
|
|
|
# files.
|
|
|
|
custom_includes =
|
2006-04-11 21:52:54 +00:00
|
|
|
|
2023-07-30 21:14:36 +02:00
|
|
|
# When called with --json, log all input and output to a tempfile (/tmp/aa-jsonlog-*)
|
|
|
|
# Only enable for debugging.
|
|
|
|
# Note that aa-logprof will not display any hint that aa-jsonlog-* gets written.
|
|
|
|
json_log = 0
|
2007-05-22 20:49:51 +00:00
|
|
|
|
2006-04-11 21:52:54 +00:00
|
|
|
[qualifiers]
|
|
|
|
# things will be painfully broken if bash has a profile
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/bash = icnu
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/bash = icnu
|
|
|
|
/bin/ksh = icnu
|
|
|
|
/usr/bin/ksh = icnu
|
|
|
|
/bin/dash = icnu
|
|
|
|
/usr/bin/dash = icnu
|
2018-09-24 16:51:11 +00:00
|
|
|
/bin/zsh = icnu
|
|
|
|
/usr/bin/zsh = icnu
|
2006-04-11 21:52:54 +00:00
|
|
|
|
|
|
|
# these programs can't function if they're confined
|
|
|
|
/bin/mount = u
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/mount = u
|
2006-04-11 21:52:54 +00:00
|
|
|
/etc/init.d/subdomain = u
|
|
|
|
/sbin/cardmgr = u
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/sbin/cardmgr = u
|
2006-04-11 21:52:54 +00:00
|
|
|
/sbin/subdomain_parser = u
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/sbin/subdomain_parser = u
|
2006-04-11 21:52:54 +00:00
|
|
|
/usr/sbin/genprof = u
|
|
|
|
/usr/sbin/logprof = u
|
|
|
|
/usr/lib/YaST2/servers_non_y2/ag_genprof = u
|
|
|
|
/usr/lib/YaST2/servers_non_y2/ag_logprof = u
|
|
|
|
|
2020-11-19 12:36:23 -08:00
|
|
|
# these ones shouldn't have their own profiles
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/awk = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/awk = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/cat = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/cat = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/chmod = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/chmod = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/chown = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/chown = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/cp = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/cp = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/gawk = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/gawk = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/grep = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/grep = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/gunzip = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/gunzip = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/gzip = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/gzip = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/kill = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/kill = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/ln = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/ln = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/ls = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/ls = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/mkdir = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/mkdir = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/mv = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/mv = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/readlink = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/readlink = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/rm = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/rm = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/sed = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/sed = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/bin/touch = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/bin/touch = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/sbin/killall5 = icn
|
2014-02-02 15:12:32 +01:00
|
|
|
/usr/sbin/killall5 = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/usr/bin/find = icn
|
|
|
|
/usr/bin/killall = icn
|
|
|
|
/usr/bin/nice = icn
|
|
|
|
/usr/bin/perl = icn
|
2015-11-18 13:39:07 +01:00
|
|
|
/usr/bin/python = icn
|
|
|
|
/usr/bin/python2 = icn
|
|
|
|
/usr/bin/python2.7 = icn
|
|
|
|
/usr/bin/python3 = icn
|
|
|
|
/usr/bin/python3.3 = icn
|
|
|
|
/usr/bin/python3.4 = icn
|
2015-11-19 20:22:40 +01:00
|
|
|
/usr/bin/python3.5 = icn
|
2017-10-23 16:31:25 +02:00
|
|
|
/usr/bin/python3.6 = icn
|
2018-09-15 00:32:48 +02:00
|
|
|
/usr/bin/python3.7 = icn
|
2021-08-25 13:47:29 +02:00
|
|
|
/usr/bin/python3.8 = icn
|
|
|
|
/usr/bin/python3.9 = icn
|
|
|
|
/usr/bin/python3.10 = icn
|
|
|
|
/usr/bin/python3.11 = icn
|
|
|
|
/usr/bin/python3.12 = icn
|
|
|
|
/usr/bin/python3.13 = icn
|
|
|
|
/usr/bin/python3.14 = icn
|
|
|
|
/usr/bin/python3.15 = icn
|
|
|
|
/usr/bin/python3.16 = icn
|
|
|
|
/usr/bin/python3.17 = icn
|
|
|
|
/usr/bin/python3.18 = icn
|
|
|
|
/usr/bin/python3.19 = icn
|
2008-05-30 07:21:15 +00:00
|
|
|
/usr/bin/tr = icn
|
2006-04-11 21:52:54 +00:00
|
|
|
|
|
|
|
[required_hats]
|
|
|
|
^.+/apache(|2|2-prefork)$ = DEFAULT_URI HANDLING_UNTRUSTED_INPUT
|
|
|
|
^.+/httpd(|2|2-prefork)$ = DEFAULT_URI HANDLING_UNTRUSTED_INPUT
|
|
|
|
|
|
|
|
[defaulthat]
|
|
|
|
^.+/apache(|2|2-prefork)$ = DEFAULT_URI
|
|
|
|
^.+/httpd(|2|2-prefork)$ = DEFAULT_URI
|
|
|
|
|
|
|
|
[globs]
|
|
|
|
# /foo/bar/lib/libbaz.so -> /foo/bar/lib/lib*
|
|
|
|
/lib/lib[^\/]+so[^\/]*$ = /lib/lib*so*
|
|
|
|
|
|
|
|
# strip kernel version numbers from kernel module accesses
|
|
|
|
^/lib/modules/[^\/]+\/ = /lib/modules/*/
|
|
|
|
|
|
|
|
# strip pid numbers from /proc accesses
|
|
|
|
^/proc/\d+/ = /proc/*/
|
|
|
|
|
|
|
|
# if it looks like a home directory, glob out the username
|
|
|
|
^/home/[^\/]+ = /home/*
|
|
|
|
|
|
|
|
# if they use any perl modules, grant access to all
|
|
|
|
^/usr/lib/perl5/.+$ = /usr/lib/perl5/**
|
2014-08-20 19:14:24 -05:00
|
|
|
^/usr/lib/[^\/]+/perl5?/.+$ = /usr/lib/@{multiarch}/perl{,5}/**
|
2006-04-11 21:52:54 +00:00
|
|
|
|
|
|
|
# locale foo
|
|
|
|
^/usr/lib/locale/.+$ = /usr/lib/locale/**
|
|
|
|
^/usr/share/locale/.+$ = /usr/share/locale/**
|
|
|
|
|
|
|
|
# timezone fun
|
|
|
|
^/usr/share/zoneinfo/.+$ = /usr/share/zoneinfo/**
|
|
|
|
|
|
|
|
# /foobar/fonts/baz -> /foobar/fonts/**
|
|
|
|
/fonts/.+$ = /fonts/**
|
|
|
|
|
|
|
|
# turn /foo/bar/baz.8907234 into /foo/bar/baz.*
|
|
|
|
# BUGBUG - this one looked weird because it would suggest a glob for
|
|
|
|
# BUGBUG - libfoo.so.5.6.0 that looks like libfoo.so.5.6.*
|
|
|
|
# \.\d+$ = .*
|
|
|
|
|
|
|
|
# some various /etc/security poo -- dunno about these ones...
|
|
|
|
^/etc/security/_[^\/]+$ = /etc/security/*
|
|
|
|
^/lib/security/pam_filter/[^\/]+$ = /lib/security/pam_filter/*
|
|
|
|
^/lib/security/pam_[^\/]+\.so$ = /lib/security/pam_*.so
|
|
|
|
|
|
|
|
^/etc/pam.d/[^\/]+$ = /etc/pam.d/*
|
|
|
|
^/etc/profile.d/[^\/]+\.sh$ = /etc/profile.d/*.sh
|
2006-10-05 21:29:22 +00:00
|
|
|
|