Module: Cap2
- Defined in:
- lib/cap2.rb,
lib/cap2/file.rb,
lib/cap2/process.rb,
lib/cap2/version.rb,
ext/cap2/cap2.c
Overview
Cap2 is a module for querying the POSIX 1003.1e capabilities available in Linux kernels. These capabilities are a partitioning of the all powerful root privilege into a set of distinct privileges.
For more information see capabilities(7).
Defined Under Namespace
Classes: File, FileNotFound, Process, ProcessNotFound
Constant Summary collapse
- Version =
'0.2.2'
Class Method Summary collapse
- .allcaps ⇒ Object
-
.file(filename) ⇒ Object
Returns a Cap2::File initialized with the given filename.
-
.process(pid = ::Process.pid) ⇒ Object
Returns a Cap2::Process initialized with the given pid, defaulting to the current pid.
Class Method Details
.allcaps ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 |
# File 'ext/cap2/cap2.c', line 82
VALUE cap2_allcaps(VALUE self) {
int i;
VALUE caps;
caps = rb_ary_new();
for(i = 0; i < __CAP_COUNT; i++)
rb_ary_push(caps, ID2SYM(rb_intern(cap2_caps[i].name)));
return caps;
}
|