summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-29LibCore+Inspector: Move RPC sockets to /tmp/rpcSergey Bugaev
We have a hierarchical filesystem, let's make use of it :^)
2020-05-29LibCore: Do not assert that we can start the RPC serverSergey Bugaev
Now that the Shell uses Core::EventLoop, we can't afford to just crash if /tmp is unwritable.
2020-05-29Kernel+Base: Mount root filesystem read-only :^)Sergey Bugaev
We remount /home and /root as read-write, to keep the ability to modify files there. /tmp remains read-write, as it is mounted from a TmpFS.
2020-05-29Base: Document MS_RDONLYSergey Bugaev
Also fix a couple of issues with the man pages.
2020-05-29Userland+SystemMonitor: Recognize the MS_RDONLY mount flagSergey Bugaev
2020-05-29Kernel: Support read-only filesystem mountsSergey Bugaev
This adds support for MS_RDONLY, a mount flag that tells the kernel to disallow any attempts to write to the newly mounted filesystem. As this flag is per-mount, and different mounts of the same filesystems (such as in case of bind mounts) can have different mutability settings, you have to go though a custody to find out if the filesystem is mounted read-only, instead of just asking the filesystem itself whether it's inherently read-only. This also adds a lot of checks we were previously missing; and moves some of them to happen after more specific checks (such as regular permission checks). One outstanding hole in this system is sys$mprotect(PROT_WRITE), as there's no way we can know if the original file description this region has been mounted from had been opened through a readonly mount point. Currently, we always allow such sys$mprotect() calls to succeed, which effectively allows anyone to circumvent the effect of MS_RDONLY. We should solve this one way or another.
2020-05-29Kernel+LibC: Move O_* and MS_* flags to UnixTypes.hSergey Bugaev
That's where the other similar definitions reside. Also, use bit shift operations for MS_* values.
2020-05-29Kernel: Fix error case in Process::create_user_process()Sergey Bugaev
If we fail to exec() the target executable, don't leak the thread (this actually triggers an assertion when destructing the process), and print an error message.
2020-05-29Kernel: Fix some failing assertionsSergey Bugaev
When mounting Ext2FS, we don't care if the file has a custody (it doesn't if it's a device, which is a common case). When doing a bind-mount, we do need a custody; if none is provided, let's return an error instead of crashing.
2020-05-29Kernel: Always require read access when mmaping a fileSergey Bugaev
POSIX says, "The file descriptor fildes shall have been opened with read permission, regardless of the protection options specified."
2020-05-29Kernel: Pass a Custody instead of Inode to VFS methodsSergey Bugaev
VFS no longer deals with inodes in public API, only with custodies and file descriptions. Talk directly to the file system if you need to operate on a inode. In most cases you actually want to go though VFS, to get proper permission check and other niceties. For this to work, you have to provide a custody, which describes *how* you have opened the inode, not just what the inode is.
2020-05-29Kernel: Pass a FileDescription to File::chmod() and File::chown()Sergey Bugaev
We're going to make use of it in the next commit. But the idea is we want to know how this File (more specifically, InodeFile) was opened in order to decide how chown()/chmod() should behave, in particular whether it should be allowed or not. Note that many other File operations, such as read(), write(), and ioctl(), already require the caller to pass a FileDescription.
2020-05-29Userland: Fix displaying mount sourceSergey Bugaev
The key is now called "source" instead of "device".
2020-05-29Kernel: Report source of synthetic filesystems as "none"Sergey Bugaev
As opposed to the fs name. This matches the new convention we have for specifying it in mount(8).
2020-05-29LibJS: Throw in strict mode when assigning property to primitive valueLinus Groh
2020-05-28Meta: Tweak license in celebration of 10'000 commits :^)Andreas Kling
2020-05-28LibWeb: Add a way to stop the new HTML parserAndreas Kling
Some things are specced to "stop parsing", which basically just means to stop fetching tokens and jump to "The end"
2020-05-28LibWeb: Implement more of the "after body" insertion modeAndreas Kling
2020-05-28LibWeb: Parse comments in the "in body" insertion modeAndreas Kling
2020-05-28LibWeb: Implement a bunch more script-related tokenization statesAndreas Kling
2020-05-28LibWeb: Add HTMLToken::make_character()Andreas Kling
It's tedious to make character tokens manually all the time.
2020-05-28LibWeb: Rename Web::HtmlView => Web::PageViewAndreas Kling
This widget doesn't just view HTML, it views a web page. :^)
2020-05-28LibWeb: Fix HTMLDocumentParser buildAndreas Kling
2020-05-28LibWeb: Remove a misplaced call to close_a_p_element() in "in body"Andreas Kling
This should only be done for the corresponding start tags.
2020-05-28LibWeb: Add a StackOfOpenElements helper for "popping until a tag name"Andreas Kling
2020-05-28Browser: Switch focus to the web page after pressing return in URL barAndreas Kling
Instead of dropping focus entirely, which felt weird.
2020-05-28LibJS: Implement standard semantics for relational operators (#2417)Marcin Gasperowicz
Previously, the relational operators where casting any value to double and comparing the results according to C++ semantics. This patch makes the relational operators in JS behave according to the standard specification. Since we don't have BigInt yet, the implementation doesn't take it into account. Moved PreferredType from Object to Value. Value::to_primitive now passes preferred_type to Object::to_primitive.
2020-05-28LibJS: Strict mode assignment to 'eval' & 'arguments' is a syntax errorMatthew Olsson
2020-05-28LibJS: Add strict modeMatthew Olsson
Adds the ability for a scope (either a function or the entire program) to be in strict mode. Scopes default to non-strict mode. There are two ways to determine the strict-ness of the JS engine: 1. In the parser, this can be accessed with the parser_state variable m_is_strict_mode boolean. If true, the Parser is currently parsing in strict mode. This is done so that the Parser can generate syntax errors at parse time, which is required in some cases. 2. With Interpreter.is_strict_mode(). This allows strict mode checking at runtime as opposed to compile time. Additionally, in order to test this, a global isStrictMode() function has been added to the JS ReplObject under the test-mode flag.
2020-05-28LibJS: Object index properties have descriptors; Handle sparse indicesMatthew Olsson
This patch adds an IndexedProperties object for storing indexed properties within an Object. This accomplishes two goals: indexed properties now have an associated descriptor, and objects now gracefully handle sparse properties. The IndexedProperties class is a wrapper around two other classes, one for simple indexed properties storage, and one for general indexed property storage. Simple indexed property storage is the common-case, and is simply a vector of properties which all have attributes of default_attributes (writable, enumerable, and configurable). General indexed property storage is for a collection of indexed properties where EITHER one or more properties have attributes other than default_attributes OR there is a property with a large index (in particular, large is '200' or higher). Indexed properties are now treated relatively the same as storage within the various Object methods. Additionally, there is a custom iterator class for IndexedProperties which makes iteration easy. The iterator skips empty values by default, but can be configured otherwise. Likewise, it evaluates getters by default, but can be set not to.
2020-05-28LibJS: Fix out-of-range error in Parser::Error::source_location_hintMatthew Olsson
2020-05-28LibC: run clang-format on getopt.h to remove tab charactersEmanuele Torre
2020-05-28LibWeb: replace some tab characters with spacesEmanuele Torre
also add missing "#pragma once" in StylePropertiesModel.h
2020-05-28IRCClient: remove some unused headers and replace tabs with spacesEmanuele Torre
2020-05-28Meta: Move INSTALL.md into Documentation/Andreas Kling
2020-05-28LibWeb: Fall back to block layout for unimplemented CSS display valuesAndreas Kling
This seems to have a higher chance of generating somewhat recognizable content compared to inline layout. This problem will gradually go away as we implement more display values.
2020-05-28LibWeb: Add default UA style for some table-related elementsAndreas Kling
2020-05-28LibWeb: Plumb content encoding into the new HTML parserAndreas Kling
We still don't handle non-ASCII input correctly, but at least now we'll convert e.g ISO-8859-1 to UTF-8 before starting to tokenize. This patch also makes "view source" work with the new parser. :^)
2020-05-28LibWeb: Parse "input" tags during the "in body" insertion modeAndreas Kling
2020-05-28LibWeb: Parse "td" start tags during "in cell" insertion modeAndreas Kling
2020-05-28LibGUI: Don't show big Buggie in app about dialogsAndreas Kling
It was getting to crowded between two Buggies and the app icon.
2020-05-28LibWeb: Support named character references (e.g "&")Andreas Kling
2020-05-28Base: Add manpage for xargsAnotherTest
2020-05-28Userland: Add a basic xargsAnotherTest
This adds a basic implementation of xargs. The implemenation is missing quite a few options, and is not entirely POSIX-compliant, but it gets the job done :^)
2020-05-28LibC: Add a O_CLOEXEC mode element to fopen()AnotherTest
This commit also changes the mode parsing to allow specifying the modes in any order.
2020-05-28AK: Add StringView::split_view() taking a StringViewAnotherTest
Since the task of splitting a string via another is pretty common, we might as well have this overload of split_view() as well.
2020-05-28Kernel: Remove outdated FIXME in InterruptManagement::locate_apic_dataAndreas Kling
2020-05-28IRCClient: Enable history on the message boxFalseHonesty
2020-05-28Build: Use a separate byproduct name for the GRUB disk image (#2424)etaIneLp
The grub-image target no longer conflicts with normal image target. This unbreaks using CMake with Ninja. Fixes #2423.
2020-05-28Kernel: Stop bootloader from setting video mode with MultibootetaIneLp
Meta: Update INSTALL.md and grub configs for new boot_mode option