One of the things vexingly difficult to do is to bind to privileged ports when running as a non-privileged user, and a potential cool feature for YAJSW would be for it to do the port binding before running its JNA code to setuid to whichever nonprivileged user has been configured.
There are a couple different possibly ways this might be done, possibly by having YAJSW keeping around a map of requested ServerSockets that it bound before de-escalation and having some way for the wrapped process to get at them; alternatively, a simple threaded proxy engine could start up before de-escalation and proxy privileged ports to loopback non-privileged ports for the wrapped Java application to use.
hello,
good idea. I will have a look at this and let you know.
the class PosixSpawnMain should be the place for binding the port.
-- Ron