grantpt() and unlockpt() need to be used according to the standard, even
though our grantpt is a no-op (since we auto-lock ptys as we give them
out).
This is part of my series for ptyd. This can be safely merged as long as
the relibc/ and base/ changes are merged at the same time.
Previously root would need to know its own password. On Linux root can
change its own password without needing to enter its own password. It
can do so on Redox OS already anyway by directly editing /etc/shadow.
This daemon will request the password of the user, check that the user
is in the sudo group and if everything checks out elevate the sudo
process to root after which the sudo process can exec the target process.
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.
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.
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.