2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
2020-09-12 17:19:23 +02: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.
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# See more at: https://gitlab.com/apparmor/apparmor/wikis/Pam_apparmor_example
|
|
|
|
|
|
|
|
#
|
|
|
|
# This file contains the roles as referenced by pam/mappings
|
|
|
|
#
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
abi <abi/3.0>,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include <tunables/global>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# By default, allow users to read, lock and link to their own files anywhere,
|
|
|
|
# but only write to files in their home directory. Only allow limited execution
|
|
|
|
# of files.
|
|
|
|
profile default_user flags=(complain) {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/bash>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/nameservice>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
deny capability sys_ptrace,
|
|
|
|
|
|
|
|
/{usr/,}bin/** Pixmr,
|
|
|
|
|
|
|
|
owner /** rkl,
|
|
|
|
@{PROC}/** r,
|
|
|
|
|
|
|
|
owner @{HOMEDIRS}/ w,
|
|
|
|
owner @{HOMEDIRS}/** w,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# Allow confined_users to read, write, lock and link to their own files
|
|
|
|
# anywhere, and execute from some places.
|
|
|
|
profile confined_user flags=(complain) {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/bash>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/nameservice>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
deny capability sys_ptrace,
|
|
|
|
|
|
|
|
/{usr/,}bin/** Pixmr,
|
|
|
|
owner @{HOMEDIRS}/bin/** ixmr,
|
|
|
|
|
|
|
|
owner /** rwkl,
|
|
|
|
@{PROC}/** r,
|
|
|
|
|
|
|
|
}
|