Commit graph

21374 commits

Author SHA1 Message Date
brapru 1560775494 Utilities: Change default shell of useradd to /bin/sh 2021-05-30 17:42:03 +01:00
Edwin Hoksberg e68780e1ad WebServer: Put dbgln's behind WEBSERVER_DEBUG
These dbgln's caused excessive load in the WebServer process,
accounting for ~67% of the processing time when serving a webpage
with a bunch of resources like serenityos.org/happy/2nd/.
2021-05-30 17:41:56 +01:00
Max Wipfli a557f83f8c AK: Verify that m_impl is non-null in String::operator[]
This helps to find bugs where null strings are indexed into with
operator[], as this would previously only report a RefPtr null
dereference.
2021-05-30 17:41:49 +01:00
Tim Schumacher 040d2479bf Ports: Add port for wget 2021-05-30 14:56:50 +01:00
Tim Schumacher c2b47c0676 LibC: Add stubs for wctype and iswctype 2021-05-30 14:56:50 +01:00
Tim Schumacher d364abe4d5 LibC: Stub out btowc
wint_t is also not supposed to be defined by sys/types.h, but should
be defined in wchar.h instead. Since we require it for our definition of
btowc, let's move it to the correct place.
2021-05-30 14:56:50 +01:00
Tim Schumacher ccef5fe234 LibC: Implement __fpurge 2021-05-30 14:56:50 +01:00
Tim Schumacher cd970928a0 LibC: Implement getprogname and setprogname 2021-05-30 14:56:50 +01:00
Tim Schumacher a3b4e43dd8 LibC: Implement __freading and __fwriting
These functions are used by gnulib (and therefore many GNU utilities)
to provide access to internal details of the stdio FILE structure.
2021-05-30 14:56:50 +01:00
Ben Wiederhake a49c77b76d LibGfx: Load correct durations for gifs
The wrong shift effectively set the upper byte to 0, meaning that
durations longer than 255 centiseconds (2.55 seconds) were wrapped
around. See serenity-fuzz-corpora for an example.
2021-05-30 14:42:34 +01:00
Ben Wiederhake 774107f37c Fuzz+LibGfx: When fuzzing GIFLoader, try to load all frames 2021-05-30 14:42:34 +01:00
Ben Wiederhake 2d011961c9 AK: Fix accidentally-quadratic behavior in StringBuilder
Found by OSS Fuzz:
#34451 (old bug)

Related commit: 3908a49661
2021-05-30 14:39:30 +01:00
Andrew Kaster 7b4dc590e7 AK+Userland: Use akaster@serenityos.org for my copyright headers 2021-05-30 14:35:34 +01:00
Linus Groh 75ea1bd346 WebServer: Exit when the given port is invalid
Similar to an invalid listen address, we should not fallback to the
default port (8000) but instead exit with an error.
2021-05-30 14:11:53 +01:00
Linus Groh 7fa3033ca8 WebServer: Replace printf()/fprintf(stderr) with outln()/warnln() 2021-05-30 14:07:58 +01:00
Linus Groh 5d80aab038 which: Replace printf() with outln()/warnln() 2021-05-30 14:07:58 +01:00
Linus Groh 7b79758fc6 userdel: Replace fprintf(stderr) with warnln() 2021-05-30 14:07:58 +01:00
Linus Groh 65528d86d5 ntpquery: Replace printf()/fprintf(stderr) with out{,ln}()/warnln() 2021-05-30 14:07:58 +01:00
Andreas Kling c584421592 AK: Make HashTable::operator=(HashTable&&) clear the moved-from table
This is consistent with how other AK containers behave when moved from.
2021-05-30 14:34:32 +02:00
Gunnar Beutner 259822493f Toolchain: Check whether required tools and libraries are available
Rather than having the toolchain build fail half-way through we should
check whether the user has installed all the required tools and
libraries early on.
2021-05-30 13:06:28 +01:00
Edwin Hoksberg 2deffeb74d WebServer: Add optional listen address argument
With this we can make the Webserver listen on
another address than the default of "0.0.0.0".
2021-05-30 13:03:59 +01:00
Andreas Kling 4190fd2199 LibWeb: Rename Web::Frame to Web::BrowsingContext
Our "frame" concept very closely matches what the web specs call a
"browsing context", so let's rename it to that. :^)

The "main frame" becomes the "top-level browsing context",
and "sub-frames" are now "nested browsing contexts".
2021-05-30 12:39:53 +02:00
sin-ack 8be98af77c AK: Declare malloc_good_size as extern "C"
This would otherwise cause an error with clang when __serenity__ wasn't
defined.
2021-05-30 11:10:47 +01:00
Brendan Coles 340cecaf80 pls: Unveil search paths with browse permissions 2021-05-30 10:41:25 +01:00
Ali Mohammad Pur f387da4a90 LibTest+test-js: Add back the lost test262 parser test option
Fixes #7566.
2021-05-30 10:34:44 +01:00
Ali Mohammad Pur 724b89f90c LibJS: Make missing variable decls in for..in/of a syntax error
...instead of a hard crash :P
2021-05-30 10:34:44 +01:00
Ali Mohammad Pur e10006b3fa LibJS: Don't try to parse binding patterns after a syntax error
Otherwise we'd be spinning there forever.
2021-05-30 10:34:44 +01:00
Idan Horowitz 6bfeb87572 LibJS: Add String.prototype.anchor & friends
Adds an implementation of the following StringPrototype methods:
anchor, big, blink, bold, fixed, fontcolor, fontsize, italics, link,
small, strike, sub, sup.
2021-05-30 10:32:05 +01:00
Andreas Kling 460c0f9847 LibGUI: Don't scroll TreeView horizontally to bring index into view
This behavior was really irritating and basically never what you wanted
so let's stop doing it.
2021-05-30 09:28:19 +02:00
Andreas Kling 42b27d9f87 LibGUI: Avoid a bunch of virtual calls during TreeView painting
The index of the tree column will not change while painting.
Neither will the number of columsn. So avoid a whole bunch of virtual
function calls by caching these two values at the start of painting.
2021-05-30 09:05:37 +02:00
David Carlier 594dfaadb9 LibC: openpty error handling update 2021-05-30 08:41:17 +02:00
Stephan Unverwerth 755393e684 LibGL: Implement glBindTexture()
Textures are now initialized with a nullptr upon generation.
They are only actually created once they are bound to a target.
Currently only the GL_TEXTURE_2D target is supported.
The software rasterizer now allows rendering with or without
a bound TEXTURE_2D.
2021-05-30 00:32:37 +01:00
Stephan Unverwerth fde0045ebe LibGL: Introduce Texture base class for all texture types 2021-05-30 00:32:37 +01:00
Idan Horowitz 09233b9e41 LibJS: Add Date.prototype.{get, set}Year() 2021-05-29 23:42:08 +01:00
Idan Horowitz 96ee5e36ed LibJS: Replace the broken and unused Date::year getter 2021-05-29 23:42:08 +01:00
Ben Wiederhake a7c265f341 Everywhere: Sort out superfluous QuickSort.h imports
They were sorta unneeded. :^)
2021-05-29 23:41:54 +01:00
Ali Mohammad Pur e0b17988bd LibWasm: Make f32-add/sub actually perform addition/subtraction
Instead of applying a unary operator to the ToS.
This alone fixes 4% of the spec test issues.
2021-05-30 01:34:28 +04:30
Ali Mohammad Pur 08b567e137 LibWasm: Avoid OOB accesses caused by user input
Just trap instead of crashing.
2021-05-30 01:34:28 +04:30
Ali Mohammad Pur 90de1ded55 Kernel: Ensure that an unveil node with no permission is never accepted
Otherwise nodes inheriting from root may still be accessed with
`access(..., F_OK)`.
Also adds a test case to TestKernelUnveil about this behaviour.
2021-05-29 22:05:34 +02:00
Ali Mohammad Pur 8ce015742d LibWasm: Fix logic error in Limits::parse()
The check was negated, and it errored out when the read actually
succeeded.
2021-05-29 23:03:18 +04:30
Ali Mohammad Pur 827d94939b LibJS: Add tests for destructuring assignments and function parameters 2021-05-29 23:02:23 +04:30
Ali Mohammad Pur 7a00d6d9c8 LibJS: Implement destructuring assignments and function parameters 2021-05-29 23:02:23 +04:30
Andreas Kling 1123af361d Kernel: Convert Process::get_syscall_path_argument() to KString
This API now returns a KResultOr<NonnullOwnPtr<KString>> and allocation
failures should be propagated everywhere nicely. :^)
2021-05-29 20:18:57 +02:00
Andreas Kling 66f3ec687b AK: Move RefCountedBase definitions out-of-line
This dramatically reduces code size since we no longer inline all these
VERIFY() checks everywhere. Appears to be performance neutral.
2021-05-29 20:18:57 +02:00
Jesse Buhagiar d44e2c9ad9 Userland: Check sudoers file perms and owner in pls
As per comment found in #6319 by @bcoles, `pls` should check the
permissions and owner of the sudoers file to ensure that it hasn't
been compromised.
2021-05-29 22:33:12 +04:30
Jesse Buhagiar 82b48d867d Userland: Implement pls, a sudo clone 2021-05-29 22:33:12 +04:30
Gunnar Beutner ea33e9647b LibC: Don't leak memory for realloc(p, 0)
Previously we'd leak memory when the user called realloc(p, 0). Instead
this call should behave as if the user had called free(p).
2021-05-29 19:40:23 +02:00
Andrew Kaster 3ece67d62d Meta/CI: Remove IRC notifications
With the increased volume of PRs being opened and merged lately,
multiple people have complained that the IRC is absolutely flooded with
SerenityBot posts. Remove the IRC notifications from the CI scripts, and
the Meta script that handles parsing the github actions context into
an IRC message.
2021-05-29 19:35:49 +02:00
Jelle Raaijmakers 80a84f726e LibGUI/TreeView: Implement Home/End/PageUp/PageDn navigation
This adds an implementation for the Home, End, Page Up and Page Down
cursor movements for TreeView.

Also, the Up and Down movement implementations are replaced by a more
efficient traversal mechanism: whereas the old code would walk over all
visible nodes every time, the new code only evaluates relevant sibling
and parent indices.
2021-05-29 21:58:51 +04:30
brapru 3cf835af6d LibCore: Do not write disabled spwd values in generate_shadow_file
When LibC/shadow.cpp parses shadow entries in getspent, it sets the
spwd member value to disabled (-1) if the value is empty. When
Core::Account::sync calls getspent to generate a new shadow file, it
would recieve the -1 values and write them in the shadow file. This
would cause the /etc/shadow file to be cluttered with disabled values
after any password change.

This patch checks if the spwd member value is disabled, and prints the
appropriate value to the shadow file.
2021-05-29 18:23:10 +01:00