Compare commits

..

11 Commits

Author SHA1 Message Date
00d625a697
kernel/ext2: Add support for symbolic links
All checks were successful
continuous-integration/drone/pr Build is passing
2023-06-24 13:56:19 +02:00
cf897ebb78
kernel: Make pivot_root() reset the parent entry of the new root directory
Otherwise it would just be pointing to the old parent fs, and we don't want that.
2023-06-24 13:56:18 +02:00
0d3aa2de07
kernel/ext2: Implement directory traversal 2023-06-24 13:56:17 +02:00
9ac7082659
tools: Generate the Ext2 filesystem using genext2fs instead
mkbootimg's filenames have some kind of bug...
2023-06-24 13:56:17 +02:00
7bdaac6e0a
kernel/ext2: Implement Inode::read() 2023-06-24 13:56:16 +02:00
40d2efd7ad
kernel/Ext2: Read the root inode metadata from the disk 2023-06-24 13:56:15 +02:00
3d2f73a33b
mount: Put the source argument first 2023-06-24 13:56:14 +02:00
733c778339
kernel+libc+apps: Add a source parameter to the mount() system call 2023-06-24 13:56:14 +02:00
52f48a3187
kernel: Add an Ext2 filesystem skeleton 2023-06-24 13:56:09 +02:00
3b6f5b28fc
kernel: Make the configurable filename restrictions actually compile
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-22 20:24:33 +02:00
fdf2bb2501
kernel: Make the filename restrictions configurable
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-22 20:22:43 +02:00
2 changed files with 10 additions and 0 deletions

View File

@ -10,3 +10,8 @@
# Example: Adding a compiler flag. This will optimize the kernel aggressively (warning: untested, use at your own discretion). # Example: Adding a compiler flag. This will optimize the kernel aggressively (warning: untested, use at your own discretion).
# target_compile_options(moon PRIVATE -O3) # target_compile_options(moon PRIVATE -O3)
# Uncomment the line below to allow any filename on file/directory creation (by default, the kernel prohibits filenames with
# control characters, leading/trailing spaces, problematic characters and invalid UTF-8). Keep in mind that this restriction
# is only enforced when creating files; existing files with such illegal filenames are parsed correctly and fully usable.
# target_compile_definitions(moon PRIVATE MOON_DISABLE_FILENAME_RESTRICTIONS)

View File

@ -101,6 +101,11 @@ namespace VFS
Result<void> validate_filename(StringView name) Result<void> validate_filename(StringView name)
{ {
#ifdef MOON_DISABLE_FILENAME_RESTRICTIONS
(void)name;
return {};
#endif
// Forbid problematic characters that could cause trouble in shell scripts and the like. // Forbid problematic characters that could cause trouble in shell scripts and the like.
if (strpbrk(name.chars(), "*?:[]\"<>\\")) return err(EINVAL); if (strpbrk(name.chars(), "*?:[]\"<>\\")) return err(EINVAL);