Details
Details
- Reviewers
kib - Group Reviewers
Linux Emulation - Commits
- rGda51ef550cf5: linux: implement O_PATH
rG1663120ae452: linux: implement O_PATH
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Is there a Linux test suite for O_PATH? If yes, did you run it over this implementation?
| sys/compat/linux/linux_file.h | ||
|---|---|---|
| 87 | Octal?! This is crazy. Does glibc header use octal for O_ constants? Also can you commit addition of '0' separately? | |
Comment Actions
I didn't find any tests; what I did was a quick smoke test with Python:
>>> import os
>>> fd = os.open('/etc/passwd', os.O_RDONLY | os.O_PATH)
>>> os.read(fd, 5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 9] Bad file descriptor
>>> os.fstat(fd)
os.stat_result(st_mode=33188, st_ino=13324429, st_dev=112, st_nlink=1, st_uid=0, st_gid=0, st_size=2108, st_atime=1612790821, st_mtime=1612790821, st_ctime=1612790821)| sys/compat/linux/linux_file.h | ||
|---|---|---|
| 87 | It is sad, and yes, that's what you'll find in glibc headers. Sure I can! | |