-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A restrictive AppArmor profile to help enforce Tor usage
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# | ||
# AppArmor xmpp-client profile for Ubuntu 11.04 and later | ||
# | ||
# 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. | ||
# | ||
|
||
#include <tunables/global> | ||
/usr/bin/xmpp-client { | ||
#include <abstractions/consoles> | ||
#include <abstractions/ssl_certs> | ||
|
||
# IPv4 TCP | ||
network inet stream, | ||
# We disable the following to enforce Tor usage | ||
# IPv4 UDP for DNS resolution | ||
#network inet dgram, | ||
|
||
# Allow reading of /etc/xmpp-client/ | ||
/etc/xmpp-client/*/** r, | ||
|
||
# Allow reading/writing of xmpp-client dot files | ||
/home/*/.xmpp-client rw, | ||
/home/*/.xmpp-client* rw, | ||
|
||
# Allow reading of libs and /tmp | ||
/etc/ld.so.cache r, | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
# Random number generation requires these two | ||
/dev/random r, | ||
/dev/urandom r, | ||
|
||
# Various xmpp-client denials that make life easier | ||
/etc/ssl/certs/ca-certificates.crt r, | ||
/proc/sys/net/core/somaxconn r, | ||
/etc/localtime r, | ||
|
||
# Allow mapping of shared libraries | ||
/lib/* rm, | ||
/lib32/* rm, | ||
/lib64/* rm, | ||
/usr/lib/* rm, | ||
/lib/x86_64-linux-gnu/* rm, | ||
|
||
# We'll allow xmpp-client to write debug logs | ||
/tmp/xmpp-client*.log rw, | ||
} |
either the comment or the rule is wrong ;-)
BTW: you can simplyfy the profile by using abstractions/base