hmm, on Tue, Dec 21, 2010 at 11:06:27PM +0100, Matthieu Herrb said that
> Can you test the patch below for the -keepPriv case?
it seems to be working in the jan 2 snapshot.
thank you.
$ ps axuww|grep X
root 4823 2.3 2.1 7620 10964 ?? Ss 12:58AM 0:02.74
/usr/X11R6/bin/X :0 vt05 -nolisten tcp -keepPriv -auth
/etc/X11/xdm/authdir/authfiles/A:0-1kDfzT (Xorg)
-f
>
> Index: lib/libdrm/xf86drm.c
> ===================================================================
> RCS file: /cvs/OpenBSD/xenocara/lib/libdrm/xf86drm.c,v
> retrieving revision 1.4
> diff -u -p -u -r1.4 xf86drm.c
> --- lib/libdrm/xf86drm.c 31 Mar 2010 06:31:45 -0000 1.4
> +++ lib/libdrm/xf86drm.c 21 Dec 2010 21:25:43 -0000
> @@ -293,7 +293,7 @@ static int drmOpenDevice(long dev, int m
> return fd;
>
> drmMsg("drmOpenDevice: Open failed\n");
> - remove(buf);
> +
> return -errno;
> }
>
> Index: xserver/os/privsep.c
> ===================================================================
> RCS file: /cvs/OpenBSD/xenocara/xserver/os/privsep.c,v
> retrieving revision 1.15
> diff -u -p -u -r1.15 privsep.c
> --- xserver/os/privsep.c 5 Dec 2010 15:36:10 -0000 1.15
> +++ xserver/os/privsep.c 21 Dec 2010 21:48:41 -0000
> @@ -299,14 +299,21 @@ int
> priv_open_device(const char *path)
> {
> priv_cmd_t cmd;
> + struct okdev *dev;
>
> if (priv_fd != -1) {
> cmd.cmd = PRIV_OPEN_DEVICE;
> strlcpy(cmd.arg.open.path, path, MAXPATHLEN);
> write(priv_fd, &cmd, sizeof(cmd));
> return receive_fd(priv_fd);
> - } else
> - return open(path, O_RDWR | O_NONBLOCK | O_EXCL);
> + } else {
> + if ((dev = open_ok(path)) != NULL)
> + return open(path, dev->flags);
> + else {
> + errno = EPERM;
> + return -1;
> + }
> + }
> }
>
> /* send signal to parent process */
>
> --
> Matthieu Herrb
--
runtime error. should i walk? (y/n)