The officially official Devuan Forum!

You are not logged in.

#1 2024-09-04 09:50:04

Lomax
Member
From: United Kingdom
Registered: 2018-02-06
Posts: 76  

Removing Apparmor

Hi all,

I've purged apparmor and added security=none to kernel params. I've also deleted /etc/apparmor.d and /var/cache/apparmor. But I still have lots of /proc/[some pid]/task/[some pid]/attr/apparmor directories as well as a /sys/module/apparmor directory - can I safely rm -rf these as well?


"I cannot lie to you about your chances, but you have my sympathies."

Offline

#2 2024-09-04 10:41:02

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 156  

Re: Removing Apparmor

as long as you are adequately backed-up, you can always make alterations and see what happens(especially after a warm-restart and/or cold-boot)


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#3 2024-09-04 10:51:50

Lomax
Member
From: United Kingdom
Registered: 2018-02-06
Posts: 76  

Re: Removing Apparmor

Thanks. I am adequately-ish backed up, but the problem is this is on a Raspberry Pi which is somewhat inaccessible, which makes taking a new image of the card quite fiddly. Not to mention how long it takes to image a 64Gb card... So it's not something I do very frequently; most recent back-up was made yesterday and I've done a fair bit of work on it since then. I guess I could copy just those folders back onto the card if I bork it, though physically retrieving it is a bit of a hassle.

Last edited by Lomax (2024-09-04 10:53:55)


"I cannot lie to you about your chances, but you have my sympathies."

Offline

#4 2024-09-04 11:08:27

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 156  

Re: Removing Apparmor


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#5 2024-09-05 00:19:35

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,247  

Re: Removing Apparmor

Note that /proc is a virtual filesystem tree giving insight into the running kernel. Not to be played with by hand.

Offline

#6 2024-09-05 14:48:43

Lomax
Member
From: United Kingdom
Registered: 2018-02-06
Posts: 76  

Re: Removing Apparmor

Thanks, I thought so, and haven't touched it. Strange that these directories are created despite setting the security=none kernel parameter. What about /sys/module/apparmor?

$ dpkg -S apparmor
libapparmor1:arm64: /usr/share/doc/libapparmor1/copyright
libapparmor1:arm64: /usr/share/doc/libapparmor1
man-db: /etc/apparmor.d/usr.bin.man
libapparmor1:arm64: /usr/lib/aarch64-linux-gnu/libapparmor.so.1.8.4
isc-dhcp-client: /etc/apparmor.d/sbin.dhclient
libapparmor1:arm64: /usr/lib/aarch64-linux-gnu/libapparmor.so.1
libapparmor1:arm64: /usr/share/doc/libapparmor1/changelog.Debian.gz
man-db, isc-dhcp-client: /etc/apparmor.d

"I cannot lie to you about your chances, but you have my sympathies."

Offline

#7 2024-09-05 14:52:00

quickfur
Member
Registered: 2023-12-14
Posts: 426  

Re: Removing Apparmor

In theory you could probably remove libapparmor1 as well. But first check the reverse dependencies to see if it will inadvertently also remove some essential packages, or packages that you need.

Offline

#8 2024-09-05 14:54:14

Lomax
Member
From: United Kingdom
Registered: 2018-02-06
Posts: 76  

Re: Removing Apparmor

Thanks - that would remove dbus as well, which I think I need:

The following packages will be REMOVED:
  dbus dbus-daemon libapparmor1 libsystemd-shared udisks2

"I cannot lie to you about your chances, but you have my sympathies."

Offline

#9 2024-09-05 15:18:30

delgado
Member
Registered: 2022-07-14
Posts: 208  

Re: Removing Apparmor

Sometimes such command lines work:

$ apt install dbus apparmor- -s
dbus is already the newest version (1.14.10-1~deb12u1devuan1).
The following packages will be REMOVED:
  apparmor
Remv apparmor [3.0.8-3]

"apparmor-" has a trailing "-" and "-s" is for simulation.
Computer: daedalus notebook

Offline

#10 2024-09-05 15:28:55

Lomax
Member
From: United Kingdom
Registered: 2018-02-06
Posts: 76  

Re: Removing Apparmor

Thanks, strangely it now wants a load of armhf packages, though I'm on aarch64:

$ sudo apt install dbus libapparmor1- -s
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dbus is already the newest version (1.14.10-1~deb12u1).
dbus set to manually installed.
The following additional packages will be installed:
  dbus-daemon:armhf gcc-12-base:armhf libapparmor1:armhf libaudit1:armhf libc6:armhf libcap-ng0:armhf libcap2:armhf
  libdbus-1-3:armhf libexpat1:armhf libgcc-s1:armhf libgcrypt20:armhf libgpg-error0:armhf liblz4-1:armhf liblzma5:armhf
  libpcre2-8-0:armhf libselinux1:armhf libsystemd0:armhf libzstd1:armhf
Suggested packages:
  glibc-doc:armhf locales:armhf libnss-nis:armhf libnss-nisplus:armhf rng-tools:armhf
Recommended packages:
  libidn2-0:armhf libgpg-error-l10n:armhf
The following packages will be REMOVED:
  dbus-daemon libapparmor1 libsystemd-shared
The following NEW packages will be installed:
  dbus-daemon:armhf gcc-12-base:armhf libapparmor1:armhf libaudit1:armhf libc6:armhf libcap-ng0:armhf libcap2:armhf
  libdbus-1-3:armhf libexpat1:armhf libgcc-s1:armhf libgcrypt20:armhf libgpg-error0:armhf liblz4-1:armhf liblzma5:armhf
  libpcre2-8-0:armhf libselinux1:armhf libsystemd0:armhf libzstd1:armhf
0 upgraded, 18 newly installed, 3 to remove and 0 not upgraded.

"I cannot lie to you about your chances, but you have my sympathies."

Offline

Board footer