Skip to content

File Open Flags and Enforcement #246

Description

@dthain

Fix up the use of access flags for open files, in several places:
1 - User programs that call syscall_open are currently passing in magic integers to indicate various file flags. Instead, they should be using KERNEL_FLAGS_READ etc defined in kernel/types.h
2 - Drop FS_FLAGS_READ|WRITE in fs.h
3 - Remember the flags with which a kobject was opened, and reject attempts to write a file not opened with KERNEL_FLAG_WRITE, or to seek on a file not opened with KERNEL_FLAGS_RANDOM

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions