-
Notifications
You must be signed in to change notification settings - Fork 29
bootupd: add --pty
when stdin is a terminal
#906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Build and test on rhcos:
|
Run cosa without Then update bootupd (built within rhel) that includes the patch, run
Without the patch, run
|
From Colin's pointer: `systemd-run` breaks when forwarding a physical (`/dev/tty*` with label `tty_device_t`) as opposed to virtual console (`/dev/pts` with label `user_devpts_t`). When stdin is a terminal, we should definitely use `-t`. Fixes coreos#902
That looks right to me offhand. (btw though I prefer rustix over nix personally, and in this case the rustix api is slightly cleaner. But anyways that's a basically irrelevant aside.
No, both physical and virtual consoles are ttys. I am not sure there's really a way to find out the difference short of scraping |
I think I was wrong, there's no real value in us allocating a new pty when we're already on a tty and doing so is just a workaround. So if the selinux fix is going to take some time, then we could do the above logic (detect physical tty and allocate a pty). Or we could just leave this as a known corner case issue that I think relatively few people will hit. |
I am OK to leave this as it is and wait for https://issues.redhat.com/browse/RHEL-86925 is fixed, WDYT, @dustymabe ? |
SGTM. Feel free to close this PR and the open issue. |
From Colin's pointer:
systemd-run
breaks when forwarding a physical (/dev/tty*
withlabel
tty_device_t
) as opposed to virtual console (/dev/pts
with label
user_devpts_t
).When stdin is a terminal, we should definitely use
-t
.Fixes #902