2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-01 14:55:10 +00:00

Merge Add ncurses abstraction with terminfo paths

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1550
Approved-by: Christian Boltz <apparmor@cboltz.de>
Merged-by: Ryan Lee <rlee287@yahoo.com>
This commit is contained in:
Ryan Lee
2025-03-17 09:16:14 -07:00
5 changed files with 16 additions and 9 deletions

View File

@@ -0,0 +1,10 @@
abi <abi/4.0>,
# Default hardcoded locations searched by ncurses for terminfo
@{HOME}/.terminfo/** r,
/etc/terminfo/** r,
/{usr/,}lib/terminfo/** r,
/usr/share/terminfo/** r,
# Local overrides for systems with TERMINFO env vars, etc.
include if exists <abstractions/terminfo.d>

View File

@@ -6,9 +6,9 @@ profile alsamixer /{usr,}/bin/alsamixer {
include <abstractions/base> include <abstractions/base>
include <abstractions/consoles> include <abstractions/consoles>
include <abstractions/nameservice-strict> include <abstractions/nameservice-strict>
include <abstractions/dbus-session-strict> include <abstractions/terminfo>
/usr/share/terminfo/** r, include <abstractions/dbus-session-strict>
@{sys}/devices/virtual/dmi/id/sys_vendor r, @{sys}/devices/virtual/dmi/id/sys_vendor r,

View File

@@ -12,6 +12,7 @@ include <tunables/global>
profile lsb_release { profile lsb_release {
include <abstractions/base> include <abstractions/base>
include <abstractions/python> include <abstractions/python>
include <abstractions/terminfo>
owner @{PROC}/@{pid}/fd/ r, owner @{PROC}/@{pid}/fd/ r,
@@ -43,7 +44,6 @@ profile lsb_release {
/usr/include/python*/pyconfig.h r, /usr/include/python*/pyconfig.h r,
/usr/share/distro-info/** r, /usr/share/distro-info/** r,
/usr/share/dpkg/** r, /usr/share/dpkg/** r,
/usr/share/terminfo/** r,
/var/lib/dpkg/** r, /var/lib/dpkg/** r,
# file_inherit # file_inherit

View File

@@ -21,6 +21,7 @@ profile tnftp /usr/bin/tnftp {
include <abstractions/base> include <abstractions/base>
include <abstractions/consoles> include <abstractions/consoles>
include <abstractions/nameservice> include <abstractions/nameservice>
include <abstractions/terminfo>
include <abstractions/user-tmp> include <abstractions/user-tmp>
include <abstractions/user-download> include <abstractions/user-download>
include <abstractions/private-files-strict> include <abstractions/private-files-strict>
@@ -28,9 +29,6 @@ profile tnftp /usr/bin/tnftp {
network inet stream, network inet stream,
network inet6 stream, network inet6 stream,
# readline wants to know terminal capabilities
file r /usr/share/terminfo/**,
# required for the pager (less, more) to work # required for the pager (less, more) to work
file Cx /usr/bin/dash, file Cx /usr/bin/dash,
@@ -52,11 +50,10 @@ profile tnftp /usr/bin/tnftp {
# Defined as sub profile of tnftp for backwards compatibility. # Defined as sub profile of tnftp for backwards compatibility.
profile dash//more { profile dash//more {
include <abstractions/base> include <abstractions/base>
include <abstractions/terminfo>
network (send, receive) inet stream, network (send, receive) inet stream,
network (send, receive) inet6 stream, network (send, receive) inet6 stream,
# readline wants to know terminal capabilities
file r /usr/share/terminfo/**,
file mr /usr/bin/more, file mr /usr/bin/more,
} }

View File

@@ -17,6 +17,7 @@ include <tunables/global>
include <abstractions/base> include <abstractions/base>
include <abstractions/bash> include <abstractions/bash>
include <abstractions/consoles> include <abstractions/consoles>
include <abstractions/terminfo>
include <abstractions/user-manpages> include <abstractions/user-manpages>
/{usr/,}bin/bash rmix, /{usr/,}bin/bash rmix,
@@ -61,7 +62,6 @@ include <tunables/global>
/usr/share/locale-bundle/** r, /usr/share/locale-bundle/** r,
/usr/share/man/ r, /usr/share/man/ r,
/usr/share/man/** r, /usr/share/man/** r,
/usr/share/terminfo/** r,
/usr/share/texmf/teTeX/man/** r, /usr/share/texmf/teTeX/man/** r,
/usr/share/postgresql/*/man/** rk, /usr/share/postgresql/*/man/** rk,