Ticket #13530: 0001-Fix-permissions-on-symlinks-in-root-directory.patch

File 0001-Fix-permissions-on-symlinks-in-root-directory.patch, 1.3 KB (added by mjw, 7 years ago)

Update patch from a git export

  • src/system/kernel/fs/vfs_boot.cpp

    From 00b8cf710fd2ecb11d39828f9d5ee1851f4ea59b Mon Sep 17 00:00:00 2001
    From: James Woodcock <tiphphin@gmail.com>
    Date: Fri, 26 May 2017 17:11:20 +0100
    Subject: [PATCH 1/1] Fix permissions on symlinks in root directory
    
    Various symbolic links (/bin, for example) in the root directory have
    no read, write or execute permissions. This prevents non-privileved users
    from logging in.
    ---
     src/system/kernel/fs/vfs_boot.cpp | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/system/kernel/fs/vfs_boot.cpp b/src/system/kernel/fs/vfs_boot.cpp
    index f4f1102..3e5a9d9 100644
    a b vfs_bootstrap_file_systems(void)  
    455455
    456456    for (int32 i = 0; sPredefinedLinks[i].path != NULL; i++) {
    457457        _kern_create_symlink(-1, sPredefinedLinks[i].path,
    458             sPredefinedLinks[i].target, 0);
     458            sPredefinedLinks[i].target, 0777);
    459459            // we don't care if it will succeed or not
    460460    }
    461461
    vfs_mount_boot_file_system(kernel_args* args)  
    517517        char path[B_FILE_NAME_LENGTH + 1];
    518518        snprintf(path, sizeof(path), "/%s", info.volume_name);
    519519
    520         _kern_create_symlink(-1, path, "/boot", 0);
     520        _kern_create_symlink(-1, path, "/boot", 0777);
    521521    }
    522522
    523523    // If we're booting off a packaged system, mount packagefs.