Commit graph

982 commits

Author SHA1 Message Date
Brendan Coles 501834ba45 Inspector: Add help documentation 2021-02-23 13:52:16 +01:00
TheMorc 38781cb131 Base: Add Slovak keymap 2021-02-22 09:46:02 +01:00
Kevin Kuehler c909f7001c keymaps: Add dvorak-programmer
I left the numpad the same as qwerty because I don't have a keyborad
with a numpad and don't know if those keys change or not.
2021-02-21 23:48:57 +01:00
Andreas Kling d475460ea1 Base: Add a lion emoji 🦁 2021-02-21 15:07:25 +01:00
Andreas Kling 84b2d4c475 Kernel: Add "map_fixed" pledge promise
This is a new promise that guards access to mmap() with MAP_FIXED.

Fixed-address mappings are rarely used, but can be useful if you are
trying to groom the process address space for malicious purposes.

None of our programs need this at the moment, as the only user of
MAP_FIXED is DynamicLoader, but the fixed mappings are constructed
before the process has had a chance to pledge anything.
2021-02-21 01:08:48 +01:00
Linus Groh 17959c1408 Base: Update path in js(1) manpage example 2021-02-20 16:05:20 +01:00
Linus Groh 1002236715 Base: Mention -n option in echo(1) manpage 2021-02-20 16:05:20 +01:00
Linus Groh 4896005fb2 Base: Tweak ddate(1) manpage tagline 2021-02-20 16:05:20 +01:00
Linus Groh b80b6ffca0 Base: Unify synopsis format in manpages 2021-02-20 16:05:20 +01:00
Andreas Kling 8fd86fe6c9 Base: Do a little copy-editing in Mitigations(7) 2021-02-20 11:37:55 +01:00
Andreas Kling 7e959d7430 Base: Fix a broken commit link in Mitigations(7) 2021-02-20 09:32:40 +01:00
Brian Gianforcaro 0d196d14d2 Base: Document more the mitigations in man7/Mitigations.md
Document:
* Unmap After Init
* RELRO
* -fstack-clash-protection
* -fstack-protector / -fstack-protector-strong
2021-02-20 09:01:02 +01:00
Linus Groh 2a519722a9 Base: Make PixelPaint launch handler for .pp files
Closes #5374.
2021-02-16 19:00:41 +01:00
Brian Gianforcaro a5f879ea8c Base: Add a man page documenting security mitigations
Since so much work is being put into mitigations, I thought
it would be nice to track them all in one place. This is the
start of that document.
2021-02-15 15:25:01 +01:00
Sergey Bugaev 373d135e74 LookupServer: Implement a DNS server :^)
LookupServer can now itself server as a DNS server! To service DNS clients, it
uses the exact same lookup logic as it does for LibIPC clients. Namely, it will
synthesize records for data from /etc/hosts on its own (you can use this to
configure host names for your domain!), and forward other questions to
configured upstream DNS servers. On top of that, it implements its own caching,
so once a DNS resource record has been obtained from an upstream server,
LookupServer will cache it locally for faster future lookups.

The DNS server part of LookupServer is disabled by default, because it requires
you to run it as root (for it to bind to the port 53) and on boot, and we don't
want either by default. If you want to try it, modify SystemServer.ini like so:

[LookupServer]
Socket=/tmp/portal/lookup
SocketPermissions=666
Priority=low
KeepAlive=1
User=root
BootModes=text,graphical

and enable server mode in LookupServer.ini like so:

[DNS]
Nameservers=...
EnableServer=1

