mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-01 14:55:10 +00:00
Compare commits
8 Commits
v2.11.95
...
git-conver
Author | SHA1 | Date | |
---|---|---|---|
|
df0f20f32b | ||
|
c4a4e5bb82 | ||
|
d2f7f21b04 | ||
|
ca42518c1d | ||
|
41c1e30e9b | ||
|
b973c9b473 | ||
|
c79dd88edb | ||
|
bb981d54f0 |
@@ -22,7 +22,9 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Class of public mediation types in the AppArmor policy db
|
||||
@@ -191,6 +193,8 @@ extern int aa_policy_cache_remove(int dirfd, const char *path);
|
||||
extern int aa_policy_cache_replace_all(aa_policy_cache *policy_cache,
|
||||
aa_kernel_interface *kernel_interface);
|
||||
|
||||
__END_DECLS
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* sys/apparmor.h */
|
||||
|
@@ -20,7 +20,9 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _aa_is_blacklisted(const char *name);
|
||||
|
||||
@@ -33,6 +35,8 @@ int _aa_asprintf(char **strp, const char *fmt, ...);
|
||||
int _aa_dirat_for_each(int dirfd, const char *name, void *data,
|
||||
int (* cb)(int, const char *, struct stat *, void *));
|
||||
|
||||
__END_DECLS
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* sys/apparmor_private.h */
|
||||
|
@@ -45,6 +45,7 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <dirent.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "lib.h"
|
||||
#include "parser.h"
|
||||
|
@@ -124,7 +124,9 @@ static struct keyword_table rlimit_table[] = {
|
||||
{"core", RLIMIT_CORE},
|
||||
{"rss", RLIMIT_RSS},
|
||||
{"nofile", RLIMIT_NOFILE},
|
||||
#ifdef RLIMIT_OFILE
|
||||
{"ofile", RLIMIT_OFILE},
|
||||
#endif
|
||||
{"as", RLIMIT_AS},
|
||||
{"nproc", RLIMIT_NPROC},
|
||||
{"memlock", RLIMIT_MEMLOCK},
|
||||
|
@@ -902,6 +902,7 @@ rules: rules TOK_SET TOK_RLIMIT TOK_ID TOK_LE TOK_VALUE opt_id TOK_END_OF_RULE
|
||||
pwarn(_("RLIMIT 'cpu' no units specified using default units of seconds\n"));
|
||||
value = tmp;
|
||||
break;
|
||||
#ifdef RLIMIT_RTTIME
|
||||
case RLIMIT_RTTIME:
|
||||
/* RTTIME is measured in microseconds */
|
||||
if (!end || $6 == end || tmp < 0)
|
||||
@@ -913,6 +914,7 @@ rules: rules TOK_SET TOK_RLIMIT TOK_ID TOK_LE TOK_VALUE opt_id TOK_END_OF_RULE
|
||||
pwarn(_("RLIMIT 'rttime' no units specified using default units of microseconds\n"));
|
||||
value = tmp;
|
||||
break;
|
||||
#endif
|
||||
case RLIMIT_NOFILE:
|
||||
case RLIMIT_NPROC:
|
||||
case RLIMIT_LOCKS:
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Author: Marc Deslauriers <marc.deslauriers@ubuntu.com>
|
||||
|
||||
#include <tunables/global>
|
||||
/usr/sbin/apache2 {
|
||||
/usr/sbin/apache2 flags=(attach_disconnected) {
|
||||
|
||||
# This profile is completely permissive.
|
||||
# It is designed to target specific applications using mod_apparmor,
|
||||
@@ -84,7 +84,7 @@
|
||||
/** mrwlkix,
|
||||
|
||||
|
||||
^DEFAULT_URI {
|
||||
^DEFAULT_URI flags=(attach_disconnected) {
|
||||
#include <abstractions/base>
|
||||
#include <abstractions/apache2-common>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
/** mrwlkix,
|
||||
}
|
||||
|
||||
^HANDLING_UNTRUSTED_INPUT {
|
||||
^HANDLING_UNTRUSTED_INPUT flags=(attach_disconnected) {
|
||||
#include <abstractions/apache2-common>
|
||||
|
||||
/ rw,
|
||||
|
@@ -16,29 +16,66 @@
|
||||
#include <abstractions/base>
|
||||
#include <abstractions/bash>
|
||||
#include <abstractions/consoles>
|
||||
#include <abstractions/dconf>
|
||||
#include <abstractions/dbus-session-strict>
|
||||
#include <abstractions/ibus>
|
||||
#include <abstractions/kde>
|
||||
#include <abstractions/nameservice>
|
||||
#include <abstractions/gnome>
|
||||
#include <abstractions/user-write>
|
||||
#include <abstractions/X>
|
||||
|
||||
#include <abstractions/dbus-accessibility-strict>
|
||||
dbus (send)
|
||||
bus=session
|
||||
peer=(name=org.a11y.Bus),
|
||||
dbus (receive)
|
||||
bus=session
|
||||
interface=org.a11y.atspi**,
|
||||
dbus (receive, send)
|
||||
bus=accessibility,
|
||||
|
||||
capability net_raw,
|
||||
|
||||
/etc/ethers r,
|
||||
# From abstractions/evince
|
||||
deny /run/udev/data/** r,
|
||||
|
||||
@{HOME}/.wireshark/* rw,
|
||||
@{HOME}/.fonts.cache-* r,
|
||||
/etc/ethers r,
|
||||
/etc/udev/udev.conf r,
|
||||
/etc/wireshark/** r,
|
||||
|
||||
owner @{HOME}/.wireshark/* rw,
|
||||
owner @{HOME}/.config/wireshark/* rw,
|
||||
owner @{HOME}/.config/QtProject.conf rw,
|
||||
owner @{HOME}/.config/QtProject.conf.lock rw,
|
||||
owner @{HOME}/.fonts.cache-* r,
|
||||
|
||||
owner @{HOME}/.config/dconf/user w,
|
||||
owner /{,var/}run/user/*/dconf/user w,
|
||||
owner @{PROC}/@{pid}/cmdline r,
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
@{PROC}/@{pid}/net/dev r,
|
||||
/sys/devices/pci[0-9]*/**/uevent r,
|
||||
|
||||
/etc/pango/pango.modules r,
|
||||
/usr/lib/gtk-*/*/loaders/* mr,
|
||||
/usr/share/* r,
|
||||
/usr/share/icons/** r,
|
||||
/usr/share/icons/ r,
|
||||
/usr/share/icons/** rk,
|
||||
/usr/share/glib-2.0/schemas/gschemas.compiled r,
|
||||
/usr/share/mime/* r,
|
||||
/usr/lib/firefox/firefox.sh rPx,
|
||||
/usr/bin/wireshark mixr,
|
||||
/usr/share/icons r,
|
||||
/usr/share/mime/* r,
|
||||
/usr/share/snmp/mibs r,
|
||||
/usr/share/snmp/mibs/* r,
|
||||
/usr/share/snmp/mibs/.index rw,
|
||||
/usr/share/wireshark/** r,
|
||||
/usr/share/GeoIP/ r,
|
||||
/usr/share/GeoIP/** r,
|
||||
/usr/lib/@{multiarch}/wireshark/extcap/* ix,
|
||||
/usr/lib/@{multiarch}/wireshark/plugins/**/ r,
|
||||
/usr/lib/@{multiarch}/wireshark/plugins/**.so mr,
|
||||
|
||||
# for reading pcaps
|
||||
/**.pcap r,
|
||||
}
|
||||
|
Reference in New Issue
Block a user