Commit Graph

61 Commits

Author SHA1 Message Date
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
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
Jose Narvaez ef5fdc82a0 Improved id and whoami.
Details

- New implementation of `id` inspired by BSD's one.
- Refactoring on `whoami`.
- Added few utility functions in `userutils` for getting processes user and group
real/effective ID and names.

Added docs do `getty`, `login`, `passwd`, `su`, and `sudo`.

Details

- The docs are from BSD's ones.
- Also added `ArgParser` to all of them and added a -h/--help flag
to all of them.
- This is the start of a revision of all of those commands.
2017-07-19 18:06:48 +01:00
Jeremy Soller e70be16a48 Merge pull request #6 from goyox86/whoami-improved
whoami improved and a bit of love to the crate.
2017-07-16 18:59:20 -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
Jeremy Soller 3ca18917f8 Update to use sudo password 2017-04-06 21:05:46 -06:00
Jeremy Soller 1ee223f926 Better error messages for sudo 2017-02-27 15:34:35 -07:00
Jeremy Soller b1e0ae8722 Fix issue with variable not passed to daemon 2017-02-07 20:39:07 -07:00
Jeremy Soller 880c664a24 Better failure detection in getty 2017-02-07 20:38:21 -07:00
Jeremy Soller bb463a8f02 Merge pull request #2 from xTibor/implement_whoami
Implement whoami
2017-01-15 21:19:50 -07: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 ccae9c0b0a Correctly set environment 2017-01-10 09:50:23 -07:00
Jeremy Soller 13ef8943df Fix UID, GROUPS setting 2017-01-10 09:46:02 -07:00
Jeremy Soller 6208a242f6 Merge branch 'master' of https://github.com/redox-os/userutils 2017-01-10 09:44:58 -07:00
Jeremy Soller 4a7d61eb1c Set other environmental variables 2017-01-10 09:44:43 -07:00
Jeremy Soller 8083f84cbc Add resource directory 2017-01-09 17:16:38 -07:00
Jeremy Soller 901caafce3 Use upstream argon2rs 2016-12-29 07:52:11 -07:00
Jeremy Soller 45cb3e8208 Add clear argument 2016-12-19 21:38:00 -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 56da6a40b0 Manually enter/exit raw mode 2016-11-20 11:59:08 -07:00
Jeremy Soller 5f9ff4d19e Remove cargo.lock 2016-11-16 21:32:05 -07:00
Jeremy Soller d44639145b Update syscall 2016-11-15 17:05:49 -07:00
Jeremy Soller 6305f222ad Update syscall 2016-11-15 16:01:51 -07:00
Jeremy Soller ba16f79ada Update syscall 2016-11-14 12:16:28 -07:00
Jeremy Soller b59deda452 Update syscall 2016-11-10 21:08:56 -07:00
Jeremy Soller 48938fa3fd Use clone instead of threading to daemonize 2016-11-10 20:09:15 -07:00
Jeremy Soller 61203b6a72 Update libc 2016-11-10 11:29:36 -07:00
Jeremy Soller 69a21ddd1f Use upstream rand! 2016-11-09 10:31:31 -07:00
Jeremy Soller 30187e1c64 WIP passwd implementation 2016-11-08 11:54:10 -07:00
Jeremy Soller 7511f6dd5a Update rand 2016-11-07 11:27:45 -07:00
Jeremy Soller 24859cb7a6 Update syscall 2016-11-04 13:47:32 -06:00
Jeremy Soller 8a7f4bba83 Update libc 2016-11-03 17:39:57 -06:00
Jeremy Soller 98d7b64a16 Update libc 2016-11-03 17:17:07 -06:00
Jeremy Soller d765b381f8 Update redox_syscall 2016-11-03 15:09:46 -06:00
Jeremy Soller 0073f5695e Use syscall git 2016-11-03 13:50:34 -06:00
Jeremy Soller f27ed41bcb Use fmap, fix syscall crate name 2016-11-02 19:47:24 -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