Find a file
Andreas Kling 0569123ad7 Kernel: Add a basic implementation of unveil()
This syscall is a complement to pledge() and adds the same sort of
incremental relinquishing of capabilities for filesystem access.

The first call to unveil() will "drop a veil" on the process, and from
now on, only unveiled parts of the filesystem are visible to it.

Each call to unveil() specifies a path to either a directory or a file
along with permissions for that path. The permissions are a combination
of the following:

- r: Read access (like the "rpath" promise)
- w: Write access (like the "wpath" promise)
- x: Execute access
- c: Create/remove access (like the "cpath" promise)

Attempts to open a path that has not been unveiled with fail with
ENOENT. If the unveiled path lacks sufficient permissions, it will fail
with EACCES.

Like pledge(), subsequent calls to unveil() with the same path can only
remove permissions, not add them.

Once you call unveil(nullptr, nullptr), the veil is locked, and it's no
longer possible to unveil any more paths for the process, ever.

This concept comes from OpenBSD, and their implementation does various
things differently, I'm sure. This is just a first implementation for
SerenityOS, and we'll keep improving on it as we go. :^)
2020-01-20 22:12:04 +01:00
.github Meta: Add GitHub Sponsors to funding options 2019-11-02 23:32:34 +01:00
AK AK: Allow clamp() with min==max 2020-01-20 13:49:05 +01:00
Applications Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Base Kernel: Do not return ENOENT for unresolved symbols 2020-01-18 23:51:22 +01:00
Demos Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
DevTools Kernel: Let's say that everything < 3GB is user virtual memory 2020-01-19 08:58:33 +01:00
Documentation Documentation: Suggest gcc-9 on Ubuntu since PPA doesn't have 8 anymore 2020-01-05 08:57:43 +01:00
Games Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Kernel Kernel: Add a basic implementation of unveil() 2020-01-20 22:12:04 +01:00
Libraries Kernel: Add a basic implementation of unveil() 2020-01-20 22:12:04 +01:00
MenuApplets Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Meta Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Ports Ports: Add missing ' after timestamp in GCC patch (#1004) 2020-01-03 02:09:53 +01:00
Servers WindowServer: Simplify WSMenu MouseWheel event 2020-01-20 10:35:12 +01:00
Shell Shell: Don't crash when stdout is not a TTY 2020-01-19 13:52:44 +01:00
Tests/Kernel Kernel: Pass correct permission flags when opening files 2020-01-18 23:51:22 +01:00
Toolchain Build: add support for building on OpenBSD 2020-01-02 21:03:53 +01:00
Userland Userland: Add a dummy passthrough "flock" program 2020-01-20 20:44:29 +01:00
.clang-format Meta: Tweak .clang-format to not wrap braces after enums. 2019-06-07 17:13:23 +02:00
.gitignore Demos: Add a dynamic linking demo to show off dlfcn methods 2020-01-01 17:48:41 +01:00
.travis.yml Travis: We don't have UseIt.sh anymore :^) 2019-12-21 00:19:49 +01:00
CODE_OF_CONDUCT.md Meta: Move code of conduct (lol) to a separate file 2019-10-23 10:05:06 +02:00
CONTRIBUTING.md Meta: Reference CodingStyle doc in CONTRIBUTING.md 2020-01-08 19:41:20 +01:00
INSTALL.md Meta: Update link to build instructions in INSTALL.md 2020-01-01 17:33:32 +01:00
LICENSE Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Makefile Build: Enter Libraries before AK, clean tests as separate step 2020-01-01 22:21:50 +01:00
Makefile.common Build: add support for building on OpenBSD 2020-01-02 21:03:53 +01:00
Makefile.subdir Build: wrap make invocations with flock(1) 2019-12-28 21:09:33 +01:00
ReadMe.md Meta: Fix typo in ReadMe 2019-12-29 16:25:06 +01:00

SerenityOS

Graphical Unix-like operating system for x86 computers.

Travis CI status

About

SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core. It flatters with sincerity by stealing beautiful ideas from various other systems.

Roughly speaking, the goal is a marriage between the aesthetic of late-1990s productivity software and the power-user accessibility of late-2000s *nix. This is a system by me, for me, based on the things I like.

If you like some of the same things, you are welcome to join the project. It would be great to one day change the above to say "this is a system by us, for us, based on the things we like." :^)

I regularly post raw hacking sessions and demos on my YouTube channel.

Sometimes I write about the system on my github.io blog.

I'm also on Patreon and GitHub Sponsors if you would like to show some support that way.

Screenshot

Screenshot as of 1133aca

Current features (all under development, some more mature than others)

  • Pre-emptive multitasking
  • Multithreading
  • Compositing window server
  • IPv4 networking with ARP, TCP, UDP and ICMP
  • ext2 filesystem
  • Unix-like libc and userland
  • POSIX signals
  • Shell with pipes and I/O redirection
  • mmap()
  • Purgeable memory
  • /proc filesystem
  • Local sockets
  • Pseudoterminals (with /dev/pts filesystem)
  • Filesystem notifications
  • JSON framework
  • Low-level utility library (LibCore)
  • Mid-level 2D graphics library (LibDraw)
  • High-level GUI library (LibGUI)
  • HTML/CSS engine
  • Web browser
  • C++ IDE
  • Sampling profiler with GUI
  • Emojis (UTF-8)
  • HTTP downloads
  • SoundBlaster 16 driver
  • Software-mixing sound daemon
  • WAV playback
  • Simple desktop piano/synthesizer
  • Visual GUI design tool
  • PNG format support
  • Text editor
  • IRC client
  • Simple painting application
  • DNS lookup
  • Desktop games: Minesweeper and Snake
  • Color theming
  • Ports system (needs more packages!)
  • Other stuff I can't think of right now...

How do I build and run this?

See the SerenityOS build instructions

Wanna talk?

Come chat with us in #serenityos on the Freenode IRC network.

Author

Contributors

(And many more!) Feel free to append yourself here if you've made some sweet contributions. :)

License

SerenityOS is licensed under a 2-clause BSD license.