mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 17:08:09 +01:00
275d6b6e62
Beware some [0-9]* glob are actually not proper @{int}.
125 lines
3.4 KiB
Text
125 lines
3.4 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2018-2021 Mikhail Morfikov
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{JD_INSTALLDIR} = /home/*/jd2
|
|
|
|
@{exec_path} = @{JD_INSTALLDIR}/*JDownloader*
|
|
profile jdownloader @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/freedesktop.org>
|
|
include <abstractions/fonts>
|
|
include <abstractions/fontconfig-cache-read>
|
|
include <abstractions/freedesktop.org>
|
|
include <abstractions/user-download-strict>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
@{exec_path} rix,
|
|
|
|
@{bin}/basename rix,
|
|
@{bin}/dirname rix,
|
|
@{bin}/expr rix,
|
|
@{bin}/cut rix,
|
|
@{bin}/ls rix,
|
|
@{bin}/{,e}grep rix,
|
|
@{bin}/find rix,
|
|
@{bin}/sed rix,
|
|
@{bin}/chmod rix,
|
|
|
|
@{bin}/ffmpeg rPx,
|
|
|
|
# These are needed when the above tools are in some nonstandard locations
|
|
#@{bin}/which{,.debianutils} rix,
|
|
#/usr/ r,
|
|
#/usr/local/ r,
|
|
#@{bin}/ r,
|
|
#@{lib}/ r,
|
|
|
|
deny /opt/ r,
|
|
|
|
owner @{HOME}/ r,
|
|
owner @{JD_INSTALLDIR}/ rw,
|
|
owner @{JD_INSTALLDIR}/** rwk,
|
|
owner @{JD_INSTALLDIR}/jre/bin/java rix,
|
|
owner @{JD_INSTALLDIR}/jre/lib/*/jli/libjli.so mrw,
|
|
owner @{JD_INSTALLDIR}/jre/lib/*/server/libjvm.so mrw,
|
|
owner @{JD_INSTALLDIR}/jre/lib/*/*.so mrw,
|
|
owner @{JD_INSTALLDIR}/tmp/jna/jna[0-9]*.tmp mrw,
|
|
owner @{JD_INSTALLDIR}/tmp/7zip/SevenZipJBinding-*/lib7-Zip-JBinding.so mrw,
|
|
|
|
owner @{HOME}/.oracle_jre_usage/@{hex}.timestamp rw,
|
|
owner @{HOME}/.java/.userPrefs/.user.lock.* rwk,
|
|
owner @{HOME}/.java/.userPrefs/com/install4j/installations/prefs.xml rw,
|
|
owner @{HOME}/.java/fonts/@{int}/ rw,
|
|
owner @{HOME}/.java/fonts/@{int}/fcinfo*.tmp rw,
|
|
owner @{HOME}/.java/fonts/@{int}/fcinfo-*.properties rw,
|
|
|
|
owner @{HOME}/.install4j rw,
|
|
|
|
owner /tmp/hsperfdata_*/ rw,
|
|
owner /tmp/hsperfdata_*/@{pid} rw,
|
|
# If the @{JD_INSTALLDIR}/tmp/ dir can't be accessed, the /tmp/ dir will be used instead
|
|
owner /tmp/SevenZipJBinding-*/ rw,
|
|
owner /tmp/SevenZipJBinding-*/lib7-Zip-JBinding.so mrw,
|
|
# For auto updates
|
|
owner /tmp/lastChanceSrc[0-9]*lch rw,
|
|
owner /tmp/lastChanceDst[0-9]*.jar rw,
|
|
owner /tmp/i4j_log_jd2_[0-9]*.log rw,
|
|
owner /tmp/install4jError[0-9]*.log rw,
|
|
|
|
owner @{HOME}/.Xauthority r,
|
|
|
|
# What's this for?
|
|
deny owner @{HOME}/.mozilla/firefox/ r,
|
|
deny owner @{HOME}/.mozilla/firefox/*.*/prefs.js r,
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
deny @{PROC}/@{pid}/net/ipv6_route r,
|
|
deny @{PROC}/@{pid}/net/if_inet6 r,
|
|
owner @{PROC}/@{pid}/mountinfo r,
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
deny owner @{PROC}/@{pid}/cmdline r,
|
|
deny @{PROC}/asound/version r,
|
|
|
|
# For Reconnect -> Share Settings/Get Route
|
|
#@{bin}/netstat rix,
|
|
#@{bin}/route rix,
|
|
#@{bin}/ping rix,
|
|
#@{bin}/ip rix,
|
|
#@{PROC}/@{pid}/net/route r,
|
|
|
|
# To open a web browser for CAPTCHA
|
|
@{bin}/xdg-open rCx -> open,
|
|
@{lib}/@{multiarch}/glib-[0-9]*/gio-launch-desktop rCx -> open,
|
|
|
|
|
|
profile open {
|
|
include <abstractions/base>
|
|
include <abstractions/xdg-open>
|
|
|
|
@{bin}/xdg-open mr,
|
|
@{lib}/@{multiarch}/glib-[0-9]*/gio-launch-desktop mr,
|
|
|
|
@{bin}/{,ba,da}sh rix,
|
|
@{bin}/{m,g,}awk rix,
|
|
@{bin}/readlink rix,
|
|
@{bin}/basename rix,
|
|
|
|
owner @{HOME}/ r,
|
|
|
|
owner @{run}/user/@{uid}/ r,
|
|
|
|
# Allowed apps to open
|
|
@{lib}/firefox/firefox rPUx,
|
|
|
|
# file_inherit
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
}
|
|
|
|
include if exists <local/jdownloader>
|
|
}
|