Mercurial > crates > nonstick
comparison src/handle.rs @ 78:002adfb98c5c
Rename files, reorder structs, remove annoying BorrowedBinaryData type.
This is basically a cleanup change. Also it adds tests.
- Renames the files with Questions and Answers to question and answer.
- Reorders the structs in those files to put the important ones first.
- Removes the BorrowedBinaryData type. It was a bad idea all along.
Instead, we just use (&[u8], u8).
- Adds some tests because I just can't help myself.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 08 Jun 2025 03:48:40 -0400 |
parents | c30811b4afae |
children | 5aa1a010f1e8 |
comparison
equal
deleted
inserted
replaced
77:351bdc13005e | 78:002adfb98c5c |
---|---|
207 ); | 207 ); |
208 | 208 |
209 trait_item!( | 209 trait_item!( |
210 set = set_authtok_item, | 210 set = set_authtok_item, |
211 item = "PAM_AUTHTOK", | 211 item = "PAM_AUTHTOK", |
212 see = PamModuleHandle::authtok_item, | 212 see = PamModuleOnly::authtok_item, |
213 "Sets the user's authentication token (e.g., password)." | 213 "Gets the user's authentication token (e.g., password)." |
214 "" | 214 "" |
215 "This is usually set automatically when " | 215 "This is usually set automatically when " |
216 "[`get_authtok`](PamModuleHandle::get_authtok) is called, " | 216 "[`get_authtok`](PamModuleOnly::get_authtok) is called, " |
217 "but can be manually set." | 217 "but can be manually set." |
218 ); | 218 ); |
219 | 219 |
220 trait_item!( | 220 trait_item!( |
221 set = set_old_authtok_item, | 221 set = set_old_authtok_item, |
222 item = "PAM_OLDAUTHTOK", | 222 item = "PAM_OLDAUTHTOK", |
223 see = PamModuleHandle::old_authtok_item, | 223 see = PamModuleOnly::old_authtok_item, |
224 "Sets the user's \"old authentication token\" when changing passwords." | 224 "Sets the user's \"old authentication token\" when changing passwords." |
225 "" | 225 "" |
226 "This is usually set automatically by PAM." | 226 "This is usually set automatically by PAM." |
227 ); | 227 ); |
228 } | 228 } |
306 ); | 306 ); |
307 | 307 |
308 trait_item!( | 308 trait_item!( |
309 get = old_authtok_item, | 309 get = old_authtok_item, |
310 item = "PAM_OLDAUTHTOK", | 310 item = "PAM_OLDAUTHTOK", |
311 see = PamHandle::set_old_authtok_item, | 311 see = PamShared::set_old_authtok_item, |
312 "Gets the user's old authentication token when changing passwords." | 312 "Gets the user's old authentication token when changing passwords." |
313 "" | 313 "" |
314 "This should only ever be called by *password-change* PAM modules." | 314 "This should only ever be called by *password-change* PAM modules." |
315 ); | 315 ); |
316 | 316 |