If in the future we implement socket takeover for IP sockets, these limitations
may be lifted.
2021-02-15 09:14:42 +01:00
Stephan Unverwerth 53d2073a66 Resources: Add SerenitySans Truetype font to /res/fonts 2021-02-15 08:50:48 +01:00
Nick Vella b671577223 HackStudio: Project templates and New Project dialog
This commit adds a simple project template system to HackStudio,
as well as a pretty New Project dialog, inspired by early VS.NET
and MS Office.
2021-02-13 19:49:30 +01:00
thankyouverycool 94e494d6d2 FileManager: Add layout options to View menu
File Manager's toolbar, location bar, status bar and folder pane
can now be toggled on/off
2021-02-13 11:01:59 +01:00
thankyouverycool cb42ba0ab1 FileManager: Save 'Show dotfiles' setting in FileManager.ini 2021-02-13 11:01:59 +01:00
thankyouverycool 5a03b326a7 TextEditor: Add layout options to View menu
Toolbar, status bar, and ruler can now be toggled on/off and their
settings are saved in ~/.config/TextEditor.ini
2021-02-13 11:01:59 +01:00
Tom 58cf1987bf Themes: Basalt's title text shadow shouldn't be transparent
Fixes pixels bleeding through from behind.
2021-02-13 00:39:33 +01:00
Andreas Kling ca1c560161 Base: Don't mark "prot_exec" pledge promise as a SerenityOS extension
OpenBSD also has this promise.
2021-02-12 16:24:40 +01:00
Sahan Fernando 9e68752264 Themes: Improve syntax highlighting colors of Nord theme 2021-02-12 08:55:34 +01:00
Tom cd2874dfcf Themes: Make Redmond 2000 menu shadows a bit lighter 2021-02-12 08:55:11 +01:00
Tom cf1c159ed5 WindowServer: Allow different shadows for active/inactive windows
Also allow specifying different shadows for the task and menu bar.
2021-02-11 23:36:11 +01:00
Tom 964894dee6 WindowServer: Allow specifying different shadows for menus and tooltips
Also update the Redmond 2000 theme to drop shadows more Redmond-like.
2021-02-09 22:27:14 +01:00
Nico Weber 106939c11f Base: Fill in rightmost pixel in crosshair cursor
gimp claimed that the rightmost white pixel was actually transparent.
It didn't look transparent in Serenity, but I painted it white like
the other inner pixels anyways.
2021-02-09 20:10:00 +01:00
Nico Weber ae98f575d9 Base: Add 2x versions of most cursors
I upsampled them in gimp using the "None" filter and manually cleaned up
the outline. The drop shadow is just upsampled using "None" and looks a
bit rough -- someone who knows how to do this either has to re-create
the shadow on the 2x bitmaps, or we need to remove the shadow from the
resource and render it in code at some point. Still, looks a lot better
than with the upsampled 1x bitmaps.
2021-02-09 20:10:00 +01:00
Tom 0ce4b9d7db WindowServer: Implement simple window shadows
This implements simple window shadows around most windows, including
tooltips. Because this method uses a bitmap for the shadow bits,
it is limited to rectangular window frames. For non-rectangular
window frames we'll need to implement a more sophisticated algorithm.
2021-02-09 18:47:43 +01:00
Itamar 72fdab7bfb LanguageServers/Cpp: ParserAutoComplete engine inspects header files
... and performs preprocessing on the source code before parsing.

To support this, we are now able to keep track of multiple
files in the autocomplete engine. We re-parse a file whenever it is
edited.
2021-02-08 23:10:38 +01:00
Linus Groh dff808d087 Base: Remove /res/pci.ids and download at build time instead
This is an external file from https://pci-ids.ucw.cz that's being updated
daily, which was imported a while ago but probably shouldn't live in the
SerenityOS repository in the first place (or else would need manual
maintenance). The legal aspects of redistributing this file as we
currently do are not quite clear to me, they require either GPL (version
2 or later) or 3-clause BSD - Serenity is 2-clause BSD...

The current version we use is 2019.08.08, so quite outdated - and while
most of these devices are obviously not supported, we're still capable
of *listing* them, so having an up-to-date version with recent additions
and fixes would be nice.

This updates the root CMakeLists.txt to check for existence of the file
and download it if not found - effectively on every fresh build. Do note
that this is not a critical file, and the system runs just fine should
this ever fail. :^)
2021-02-07 01:14:36 +01:00
Andreas Kling aefd206038 SymbolServer: Add symbolication service for out-of-process ELF parsing
This patch adds SymbolServer, a service daemon that provides
symbolication of ELF binaries. It has a very simple IPC API at the
moment that only turns addresses into symbol names.

This can be used to implement symbolication without having to do
in-process ELF parsing yourself. :^)
2021-02-04 23:19:08 +01:00
Ben Wiederhake d24e287f8c Base: Make /www read-write by default
Since it is owned by root anyway, there is no need for 'additional security' to prevent
modification of that directory. This makes it easier to quickly export files from
Serenity. Fixes #5152.
2021-02-03 21:23:15 +01:00
Andreas Kling c94392a1cc Applications: Remove "Welcome" application
This was a cute application for its time, but it's far too jokey and
non-serious for how I'd like this project to treat itself.
2021-02-03 10:20:17 +01:00
Linus Groh 7b50d3cda4 Base: Update keymap(1) manpage
- Keymap name/file is now optional
- No root shell required (/bin/keymap is setuid root)
- Add example for getting the current keymap name
2021-02-02 16:53:11 +01:00
Linus Groh ee41d6e154 Base: Rename some keymaps to use xx-xx format where appropriate
- en.json -> en-us.json
- gb.json -> en-gb.json
- ptbr.json -> pt-br.json
- ptpt.json -> pt-pt.json
2021-02-02 16:53:11 +01:00
Liav A 878d353c3d Documentation: Add a manual page about the new MemoryDevice file 2021-02-01 17:13:23 +01:00
Ben Wiederhake 9f60ce4801 Base: Replace tabs+spaces in keymaps by only spaces 2021-02-01 09:54:32 +01:00
Ben Wiederhake b6dddd27b4 Base: Cover entire German keyboard
I'm strongly basing this on what I'm used to (xkb-data's "de(basic)"),
but without dead keys (since we don't support them).
2021-02-01 09:54:32 +01:00
Ben Wiederhake 2f92c8cad5 Base: Replace unnecessary escapes by actual codepoints
I used this arcane incantation by @emanuele6:

    < <(grep -hoP -e '\\u[A-Za-z0-9]{4}' ./*.json) grep -i -ve '\\u001b' \
    | sort -u \
    | while read -r; do
        sed -i "s,\\$REPLY,$(eval "echo $'$REPLY'"),g" ./*.json
    done

Plus some manual editing to re-align everything. Thanks! :)
2021-02-01 09:54:32 +01:00
Ben Wiederhake fa642eb7d0 Base: Fix wrong offset for Numpad and later keys
This seems to be the last remaining fallout of
8733da652e.
2021-02-01 09:54:32 +01:00
Andreas Kling 6e4e3a7612 Kernel: Remove pledge exception for sys$getsockopt() with SO_PEERCRED
We had an exception that allowed SOL_SOCKET + SO_PEERCRED on local
socket to support LibIPC's PID exchange mechanism. This is no longer
needed so let's just remove the exception.
2021-01-31 09:29:27 +01:00
Andreas Kling 90343eeaeb Revert "Kernel: Return -ENOTDIR for non-directory mount target"
This reverts commit b7b09470ca.

Mounting a file on top of a file is a valid thing we support.
2021-01-30 13:52:12 +01:00
Linus Groh c7ca0a5fef Base: Add missing "ß" to DE keymap 2021-01-29 23:21:07 +01:00
Linus Groh 8fa8dda97c Base: Add missing umlauts to DE keymap 2021-01-29 23:21:07 +01:00
Linus Groh b1b015c052 Base: Fix missing "£" in GB keymap
Shift+3 is "£", not "#".
2021-01-29 23:21:07 +01:00
Linus Groh f70a364a83 Base: Reformat some keymaps
This is in line with all the other ones, and makes finding the same keys
in each map array a little easier.
2021-01-29 23:21:07 +01:00
Andreas Kling d0c5979d96 Kernel: Add "prot_exec" pledge promise and require it for PROT_EXEC
This prevents sys$mmap() and sys$mprotect() from creating executable
memory mappings in pledged programs that don't have this promise.

Note that the dynamic loader runs before pledging happens, so it's
unaffected by this.
2021-01-29 18:56:34 +01:00
Linus Groh dbbc378fb2 Kernel: Return -ENOTBLK for non-block device Ext2FS mount source
When mounting an Ext2FS, a block device source is required. All other
filesystem types are unaffected, as most of them ignore the source file
descriptor anyway.

Fixes #5153.
2021-01-29 08:45:56 +01:00
Linus Groh b7b09470ca Kernel: Return -ENOTDIR for non-directory mount target
The absence of this check allowed silly things like this:

    # touch file
    # mount /dev/hda file
2021-01-29 08:45:56 +01:00