mathstuf / rust-keyutils

Rust interface to the Linux keyring
BSD 3-Clause "New" or "Revised" License
17 stars 9 forks source link

Change libkeyutils-sys to not requite C linking #24

Closed josephlr closed 4 years ago

josephlr commented 5 years ago

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:

This changes would probably justify changing the name from libkeyutils-sys to keyutils-raw.

mathstuf commented 5 years ago

I'd be thrilled to do this. However, first I think the test suite should be improved to help ensure that we're not breaking behavior with our implementation. There are some more advanced functionality bits that we're using that are incidental (mainly EOPNOTSUPP holes). Most of the extra code we are using seems to be around supporting older kernels without all of the features.