Add support for request_key and keyctl_instantiate#13
Conversation
|
@mythi Thanks for the PR! It looks great, will try to finish the review this weekend. Left one comment for your question about "NULL" callouts. |
Thanks, I think the comment is missing (at least I cannot see it). I pushed one small fix to |
| pub fn request_key<D: AsRef<str> + ?Sized, C: AsRef<str> + ?Sized>( | ||
| &self, | ||
| description: &D, | ||
| callout: &C, |
There was a problem hiding this comment.
I think having this as Option<&C> and then updating ffi::request_key to provide core::ptr::null when the Option is None would be nice from a user perspective. Instead of checking for ""
There was a problem hiding this comment.
I thought about the same but dropped the idea in the initial ver. I've have that now implemented. AFAUI, Option<&C> wants type hint so the param becomes None::<&str>.
70758d7 to
d76f9f2
Compare
|
(pushed with one lint error fixed that I just discovered) |
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
the rustdoc content is based on 'man request_key'. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13 +/- ##
===========================================
- Coverage 78.33% 65.51% -12.82%
===========================================
Files 9 9
Lines 420 319 -101
===========================================
- Hits 329 209 -120
- Misses 91 110 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@mythi Sorry for the delay. Just added a small Also added https://github.com/landhb/linux-keyutils/blob/main/examples/request-key.rs Will get this out in the next release. |
|
@landhb thanks! |
Fixes: #12