Commit Graph

40 Commits

Author SHA1 Message Date
Jeremy Soller 2fd54ec8d4 Update liner 2019-11-29 19:37:53 -07:00
Jeremy Soller a208ce4aa8 Update redox_users 2019-08-07 20:00:09 -06:00
Jeremy Soller 32569c0620 Compile with LTO 2019-05-14 13:54:24 -06:00
MggMuggins 48a8e2fa56 Update redox-users v0.2: Shadowfile support 2018-07-25 15:18:19 -05:00
Jeremy Soller 6635f8cb9e Update links to gitlab 2018-06-12 12:30:45 -06:00
MggMuggins ba89992998 Update Cargo.lock 2018-03-28 13:37:34 -05:00
MggMuggins 69838054ab Remove ArgParser dep, whoami
Remove Arg parsing from sudo, (maybe in prep to deprecate in favor of
rudo)

Port login to clap-rs

Remove ArgParser dep

Remove whoami in favor of a link to id, and implemented linking in id.
2018-02-10 12:09:10 -06:00
MggMuggins fba0c70ae2 Port to clap-rs
I did a number of things here:

the *add, *mod, and *del utilities, as well as id recieved substantial
changes, probably what you'd call a rewrite. This was of course using
clap-rs. These should all be very stable at this point (except
unimplemented features in usermod, grr)

getty, passwd, and su are simply ported, using clap for arg parsing. I
didn't change any of the logic, just swapped ArgParser for clap.

Fixed a bug with passwd and unset passwords

I'll open issues about the ones I didn't mention.
2018-02-08 21:10:44 -06:00
MggMuggins d5e011a304 Implement usermod, groupmod, userdel, groupdel; Fix passwd and useradd
Here I've implemented the remainder of the core user utilities present
on most unix systems. They aren't particularly pretty, but they do work
for the most part.

Note that for some reason attempting to move the home directory of a
user via usermod -m does not work.

Also removing user's that have been deleted from groups is not yet
implemented, nor is updating /etc/passwd when a group id is changed.

Note that redox_users as used by Cargo.lock as of this commit is broken,
and may not work properly. If redox-os/users#11 is merged, cargo update
should fix.
2018-02-03 19:10:39 -06:00
MggMuggins 5e53b4b161 Port to redox_users break-api
All the utilities use the new API I defined in mu recent PR to
redox_users. `su`'s behavior was also fixed.

I also updated Cargo.toml (removing unused deps). This may require
another commit after my first PR is merged in order to appropriately
update Cargo.lock and make sure everything builds.
2018-01-29 16:39:52 -06:00
MggMuggins 0b8f40c234 Add additional flags to user and groupadd; Update Cargo files 2017-12-09 22:06:47 -06:00
Jose Narvaez cf8f7f3a25 Oops, commited local paths. Fixed. 2017-12-01 23:44:03 +00:00
Jose Narvaez fd81487760 Updated to new error types from redox_users and simplefied the inspection and downcasting of the error on login. 2017-12-01 23:16:14 +00:00
Jose Narvaez 13681c3442 Moved to new error hadling of . 2017-11-30 22:41:57 +00:00
MggMuggins d9d3635916 Implemented useradd; groupadd fix 2017-11-28 21:39:20 -06:00
MggMuggins 8fffeb1e57 Implemented groupadd, fix for passwd compile 2017-11-26 16:53:37 -06:00
Jose Narvaez 0ed14bec6d Migrated to redox_users and some refactoring and docs.
Details

- Updated dependencies with `redox_users`.
- Migrated all user/group dependent functionality to calls to `redox_users`.
- Added top level documentation to the crate.
- Added a `spawn_shell` function to reuse a bit of code.
- `login`: Handled the case of an invalid login with "Login incorrect" (as in BSD).
- `passwd`: Refactored a bit and used `eprintln!` where possible.
- `su`: Refactored a bit and used `eprintln!` where possible.
- `sudo`: Refactored a bit to simplify logic also used `eprintln!` where possible.
- `whoami`: Refactored a bit and used `eprintln!/println!` where possible.
- Also added myself on the AUTHORS section :).
2017-11-08 22:49:00 +00:00
Jeremy Soller bc31f4d490 Update Cargo.lock and Cargo.toml 2017-08-19 14:51:08 -06:00
Jeremy Soller f6fd552f45 Replace termion 2017-08-02 19:42:00 -06:00
Jeremy Soller 83d77f8124 Use PTY in getty to provide line control for raw consoles and vesad 2017-07-24 20:58:30 -06:00
Jose Narvaez 0d0f726277 Updated deps. 2017-07-16 22:49:58 +01:00
Jose Narvaez 3a06dbbc8e Implemented whoami on top of system calls.
Details

- The current implementataion the `whoami` utility relies
on a env var to determine the user. With this change we get
the effective user id of the context and lookup that id on
/etc/passwd.
- Added the Redox `libextra` dependency as it has some goodies
for error handling. This will allow to make this crate upto date
with `coreutils` practices.
- Added a new small `arg_parser` crate that was extracted from
`coreutils` as is now commen between `coreutils` and here.
2017-07-16 17:47:18 +01:00
xTibor 63985a11ff Implement whoami 2017-01-16 00:19:24 +01:00
Jeremy Soller 2011976381 Use source from crates.io 2017-01-13 15:06:38 -07:00
Jeremy Soller 2fdef17559 Use liner to get username 2017-01-12 19:12:59 -07:00
Jeremy Soller 901caafce3 Use upstream argon2rs 2016-12-29 07:52:11 -07:00
Jeremy Soller 095a5baafa Do not checkout rand 2016-12-10 22:03:02 -07:00
Jeremy Soller 80379e0eae Remove replacement for libc 2016-12-06 15:14:53 -07:00
Jeremy Soller 69a21ddd1f Use upstream rand! 2016-11-09 10:31:31 -07:00
Jeremy Soller 7511f6dd5a Update rand 2016-11-07 11:27:45 -07:00
Jeremy Soller 98d7b64a16 Update libc 2016-11-03 17:17:07 -06:00
Jeremy Soller 0073f5695e Use syscall git 2016-11-03 13:50:34 -06:00
Jeremy Soller 359fe4b018 Use crate of redox_syscall 2016-11-02 19:37:44 -06:00
Jeremy Soller 5ae17129d3 Use syscall from git 2016-10-31 13:33:22 -06:00
Jeremy Soller 46631df4f0 Use OsRng to get random data for seed 2016-10-24 14:07:55 -06:00
Jeremy Soller d32f2dc10e Correctly use salt 2016-10-24 13:12:58 -06:00
Jeremy Soller e0fe388ccf Switch to argon2: WIP 2016-10-24 12:22:13 -06:00
Jeremy Soller a05b8f4d25 Update libc 2016-10-15 21:12:03 -06:00
Jeremy Soller eaf26765c1 Add su 2016-10-07 10:42:00 -06:00
Jeremy Soller 860c1f5f25 Initial commit 2016-10-07 10:19:08 -06:00