summaryrefslogtreecommitdiff
path: root/xserver/hw
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-07-31 17:47:51 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-07-31 17:47:51 +0000
commitdcc544d3fd76269289eb2c5ef7cc6d8024ad17ac (patch)
tree0f5167f189486d7f9de11eb2af8fd45196dc7ee7 /xserver/hw
parentd99c6e5ed58d452a2e418eb2327f2cde83d8722f (diff)
Fix X -keepPriv by calling xf86OpenConsole() early enough on architectures
that don't have a separate /dev/xf86. Problem noticed by kettenis@ and krw@ ok kettenis@.
Diffstat (limited to 'xserver/hw')
-rw-r--r--xserver/hw/xfree86/os-support/bsd/bsd_init.c2
-rw-r--r--xserver/hw/xfree86/os-support/bsd/hppa_video.c4
-rw-r--r--xserver/hw/xfree86/os-support/bsd/ppc_video.c2
-rw-r--r--xserver/hw/xfree86/os-support/bsd/sparc64_video.c2
4 files changed, 7 insertions, 3 deletions
diff --git a/xserver/hw/xfree86/os-support/bsd/bsd_init.c b/xserver/hw/xfree86/os-support/bsd/bsd_init.c
index ecde574e6..7200e9a03 100644
--- a/xserver/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/xserver/hw/xfree86/os-support/bsd/bsd_init.c
@@ -170,11 +170,9 @@ xf86OpenConsole()
vtmode_t vtmode;
#endif
-#ifdef X_PRIVSEP
if (xf86Info.consoleFd != -1) {
return;
}
-#endif
if (serverGeneration == 1)
{
/* check if we are run with euid==0 */
diff --git a/xserver/hw/xfree86/os-support/bsd/hppa_video.c b/xserver/hw/xfree86/os-support/bsd/hppa_video.c
index f26341c50..c67668800 100644
--- a/xserver/hw/xfree86/os-support/bsd/hppa_video.c
+++ b/xserver/hw/xfree86/os-support/bsd/hppa_video.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hppa_video.c,v 1.2 2009/12/18 22:47:56 matthieu Exp $ */
+/* $OpenBSD: hppa_video.c,v 1.3 2010/07/31 17:47:50 matthieu Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -51,6 +51,8 @@ static void hppaUnmapVidMem(int, pointer, unsigned long);
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
+ xf86OpenConsole();
+
pVidMem->linearSupported = TRUE;
pVidMem->mapMem = hppaMapVidMem;
pVidMem->unmapMem = hppaUnmapVidMem;
diff --git a/xserver/hw/xfree86/os-support/bsd/ppc_video.c b/xserver/hw/xfree86/os-support/bsd/ppc_video.c
index c74673b9e..0fdb15f1d 100644
--- a/xserver/hw/xfree86/os-support/bsd/ppc_video.c
+++ b/xserver/hw/xfree86/os-support/bsd/ppc_video.c
@@ -62,6 +62,8 @@ void xf86DisableIO(void);
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
+ xf86OpenConsole();
+
pVidMem->linearSupported = TRUE;
pVidMem->mapMem = ppcMapVidMem;
pVidMem->unmapMem = ppcUnmapVidMem;
diff --git a/xserver/hw/xfree86/os-support/bsd/sparc64_video.c b/xserver/hw/xfree86/os-support/bsd/sparc64_video.c
index d791b2b38..30c316593 100644
--- a/xserver/hw/xfree86/os-support/bsd/sparc64_video.c
+++ b/xserver/hw/xfree86/os-support/bsd/sparc64_video.c
@@ -48,6 +48,8 @@ static void sparc64UnmapVidMem(int, pointer, unsigned long);
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
+ xf86OpenConsole();
+
pVidMem->linearSupported = TRUE;
pVidMem->mapMem = sparc64MapVidMem;
pVidMem->unmapMem = sparc64UnmapVidMem;