29 lines
814 B
Groff
29 lines
814 B
Groff
.Dd Jul 16, 2018
|
|
.Dt setruid 1
|
|
.Os
|
|
.Sh NAME
|
|
.Nm setruid
|
|
.Nd set the real UID and GID for a command
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Ar username Ns Op : Ns Ar group
|
|
.Ar command
|
|
.Op Ar arguments
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
sets the real UID and GID while keeping the effective UID and GID the same. It
|
|
is indended for simple servers that need to bind on a low port and drop
|
|
privileges by setting effective UID to real UID.
|
|
.Pp
|
|
By default the real GID of the process is set to the default group of the given
|
|
user, but this can be overridden by passing the group argument.
|
|
.Pp
|
|
.Nm
|
|
executes the given command as the same process.
|
|
.Sh EXIT STATUS
|
|
.Nm
|
|
will exit with status 1 if it fails to set the UID or execute the given command.
|
|
If it is succesful, exit status will be that of the given command.
|
|
.Sh AUTHORS
|
|
.Nm
|
|
has been written by nortti.
|