Commit Graph

100 Commits

Author SHA1 Message Date
Ibuki.O 8005fc0991 fix: Set FD flag to send process fd during sudo 2026-07-05 19:42:56 +09:00
Ibuki Omatsu c9af430c19 misc: Update redox_syscall, libredox and redox-scheme 2026-07-01 08:20:22 -06:00
Connor-GH 2834434b9a getty: use standard C functions
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.
2026-06-03 19:15:31 -05:00
bjorn3 8bcdb70d76 sudo: Switch to the root namespace before execing the target process 2026-03-01 13:08:07 +01:00
Ibuki Omatsu 3bdd1d9a6e Adapt sudo and getty to new namespace management, and enforce strict namespace at login. 2026-01-20 20:58:27 -07:00
Jeremy Soller 8ccf37d74a getty: determine correct tty size 2026-01-09 15:46:59 -07:00
Wildan M 9dc487e1d8 Fix compilation with newer syscall 2025-12-28 17:40:14 +07:00
bjorn3 6d50c1220e Leave daemonization to init 2025-11-30 10:45:21 +01:00
James Matlik 6deaf4c51e Minor dependency cleanup
Fully use libredox instead of libc for all constants
2025-06-26 19:54:22 -04:00
bjorn3 4ed8323351 passwd: Remove suid usage though the sudo daemon 2025-04-20 21:10:22 +02:00
bjorn3 cacb0dd67e passwd: Extract find_user 2025-04-20 20:54:52 +02:00
bjorn3 d514768aae passwd: Allow root to always change passwords
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.
2025-04-20 20:52:24 +02:00
bjorn3 f557417ebf passwd: Extract ask_new_password 2025-04-20 20:40:37 +02:00
bjorn3 2e630a9f4d passwd: Only allow locking accounts as root
This is consistent with how Linux works and prevents accidentally
locking yourself out.
2025-04-20 20:23:17 +02:00
bjorn3 0a2dea6b04 passwd: Reduce code nesting and minor cleanups 2025-04-20 19:52:18 +02:00
bjorn3 9c53a9a775 Use the sudo daemon rather than setuid for su 2025-04-20 16:46:50 +02:00
bjorn3 bfd521ff49 Fix sudo for procmgr 2025-04-20 16:20:56 +02:00
bjorn3 1fbb804f35 Introduce a sudo daemon as replacement for suid/escalated
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.
2025-04-14 20:16:33 +02:00
bjorn3 7fa1bf8df4 sudo: Simplify a bit 2025-04-13 18:03:49 +02:00
bjorn3 6a208c6b34 Rustfmt 2025-04-13 16:51:27 +02:00
bjorn3 6f2514ed95 Move to the 2024 edition 2025-04-13 16:50:06 +02:00
bjorn3 4ccec7baae sudo: Reduce indentation 2025-03-11 21:31:54 +01:00
bjorn3 88ccab8844 sudo: Rustfmt 2025-03-11 21:31:49 +01:00
Andrey Turkin 53992ad18c Bump dependencies 2024-10-16 21:17:20 +03:00
bjorn3 1e183ca4ba Use the new scheme format 2024-07-11 21:09:53 +02:00
Jeremy Soller de5e7eb903 Use absolute path without scheme for default home and shell 2024-01-18 14:53:02 -07:00
Jeremy Soller b5a371be31 Do not set COLUMNS or LINES in getty 2024-01-18 14:52:13 -07:00
bjorn3 41fde1045c Let fbcond rather than inputd handle input events 2024-01-14 18:30:51 +01:00
bjorn3 0148436174 Fix for the introduction of fbcond 2024-01-14 18:28:00 +01:00
Ron Williams 5cb44522f0 add option to getty to run contain_login 2023-12-19 21:00:27 -08:00
4lDO2 8ab925eb65 Fully switch to libredox 2023-11-04 20:04:59 +01:00
4lDO2 8afb03544f Update redox_users. 2023-11-04 14:52:16 +01:00
Anhad Singh 7c3c5f306e getty: make the consumer changes work with :debug
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
2023-07-22 18:15:43 +10:00
Anhad Singh 5e3956adf1 misc: getty open consumer channel to get events
Signed-off-by: Anhad Singh <andypythonappdeveloper@gmail.com>
2023-07-22 17:41:30 +10:00
4lDO2 0621709286 Use redox-daemon in getty 2022-07-27 16:32:27 +02:00
Jeremy Soller 93b6791e29 Update redox_users 2021-01-26 12:52:03 -07:00
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 8d6649ec5a Merge changes from redox-unix 2019-06-15 09:34:55 -06:00
Jeremy Soller dc387310f6 Update to new rust 2019-04-07 11:30:17 -06:00
MggMuggins 48a8e2fa56 Update redox-users v0.2: Shadowfile support 2018-07-25 15:18:19 -05:00
jD91mZM2 3831828485 Return on EOF, don't break 2018-05-31 20:17:17 +02:00
jD91mZM2 e37ebb22f0 Support new edge-triggered model 2018-05-31 19:18:59 +02:00
Jeremy Soller 07e3c7e320 Remove debug print 2018-05-22 19:37:14 -06:00
Jeremy Soller a9ab9e18b3 Fix issues with new event method 2018-05-20 13:16:14 -06:00
Jeremy Soller f6b27be9d9 Update to new event 2018-05-20 11:08:13 -06:00
MggMuggins 1d6b67cd42 Implement Unimplemented; Bugs
Fix a CLI bug with groupadd

Implement everything that involves removing user from groups, mostly
in userdel and usermod.
2018-02-12 09:07:17 -06: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