You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go 1.16 added support for Setuid/Setgid (and other uid/gid related syscalls), instead of returning the EOPNOTSUPP error.
But the x/sys/unix still returns EOPNOTSUPP.
Proposal: uid/gid related syscalls might just call their counterparts in the syscall package (when golang 1.16 or higher (build tags)) and return EOPNOTSUPP (when golang 1.15 and lower)
The text was updated successfully, but these errors were encountered:
Or it might make sense to just add a normal syscall invocation (not on all threads). It could be useful to have 2 different implementations. The x/sys/unix with the help of runtime.LockOSThread() would change uid only on one goroutine/thread. So it will allow to drop/gain privileges per thread.
Even unix.Setresuid, unix.Setreuid (...) are still working on per-thread basis, without returning EOPNOTSUPP.
Thanks, I don't think this needs to be a proposal. We should just make the unix versions call the syscall versions on Linux.
ianlancetaylor
changed the title
proposal: x/sys/unix: support Setuid/Setgid (...) syscalls
x/sys/unix: support Setuid/Setgid (...) syscalls on Linux
Jun 19, 2022
Go 1.16 added support for Setuid/Setgid (and other uid/gid related syscalls), instead of returning the EOPNOTSUPP error.
But the x/sys/unix still returns EOPNOTSUPP.
Proposal: uid/gid related syscalls might just call their counterparts in the syscall package (when golang 1.16 or higher (build tags)) and return EOPNOTSUPP (when golang 1.15 and lower)
The text was updated successfully, but these errors were encountered: