File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -18,5 +18,6 @@ members = ["libkeyutils-sys"]
18
18
bitflags = " ~0.9"
19
19
errno = " ~0.2"
20
20
libkeyutils-sys = { path = " libkeyutils-sys" , version = " ~0.3" }
21
+ log = " ~0.4"
21
22
22
23
libc = " ~0.2"
Original file line number Diff line number Diff line change @@ -628,11 +628,16 @@ impl Description {
628
628
None
629
629
} else {
630
630
if len > 5 {
631
- println ! ( "New fields detected! Please report this upstream to \
632
- https://github.com/mathstuf/rust-keyutils: {}",
633
- desc) ;
631
+ error ! ( "New fields detected! Please report this upstream to \
632
+ https://github.com/mathstuf/rust-keyutils: {}",
633
+ desc) ;
634
634
}
635
635
let bits = KeyPermissions :: from_str_radix ( pieces[ 1 ] , 16 ) . unwrap ( ) ;
636
+ if Permission :: from_bits ( bits) . is_none ( ) {
637
+ error ! ( "New permission bits detected! Please report this upstream to \
638
+ https://github.com/mathstuf/rust-keyutils: {}",
639
+ bits) ;
640
+ }
636
641
Some ( Description {
637
642
type_ : pieces[ 4 ] . to_owned ( ) ,
638
643
uid : pieces[ 3 ] . parse :: < libc:: uid_t > ( ) . unwrap ( ) ,
Original file line number Diff line number Diff line change 31
31
#![ warn( missing_docs) ]
32
32
33
33
#[ macro_use] extern crate bitflags;
34
+ #[ macro_use] extern crate log;
34
35
35
36
mod crates {
36
37
// public
You can’t perform that action at this time.
0 commit comments