File: securebits.rs

package info (click to toggle)
rust-caps 0.5.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 208 kB
  • sloc: makefile: 2
file content (13 lines) | stat: -rw-r--r-- 382 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
use caps::securebits;

#[test]
fn test_keepcaps() {
    // Test a roundtrip on SET_KEEPCAPS.
    let f0 = securebits::has_keepcaps().unwrap();
    securebits::set_keepcaps(!f0).unwrap();
    let f1 = securebits::has_keepcaps().unwrap();
    assert_eq!(f0, !f1);
    securebits::set_keepcaps(!f1).unwrap();
    let f2 = securebits::has_keepcaps().unwrap();
    assert_eq!(f0, f2);
}