chris-huxtable / user_group.cr

Adds System Users and Groups.
ISC License
4 stars 1 forks source link

Add ability to change uid and gid of process #2

Closed jrester closed 4 years ago

jrester commented 4 years ago

This adds methods for changing the uid and gid of a process with only the uid and gid:

Process.uid=(uid : UInt32)
Process.gid=(gid : UInt32)
Process.become(uid : UInt32, gid : UInt32)

Those methods are especially useful in docker environments where you may have to change the uid and gid of the process but the user does not exist in the container.

chris-huxtable commented 4 years ago

Looks reasonable.