summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2011-05-09 15:13:14 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-11 16:42:58 +0100
commit495c109534b32be107c55864c0818df9387284cf (patch)
treee80b19228d4d966881715a7439a44a986d14f3cd /meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
parentc532f96b5b4528fff2eb009c52b8ff5a76721404 (diff)
downloadpoky-495c109534b32be107c55864c0818df9387284cf.tar.gz
xserver-xf86-dri-lite_git: upgrade to 1.10.2 RC1 snapshot
- the following patches are no longer used, so remove them doublefix.patch drmfix.patch fix_macros.patch libdri-xinerama-symbol.patch xorg-server-disable-dri_sarea.patch xorg-server-enable-dri2.patch xserver-1.5.0-bg-none-root.patch xserver-DRI2Swapbuffer.patch xserver-boottime.patch xserver-no-root-2.patch - update the patch upstream status (From OE-Core rev: 642f7199c2a5221a45be25b4aa008fde25a5c07a) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch105
1 files changed, 0 insertions, 105 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
deleted file mode 100644
index afc94dcc5c..0000000000
--- a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
+++ /dev/null
@@ -1,105 +0,0 @@
1diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
2index 7f40857..cf58c01 100644
3--- a/hw/xfree86/os-support/linux/lnx_init.c
4+++ b/hw/xfree86/os-support/linux/lnx_init.c
5@@ -49,6 +49,7 @@ static Bool KeepTty = FALSE;
6 static int VTnum = -1;
7 static Bool VTSwitch = TRUE;
8 static Bool ShareVTs = FALSE;
9+Bool NoHwAccess = FALSE;
10 static int activeVT = -1;
11
12 static int vtPermSave[4];
13@@ -80,9 +81,11 @@ saveVtPerms(void)
14 static void
15 restoreVtPerms(void)
16 {
17- /* Set the terminal permissions back to before we started. */
18- chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
19- chown(vtname, vtPermSave[2], vtPermSave[3]);
20+ if (geteuid() == 0) {
21+ /* Set the terminal permissions back to before we started. */
22+ (void)chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
23+ (void)chown(vtname, vtPermSave[2], vtPermSave[3]);
24+ }
25 }
26
27 static void *console_handler;
28@@ -210,20 +213,22 @@ xf86OpenConsole(void)
29 xf86Msg(X_WARNING,
30 "xf86OpenConsole: Could not save ownership of VT\n");
31
32- /* change ownership of the vt */
33- if (chown(vtname, getuid(), getgid()) < 0)
34- xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
35- vtname, strerror(errno));
36-
37- /*
38- * the current VT device we're running on is not "console", we want
39- * to grab all consoles too
40- *
41- * Why is this needed??
42- */
43- if (chown("/dev/tty0", getuid(), getgid()) < 0)
44- xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
45- strerror(errno));
46+ if (geteuid() == 0) {
47+ /* change ownership of the vt */
48+ if (chown(vtname, getuid(), getgid()) < 0)
49+ xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
50+ vtname, strerror(errno));
51+
52+ /*
53+ * the current VT device we're running on is not
54+ * "console", we want to grab all consoles too
55+ *
56+ * Why is this needed??
57+ */
58+ if (chown("/dev/tty0", getuid(), getgid()) < 0)
59+ xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
60+ strerror(errno));
61+ }
62 }
63
64 /*
65@@ -433,6 +438,11 @@ xf86ProcessArgument(int argc, char *argv[], int i)
66 ShareVTs = TRUE;
67 return(1);
68 }
69+ if (!strcmp(argv[i], "-nohwaccess"))
70+ {
71+ NoHwAccess = TRUE;
72+ return(1);
73+ }
74 if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
75 {
76 if (sscanf(argv[i], "vt%2d", &VTnum) == 0)
77@@ -454,5 +464,6 @@ xf86UseMsg()
78 ErrorF("don't detach controlling tty (for debugging only)\n");
79 ErrorF("-novtswitch don't immediately switch to new VT\n");
80 ErrorF("-sharevts share VTs with another X server\n");
81+ ErrorF("-nohwaccess don't access hardware ports directly\n");
82 return;
83 }
84diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
85index 688106a..34a845b 100644
86--- a/hw/xfree86/os-support/linux/lnx_video.c
87+++ b/hw/xfree86/os-support/linux/lnx_video.c
88@@ -51,6 +51,7 @@
89 #define MAP_FAILED ((void *)-1)
90 #endif
91
92+extern Bool NoHwAccess;
93 static Bool ExtendedEnabled = FALSE;
94
95 #ifdef __ia64__
96@@ -509,6 +510,9 @@ xf86EnableIO(void)
97 int fd;
98 unsigned int ioBase_phys;
99 #endif
100+ /* Fake it... */
101+ if (NoHwAccess)
102+ return TRUE;
103
104 if (ExtendedEnabled)
105 return TRUE;