Re: [PATCH RFC] Xorg: Add a suid root wrapper

2014-03-10 Thread Hans de Goede
Hi, On 03/09/2014 11:39 PM, Mark Kettenis wrote: Date: Thu, 06 Mar 2014 13:57:32 +0100 From: Hans de Goede hdego...@redhat.com +for (i = 0; i 16; i++) { +snprintf(buf, PATH_MAX, /dev/dri/card%d, i); Hardcoding paths like this is a bad idea. We use /dev/drm%d on OpenBSD for

Re: [PATCH RFC] Xorg: Add a suid root wrapper

2014-03-09 Thread Mark Kettenis
Date: Thu, 06 Mar 2014 13:57:32 +0100 From: Hans de Goede hdego...@redhat.com +for (i = 0; i 16; i++) { +snprintf(buf, PATH_MAX, /dev/dri/card%d, i); Hardcoding paths like this is a bad idea. We use /dev/drm%d on OpenBSD for example. Other systems might use different

Re: [PATCH RFC] Xorg: Add a suid root wrapper

2014-03-06 Thread Hans de Goede
Hi, On 03/06/2014 06:40 AM, Alan Coopersmith wrote: On 03/ 5/14 07:51 AM, Hans de Goede wrote: This commit adds a little suid root wrapper, which is a bit weird, first we strip the suid-root bit of the Xorg binary, and then we add a wrapper ? Have you looked at Debian's Xwrapper and

Re: [PATCH RFC] Xorg: Add a suid root wrapper

2014-03-06 Thread Mark Kettenis
From: Hans de Goede hdego...@redhat.com Date: Wed, 5 Mar 2014 16:51:52 +0100 If you end up going with this wrapper approach anyway despite my previous message, here are some comments. Oh, and it's good that this is optional. diff --git a/hw/xfree86/Xorg.sh b/hw/xfree86/Xorg.sh new file

Re: [PATCH RFC] Xorg: Add a suid root wrapper

2014-03-06 Thread Hans de Goede
Hi, Thanks for the review! On 03/06/2014 01:46 PM, Mark Kettenis wrote: From: Hans de Goede hdego...@redhat.com Date: Wed, 5 Mar 2014 16:51:52 +0100 If you end up going with this wrapper approach anyway despite my previous message, here are some comments. Oh, and it's good that this is

Re: [PATCH RFC] Xorg: Add a suid root wrapper

2014-03-06 Thread Alan Coopersmith
On 03/ 6/14 04:46 AM, Mark Kettenis wrote: +canonical=$(readlink -f $0) POSIX doesn't specify readlink(1), so it might not be available on all systems. Solaris doesn't seem to have it. Perhaps just have configure substitute the installation path here? Solaris 11 and later have it, and I no

[PATCH RFC] Xorg: Add a suid root wrapper

2014-03-05 Thread Hans de Goede
With the recent systemd-logind changes it is possible to install the Xorg binary without suid root rights and still have everything working as it should *if* the user only has cards which are supported by kms. This commit adds a little suid root wrapper, which is a bit weird, first we strip the

Re: [PATCH RFC] Xorg: Add a suid root wrapper

2014-03-05 Thread Alan Coopersmith
On 03/ 5/14 07:51 AM, Hans de Goede wrote: This commit adds a little suid root wrapper, which is a bit weird, first we strip the suid-root bit of the Xorg binary, and then we add a wrapper ? Have you looked at Debian's Xwrapper and considered adopting it, or at least some of its functionality?