Closed
Description
The current implementation of libkeyutils-sys
requires linking against the C library libkeyutils
. However, this seems a bit unnecessary as this library doesn't use any of libkeyutils
advanced functionality (and it reimplements all the constants), but only needs the wrappers for the three Linux syscalls:
I would propose the following design change:
- Don't use
libkeyutils
- Use
libc::syscall
and std::io::Error::last_os_error to implement type-safe Rust wrappers around the syscalls. - These functions would then be safe, and all
unsafe
code would be limited to the lower-level crate. - The
errno
crate could be removed as a dependancy
This changes would probably justify changing the name from libkeyutils-sys
to keyutils-raw
.