blob: 33819044c1b6df5b26b5419e31174bf8b0627684 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
$OpenBSD$
Index: src/intel_device.c
--- src/intel_device.c.orig
+++ src/intel_device.c
@@ -64,6 +64,12 @@
#include "intel_driver.h"
#include "fd.h"
+#ifdef X_PRIVSEP
+extern int priv_open_device(const char *);
+#else
+#define priv_open_device(n) open(n,O_RDWR|O_CLOEXEC)
+#endif
+
struct intel_device {
char *master_node;
char *render_node;
@@ -696,9 +702,7 @@ int intel_get_client_fd(ScrnInfoPtr scrn)
assert(dev->fd != -1);
assert(dev->render_node);
-#ifdef O_CLOEXEC
- fd = open(dev->render_node, O_RDWR | O_CLOEXEC);
-#endif
+ fd = priv_open_device(dev->render_node);
if (fd < 0)
fd = fd_set_cloexec(open(dev->render_node, O_RDWR));
if (fd < 0)
|