Commit Graph

300 Commits

Author SHA1 Message Date
Andreas Kling
3f9e4cd24e chroot: Add a little chroot program
This program changes the current filesystem root and spawns a shell.
2020-01-10 23:23:20 +01:00
Sergey Bugaev
7bc8fa884a FileManager: Add a columns view
This new view, backed by a GColumnsView, joins the existing table and icon
views :^) Even though it displays a file tree, its data is provided by the very
same GFileSystemModel that the other two views use.

This commit also includes my attempt at making an icon for the new mode.
2020-01-10 17:45:59 +01:00
Andreas Kling
f5d9f11e52 Base: Add a "lookup" user+group that runs LookupServer
LookupServer now runs as lookup:lookup, allowing connections from other
members of the "lookup" group.

This is enforced through file system permissions by having the service
socket (/tmp/portal/lookup) be mode 0660.

Now the LookupServer program can't overwrite other people's files if it
starts misbehaving. That's pretty cool :^)
2020-01-09 21:36:17 +01:00
Andreas Kling
7dd03b46ee SystemServer: Allow specifying per-service socket file permissions 2020-01-09 21:35:33 +01:00
0xtechnobabble
123dcada05 Themes: Support rubberband selection theming 2020-01-07 11:02:43 +01:00
Jami Kettunen
08c7b5068e Base: Space out some names in app files 2020-01-04 22:29:21 +01:00
Andreas Kling
f558c8e36a Base: Add an "audio" group that gets to write to /dev/audio 2020-01-04 13:25:13 +01:00
Andreas Kling
498659773c Base: Add a "phys" group for users with physical access
Only users in this group can access the screen, mouse and keyboard.
2020-01-04 13:21:33 +01:00
Andreas Kling
9bd4bf41fb SystemServer: Explicitly open /dev/null for services without StdIO
Spawning services with nothing open at all on the standard I/O fds is
way too harsh. We now open /dev/null for them instead.
2020-01-04 13:15:01 +01:00
Andreas Kling
c2b7c43f3c SystemServer: Fetch any extra GIDs and call setgroups() before spawn
We now pick up all the user's extra GIDs from /etc/group and make
sure those are set before exec'ing a service.

This means we finally get to enjoy being in more than one group. :^)
2020-01-04 13:11:43 +01:00
Andreas Kling
20ac4e44d1 Base: Add "tty" group and make /dev/tty* be root:tty mode 610
This fixes an issue where anyone could snoop on the virtual consoles.
2020-01-04 12:46:09 +01:00
Tibor Nagy
790eaab6f5 Keymap+Base: Keycode fixes, remove workaround
Add missing keymap entries for the dollar sign and escape key and reformat
the Hungarian keymap.

Remove the workaround for "0x08", replace it with '\b'.

Fix the octal/hex mixup in the value of escape key. (033 != 0x33, 033 == 0x1B)
2020-01-03 01:20:47 +01:00
Andreas Kling
7f843ef3b2 Kernel: Make the purge() syscall superuser-only
I don't think we need to give unprivileged users access to what is
essentially a kernel testing mechanism.
2020-01-02 13:39:49 +01:00
Andreas Kling
4fa7146da1 Base: Move the modload and modunload command documentation to man8
These are system administration commands, not intended for use by
all users. These tend to go in section 8.
2020-01-02 12:37:19 +01:00
Andreas Kling
05b004ec64 Base: Remove "idle" priority note from SystemServer(5)
The "idle" priority was never meant to be exposed to userspace, as it's
only used by the kernel's internal idle thread.
2020-01-02 12:36:15 +01:00
Andreas Kling
0c22646e2b Base: Document EPERM error in module_load(2) and module_unload(2)
Only the superuser can use these system calls.
2020-01-02 12:35:19 +01:00
Andreas Kling
38f93ef13b Kernel: Disable x86 RDTSC instruction in userspace
It's still possible to read the TSC via the read_tsc() syscall, but we
will now clear some of the bottom bits for unprivileged users.
2020-01-01 18:22:20 +01:00
Andreas Kling
f598bbbb1d Kernel: Prevent executing I/O instructions in userspace
All threads were running with iomapbase=0 in their TSS, which the CPU
interprets as "there's an I/O permission bitmap starting at offset 0
into my TSS".

Because of that, any bits that were 1 inside the TSS would allow the
thread to execute I/O instructions on the port with that bit index.

Fix this by always setting the iomapbase to sizeof(TSS32), and also
setting the TSS descriptor's limit to sizeof(TSS32), effectively making
the I/O permissions bitmap zero-length.

This should make it no longer possible to do I/O from userspace. :^)
2020-01-01 17:31:41 +01:00
Andreas Kling
9c0836ce97 Kernel: Enable x86 UMIP (User Mode Instruction Prevention) if supported
This prevents code running outside of kernel mode from using the
following instructions:

* SGDT - Store Global Descriptor Table
* SIDT - Store Interrupt Descriptor Table
* SLDT - Store Local Descriptor Table
* SMSW - Store Machine Status Word
* STR - Store Task Register

There's no need for userspace to be able to use these instructions so
let's just disable them to prevent information leakage.
2020-01-01 13:21:15 +01:00
Jami Kettunen
6af301edec Base: Update Finnish keymap with proper AltGr support 2019-12-31 19:46:40 +01:00
Tibor Nagy
d8ddf803e2 Base: Add Hungarian keymap 2019-12-31 19:31:42 +01:00
Shannon Booth
d0f9906c17 Crash: Add a "Test All Crash Types" option
Add an option "-A", that will run all of the crash types in the crash
program. In this mode, all crash tests are run in a child process so
that the crash program does not crash.

