2 releases
0.0.1 | Jul 5, 2020 |
---|---|
0.0.0 | Jun 15, 2020 |
#7 in #effective
16KB
392 lines
capo - Linux capabilities
capo provides a Rust interface to Linux capabilities(7).
Example
let caps = Caps::get()?;
caps.effective.contains(SysAdmin);
let mut caps = Caps::empty();
caps.effective.insert(SysAdmin | Syslog);
caps.permitted.insert(SysAdmin | Syslog);
caps.set()?;
License
Copyright 2020 Will Glozer
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
lib.rs
:
An interface to Linux capabilities(7).
Examples
Get capabilities of the current thread:
use capo::{Caps, caps::*};
let caps = Caps::get()?;
caps.effective.contains(SysAdmin);
Set capabilities of the current thread:
let mut caps = Caps::empty();
caps.effective.insert(SysAdmin | Syslog);
caps.permitted.insert(SysAdmin | Syslog);
caps.set()?;
Dependencies
~230KB