1 |
On Fri, 2019-03-22 at 21:32 +0100, Piotr Karbowski wrote: |
2 |
> Hi, |
3 |
> |
4 |
> I'd like to discuss here the current state of elogind integration as a |
5 |
> whole, and the follow-up work that is now required, after I've put a |
6 |
> default on local USE flag +elogind on xorg-server while dropping default |
7 |
> suid flag in my commit yesterday. |
8 |
> |
9 |
> The motivation on the changes was to follow up the removal of default |
10 |
> +suid that happened in November last years, that sadly had to be |
11 |
> reverted. Now with elogind integration, non-systemd users got all that |
12 |
> they need to run Xorg as a unprivileged user. |
13 |
> |
14 |
> The status of xorg-server at this very moment is that it no longer |
15 |
> defaults to be merged with suid, however, now it defaults to +elogind. |
16 |
> This have the following implications: |
17 |
> |
18 |
> - User will be prompted that pambase requires +elogind, which is not |
19 |
> enabled by default -- meaning that simple `emerge xorg-server` will |
20 |
> prompt user to add package.use entry. This could be solved by always |
21 |
> having the elogind bits enabled, the same way a gnome-keyring is, so the |
22 |
> pam_elogind.so is used if present. This shouldn't have any negative |
23 |
> effect on for instance systemd users, as systemd cannot be installed at |
24 |
> the same time as elogind. |
25 |
> |
26 |
> - systemd users that does not use systemd profiles will be required to |
27 |
> alter package.use or make.conf USE flags definition to drop -elogind |
28 |
> there, as otherwise xorg-server will refuse to be merged due to |
29 |
> at-most-one-of ( elogind systemd ) condition there. However those |
30 |
> systemd users that do use systemd profiles will not run into any things |
31 |
> to do, as systemd's use.mask have elogind there. |
32 |
> |
33 |
> - The desktop profiles enables +consolekit, which conflicts with elogind |
34 |
> -- the users of those profiles will need to adjust USE flags. |
35 |
> |
36 |
> - OpenRC/non-systemd users are now able to run X without suid, as |
37 |
> elogind is the entity that wraps the SETMASTER, no more "ioctl |
38 |
> permission denied" on starting X as unprivileged user. |
39 |
> |
40 |
> After speaking with some of you on #-dev and #-desktop I know that the |
41 |
> opinions on that vary, arguably enabling elogind local USE flag on |
42 |
> xorg-server was somewhat ahead of time, leaving some users in |
43 |
> unfavorable position where the xorg-server installation will require |
44 |
> them to manually modify package.use/make.conf. |
45 |
> |
46 |
> Some of the ideas that were pointed on IRC (forgive me if I missed some): |
47 |
> |
48 |
> - We should go back to +suid -elogind default. |
49 |
> - We should actually NOT put suid on Xorg if USE="suid elogind" but put |
50 |
> suid bit with USE="suid -elogind". |
51 |
|
52 |
This is a horrible idea. While some people think it's cool to have |
53 |
flags magically fit a random definition of a 'sane thing' in insane |
54 |
combinations, it's confusing to everyone. |
55 |
|
56 |
> - We should only ever enable elogind in desktop profiles. |
57 |
> |
58 |
> Personally I'd like to stay without enabling suid by default on |
59 |
> xorg-server, as otherwise hardly anyone will ever drop the suid from it, |
60 |
> which would be a big step back. Gentoo tried to drop suid from |
61 |
> xorg-server a handful of times, let's make the current one a final one :) |
62 |
> |
63 |
> I'd like to propose doing the following: |
64 |
> |
65 |
> - Keywording elogind on missing archs |
66 |
> - Making elogind a global USE flag |
67 |
> - Switching desktop profiles to elogind from consolekit while still |
68 |
> preserving -suid +elogind on xorg-server for those that does not use |
69 |
> desktop profiles (systemd profiles users not affected) |
70 |
> - Making pambase always install the configuration for pam_elogind.so, |
71 |
> the same way it does for pam_gnome_keyring.so at this very moment, |
72 |
> effectively removing elogind USE flag from it. |
73 |
> |
74 |
> What do you all think about? |
75 |
> |
76 |
|
77 |
My suggestion would be to focus on having sane defaults in all profiles, |
78 |
and sane flags. AFAIU logind makes sense on desktop profiles. So |
79 |
enable it globally in desktop profiles, then replace it with systemd |
80 |
in systemd subprofiles. |
81 |
|
82 |
Don't do USE defaults. People who don't use desktop profiles can live |
83 |
with having to fine-tune xorg-server. Worst case, in the generic case |
84 |
use REQUIRED_USE to force them to choose one of the options. |
85 |
|
86 |
-- |
87 |
Best regards, |
88 |
Michał Górny |