mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	Improve AppArmor profile
- give it a name - import needed abstractions - allow local additions - cleanup
This commit is contained in:
		
							parent
							
								
									49a19a52c8
								
							
						
					
					
						commit
						0f309377ec
					
				
					 1 changed files with 8 additions and 20 deletions
				
			
		| 
						 | 
				
			
			@ -4,34 +4,22 @@
 | 
			
		|||
#
 | 
			
		||||
#include <tunables/global>
 | 
			
		||||
 | 
			
		||||
/usr/sbin/i2pd {
 | 
			
		||||
profile i2pd /{usr/,}sbin/i2pd {
 | 
			
		||||
  #include <abstractions/base>
 | 
			
		||||
 | 
			
		||||
  network inet dgram,
 | 
			
		||||
  network inet stream,
 | 
			
		||||
  network inet6 dgram,
 | 
			
		||||
  network inet6 stream,
 | 
			
		||||
  network netlink raw,
 | 
			
		||||
 | 
			
		||||
  /etc/gai.conf r,
 | 
			
		||||
  /etc/host.conf r,
 | 
			
		||||
  /etc/hosts r,
 | 
			
		||||
  /etc/nsswitch.conf r,
 | 
			
		||||
  /etc/resolv.conf r,
 | 
			
		||||
  /run/resolvconf/resolv.conf r,
 | 
			
		||||
  /run/systemd/resolve/resolv.conf r,
 | 
			
		||||
  /run/systemd/resolve/stub-resolv.conf r,
 | 
			
		||||
  #include <abstractions/openssl>
 | 
			
		||||
  #include <abstractions/nameservice>
 | 
			
		||||
 | 
			
		||||
  # path specific (feel free to modify if you have another paths)
 | 
			
		||||
  /etc/i2pd/** r,
 | 
			
		||||
  /run/i2pd/i2pd.pid rwk,
 | 
			
		||||
  /var/lib/i2pd/** rw,
 | 
			
		||||
  /var/log/i2pd/i2pd.log w,
 | 
			
		||||
  /var/run/i2pd/i2pd.pid rwk,
 | 
			
		||||
  /usr/sbin/i2pd mr,
 | 
			
		||||
  /usr/share/i2pd/** r,
 | 
			
		||||
  /{var/,}run/i2pd/i2pd.pid rwk,
 | 
			
		||||
  /{usr/,}sbin/i2pd mr,
 | 
			
		||||
  @{system_share_dirs}/i2pd/** r,
 | 
			
		||||
 | 
			
		||||
  # user homedir (if started not by init.d or systemd)
 | 
			
		||||
  owner @{HOME}/.i2pd/   rw,
 | 
			
		||||
  owner @{HOME}/.i2pd/** rwk,
 | 
			
		||||
 | 
			
		||||
  #include if exists <local/usr.sbin.i2pd>
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue