1
0
mirror of https://github.com/0xAX/linux-insides.git synced 2024-12-22 06:38:07 +00:00
fix
This commit is contained in:
Weikang Shi 2018-11-20 10:26:56 +08:00 committed by GitHub
parent 29f893bc6b
commit b7e625efdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,7 +250,7 @@ If we didn't pass `O_TMPFILE` for creation of a temporary file, we check the `O_
* to indicate a location in the filesystem tree; * to indicate a location in the filesystem tree;
* to perform operations that act purely at the file descriptor level. * to perform operations that act purely at the file descriptor level.
So, in this case the file itself is not opened, but operations like `dup`, `fcntl` and other can be used. So, if all file content related operations like `read`, `write` and other are permitted, only `O_DIRECTORY | O_NOFOLLOW | O_PATH` flags can be used. We have finished with flags for this moment in the `build_open_flags` for this moment and we may fill our `open_flags->open_flag` with them: So, in this case the file itself is not opened, but operations like `dup`, `fcntl` and other can be used. So, if all file content related operations like `read`, `write` and other are not permitted, only `O_DIRECTORY | O_NOFOLLOW | O_PATH` flags can be used. We have finished with flags for this moment in the `build_open_flags` for this moment and we may fill our `open_flags->open_flag` with them:
```C ```C
op->open_flag = flags; op->open_flag = flags;