Commit Graph

101 Commits

Author SHA1 Message Date
Jeremy Soller 7bb8dea121 Merge pull request #27 from MggMuggins/master
Fix #26
2018-01-30 16:57:03 -07:00
MggMuggins cbb7f52381 Fix #26 2018-01-30 17:41:16 -06:00
Jeremy Soller b335c59e7e Merge pull request #25 from MggMuggins/master
Port to redox_users break-api
2018-01-29 19:47:32 -07:00
MggMuggins bc0dc6488b Update Cargo.lock; Fix su 2018-01-29 20:44:08 -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
Jeremy Soller 02759b4a5a Fix bug causing ctrl-d to log in any user with su
Document su's logic
Return error code of shell from su
2018-01-22 08:01:02 -07:00
Jeremy Soller 5765da1ed9 Merge pull request #22 from goyox86/goyox86/unwrap_or_exit
Using new 'unwrap_or_exit' from libextra.
2017-12-15 12:40:50 -07:00
Jose Narvaez 0e327d8124 Using new 'unwrap_or_exit' from libextra. 2017-12-15 18:31:25 +00:00
Jeremy Soller 52cae8be05 Merge pull request #21 from MggMuggins/master
Add additional flags to user and groupadd; Update Cargo files
2017-12-10 07:26:59 -07:00
MggMuggins 0b8f40c234 Add additional flags to user and groupadd; Update Cargo files 2017-12-09 22:06:47 -06:00
Jeremy Soller 0db7c527a7 Merge pull request #20 from goyox86/goyox86/better-errors
Goyox86/better errors
2017-12-09 13:59:01 -07: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
Jeremy Soller 00eaa34aa6 Merge pull request #19 from fraang/master
Add missing included utility, add missing word
2017-11-29 06:30:14 -07:00
Florian R. A. Angermeier 0b1b978755 Add missing included utility, add missing word 2017-11-29 10:09:19 +01:00
Jeremy Soller dcf35e3548 Merge pull request #17 from MggMuggins/master
Implemented groupadd, fix for passwd compile
2017-11-28 21:12:39 -07:00
MggMuggins 65817077ee Cargo.lock update 2017-11-28 22:10:45 -06:00
MggMuggins d9d3635916 Implemented useradd; groupadd fix 2017-11-28 21:39:20 -06:00
MggMuggins 464b5c4aa5 Small fixes to better mesh with redox_users changes 2017-11-27 17:53:11 -06:00
MggMuggins 8fffeb1e57 Implemented groupadd, fix for passwd compile 2017-11-26 16:53:37 -06:00
Jeremy Soller 6b951a8bdc Merge pull request #15 from goyox86/goyox86-readme
README and docs tweaks.
2017-11-08 16:40:02 -07:00
Jose Narvaez 31d217b375 README and docs tweaks. 2017-11-08 23:23:00 +00:00
Jeremy Soller a857871fd8 Merge pull request #14 from goyox86/goyox86-redox-users
Migrated to `redox_users` and some refactoring and docs.
2017-11-08 16:09:24 -07: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 28d097dbf3 Fix man pages 2017-10-14 08:49:19 -06:00
Jeremy Soller 1f9042f47c Update Cargo.lock 2017-10-11 20:54:45 -06:00
Jeremy Soller a1d096b0bf Update Cargo.lock 2017-10-04 20:29:41 -06:00
Jeremy Soller 712eb2967b Merge pull request #13 from andre-richter/master
Fix unused extern crates
2017-08-31 07:04:00 -06:00
Andre Richter 2a6615d343 Fix unused extern crates 2017-08-31 11:36:30 +02:00
Jeremy Soller bc31f4d490 Update Cargo.lock and Cargo.toml 2017-08-19 14:51:08 -06:00
Jeremy Soller aeda1ae4b4 Update Cargo.lock 2017-08-02 21:13:16 -06:00
Jeremy Soller d811d8758c Update password read to new method 2017-08-02 21:09:36 -06:00
Jeremy Soller f6fd552f45 Replace termion 2017-08-02 19:42:00 -06:00
Jeremy Soller d0e22dd165 Update Cargo.lock 2017-07-29 08:25:08 -06:00
Jeremy Soller c05f37f653 Merge pull request #10 from goyox86/goyox86/login-improvements
Revisited `login`.
2017-07-27 11:26:23 -06:00
Jeremy Soller 7cdd6c7e18 Merge pull request #11 from goyox86/goyox86/revisiting-su
Revisited `su`.
2017-07-26 17:02:04 -06:00
Jeremy Soller 8f0b9afac2 Merge pull request #12 from goyox86/goyox86/revisiting-passwd
Revisiting `passwd`.
2017-07-26 17:01:21 -06:00
Jose Narvaez 1aa558e205 Some improvements to login
- Added constants for standard file paths.
- Improved error reporting when opening the files.
- Used `Passwd::parse_file` instead of doing it manually.
- Removed all the calls to unwrap().
- Used `fail` to report errors and exit when possible.
2017-07-26 21:37:13 +01:00
Jose Narvaez 80e085e7f0 Revisiting passwd
- Replaced all `unwrap()` calls by `try()`.
- Replaced all `panic()` calls by `fail()`.
- Argument parsing is now all done by `ArgParser`.
- Used `Passwd::parse_file` where possible.
- This actually does not change the password, will be the next job.
2017-07-26 21:12:10 +01:00
Jose Narvaez b42b6dd835 Revisited su.
Details

- Moved cmd line args parsing to `ArgParser`.
- All the calls to `panic!` were replaced by calls to `fail`.
- Revisited synopsis in the docs.
- Using `try` where possible.
- Using `Passwd::parse_file` instead of doing it manually.
- Handled errors while parsing passwd file.
- Added some constants.
2017-07-26 20:41:05 +01:00
Jeremy Soller 1725b377cd Add Cargo.lock file 2017-07-26 08:04:04 -06:00
Jeremy Soller e35d0bc6cd Add Cargo.lock 2017-07-26 08:00:41 -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
Jeremy Soller 4e2561ed75 Correctly exit when parent, not child 2017-07-20 20:37:40 -06:00
Jeremy Soller ad00ba9eae Merge pull request #9 from goyox86/goyox86/getty-improved
Some improvements to `getty`
2017-07-20 17:54:08 -06:00
Jose Narvaez d4de8c0b79 Some improvements to getty
- Improved error handling over all.
- Switched to argument parsing by `ArgParser`.
- Replaced panics by calls to `fail.
- Removed unwraps ignoring results of syscalls when clearing the screen
and flushing stdout.
- Added docs for 'noclear' option.
- The current implementation was receiving n arguments and was
considering only the last one as the TTY this new one checks that we
have at least one and always use the first one.
- Added constants for columns and lines.
- Daemon receiver a reference to stderr to setup error reporting inside
there.
2017-07-20 23:49:37 +01:00
Jeremy Soller 73995693f6 Merge pull request #8 from goyox86/goyox86/some-tweaks
Some tweaks to the `id` docs and copy-pasta typos.
2017-07-20 11:47:53 -06:00
Jose Narvaez 4a4c45a7a7 Some tweaks to the id docs and copy-pasta typos.
Details

- Added docs for the `-r` flag of `id` also reindented to 80 cols.
- Fixed a typo on `getty`.
2017-07-20 17:34:06 +01:00
Jeremy Soller 6d5e183c81 Merge pull request #7 from goyox86/some-love
Some love to userutils \o/
2017-07-19 18:02:13 -06:00