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@.
This commit is contained in:
matthieu 2010-07-31 17:47:50 +00:00
parent 36733264e6
commit fe603b97cb
4 changed files with 7 additions and 3 deletions

View File

@ -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 */

View File

@ -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;

View File

@ -62,6 +62,8 @@ void xf86DisableIO(void);
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
xf86OpenConsole();
pVidMem->linearSupported = TRUE;
pVidMem->mapMem = ppcMapVidMem;
pVidMem->unmapMem = ppcUnmapVidMem;

View File

@ -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;