Recently bug #60 was closed and it was determined that OS X's existing permissions structure can't support granting special privileges to xhyve. It looks like the best way to set up networking for a vm without sudo is to use the setuid bit. However, after networking has been set up, root permissions are no longer needed and can be dropped. This PR drops privileges after networking has been initialized. As a bonus, it redirects the vmnet failure message to stderr instead of stdout.
Recently bug #60 was closed and it was determined that OS X's existing permissions structure can't support granting special privileges to xhyve. It looks like the best way to set up networking for a vm without sudo is to use the setuid bit. However, after networking has been set up, root permissions are no longer needed and can be dropped. This PR drops privileges after networking has been initialized. As a bonus, it redirects the vmnet failure message to stderr instead of stdout.