1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00
serenity/Kernel/FileSystem
Ben Wiederhake c05c5a7ff4 Kernel: Clarify ambiguous {File,Description}::absolute_path
Found due to smelly code in InodeFile::absolute_path.

In particular, this replaces the following misleading methods:

File::absolute_path
This method *never* returns an actual path, and if called on an
InodeFile (which is impossible), it would VERIFY_NOT_REACHED().

OpenFileDescription::try_serialize_absolute_path
OpenFileDescription::absolute_path
These methods do not guarantee to return an actual path (just like the
other method), and just like Custody::absolute_path they do not
guarantee accuracy. In particular, just renaming the method made a
TOCTOU bug obvious.

The new method signatures use KResultOr, just like
try_serialize_absolute_path() already did.
2021-10-31 12:06:28 +01:00
..
AnonymousFile.cpp Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
AnonymousFile.h Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
BlockBasedFileSystem.cpp AK+Everywhere: Reduce the number of template parameters of IntrusiveList 2021-09-10 18:05:46 +03:00
BlockBasedFileSystem.h AK+Kernel: Format DistinctNumeric using the underlying type's formatter 2021-10-21 22:19:50 +02:00
Custody.cpp Kernel: Make KString factories return KResultOr + use TRY() everywhere 2021-09-06 19:25:36 +02:00
Custody.h AK+Everywhere: Reduce the number of template parameters of IntrusiveList 2021-09-10 18:05:46 +03:00
DevPtsFS.cpp Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
DevPtsFS.h Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
DevTmpFS.cpp Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
DevTmpFS.h Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
ext2_fs.h Everywhere: Behaviour => Behavior 2021-09-07 13:53:14 +02:00
ext2_types.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Ext2FileSystem.cpp Kernel: Make Ext2FS::free_inode() return KResult, and use TRY() more 2021-10-21 23:23:23 +02:00
Ext2FileSystem.h Kernel: Make Ext2FS::free_inode() return KResult, and use TRY() more 2021-10-21 23:23:23 +02:00
FIFO.cpp Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
FIFO.h Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
File.cpp Kernel/Devices: Defer creation of SysFS component after the constructor 2021-09-11 11:41:14 +02:00
File.h Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
FileBackedFileSystem.cpp Kernel: Rename FileDescription => OpenFileDescription 2021-09-07 13:53:14 +02:00
FileBackedFileSystem.h Kernel: Rename FileDescription => OpenFileDescription 2021-09-07 13:53:14 +02:00
FileSystem.cpp Kernel+LibC: Implement fsync 2021-09-12 11:24:02 +02:00
FileSystem.h AK+Kernel: Move KResult.h to Kernel/API for userspace access 2021-09-05 12:54:48 +02:00
Inode.cpp Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
Inode.h Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
InodeFile.cpp Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
InodeFile.h Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
InodeIdentifier.h Kernel: Remove unused InodeIdentifier::to_string() 2021-10-22 01:19:04 +02:00
InodeMetadata.h Kernel: Add per platform Processor.h headers 2021-10-14 01:23:08 +01:00
InodeWatcher.cpp Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
InodeWatcher.h Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
ISO9660FileSystem.cpp Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
ISO9660FileSystem.h Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
Mount.cpp Kernel: Make VirtualFileSystem::Mount a top-level class 2021-07-11 00:51:06 +02:00
Mount.h Kernel/Ext2FS: Cache the root inode in a member variable 2021-07-18 01:53:04 +02:00
OpenFileDescription.cpp Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
OpenFileDescription.h Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
Plan9FileSystem.cpp Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
Plan9FileSystem.h Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
ProcFS.cpp Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
ProcFS.h Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
SysFS.cpp Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
SysFS.h Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
SysFSComponent.cpp Kernel/SysFS: Make it possible to have custom permissions for nodes 2021-09-12 11:52:16 +02:00
SysFSComponent.h Kernel/SysFS: Provide a way to "truncate" and "set" mtime on inodes 2021-10-09 12:07:56 +02:00
TmpFS.cpp Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
TmpFS.h Kernel: Make Inode::flush_metadata() return a KResult 2021-10-21 23:23:23 +02:00
UnveilNode.h Kernel: Move UnveilNode.h into Kernel/FileSystem/ 2021-08-06 14:11:45 +02:00
VirtualFileSystem.cpp Kernel: Clarify ambiguous {File,Description}::absolute_path 2021-10-31 12:06:28 +01:00
VirtualFileSystem.h Kernel: Enable early-returns from VFS::for_each_mount 2021-10-31 12:06:28 +01:00