Commit Graph

16351 Commits

Author SHA1 Message Date
Ben Wiederhake
b0b8953ec1 Base: Fix syscall/libc manpage sorting 2021-01-23 16:47:09 +01:00
Ben Wiederhake
88dcbacabd Meta: Check consistency of various syscall tables 2021-01-23 16:47:09 +01:00
asynts
a7d5fbb8af AK+Format: Add dmesgln() to replace klog(). 2021-01-23 16:46:26 +01:00
asynts
1c1e577a5e Everywhere: Deprecate dbg(). 2021-01-23 16:46:26 +01:00
Andreas Kling
d7345cf560 Kernel: Use current EUID/EGID for LocalSocket prebind credentials 2021-01-23 16:45:05 +01:00
Andreas Kling
ca3489eec7 Kernel: Make VFS::create() fail with EINVAL on invalid file mode
Instead of trying to fix up the mode to look like a regular file,
just fail instead.
2021-01-23 16:45:05 +01:00
Andreas Kling
bfb254ed14 Ext2FS: Assert that create_directory() is called with valid mode 2021-01-23 16:45:05 +01:00
Andreas Kling
a85c61ad51 SystemServer: Mask off the set-uid bit in SocketPermissions 2021-01-23 16:45:05 +01:00
Andreas Kling
c32176db27 Kernel: Don't preserve set-uid bit in open() and bind() modes
For some reason we were keeping the bits 04777 in file modes. That
doesn't seem right and I can't think of a reason why the set-uid bit
should be allowed to slip through.
2021-01-23 16:45:05 +01:00
Andreas Kling
f2ea6c3d4c Ext2FS: Don't create a directory when asked to create a socket file
(mode & S_IFDIR) is not enough to check if "mode" is a directory,
we have to check all the bits in the S_IFMT mask.

Use the is_directory() helper to fix this bug.
2021-01-23 16:45:05 +01:00
Mart G
86a9e26996 LibC: Prevent remove from calling rmdir when unlink succeeds. 2021-01-23 15:26:44 +01:00
Andreas Kling
8363b3ae99 LibWeb: Generate JS bindings for XMLHttpRequest from IDL :^)
Remove the hand-written XHR bindings in favor of generated ones.
2021-01-23 15:06:09 +01:00
Andreas Kling
25056830f0 LibWeb: Add very basic support for IDL constants
You can now put constants on an IDL interface and they will pop up on
both the constructor and prototype objects.
2021-01-23 13:20:24 +01:00
Andreas Kling
5b91362d4e LibWeb: Move XMLHttpRequest to separate XHR directory
In keeping with the one-directory-per-web-spec layout, let's move XHR
into its own clubhouse.
2021-01-23 11:51:36 +01:00
Andreas Kling
5d9c36d016 Run: Pledge "thread"
This is needed for the thumbnail generation thread used by FilePicker.

Fixes #5015.
2021-01-23 09:54:46 +01:00
Andreas Kling
54f421e170 Kernel: Clear coredump metadata on exec()
If for some reason a process wants to exec after saving some coredump
metadata, we should just throw away the data.
2021-01-23 09:41:11 +01:00
Andreas Kling
fd29bed656 sleep: Support fractional sleep lengths 2021-01-23 08:53:32 +01:00
Andreas Kling
c5df0532c0 HackStudio: Handle failed fork() in TerminalWrapper a bit better 2021-01-23 08:39:59 +01:00
Ben Wiederhake
e937012870 WindowServer: Make dragging maximized windows up no-op
That's what that piece of logic is probably supposed to be doing.
Let's help it acheive that purpose! Apparently the top of the desktop
(i.e. the menubar) was forgotten, so consider it part of the deadzone.
2021-01-23 08:34:17 +01:00
Ben Wiederhake
a671a5ba7e WindowServer: Prevent moving a window to inaccessible region
This is based on a comment by @tomuta on #4644, and should prevent all future
instances of bugs like #4644.

Disadvantage: The current implementation may generate a lot of WM_WindowRectChanged
events for a listener while bouncing occurs. Feel free to improve this.
2021-01-23 08:34:17 +01:00
Ben Wiederhake
2de471b9f0 WindowServer: Fix many subtle bugs in tiling/maximizing
- Unmaximization/untiling had nearly but not quite code duplication;
  this patch replaces the actual "regrabbing" logic with Rect::set_size_around.
- When undoing maximization/untiling, it used to be possible to to grab a window
  "outside" of its frame, and thus drag it off the screen. This is no longer
  possible. Fixes #4644.
- As a side effect, when untiling from the bottom/left/right, the regrab is now
  a much smoother experience.
- Setting the resize aspect ratio while being tiled now untiles and umaximizes
  the window, as these things are incompatible. Fixes an undocumented bug
  (steps to reproduce: maximize, then set aspect ratio).
- When unmaximizing, spurious WindowLeft events were sent, because that path
  didn't set hovered_window. Fixes an undocumented bug.

Since these things are interwoven, this is all a single commit.
2021-01-23 08:34:17 +01:00
Ben Wiederhake
e8997e1de9 LibGfx: Implement Rect resizing around a fixed point 2021-01-23 08:34:17 +01:00
Ben Wiederhake
6a552f0b93 WindowServer: Remember the correct untiled rect
What a silly logic bug! :)
2021-01-23 08:34:17 +01:00
Ben Wiederhake
399908e53c WindowServer: Normalize preferred rect before applying
Previously, SetWindowRect and SetWindowRect could supply basically arbitrary
x and y coordinates. This could happen either due to a malicious or malfunctioning
program, or even due to the auto-centering feature.

This patch also moves the 'normalization' code out of ClientConnection to Window,
where it belongs better.

