Bug 83020 - logind wrapper should not drop privileges if switching to an other VT
Summary: logind wrapper should not drop privileges if switching to an other VT
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: Other All
: medium major
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-24 20:43 UTC by Laurent Bigonville
Modified: 2014-08-28 11:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Laurent Bigonville 2014-08-24 20:43:09 UTC
Hi,

When built with the logind wrapper and with needs_root_rights parameter set to auto, if the user is explicitly asking the server to start on a different VT (ie. startx -- vt2), the wrapper will still drop the privileges and the server will fail to start because it cannot open the virtual console.

Shouldn't the root privileges be preserved in that case?

Also, what should be done if needs_root_rights is explicitly set to no?
Comment 1 Hans de Goede 2014-08-26 07:41:57 UTC
(In reply to comment #0)
> Hi,
> 
> When built with the logind wrapper and with needs_root_rights parameter set
> to auto, if the user is explicitly asking the server to start on a different
> VT (ie. startx -- vt2), the wrapper will still drop the privileges and the
> server will fail to start because it cannot open the virtual console.
> 
> Shouldn't the root privileges be preserved in that case?

No, we don't want unprivileged users to be able to startx on any random tty. Ideally we would be able to never run as root. That is currently not possible, but special cases like this should really only be open to root. Note this might actually still work if the same user who is doing the startx already is logged in on text mode on that console, as then no root rights are necessary (I think, not sure, didn't try). If the user is not logged in and thus does not own that vt, why should X give $random_user rights to claim that vt (which may be owned by another user at that time) ? This used to work in the past as an accidental side effect of X needing root rights, not as something we want by design.

> Also, what should be done if needs_root_rights is explicitly set to no?

Then we never grant root rights (and the admin could go further and even remove /usr/libexec/Xorg.wrap completely).

I believe this should be closed as not a bug. But I'll leave this open for a while for further discussion first.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.