#54958 closed defect (fixed)
sudo: no sticky bit on high sierra
Reported by: | danchr (Dan Villiom Podlaski Christiansen) | Owned by: | Schamschula (Marius Schamschula) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.99 |
Keywords: | highsierra | Cc: | ryandesign (Ryan Carsten Schmidt) |
Port: | sudo |
Description
I just upgraded my Mac to High Sierra, and during the rebuild afterwards sudo was built to a non-functioning state. Specifically, everthing built, but /opt/local/bin/sudo
had no setuid bit, leaving functionality somewhat reduced.
I run MacPorts from the master branch, so that might also be the cause.
Anyway, the fix is rather trivial:
-
sysutils/sudo/Portfile
diff --git a/sysutils/sudo/Portfile b/sysutils/sudo/Portfile
a b pre-destroot { 47 47 } 48 48 49 49 post-destroot { 50 file attributes ${destroot}${prefix}/bin/sudo -permissions +s 50 51 file delete ${destroot}${prefix}/etc/sudoers 51 52 xinstall -d -m 0755 ${destroot}${prefix}/var/run/sudo 52 53 }
Change History (5)
comment:1 Changed 7 years ago by Schamschula (Marius Schamschula)
comment:2 Changed 7 years ago by Schamschula (Marius Schamschula)
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 follow-up: 4 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign added |
---|
Any explanation for why this did not get set by the build system as on previous macOS versions? Is it a bug in sudo or MacPorts or High Sierra or APFS?
comment:4 follow-up: 5 Changed 7 years ago by danchr (Dan Villiom Podlaski Christiansen)
Replying to ryandesign:
Any explanation for why this did not get set by the build system as on previous macOS versions? Is it a bug in sudo or MacPorts or High Sierra or APFS?
I believe the bug is somewhere in the MacPorts infrastructure; I ran a manual sudo make install DESTDIR=/tmp
and that resulted in a binary the proper mode. Without having investigated further, I'd be inclined to blame trace mode; it just feels like something it could break… Alternatively, overly aggressive privilege escalation might be the cause.
comment:5 Changed 7 years ago by danchr (Dan Villiom Podlaski Christiansen)
Replying to danchr:
Replying to ryandesign:
Any explanation for why this did not get set by the build system as on previous macOS versions? Is it a bug in sudo or MacPorts or High Sierra or APFS?
I believe the bug is somewhere in the MacPorts infrastructure…
Confirmed with a simple test case and reported as bug #54963.
Yes. Under High Sierra Beta I was manually setting the setuid bit, but now that the release version is out, might as well add this to the Portfile.