FS#70469 - [xorg-server] 1.20.11-1 permission problem

Attached to Project: Arch Linux
Opened by Subs (Substring) - Friday, 16 April 2021, 11:14 GMT
Last edited by Laurent Carlier (lordheavy) - Wednesday, 04 August 2021, 09:40 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Laurent Carlier (lordheavy)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
Since xorg-server 1.20.11-1, /usr/lib/Xorg.wrap lost its suid bit. Wasn't the case with xorg-server 1.20.10-3. Trying to run a root X from a normal user with X on a different virtual terminal fails with :

(EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied)

Additional info:
* package version(s) : xorg-server 1.20.11-1
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
* Update xorg-server

* /etc/X11/Xwrapper.config:
allowed_users = anybody
needs_root_rights = yes

* run a root X with a normal user with startx -- vt7
This task depends upon

Closed by  Laurent Carlier (lordheavy)
Wednesday, 04 August 2021, 09:40 GMT
Reason for closing:  Fixed
Additional comments about closing:  xorg-server-1.20.13-2
Comment by loqs (loqs) - Wednesday, 21 April 2021, 17:34 GMT
Build xorg-server 1.20.11-1 in a clean chroot using packages from https://archive.archlinux.org/repos/2020/12/14/$repo/os/$arch Xorg.wrap has its suid bit.
Is it related to the fakeroot changes? Now mv -v fakeinstall/usr/lib/Xorg.wrap /build/xorg-server/pkg/xorg-server/usr/lib/Xorg.wrap does not preserve the suid.
Comment by Yu Kou (cky) - Wednesday, 04 August 2021, 04:50 GMT
The setuid bit is lost because of a change of "makepkg" committed in February this year. However, it is not a bug of "makepkg". It is a bug of xorg-server package, in PKGBUILD file.

Please refer to https://bugs.archlinux.org/task/71578 for details. The bug report 71578 is going to be closed because it is not a makepkg bug, it is bug of xorg-server package. Refer to the comments in that bug report, which explained why it is bug of xorg-server package.

(I was going to open a bug report against xorg-server package, before I found this one)
Comment by loqs (loqs) - Wednesday, 04 August 2021, 08:00 GMT
@cky creating the file instead of moving it in package() as you proposed fixes the issue.
Comment by Laurent Carlier (lordheavy) - Wednesday, 04 August 2021, 08:15 GMT
Thanks for the patch, please test xorg-server-1.20.13-2
Comment by loqs (loqs) - Wednesday, 04 August 2021, 08:21 GMT
An alternate approach would be to move the creation of fakeinstall to package_xorg-server() which is the first package function to be called.
Edit:
xorg-server-1.20.13-2 has the setuid bit and fixes the issue for me. Thank you.

Loading...