users merge requestshttps://gitlab.redox-os.org/redox-os/users/-/merge_requests2023-10-10T19:17:02Zhttps://gitlab.redox-os.org/redox-os/users/-/merge_requests/37Switch ABI to libredox2023-10-10T19:17:02ZJacob Lorentzon4ldo2@protonmail.comSwitch ABI to libredoxBlocked on https://gitlab.redox-os.org/redox-os/relibc/-/merge_requests/419Blocked on https://gitlab.redox-os.org/redox-os/relibc/-/merge_requests/419https://gitlab.redox-os.org/redox-os/users/-/merge_requests/350.42020-12-31T19:38:51ZSamwiseFilmoremggmugginsmc@gmail.com0.4See tag 0.4 for details on this change.See tag 0.4 for details on this change.SamwiseFilmoremggmugginsmc@gmail.comSamwiseFilmoremggmugginsmc@gmail.comhttps://gitlab.redox-os.org/redox-os/users/-/merge_requests/34Bump rust-argon2 dependency2020-08-26T19:10:29ZNikhil BeneschBump rust-argon2 dependencyFix #30.Fix #30.https://gitlab.redox-os.org/redox-os/users/-/merge_requests/30Remove dependency on failure, update rand to use getrandom.2020-02-04T02:36:40ZBlaž HrastnikRemove dependency on failure, update rand to use getrandom.The failure crate has fallen out of favor in the community, and there are plans to fix the stdlib Error trait: https://github.com/rust-lang/rust/issues/53487
This library uses failure very minimally, so it's easy to swap out and in th...The failure crate has fallen out of favor in the community, and there are plans to fix the stdlib Error trait: https://github.com/rust-lang/rust/issues/53487
This library uses failure very minimally, so it's easy to swap out and in the process remove failure (which also drops syntstructure/syn/quote/proc_macro/unicode-xid -- these are very heavy, with syn adding about 20s in compilation time).
Before:
```
redox_users v0.3.1
├── failure v0.1.5
│ ├── backtrace v0.3.35
│ │ ├── backtrace-sys v0.1.31
│ │ │ └── libc v0.2.62
│ │ │ [build-dependencies]
│ │ │ └── cc v1.0.41
│ │ ├── cfg-if v0.1.9
│ │ ├── libc v0.2.62 (*)
│ │ └── rustc-demangle v0.1.16
│ └── failure_derive v0.1.5
│ ├── proc-macro2 v0.4.30
│ │ └── unicode-xid v0.1.0
│ ├── quote v0.6.13
│ │ └── proc-macro2 v0.4.30 (*)
│ ├── syn v0.15.44
│ │ ├── proc-macro2 v0.4.30 (*)
│ │ ├── quote v0.6.13 (*)
│ │ └── unicode-xid v0.1.0 (*)
│ └── synstructure v0.10.2
│ ├── proc-macro2 v0.4.30 (*)
│ ├── quote v0.6.13 (*)
│ ├── syn v0.15.44 (*)
│ └── unicode-xid v0.1.0 (*)
├── rand_os v0.1.3
│ ├── libc v0.2.62 (*)
│ └── rand_core v0.4.2
├── redox_syscall v0.1.56
└── rust-argon2 v0.5.1
├── base64 v0.10.1
│ └── byteorder v1.3.2
├── blake2b_simd v0.5.7
│ ├── arrayref v0.3.5
│ ├── arrayvec v0.4.11
│ │ └── nodrop v0.1.13
│ └── constant_time_eq v0.1.4
└── crossbeam-utils v0.6.6
├── cfg-if v0.1.9 (*)
└── lazy_static v1.4.0
```
After:
```
redox_users v0.3.1
├── rand_os v0.1.3
│ ├── libc v0.2.62
│ └── rand_core v0.4.2
├── redox_syscall v0.1.56
└── rust-argon2 v0.5.1
├── base64 v0.10.1
│ └── byteorder v1.3.2
├── blake2b_simd v0.5.7
│ ├── arrayref v0.3.5
│ ├── arrayvec v0.4.11
│ │ └── nodrop v0.1.13
│ └── constant_time_eq v0.1.4
└── crossbeam-utils v0.6.6
├── cfg-if v0.1.9
└── lazy_static v1.4.0
```
I'd also love a redox_users alternative for dirs-sys-rs: https://github.com/soc/dirs-sys-rs/blob/c3e8767a38bb542dea712c85307b6834273f2de2/src/lib.rs#L81-L87
^ for such a simple usecase, pulling in failure (+syn, etc), rust-argon2 (+crossbeam_utils, etc) and rand_os feels a bit heavy.https://gitlab.redox-os.org/redox-os/users/-/merge_requests/33Bump rust-argon2 dependency to 0.72020-01-22T00:25:45ZAlex GaynorBump rust-argon2 dependency to 0.7https://gitlab.redox-os.org/redox-os/users/-/merge_requests/31Upgrade rust-argon2 to 0.62020-01-20T18:06:33ZAlex GaynorUpgrade rust-argon2 to 0.6https://gitlab.redox-os.org/redox-os/users/-/merge_requests/32Switch from rand_os crate to getrandom2020-01-20T16:38:53ZAlex GaynorSwitch from rand_os crate to getrandomThis extracts part of !30 into it's own PR. getrandom has a smaller dependency footprint, and the version of rand_os being used was quite out of date.This extracts part of !30 into it's own PR. getrandom has a smaller dependency footprint, and the version of rand_os being used was quite out of date.https://gitlab.redox-os.org/redox-os/users/-/merge_requests/26v3.02019-02-06T01:53:23ZSamwiseFilmoremggmugginsmc@gmail.comv3.0This thing breaks some API sorta everywhere, but I think it's a nicer thing to work with than it was. I added a configuration struct which allows for finer-grained control of AllUsers/AllGroups, which should be helpful for consumers of t...This thing breaks some API sorta everywhere, but I think it's a nicer thing to work with than it was. I added a configuration struct which allows for finer-grained control of AllUsers/AllGroups, which should be helpful for consumers of the library (I didn't end up using `AsRef`). I also refactored a bunch of the repetitive code into some traits so that there wasn't quite as much code duplication. I think it's a little more reasonable now, if a bit more complicated.https://gitlab.redox-os.org/redox-os/users/-/merge_requests/27Replace rand 0.5 with rand_os 0.12019-02-05T20:06:50ZRobin KrahlReplace rand 0.5 with rand_os 0.1redox_users only uses the OsRng struct which has been moved to the
rand_os crate. Therefore, the rand dependency is no longer needed.
Depending on rand_os instead of rand would make it easier to package
this crate for Debian.redox_users only uses the OsRng struct which has been moved to the
rand_os crate. Therefore, the rand dependency is no longer needed.
Depending on rand_os instead of rand would make it easier to package
this crate for Debian.https://gitlab.redox-os.org/redox-os/users/-/merge_requests/24Update rand crate to 0.52018-10-15T20:04:53ZLaurent ArnoudUpdate rand crate to 0.5Hello; This update rand crate to 0.5; cheersHello; This update rand crate to 0.5; cheershttps://gitlab.redox-os.org/redox-os/users/-/merge_requests/8API Overhaul2018-07-05T11:26:44ZSamwiseFilmoremggmugginsmc@gmail.comAPI OverhaulSee my commit message for a little more detail. This is big enough that the git diff doesn't really give you a good idea of everything I did, so maybe take a look at the actual source/documentation as well.
As of opening this PR this ...See my commit message for a little more detail. This is big enough that the git diff doesn't really give you a good idea of everything I did, so maybe take a look at the actual source/documentation as well.
As of opening this PR this API is untested. I'll be doing some testing over the next few days, but I don't recommend merging yet. Merging with a new branch would be an option too.Jeremy SollerJeremy Sollerhttps://gitlab.redox-os.org/redox-os/users/-/merge_requests/7Improved error handling.2018-07-05T11:26:42ZJeremy SollerImproved error handling.*Created by: goyox86*
So basically this is the first take on error handling. I decided to give it a try to [failure](https://crates.io/crates/failure) and I think is awesome.
Anyways I'm still not happy with the error enum. Might be ...*Created by: goyox86*
So basically this is the first take on error handling. I decided to give it a try to [failure](https://crates.io/crates/failure) and I think is awesome.
Anyways I'm still not happy with the error enum. Might be too detailed. There is still a case in which I neeed to see *why* something failed. Basically the error I get from the library is a trait object (`failure::Error`) and I have to downcast to act on the error type, and that's the part I'm not sure yet, I need to continue exploring `failure` to see if I can improve the usability whenever you want to act based on the types of errors. But looks promising! at least from the library that generates the errors, it is much much nicer than the `Error + Debug + Display + From` combo!
Just take a look @jackpot51 and @MggMuggins lets iterate this PR! \o/
Ah! I've migrated `userutils` locally to this and seems to be working fine look at the diff [diff](https://github.com/redox-os/userutils/compare/master...goyox86:goyox86/better-errors?expand=1)
https://gitlab.redox-os.org/redox-os/users/-/merge_requests/3AllUsers Iterator2018-07-05T11:26:37ZJeremy SollerAllUsers Iterator*Created by: goyox86*
Added iterator over all users of the system, refactoring and improved docs.
- Now the `parse_file` methods take a path to the file and not the string with the contents.
- `parse_file` methods now are only visib...*Created by: goyox86*
Added iterator over all users of the system, refactoring and improved docs.
- Now the `parse_file` methods take a path to the file and not the string with the contents.
- `parse_file` methods now are only visible inside the crate.
- Derived `Debug` for structs.
- Improved docs by linking.
- Fixed the README.https://gitlab.redox-os.org/redox-os/users/-/merge_requests/2Moved `Group` `users` field to be a vector of `String`.2018-07-05T10:53:34ZJeremy SollerMoved `Group` `users` field to be a vector of `String`.*Created by: goyox86*
Also:
- Improved docs.
- Improved error messages to state they come from `redox_users`.*Created by: goyox86*
Also:
- Improved docs.
- Improved error messages to state they come from `redox_users`.https://gitlab.redox-os.org/redox-os/users/-/merge_requests/18Travis; Rustfmt; Update README2018-07-05T10:53:32ZSamwiseFilmoremggmugginsmc@gmail.comTravis; Rustfmt; Update READMEAdded config files for those two services. I'm not going to require
formatting via travis, but I thought I'd add everything so it won't do
major things to code we'd already written if somebody runs it.
@jackpot51, how difficult woul...Added config files for those two services. I'm not going to require
formatting via travis, but I thought I'd add everything so it won't do
major things to code we'd already written if somebody runs it.
@jackpot51, how difficult would it be to get travis for this repo?https://gitlab.redox-os.org/redox-os/users/-/merge_requests/17Readme; Rustify2018-07-05T10:53:30ZSamwiseFilmoremggmugginsmc@gmail.comReadme; RustifyFixed the Readme.
This merges `goyox86/rustify`.Fixed the Readme.
This merges `goyox86/rustify`.https://gitlab.redox-os.org/redox-os/users/-/merge_requests/16Tests! Fix #152018-07-05T10:53:28ZSamwiseFilmoremggmugginsmc@gmail.comTests! Fix #15Fix #15, read and write aren't as dumb now. I removed locks for Linux read/write, because I'm not sure how to accomplish that locking on other platforms. Idk if std has a way to do it. Also, I should have used `#[cfg(not(redox))]`, so th...Fix #15, read and write aren't as dumb now. I removed locks for Linux read/write, because I'm not sure how to accomplish that locking on other platforms. Idk if std has a way to do it. Also, I should have used `#[cfg(not(redox))]`, so that's something to fix.
Tests are in! Doctests work, they all pass, as do the five that I wrote for that specific purpose. The doctests look good in the docs too.
I'm going to release this version of the crate on crates.io. I hope no one has any objections.https://gitlab.redox-os.org/redox-os/users/-/merge_requests/11Improve Write2018-07-05T10:53:24ZSamwiseFilmoremggmugginsmc@gmail.comImprove WriteThis introduces even harder dependencies on syscall, but I think
it will be a much more robust solution to the problem of concurrent
access for `/etc/passwd` and `/etc/group`This introduces even harder dependencies on syscall, but I think
it will be a much more robust solution to the problem of concurrent
access for `/etc/passwd` and `/etc/group`https://gitlab.redox-os.org/redox-os/users/-/merge_requests/10Implement Unset2018-07-05T10:53:21ZSamwiseFilmoremggmugginsmc@gmail.comImplement UnsetImplement unset passwords (see docs).
Also fixed a small bug where blank passwords would allow any password
rather than just a blank field.Implement unset passwords (see docs).
Also fixed a small bug where blank passwords would allow any password
rather than just a blank field.https://gitlab.redox-os.org/redox-os/users/-/merge_requests/1Some renaming and improved docs.2018-07-05T10:53:19ZJeremy SollerSome renaming and improved docs.*Created by: goyox86*
Just renamed a couple of functions on `User` as theymade sense when it was called `Passwd`. I think they make more sense now IMHO but I'm open to other names. Also I revisited the docs and tweaked the README.
De...*Created by: goyox86*
Just renamed a couple of functions on `User` as theymade sense when it was called `Passwd`. I think they make more sense now IMHO but I'm open to other names. Also I revisited the docs and tweaked the README.
Details
- Renamed 'User.verify' to 'User.verify_passwd'.
- Renamed 'User.encode' to 'User.encode_passwd'.
- Revisited documentation.
- Tweaked README.