vasilito
25826efb9e
getty: temporary diag — log input forwarded from tty to pty
2026-07-18 12:42:04 +09:00
vasilito
106b7cb4e0
login: chdir to home (file scheme) before restricting the namespace
...
The login shell spawn was failing/hanging because login inherits its CWD
from init, which on the live image is on the 'initfs' scheme.
apply_login_schemes() switches to a namespace with only DEFAULT_SCHEMES
(no 'initfs'), leaving that inherited CWD fd unresolvable; relibc resolves
paths through the CWD fd (AT_REDOX_CWD_FD), so the shell child's chdir +
execve then fail with ENOENT (getty respawns login in a loop) or hang.
chdir into the user's home (on the always-present 'file' scheme, fallback
'/') while still in the full namespace, so the CWD fd stays valid after
the restriction and the shell spawns.
2026-07-18 11:01:23 +09:00
vasilito
b6fb5ca2da
login: drop spawn_shell CWD workaround and diagnostics
...
The real fix is in init (no longer leaves an initfs-scheme CWD that is
invalid in the restricted login namespace), so spawn_shell can stay
minimal again.
2026-07-18 10:43:07 +09:00
vasilito
36526f66a7
login: temporary spawn diagnostics to pinpoint shell-start hang
2026-07-18 10:26:46 +09:00
vasilito
0a1c31fd18
login: set a namespace-valid CWD before spawning the shell
...
After apply_login_schemes() swaps into the restricted login namespace
(only DEFAULT_SCHEMES), the CWD inherited from init on the live image is
/scheme/initfs, whose scheme is NOT in that namespace. File operations
that consult the CWD fd (notably the child's execve opening the shell
binary) then block, so the login shell never starts. chdir to the user's
home (fallback /), both on the always-present 'file' scheme, before
spawning. Also drops the temporary spawn_shell diagnostics.
2026-07-18 10:17:10 +09:00
vasilito
123649e200
login: add spawn_shell diagnostics to pinpoint shell-spawn ENOENT
...
Probe the shell binary and home directory in the (possibly restricted)
login namespace before spawning, and print the exact spawn error with
raw_os_error. This isolates whether a failed login shell spawn is due to
a missing binary, an unreachable cwd/home, or an exec-time error.
2026-07-18 08:08:20 +09:00
vasilito
0dc0cb73d1
Cargo.lock: regenerate after Cargo.toml version sync (branch 0.3.0 -> 0.3.1)
...
Cat 2 fork entries bumped: +rb0.3.0 -> +rb0.3.1
- libredox 0.1.18+rb0.3.0 -> 0.1.18+rb0.3.1
- redox-scheme 0.11.2+rb0.3.0 -> 0.11.2+rb0.3.1
- redox_syscall 0.9.0+rb0.3.0 -> 0.9.0+rb0.3.1
- userutils self 0.1.0+rb0.3.0 -> 0.1.0+rb0.3.1
Plus minor transitive patch bumps.
Part of Phase 0 fix for G1 (Cargo.lock drift).
2026-07-12 01:15:16 +03:00
vasilito
2bc1b8d5c7
userutils: apply Red Bear patches on latest upstream
...
- Path deps for redox_syscall, libredox, redox-scheme, relibc
- Login prompt fixes (standard C functions)
- Custom issue/motd branding
- Version suffix +rb0.3.1
- Author attribution
2026-07-11 11:35:08 +03:00
Jacob Lorentzon
2143eb7f33
Merge branch 'fix-sudo' into 'master'
...
fix: Set FD flag to send process fd during sudo
See merge request redox-os/userutils!64
2026-07-05 12:48:10 +02:00
Ibuki.O
8005fc0991
fix: Set FD flag to send process fd during sudo
2026-07-05 19:42:56 +09:00
Jeremy Soller
41ea648ef4
Merge branch 'libredox' into 'master'
...
misc: Update redox_syscall, libredox and redox-scheme
See merge request redox-os/userutils!63
2026-07-01 08:20:22 -06:00
Ibuki Omatsu
c9af430c19
misc: Update redox_syscall, libredox and redox-scheme
2026-07-01 08:20:22 -06:00
Jeremy Soller
dec67599f5
Merge branch 'ptyd-changes' into 'master'
...
getty: use standard C functions
See merge request redox-os/userutils!62
2026-06-03 19:25:21 -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
Jeremy Soller
0c5274faa9
Merge branch 'sudo_switch_ns' into 'master'
...
sudo: Switch to the root namespace before execing the target process
See merge request redox-os/userutils!61
2026-03-01 07:05:31 -07:00
bjorn3
8bcdb70d76
sudo: Switch to the root namespace before execing the target process
2026-03-01 13:08:07 +01:00
Jeremy Soller
72424dd28b
Merge branch 'namespace-improvement' into 'master'
...
Adapt sudo and getty to new namespace management, and enforce strict namespace at login.
See merge request redox-os/userutils!59
2026-01-20 20:58:27 -07: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
Jeremy Soller
5375c180c4
Merge branch 'fix-compile' into 'master'
...
Fix compilation with newer syscall
See merge request redox-os/userutils!60
2025-12-28 06:20:48 -07:00
Wildan M
9dc487e1d8
Fix compilation with newer syscall
2025-12-28 17:40:14 +07:00
Jeremy Soller
1125042f6b
Merge branch 'no_daemonize' into 'master'
...
Leave daemonization to init
See merge request redox-os/userutils!58
2025-11-30 07:25:24 -07:00
bjorn3
6d50c1220e
Leave daemonization to init
2025-11-30 10:45:21 +01:00
Jeremy Soller
673c9bfd3e
Update dependencies
2025-10-04 08:23:37 -06:00
Jeremy Soller
7316d58076
Merge branch 'minor-dependency-cleanup' into 'master'
...
Minor dependency cleanup
See merge request redox-os/userutils!56
2025-06-27 07:07:52 -06:00
James Matlik
6deaf4c51e
Minor dependency cleanup
...
Fully use libredox instead of libc for all constants
2025-06-26 19:54:22 -04:00
Jeremy Soller
8ab3370d9a
Merge branch 'passwd_no_setuid' into 'master'
...
passwd: Remove suid usage though the sudo daemon
See merge request redox-os/userutils!55
2025-04-20 19:58:06 +00: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
Jeremy Soller
479cce7b96
Merge branch 'simplify_passwd' into 'master'
...
passwd: Only allow locking accounts as root
See merge request redox-os/userutils!54
2025-04-20 18:36:57 +00: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
Jeremy Soller
51d2db809f
Merge branch 'su_no_setuid' into 'master'
...
Use the sudo daemon rather than setuid for su
See merge request redox-os/userutils!53
2025-04-20 15:22:33 +00:00
bjorn3
9c53a9a775
Use the sudo daemon rather than setuid for su
2025-04-20 16:46:50 +02:00
Jacob Lorentzon
9eadf3bb1d
Merge branch 'fix_sudo' into 'master'
...
Fix sudo for procmgr
See merge request redox-os/userutils!52
2025-04-20 14:23:13 +00:00
bjorn3
bfd521ff49
Fix sudo for procmgr
2025-04-20 16:20:56 +02:00
Jeremy Soller
803fd8870f
Merge branch 'no_setuid2' into 'master'
...
Introduce a sudo daemon as replacement for suid/escalated
See merge request redox-os/userutils!51
2025-04-16 15:49:21 +00: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
Jeremy Soller
bd7592270d
Merge branch 'cleanup' into 'master'
...
Various cleanups
See merge request redox-os/userutils!50
2025-04-13 20:15:18 +00: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
Jeremy Soller
e3507e18bc
Merge branch 'sudo_improvements' into 'master'
...
Cleanup the source of sudo a bit
See merge request redox-os/userutils!49
2025-03-11 21:28:12 +00: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
Jeremy Soller
dcec4b7f35
Merge branch 'deps' into 'master'
...
Bump dependencies
See merge request redox-os/userutils!48
2024-10-16 18:22:04 +00:00
Andrey Turkin
53992ad18c
Bump dependencies
2024-10-16 21:17:20 +03:00
Jeremy Soller
7a96dab061
Merge branch 'no_legacy_scheme' into 'master'
...
Update redox_event and redox_users
See merge request redox-os/userutils!47
2024-08-19 16:47:45 +00:00