forked from Bananymous/banan-os
Kernel: O_SEARCH doesn't require any permissions
Except read permissions for all directories in the path This allows us to stat e.g. device files for which we don't have the permissions.
This commit is contained in:
parent
d34c0a5abe
commit
8c282a5d83
|
@ -10,8 +10,7 @@ namespace Kernel
|
||||||
if (credentials.is_superuser())
|
if (credentials.is_superuser())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// We treat O_SEARCH as O_RDONLY
|
if (flags & O_RDONLY)
|
||||||
if (flags & (O_RDONLY | O_SEARCH))
|
|
||||||
{
|
{
|
||||||
if (mode().mode & S_IROTH)
|
if (mode().mode & S_IROTH)
|
||||||
{ }
|
{ }
|
||||||
|
|
Loading…
Reference in New Issue