Skip to main content
5 events
when toggle format what by license comment
Feb 19, 2017 at 19:05 vote accept thusoy
Feb 19, 2017 at 19:05 comment added thusoy Ah, thanks for the tip on passing only the file descriptor, nice way to pass something that can be closed after use.
Feb 19, 2017 at 12:28 comment added Gilles 'SO- stop being evil' @MichaelKjörling Binding privileged ports is commonly done through a wrapper, e.g. tcpwrapper does this and the service listens on the fd, just like what I suggest for the configuration file.
Feb 19, 2017 at 12:26 comment added user There's a related situation which doesn't work with option 2, though: binding to privileged ports. Lots of commonly used network services run on ports below 1024, and you can't bind to those without administrative privileges. I'd argue that that's a place for the relevant capability, which can be dropped after binding. (I'm too lazy to look up which one exactly that is, though.) Or maybe you could have a small wrapper that only binds to the port and passes the file descriptor in a manner similar to that described in your last paragraph; I'm not sure if that would work or not.
Feb 19, 2017 at 11:12 history answered Gilles 'SO- stop being evil' CC BY-SA 3.0