Fixes #4135.
Fixes #5052.
2021-01-23 08:34:17 +01:00
Nico Weber
345909c009 WindowServer: Don't crash on wallpapers smaller than the desktop with fill mode 'simple'
blit() calls draw_scaled_bitmap() behind the scenes in scaled contexts,
and that doesn't  like src_rect to be outside of the source bitmap's
bounds. Implicitly clip with the source rect, like the non-scaled
codepath already does.

Fixes #5017 even more.
2021-01-23 08:31:41 +01:00
Nico Weber
dcc967d1ad LibGfx: Make draw_tiled_bitmap() in scaled contexts actually work 2021-01-23 08:31:41 +01:00
Linus Groh
d37efbe647 Base: Move house on home-directory*.png icons to the left
Otherwise it might be covered by the symlink overlay, which looks silly.
2021-01-23 08:29:27 +01:00
Zac
dfa3f5fbc8 Vim: Added a Basic Implementation of Visual Mode 2021-01-23 08:29:13 +01:00
AnotherTest
4981b30ea5 Shell: Run the command's next chain even when it's empty 2021-01-23 08:28:58 +01:00
AnotherTest
be94a4ffa6 Shell: Block on the existing event loop instead of pushing a new one
This patch makes `Shell::block_on_job()` pump the event loop while the
job it's waiting for hasn't finished.
As this no longer pushes new event loops, it has the effect of
flattening the stack as well.
Fixes #4976.
2021-01-23 08:28:58 +01:00
AnotherTest
2bd77bc93b Shell: Make the parser read consecutive sequences without recursing
This fixes (the easy) part of #4976.
2021-01-23 08:28:58 +01:00
Linus Groh
212c90d68f Ports: Add table of all available ports
This adds a separate Markdown document comtaining a table with all
available ports, including name, version number and website.

This should make it easier to get an overview of what's available or
learn more about ports one is not familiar with, as well as checking the
current version of each port (many are outdated by now, and the version
being hidden in the package.sh script doesn't improve that situation)
and spotting ports with no defined version (i.e. install from the main
branch), which can break easily and should be avoided.

Please keep this list in sync when adding or updating ports. :^)
2021-01-23 08:28:25 +01:00
Linus Groh
1328f54ea9 Ports: Add documentation :^)
This documents and explains how ports work and what variables, functions
and options are available for `package.sh` scripts.
2021-01-23 08:28:25 +01:00
Linus Groh
92908259b8 Ports: Tweak shebang of python3's package.sh
This was missed in c702845.
2021-01-23 08:28:25 +01:00
Linus Groh
7cc7f7ac54 Ports: Clean up some package.sh scripts
- Remove superfluous function overrides and use makeopts instead
- Remove superfluous installopts
- Use run rather than cd'ing manually
- Ensure empty line between functions
2021-01-23 08:28:25 +01:00
Linus Groh
a4fbdb97c7 Ports: Install dependencies in separate "installdepends" step
Calling installdepends in do_fetch seems kinda silly and unexpected.
Let's add a separate step with the same name instead.
2021-01-23 08:28:25 +01:00
Andreas Kling
82c879c315 Kernel: Fix PATADiskDevice device names
This broke the regular QEMU boot.
2021-01-22 22:24:43 +01:00
Jean-Baptiste Boric
666936a06b Kernel: Find boot device by enumerating devices
Since devices are enumerable and can compute their own name inside the
/dev hierarchy, there is no need to try and parse "root=/dev/xxx" by
hand.

This also makes any block device a candidate for the boot device, which
now includes ramdisk devices, so SerenityOS can now boot diskless too.
The disk image generated for QEMU is suitable, as long as it fits in
memory with room to spare for the rest of the system.
2021-01-22 22:17:39 +01:00
Jean-Baptiste Boric
f64e287b82 Kernel: Make device generate their own names
Besides removing the monolithic DevFSDeviceInode::determine_name()
method, being able to determine a device's name inside the /dev
hierarchy outside of DevFS has its uses.
2021-01-22 22:17:39 +01:00
Jean-Baptiste Boric
a2601e1308 Kernel: Hook Ramdisk devices inside DevFS 2021-01-22 22:17:39 +01:00
Jean-Baptiste Boric
225957283e Kernel: Implement RamdiskDevice 2021-01-22 22:17:39 +01:00
Jean-Baptiste Boric
ec056f3bd1 Kernel: Parse boot modules from Multiboot specification 2021-01-22 22:17:39 +01:00
Jean-Baptiste Boric
3cbe805486 Kernel: Move kmalloc heaps and super pages inside .bss segment
The kernel ignored the first 8 MiB of RAM while parsing the memory map
because the kmalloc heaps and the super physical pages lived here. Move
all that stuff inside the .bss segment so that those memory regions are
accounted for, otherwise we risk overwriting boot modules placed next
to the kernel.
2021-01-22 22:17:39 +01:00
Jean-Baptiste Boric
5cd1217b6e Kernel: Remove trace log in MemoryManager::deallocate_user_physical_page() 2021-01-22 22:17:39 +01:00
Jean-Baptiste Boric
06b73eea94 Kernel: Do not assert if unable to load kernel symbols 2021-01-22 22:17:39 +01:00
Jean-Baptiste Boric
2f8b047339 Kernel: Untangle StorageController from PCI::DeviceController 2021-01-22 22:17:39 +01:00
Emanuele Torre
68c8b52612 Build: Use cmake's make_directory utility instead of env(1) and mkdir(1)
..in CMake files.

Also, the `-S`s were unnecessary here since "mkdir" doesn't have any
spaces and these are not shebangs.
2021-01-22 22:14:42 +01:00
asynts
ea7b7d8ceb Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
fb8d3635d9 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00
asynts
24888457d5 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-22 22:14:30 +01:00