| 1 | // Package caps provides functions for controlling capabilities on Linux. On |
| 2 | // other OSes, the functions are no-ops. |
| 3 | package caps |
| 4 | |
| 5 | // This constant will be true iff the target platform supports capabilities. |
| 6 | const Supported = supported |
| 7 | |
| 8 | // Returns true iff there are any capabilities available to the program. |
| 9 | // Returns false on non-Linux OSes. |
| 10 | func HaveAny() bool { |
| 11 | return haveAny() |
| 12 | } |
| 13 | |
| 14 | // Attempt to drop all capabilities. Does nothing on non-Linux OSes. |
| 15 | func Drop() error { |
| 16 | return drop() |
| 17 | } |