VFS: Always open kernel FDs with O_CLOEXEC.

* Avoids leaking them into userland.
This commit is contained in:
Axel Dörfler
2015-09-11 08:57:15 +02:00
parent 8d611f17a7
commit e668e80db0
+1 -1
View File
@@ -8143,7 +8143,7 @@ _kern_open(int fd, const char* path, int openMode, int perms)
if (openMode & O_CREAT)
return file_create(fd, pathBuffer.LockBuffer(), openMode, perms, true);
return file_open(fd, pathBuffer.LockBuffer(), openMode, true);
return file_open(fd, pathBuffer.LockBuffer(), openMode | O_CLOEXEC, true);
}