I've been using setcap (tool, not the syscall) on linux to bind on low
ports and it works flawless.

On ubuntu, I had to install libcap2-bin and execute /sbin/setcap
'cap_net_bind_service=+ep' /path/to/command
+ep is effective and permitted

After that the command might run as non-root and bind on low ports.

On Friday, January 21, 2011 1:39:39 PM UTC-5, ziutek wrote:

Dropping the capability after binding to the port
would be nice, but I think you would have to add a function to the
syscall package to implement it.
I wonder if setcap syscall will change capabilities for overall
process, or only for one thread.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
postedMay 15, '13 at 6:09p
activeMay 15, '13 at 6:09p

1 user in discussion

Alexandre Fiori: 1 post



site design / logo © 2022 Grokbase