Last active
August 29, 2015 14:01
-
-
Save vmarmol/7d817660ae436590da86 to your computer and use it in GitHub Desktop.
gocapability ignored EINVAL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"./capability" | |
"fmt" | |
"os" | |
) | |
// NOTE: Run as root. | |
func main() { | |
c, err := capability.NewPid(os.Getpid()) | |
if err != nil { | |
fmt.Printf("Error NewPid: %s", err) | |
} | |
c.Unset(capability.CAPS|capability.BOUNDS, capability.CAP_SYSLOG) | |
if err := c.Apply(capability.CAPS | capability.BOUNDS); err != nil { | |
fmt.Printf("Error setting cap: %s", err) | |
} | |
fmt.Printf("Caps: %s\n", c) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment