[JDEV] Binding to reserved ports...
Ralph Siemsen
ralphs at blueairnetworks.com
Tue May 21 13:38:23 CDT 2002
Can someone shed some light on the intended usage of the -U option?
I can see from main() in jabberd/jabber.c that the server executes
setuid() and setgid() calls to switch to the the specified user,
immediately after parsing commandline arguments.
This is fine, but it is not possible to run on a privileged port this
way. The call to bind the interface occurs much later in the startup,
at which time root privileges have been dropped.
It seems the -U option is more of a convenience, as the server doesn't
_do_ anything before changing users. The same could be accomplished
with "su <username> jabberd"...
Am I missing something obvious, or is there actually a way to make use
of the "root dropping" feature in the way most other daemons do?
-R
More information about the JDev
mailing list