users issueshttps://gitlab.redox-os.org/redox-os/users/-/issues2021-11-22T06:15:05Zhttps://gitlab.redox-os.org/redox-os/users/-/issues/22Zeroing Data Structures2021-11-22T06:15:05ZSamwiseFilmoremggmugginsmc@gmail.comZeroing Data StructuresThis is a security critical crate, I think it's probably important that memory is zeroed before it is freed. I'm no crypto expert though, so I'd probably differ to somebody else on this one.This is a security critical crate, I think it's probably important that memory is zeroed before it is freed. I'm no crypto expert though, so I'd probably differ to somebody else on this one.SamwiseFilmoremggmugginsmc@gmail.comSamwiseFilmoremggmugginsmc@gmail.comhttps://gitlab.redox-os.org/redox-os/users/-/issues/24API Changes2021-11-17T21:12:56ZSamwiseFilmoremggmugginsmc@gmail.comAPI ChangesThings that I want to do better for the `1.0.0` release. I'm not about to release that though, I want to iterate on this library for a while. If anybody wants to I'm happy to let somebody have a crack at this issue.
- [x] Move the implem...Things that I want to do better for the `1.0.0` release. I'm not about to release that though, I want to iterate on this library for a while. If anybody wants to I'm happy to let somebody have a crack at this issue.
- [x] Move the implementations of `Display` and `FromStr` into some internal traits so that they're not exposed in the API. Parsing these library types are implementation details that this library should be abstracting away.
- [x] ~~Make `Group` unconstructable and add a `new` method for `User` and `Group` that allows easy-ish construction. Along with this, refactor the `AllGroups::add_group` and `AllUsers::add_user` so that they just take a `User` or a `Group`. This should simplify the API and make it more consistent. Also allows for more efficient use of the library.~~
- An alternative to a new function would be a builder pattern, probably using a new type (`UserBuilder`/`GroupBuilder`), which would ensure that all their inputs are valid before building a new user. Might be nice to implement construction as `User::builder() -> UserBuilder` for ergonomic reasons.
- Alternatively, construct the `UserBuilder`/`GroupBuilder` from `AllUsers`/`AllGroups`, and cause it to hold a mutable reference to its `AllUsers`/`AllGroups`. Consuming the Builder then modifies the `All`.
- [x] ~~Remove `redox_users::Result` and just use `Result<T, failure::Error>`~~ Use [`thiserror`](https://crates.io/crates/thiserror) to derive error for the library's error type, and provide more/better context for that error type.
- [x] Implement `Debug` for `AllGroups` and fix the implementation for `AllUsers`. It works right now, but it's not pretty.SamwiseFilmoremggmugginsmc@gmail.comSamwiseFilmoremggmugginsmc@gmail.comhttps://gitlab.redox-os.org/redox-os/users/-/issues/26Make argon2 optional2020-08-26T19:59:10Zest31Make argon2 optionalThis crate is a dependency of the dirs crate which doesn't really need any of the argon2 related functionality. It would be cool if therefore all functionality that depends on the rust-argon2 crate would be behind an optional feature.
W...This crate is a dependency of the dirs crate which doesn't really need any of the argon2 related functionality. It would be cool if therefore all functionality that depends on the rust-argon2 crate would be behind an optional feature.
Would a PR to accomplish this be accepted?SamwiseFilmoremggmugginsmc@gmail.comSamwiseFilmoremggmugginsmc@gmail.com