util_file_readable
does not check what one expects it to check
#899
Labels
util_file_readable
does not check what one expects it to check
#899
util_file_readable uses
util_entry_readable
(andutil_is_file
, not focussed on here) - that function, util_entry_readable, looks as follows:we're getting the stat of the file, and check the mode for
S_IRUSR
bit being set.from the glibc docs:
so we only check whether the owner of the file can read the file.
this check returns true, say for a file with mode 0400 and owner
root:root
, but cannot be read by a non-root user.The text was updated successfully, but these errors were encountered: