Let's say I need to get a file descriptor for a file (or directory) that has only permission to execute (or search).
The X / Open norm defines the O_SEARCH flag for the open () function. See http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html
However, Linux does not work. There are only 3 flags available (O_RDONLY, O_WRONLY and O_RDWR). See http://man7.org/linux/man-pages/man2/open.2.html
Why? And how can I get a fd directory with a single permission to search?
thank
, Linux , , . . " UNIX", Google
POSIX, C ( glibc, man 3 ), Linux ( , man 2 open).
1: GNU Linux, Linux, , Linux ( fcntl-linux.h fcntl.h).
EDIT 2: - https://sourceware.org/bugzilla/show_bug.cgi?id=18228
, , !
open(3) ( 3P man-, ), . ArchLinux, 2017-05-24.
open(3)
EDIT 1: , , , althoug .
, opendir, readdir , .
opendir
readdir
? fd ?
, , , fopen .
fopen
Source: https://habr.com/ru/post/1677854/More articles:SWrevealviewcontroller: the direction of the remote menu menu from left to right is pragmatic - iosFinding an array for similar objects - arraysEMR Spark - TransportClient: Failed to send RPC - emrHow to create a separate individual selectInput menu in R Shiny? - cssError using Auth0 Quick Launch - angularКак уменьшить шум с помощью SOX? - audio-recordingСоздание естественного языка - как выйти за рамки шаблонов - textWhy does a floating div make the next div take up whole space? - htmlJavaScript: create an array of value pairs from an array of values - javascriptIterate an array as a pair (current, next) in JavaScript - javascriptAll Articles