What it actually does is disabling AppArmor confinement for smbd
.
10:~ # systemctl restart smb.service
10:~ # ps -ef | grep smb
root 6767 1 1 19:18 ? 00:00:00 /usr/sbin/smbd --foreground --no-process-group
root 6771 6767 0 19:18 ? 00:00:00 /usr/sbin/smbd --foreground --no-process-group
root 6772 6767 0 19:18 ? 00:00:00 /usr/sbin/smbd --foreground --no-process-group
root 6774 6641 0 19:18 pts/2 00:00:00 grep --color=auto smb
10:~ # ll /proc/6767/attr
total 0
dr-xr-xr-x 2 root root 0 Dec 8 19:18 apparmor
-rw-rw-rw- 1 root root 0 Dec 8 19:18 current
-rw-rw-rw- 1 root root 0 Dec 8 19:18 exec
-rw-rw-rw- 1 root root 0 Dec 8 19:18 fscreate
-rw-rw-rw- 1 root root 0 Dec 8 19:18 keycreate
-r--r--r-- 1 root root 0 Dec 8 19:18 prev
-rw-rw-rw- 1 root root 0 Dec 8 19:18 sockcreate
10:~ # cat /proc/6767/attr/current
smbd (enforce)
10:~ # aa-disable /usr/sbin/smbd
Disabling /usr/sbin/smbd.
10:~ # aa-enforce /usr/sbin/smbd
Setting /usr/sbin/smbd to enforce mode.
Warning: profile smbd represents multiple programs
10:~ # ll /proc/6767/attr
total 0
dr-xr-xr-x 2 root root 0 Dec 8 19:18 apparmor
-rw-rw-rw- 1 root root 0 Dec 8 19:18 current
-rw-rw-rw- 1 root root 0 Dec 8 19:18 exec
-rw-rw-rw- 1 root root 0 Dec 8 19:18 fscreate
-rw-rw-rw- 1 root root 0 Dec 8 19:18 keycreate
-r--r--r-- 1 root root 0 Dec 8 19:18 prev
-rw-rw-rw- 1 root root 0 Dec 8 19:18 sockcreate
10:~ # cat /proc/6767/attr/current
unconfined
10:~ #
So, it is possible that AppArmor profile is not compatible with your configuration and needs adjustment. Try aa-logprof
, what does it suggest?