summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-10Meta: Only complain about linter tools if relevant files have changedAndrew Kaster
2021-01-10Kernel+SystemServer+CrashDaemon: Better control where we put core dumpsAndreas Kling
SystemServer now creates the /tmp/coredump and /tmp/profiler_coredumps directories at startup, ensuring that they are owned by root, and with basic 0755 permissions. The kernel will also now refuse to put core dumps in a directory that doesn't fulfill the following criteria: - Owned by 0:0 - Directory with sticky bit not set - 0755 permissions Fixes #4435 Fixes #4850
2021-01-10LibCore: Don't try to unlink stale sockets in /tmp/rpc/Andreas Kling
This was very obviously racy and would only succeed if we already own the socket anyway. (And if we do, we can bind to it without unlinking!) Work towards #4876.
2021-01-10SystemServer+LibCore: Move /tmp/rpc/ directory creation to SystemServerAndreas Kling
This doesn't solve half of the problems with /tmp/rpc, but this way we can at least make it sticky instead of having it fully world-writable and owned by whoever was the first to bind an RPC socket.
2021-01-10Kernel: Don't allow non-root, non-owners to rmdir any child of stickyAndreas Kling
We were not handling sticky parents properly in sys$rmdir(). Child directories of a sticky parent should not be rmdir'able by just anyone. Only the owner and root. Fixes #4875.
2021-01-10Everywhere: Convert a bunch of dbgprintf() to dbgln()Andreas Kling
2021-01-10LibVT: Don't assert if ioctl(TIOCSWINSZ) failsAndreas Kling
This ioctl can fail if we're resizing the terminal right when the shell inside it has exited. Instead of throwing up a crash reporter, whine a little bit in the debug log and exit cleanly moments later.
2021-01-10LibELF: Convert many dbgprintf() to dbgln() and tweak debug macro nameAndreas Kling
2021-01-10LibLine: It's okay to be interrupted while reading the DSR responseAnotherTest
Fixes #4855.
2021-01-10Shell: Fix completing barewords with escapesAnotherTest
e.g. completing `foo\ bar` now works as expected.
2021-01-10LibLine: Don't clear the displayed buffer when interruptedAnotherTest
Since we always restart on a new line, there's no reason to clear the previous lines.
2021-01-10LibLine: Unregister signal handlers on destructionAnotherTest
This fixes an issue that shows up as a nice crash when "^R<enter>^C", which is actually the event loop trying to call into a deleted object (the search editor).
2021-01-09passwd: Drop "tty" pledge promise after getting password from userAndreas Kling
This leaves us with a total pledge of "stdio" when writing to /etc/passwd and /etc/shadow which is kinda neat. :^)
2021-01-09su: Drop "tty" pledge promise after getting password from userAndreas Kling
There's not much work left to do at this point, but let's be strict.
2021-01-09passwd+su: Convert fprintf(stderr, ...) to warnln()Andreas Kling
2021-01-09Ext2FS: Zero out new space when growing an inodeAndreas Kling
Before this change, truncating an Ext2FS inode to a larger size than it was before would give you uninitialized on-disk data. Fix this by zeroing out all the new space when doing an inode resize. This is pretty naively implemented via Inode::write_bytes() and there's lots of room for cleverness here in the future.
2021-01-09Ext2FS: Convert dbg() to dbgln()Andreas Kling
Also remove some dbg()'s that were printing incorrect information.
2021-01-09LibCore: Harden signal handling code to be called in global destrcutorsTom
Move some more complex globals into a Singleton, which allows it being used from global destructors. It solves problems where some global variables, such as HashMaps may already be deleted, triggering crashes trying to use them.
2021-01-09AK: Add static Singleton::get function to allow destructible globalsTom
This enable using global raw pointers rather than Singleton objects, which solves some problems because global Singleton object could be deleted when destructors are run.
2021-01-09LibCore: Allow adding/removing signal handlers while handling signalsTom
This allows adding and removing of asynchronous signal handlers while executing signal handlers, even if it is for the same signal that is being handled right now.
2021-01-09Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.Everything: The modifications in this commit were automatically made using the following command: find . -name '*.cpp' -exec sed -i -E 's/dbg\(\) << ("[^"{]*");/dbgln\(\1\);/' {} \;
2021-01-09Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
2021-01-09Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
2021-01-09Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
2021-01-09LibGUI: Add formatter for Widget.asynts
2021-01-09AK: Add Formatter<FormatString> as helper class.asynts
2021-01-09LibC: Add explicit_bzero()Andreas Kling
This is a variant of bzero() that is guaranteed to not get optimized away by the compiler. Useful for clearing out sensitive data.
2021-01-09AK: Add release_value() and release_error() to AK::ResultAndreas Kling
These are nice when you want to move something out of the result, and match the API we already have for Optional.
2021-01-09LibC: Move bzero() and bcopy() per Dr. POSIXAndreas Kling
2021-01-09su+passwd: Don't copy Core::Account unnecessarilyAndreas Kling
2021-01-09su: Use pledge() :^)Andreas Kling
Not sure why we hadn't done this one sooner, seems like a high-value program to pledge.
2021-01-09passwd: Drop privileges after opening files for writingAndreas Kling
Once we have /etc/passwd and /etc/shadow open for writing, there's no need for passwd to continue running as root. We can also drop a bunch of pledge promises, further tightening things.
2021-01-09LibCore+passwd+su+Base: Add /etc/shadow to hide hashes from users :^)Andreas Kling
This patch moves the user account password hashes from /etc/passwd, where they were world-readable, to /etc/shadow, where only root can access them. The Core::Account class is extended to support both authentication against, and modification of /etc/shadow. The default password for "anon" as of this commit is "foo" :^)
2021-01-09Meta: Unify build-and-test jobs using a matrix buildAndrew Kaster
This will make it easier to keep macos tests and non-mac tests in lockstep. Also, make sure flake8 and python are installed. This also makes it easier to add other OS targets if we want.
2021-01-09Meta: Use /usr/bin/env for python3 in newline checker scriptAndrew Kaster
2021-01-09Meta: Add flake8 to lint python filesAndrew Kaster
2021-01-09LibJS: Add tests for bitwise NOT operatorLinus Groh
2021-01-09LibJS: Make bitwise NOT work correctly with NaN and InfinityLinus Groh
This was missing a "toInt32()" which returns 0 for NaN and Infinity. From the spec: 6.1.6.1.2 Number::bitwiseNOT ( x ) The abstract operation Number::bitwiseNOT takes argument x (a Number). It performs the following steps when called: Let oldValue be ! ToInt32(x). Return the result of applying bitwise complement to oldValue. The mathematical value of the result is exactly representable as a 32-bit two's complement bit string. Fixes #4868.
2021-01-09LibJS: Use INVALID some more in abstract operationsLinus Groh
2021-01-09Kernel: Defer switching the paging scope in ptrace(PT_POKE) a littleAndreas Kling
If we can fail with EFAULT early, might as well avoid switching the paging scope.
2021-01-09LibWeb: No need to report that we encountered <svg> or <math>Andreas Kling
These things happen, and it's not particularly noteworthy.
2021-01-09LibWeb: Coalesce layouts that happen in response to style changesAndreas Kling
Instead of doing a forced layout synchronously whenever an element's style is changed, use a zero-timer to do the forced relayout on next event loop iteration. This effectively coalesces a lot of layouts and makes many pages such as GitHub spend way less time doing redundant layout work.
2021-01-09LibDebug: Convert a bunch of dbg() to dbgln()Andreas Kling
2021-01-09WindowServer: Don't enter invalid state when using resize corner.Mart G
2021-01-09Chess: Fix button size in the piece promotion dialogAndreas Kling
Fixes #4865.
2021-01-09LibWeb: Convert a bunch of dbg() to dbgln()Andreas Kling
2021-01-09Kernel: Don't put gratuitous cursing in kernel logAndreas Kling
2021-01-09LibVT+Terminal: Resize terminal when font changesAndreas Kling
When the font is changed in the Terminal application, we now resize the terminal window to accomodate the new font.
2021-01-09Everywhere: Colour => ColorAndreas Kling
The system language is US English. :^)
2021-01-09SpaceAnalyzer: use "Proper Noun" name styleTheMorc