diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-09-06 19:44:39 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-09-06 19:44:39 +0000 |
commit | 9401e5643e90e23287b785e5fc238bb7c7f2d896 (patch) | |
tree | 759a23118c7bb4a1cddc87b3ad5c63f459a64bd2 /xserver/os/privsep.c | |
parent | 6d29d2deb77299e537a0daf2babf0e217ce51376 (diff) |
update to xserver 1.6.4rc1. Tested by many, ok oga@.
Diffstat (limited to 'xserver/os/privsep.c')
-rw-r--r-- | xserver/os/privsep.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/xserver/os/privsep.c b/xserver/os/privsep.c index 11ea7a2ec..91c99d44c 100644 --- a/xserver/os/privsep.c +++ b/xserver/os/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.12 2009/07/14 18:25:16 oga Exp $ */ +/* $OpenBSD: privsep.c,v 1.13 2009/09/06 19:44:37 matthieu Exp $ */ /* * Copyright 2001 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -298,7 +298,6 @@ priv_init(uid_t uid, gid_t gid) int priv_open_device(const char *path) { - struct okdev *dev; priv_cmd_t cmd; if (priv_fd != -1) { @@ -306,13 +305,8 @@ priv_open_device(const char *path) strlcpy(cmd.arg.open.path, path, MAXPATHLEN); write(priv_fd, &cmd, sizeof(cmd)); return receive_fd(priv_fd); - } else if ((dev = open_ok(path)) != NULL) { - return open(path, dev->flags); - } else { - errno = EPERM; - return -1; - } - /* NOTREACHED */ + } else + return open(path, O_RDWR | O_NONBLOCK | O_EXCL); } /* send signal to parent process */ |