[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [screen-devel] Screen bug that opens a root terminal
From: |
Axel Beckert |
Subject: |
Re: [screen-devel] Screen bug that opens a root terminal |
Date: |
Mon, 10 Oct 2022 04:36:45 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
Hi Bobby,
[Bobby only replied to me by accident. I've asked if I may cite that
reply on the list anyway and got an ok for that.]
On Sun, Oct 09, 2022 at 10:39:58PM +0000, Bobby S wrote:
> It could be that sudo was invoked at the time of running the
> command. The Arch session was running from a USB drive, and I soon
> realized after sending the email that the "live" boot of Arch was
> already running as root. I asked a friend to assist with checking
> Ubuntu after seeing the terminal open in root, and he reported the
> behavior on the other two. At this point I think we can consider
> that to be the cause of the root terminal opening. I have one server
> running Ubuntu and double checked it after reading your email. I
> also did not replicate the issue.
Ok, that's a relief. I currently assume that there's actually no
related bug in GNU Screen then. Thanks for checking this so swiftly.
> Odd that it lists the terminal as root user, but it must be
> inheriting that from the UID from the sudo session?
sudo does several things:
1) without additional options (like "-u" to set the target user), it
tries to run the command given as parameter with root permissions.
2) It keeps some environment variables from the original user session
and IIRC also the current directory. The exact list of environment
variables is configurable. E.g. usually, but not always, $HOME is
kept from the original user session.
The second point occassionally confuses programs to think they still
run under the originating user, but actually do run as root.
> Either way, I appreciate you looking into this, especially as fast
> as you did. I apologize if this had set off any alarms.
Well, yeah, it definitely set off an alarm in my head (and probably
others', too), but that's admittedly also the reason why I looked into
it immediately when I saw that subject in my inbox. (And since I
happened to just read my mail when it came in...)
Kind regards, Axel
--
PGP: 2FF9CD59612616B5 /~\ Plain Text Ribbon Campaign, http://arc.pasp.de/
Mail: abe@deuxchevaux.org \ / Say No to HTML in E-Mail and Usenet
Mail+Jabber: abe@noone.org X
https://axel.beckert.ch/ / \ I love long mails: https://email.is-not-s.ms/
signature.asc
Description: PGP signature