Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functions for working with file permissions. #170

Merged
merged 7 commits into from
Dec 21, 2019
Merged

Commits on Dec 15, 2019

  1. Add functions for working with file permissions.

    Add functions and types to query and set the filesystem permissions of
    a file: read, write, execute (for files), and search (for directories).
    
    These permissions aren't the only thing which determines whether a given
    file or directory can be accessed; hosts may impose additional arbitrary
    security restrictions not reflected here.
    
    WASI itself does not currently have the ability to execute files, so the
    meaning of "execute" here is entirely up to the host filesystem.
    
    These are similar to fchmod/fchmodat/fstat/fstatat in POSIX, though
    there are some differences:
    
     - This doesn't surface POSIX's setuid, setgid, or sticky bits. These can
       be added in the future if needed, though they'll require additional
       security and portability considerations.
    
     - This uses separate flags for "execute" on files vs "search" on
       directories. WASI libc can provide a POSIX-compatible C API.
    
     - This doesn't expose POSIX's user/group/other concepts. These can be
       added in the future if needed, though they'll require additional
       security and portability considerations. Implementations in POSIX
       environments should follow the umask when setting permissions flags.
    sunfishcode committed Dec 15, 2019
    Configuration menu
    Copy the full SHA
    d35d676 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    70edef8 View commit details
    Browse the repository at this point in the history
  3. Put a permissions field in filestat.

    This is instead of dedicated `permissions_get` functions.
    sunfishcode committed Dec 15, 2019
    Configuration menu
    Copy the full SHA
    49cfce3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    637bcfc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2a0c047 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8eb4911 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2019

  1. Configuration menu
    Copy the full SHA
    da7fef3 View commit details
    Browse the repository at this point in the history