Crash uses the return status of the child process to ascertain whether
the crash happened as expected.
2019-12-31 02:14:36 +01:00
Andreas Kling
b0bbdc53e9 Base: Remove misplaced backtick in syscall(1) 2019-12-30 14:15:18 +01:00
Tibor Nagy
a7040078e5 Base: Add glyph spacing fields to fonts 2019-12-30 14:02:12 +01:00
Jami Kettunen
edba444aa9 Base: Add man page for keymap(1) 2019-12-30 14:02:00 +01:00
Jami Kettunen
107612209d Base: Add ASCII-friendly fi.json 2019-12-30 14:02:00 +01:00
Andreas Kling
e0ec4f89b2 Base: Add man page for purge(8) 2019-12-29 13:23:21 +01:00
Tibor Nagy
ac0b8caa42 Base: Add 2x upscaled Liza fonts 2019-12-28 21:06:02 +01:00
Hüseyin ASLITÜRK
e50deb55d3 WindowServer: Remove Clock from server.
We have clock applet.
2019-12-27 22:47:31 +01:00
Shannon Booth
c85bdff57a PaintBrush: Add an "ellipse tool"
The tool currently supports drawing an elliptical line of a specified
thickness. Further improvements can include adding a fill mode, and
holding down shift to draw a perfect circle.

Closes #375.
2019-12-27 00:52:17 +01:00
Shannon Booth
b830639912 PaintBrush: Add a "rectangle tool"
Fill, line, and gradient modes initially supported :^)
2019-12-26 21:22:29 +01:00
Tibor Nagy
f0a82e1bcc Base: Add 3x upscaled Liza fonts
Upscaled with hq3x then cleaned up the glyphs manually.
2019-12-26 14:35:51 +01:00
Andreas Kling
5be6a43860 LibDraw: Add MenuBaseText and MenuSelectionText color roles
This allows the very aesthetic "Hotdog Stand" theme to have quite
reasonable looking menus.
2019-12-26 00:58:46 +01:00
Conrad Pankoff
5330593e38 Base: Add Hotdog Stand theme 2019-12-26 00:46:16 +01:00
Andreas Kling
33efeaf71a crash: Add "-X" option for attempting to execute non-executable memory 2019-12-25 13:35:57 +01:00
Andreas Kling
aae54bdbde LibDraw: Add ColorRole::BaseText (to be painted on ColorRole::Base) 2019-12-24 22:01:32 +01:00
Mauri de Souza Nunes
cb4e51a7a5 Userland: Add syscall -l option and man page 2019-12-24 20:23:37 +01:00
Andreas Kling
b6eba388e3 LibDraw: Add Selection and SelectionText system theme colors 2019-12-24 12:13:49 +01:00
Conrad Pankoff
033de7efe2 Base: Describe kernel modules, syscalls, and programs 2019-12-24 11:52:01 +01:00
Andrés Vieira
488d755ccd Docs: Add cal(1) man page 2019-12-24 11:48:16 +01:00
Andreas Kling
2cdab2c925 Themes: Add a simple "Dark" theme :^) 2019-12-24 02:25:50 +01:00
Andreas Kling
df3a2dba43 LibDraw: Add Button and ButtonText system theme colors
These are now separate from the Window and WindowText colors.
2019-12-24 02:25:50 +01:00
Andreas Kling
411058b2a3 WindowServer+LibGUI: Implement basic color theming
Color themes are loaded from .ini files in /res/themes/
The theme can be switched from the "Themes" section in the system menu.

The basic mechanism is that WindowServer broadcasts a SharedBuffer with
all of the color values of the current theme. Clients receive this with
the response to their initial WindowServer::Greet handshake.

When the theme is changed, WindowServer tells everyone by sending out
an UpdateSystemTheme message with a new SharedBuffer to use.

This does feel somewhat bloated somehow, but I'm sure we can iterate on
it over time and improve things.

To get one of the theme colors, use the Color(SystemColor) constructor:

    painter.fill_rect(rect, SystemColor::HoverHighlight);

Some things don't work 100% right without a reboot. Specifically, when
constructing a GWidget, it will set its own background and foreground
colors based on the current SystemColor::Window and SystemColor::Text.
The widget is then stuck with these values, and they don't update on
system theme change, only on app restart.

All in all though, this is pretty cool. Merry Christmas! :^)
2019-12-23 20:33:01 +01:00
Andreas Kling
91ba94fbd4 LibHTML: Support the :only-child pseudo class 2019-12-16 19:52:11 +01:00
Andreas Kling
085cafd80a LibHTML: Support the :empty pseudo class 2019-12-16 19:46:02 +01:00
Andreas Kling
c1474e594e LibHTML: Support the :first-child and :last-child pseudo classes 2019-12-16 19:34:52 +01:00
Andreas Kling
e1940f365b WindowServer+MenuApplets: Move the "Audio" applet to its own program
This patch introduces the second MenuApplet: Audio. To make this work,
menu applet windows now also receive mouse events.

There's still some problem with mute/unmute via clicking not actually
working, but the call goes from the applet program over IPC to the
AudioServer, where something goes wrong with the state change message.
Need to look at that separately.

Anyways, it's pretty cool to have more applets running in their own
separate processes. :^)
2019-12-16 15:33:42 +01:00
Andreas Kling
e4267020c4 ProfileViewer: Show kernel frames with a red icon :^) 2019-12-14 16:16:53 +01:00
Valtteri Koskivuori
c0696ad3aa LookupServer: Switch to a more privacy-respecting DNS provider 2019-12-11 12:01:16 +01:00
Andreas Kling
5d7c0b0123 Fonts: Add two little marker glyphs to CsillaThin7x10
ASCII values 0x1 and 0x2 of this font now contain little helper glyphs
for showing left and right side markers around something.
2019-12-10 22:06:52 +01:00