projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
utils: use O_PATH when opening /dev
[project/procd.git]
/
utils
/
utils.c
diff --git
a/utils/utils.c
b/utils/utils.c
index
ebf5447
..
e2e3396
100644
(file)
--- a/
utils/utils.c
+++ b/
utils/utils.c
@@
-165,7
+165,7
@@
int patch_fd(const char *device, int fd, int flags)
device = "/dev/null";
if (*device != '/') {
- dfd = open("/dev", O_
RDONL
Y);
+ dfd = open("/dev", O_
PATH|O_DIRECTOR
Y);
if (dfd < 0)
return -1;