Page MenuHomeFreeBSD

ksu: Remove ENABLE_SUID_K5SU
AbandonedPublic

Authored by cy on Sep 9 2025, 4:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 2, 3:57 PM
Unknown Object (File)
Mon, Sep 22, 3:23 PM
Unknown Object (File)
Sun, Sep 21, 3:49 PM
Unknown Object (File)
Sep 14 2025, 4:53 AM
Unknown Object (File)
Sep 10 2025, 11:24 AM
Unknown Object (File)
Sep 10 2025, 7:30 AM
Unknown Object (File)
Sep 10 2025, 4:14 AM
Unknown Object (File)
Sep 10 2025, 3:26 AM
Subscribers

Details

Reviewers
des
ivy
emaste
delphij
Group Reviewers
krb5
Summary

ksu without setuid is useless. This affects binary-only (traditional
install and pkgbass) users.

Reported by: Dan Mahoney <dmahoney@isc.org>
MFC after: 3 days
MFC to: 15/stable

Test Plan

Running here.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66932
Build 63815: arc lint + arc unit

Event Timeline

cy requested review of this revision.Sep 9 2025, 4:50 PM
cy added reviewers: des, ivy, emaste, delphij.

can we just remove this entirely in favour of su(1) with pam_ksu(8)? i believe this provides the same functionality, with the benefit of removing a setuid executable and allowing the user to easily configure whether they want this enabled or not.

otherwise, we're adding another unconfigurable setuid executable to the base system, which is not ideal from a security standpoint.

In D52463#1198005, @ivy wrote:

can we just remove this entirely in favour of su(1) with pam_ksu(8)? i believe this provides the same functionality, with the benefit of removing a setuid executable and allowing the user to easily configure whether they want this enabled or not.

otherwise, we're adding another unconfigurable setuid executable to the base system, which is not ideal from a security standpoint.

No. Because ksu is,

a) Provided by Kerberos (MIT and Heimdal). Any users and scripts that expect the file to be there must now be FreeBSD-ized.

b) ksu is a different application than su.

c) su(1) never did work with kerberos.

Dan Mahoney <dmahoney@isc.org> has notified me they use a puppet script to chmod ksu. As long as people know to do this fine by me.