linux/security/selinux/include
Stephen Smalley ad1ac3d740 selinux: prune /sys/fs/selinux/user
Remove the previously deprecated /sys/fs/selinux/user interface aside
from a residual stub for userspace compatibility.

Commit d7b6918e22 ("selinux: Deprecate /sys/fs/selinux/user") started
the deprecation process for /sys/fs/selinux/user:

    The selinuxfs "user" node allows userspace to request a list
    of security contexts that can be reached for a given SELinux
    user from a given starting context. This was used by libselinux
    when various login-style programs requested contexts for
    users, but libselinux stopped using it in 2020.
    Kernel support will be removed no sooner than Dec 2025.

A pr_warn() message has been in place since Linux v6.13, and a 5
second sleep was introduced since Linux v6.17 to help make it more
noticeable.

We are now past the stated deadline of Dec 2025, so remove the
underlying functionality and replace it with a stub that returns a
'0\0' buffer to avoid breaking userspace. This also avoids a local DoS
from logspam and an uninterruptible sleep delay.

Cc: stable@vger.kernel.org
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2026-05-05 15:27:44 -04:00
..
audit.h selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
avc_ss.h selinux: fix style issues in security/selinux/include/avc_ss.h 2023-12-22 18:09:26 -05:00
avc.h selinux: introduce neveraudit types 2025-06-19 17:23:04 -04:00
classmap.h selinux: add support for BPF token access control 2026-01-13 15:42:37 -05:00
conditional.h selinux: constify and reconcile function parameter names 2025-01-07 23:14:38 -05:00
hash.h selinux: improve bucket distribution uniformity of avc_hash() 2025-10-23 18:24:30 -04:00
ibpkey.h selinux: make header files self-including 2023-05-18 14:12:43 -04:00
ima.h selinux: fix style issues in security/selinux/include/ima.h 2023-12-22 18:09:28 -05:00
initcalls.h selinux: move initcalls to the LSM framework 2025-10-22 19:24:28 -04:00
initial_sid_to_string.h selinux: do not include <linux/*.h> headers from host programs 2024-10-03 15:34:24 -04:00
netif.h selinux: fix style issues in security/selinux/include/netif.h 2023-12-22 18:09:28 -05:00
netlabel.h selinux: fix style issues with security/selinux/include/netlabel.h 2023-12-22 18:09:28 -05:00
netnode.h selinux: constify network address pointer 2025-04-11 16:29:50 -04:00
netport.h selinux: include necessary headers in headers 2022-05-03 14:11:13 -04:00
objsec.h selinux: fix avdcache auditing 2026-04-28 18:13:58 -04:00
policycap_names.h selinux: add support for BPF token access control 2026-01-13 15:42:37 -05:00
policycap.h selinux: add support for BPF token access control 2026-01-13 15:42:37 -05:00
security.h selinux: prune /sys/fs/selinux/user 2026-05-05 15:27:44 -04:00
xfrm.h selinux: fix style issues in security/selinux/include/xfrm.h 2023-12-22 18:09:30 -05:00