Commit graph

952 commits

Author SHA1 Message Date
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
Itamar
fa18010477 HackStudio: Integate with C++ parser-based autocomplete
By default, C++ auto completion will still be performed by the
lexer-based logic.
However, the parser-based logic can be switched on via the menubar.
2021-01-27 21:10:57 +01:00
Linus Groh
22df4727b1 Base: Update crash(1) man page
Update the outdated list of options, mention UserspaceEmulator, update
example shell output.
2021-01-26 11:40:08 +01:00
Ben Wiederhake
b0b8953ec1 Base: Fix syscall/libc manpage sorting 2021-01-23 16:47:09 +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
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
Linus Groh
421587c15c Everywhere: Fix typos 2021-01-22 18:41:29 +01:00
Andreas Kling
47a4a5ac1d Base: Add root to the /etc/shadow file
The password is still empty by default, but being present in the shadow
file is now a requirement for authentication.
2021-01-21 11:35:32 +01:00
Nico Weber
362bde4a86 SystemServer.ini: Default to not showing network change notifications
Until someone has time to implement something for not showing the
very first network change at boot, let's turn off notifications for
network changes by default altogether. Having to dismiss this
notification at every boot gets old fast.
2021-01-20 21:01:21 +01:00
Nico Weber
5ad2cbe9ad Base: Add 2x images for arrow cursor and window buttons
The window close buttons look correct.

The arrow cursor isn't quite right yet:
- its shadow was nearest-neighbor upscaled from the 1x version
- the arrow handle looks a bit too chubby

But it's a start, and maybe someone with better gimp skills than me can
pretty it up later.
2021-01-20 10:28:27 +01:00
AnotherTest
10c3168fa0 Base: Remove irrelevant example from Shell's loop manpage section
Seems like it was copied one too many times.
2021-01-18 08:56:34 +01:00
AnotherTest
ffd74a2c5a Base: Mention that the if condition is a command
Sorta closes #4991.
2021-01-18 08:56:34 +01:00
Andreas Kling
bf0719092f Kernel+Userland: Remove shared buffers (shbufs)
All users of this mechanism have been switched to anonymous files and
passing file descriptors with sendfd()/recvfd().

Shbufs got us where we are today, but it's time we say good-bye to them
and welcome a much more idiomatic replacement. :^)
2021-01-17 09:07:32 +01:00
Nico Weber
ca264030a2 WindowServer: Put default ScaleFactor in ini file
No behavior change. Matches Width and Height which also explicitly
have their default value in the ini file.
2021-01-17 08:06:12 +01:00
Brendan Coles
aa8cb35b90 TextEditor: Add help documentation 2021-01-16 19:35:08 +01:00
Nick Vella
40083444a0 Run: initial implementation of Run app 2021-01-16 09:05:01 +01:00
Nico Weber
699ba84bea DisplaySettings: Rename wallpaper setting "scaled" to "stretch"
I want to add a scale factor for picking pixel density, and using
the same terminology for wallpaper handling would be confusing.
2021-01-15 19:13:46 +01:00
AnotherTest
ddd0c1dd8b Base: Add manpage entry for history events 2021-01-15 19:13:03 +01:00
Nico Weber
d551263b11 LibGfx: Make it possible to apply an (integer) scale to a Painter
This adds a scale factor to Painter, which will be used for HighDPI
support. It's also a step towards general affine transforms on Painters.

All of Painter's public API takes logical coordinates, while some
internals deal with physical coordinates now. If scale == 1, logical
and physical coordinates are the same. For scale == 2, a 200x100 bitmap
would be covered by a logical {0, 0, 100, 50} rect, while its physical
size would be {0, 0, 200, 100}.

Most of Painter's functions just assert that scale() == 1 is for now,
but most functions called by WindowServer are updated to handle
arbitrary (integer) scale.

Also add a new Demo "LibGfxScaleDemo" that covers the converted
functions and that can be used to iteratively add scaling support
to more functions.

To make Painter's interface deal with logical coordinates only,
make translation() and clip_rect() non-public.
2021-01-12 23:32:54 +01:00
Andreas Kling
20a18d2137 Demos: Remove HelloWorld demo 2021-01-12 13:17:00 +01:00
Andreas Kling
254312aa22 Revert "Themes: Tweak "Sunshine" theme colors slightly"
This reverts commit 0ae9ae48fa.

@bcoles informs me that these match Solaris 9 and it checks out.
I don't know what version I was comparing against, and who cares?
2021-01-12 08:49:18 +01:00
Andreas Kling
f03800cee3 Kernel: Add dedicated "ptrace" pledge promise
The vast majority of programs don't ever need to use sys$ptrace(),
and it seems like a high-value system call to prevent a compromised
process from using.

This patch moves sys$ptrace() from the "proc" promise to its own,
new "ptrace" promise and updates the affected apps.
2021-01-11 22:32:59 +01:00
Andreas Kling
0ae9ae48fa Themes: Tweak "Sunshine" theme colors slightly
Bring them a little closer to the original CDE colors. :^)
2021-01-11 21:49:39 +01:00
Emanuele Torre
a330f37f06 Base: Change anon's default password from "foo\n" to just "foo". 2021-01-10 16:40:05 +01:00
Andreas Kling
9a688af4b1 LibCore+passwd+su+Base: Add /etc/shadow to hide hashes from users :^)
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-09 19:41:12 +01:00
TheMorc
30ef10a5b9 SpaceAnalyzer: use "Proper Noun" name style 2021-01-09 13:59:23 +01:00
Itamar
e318a3d3d4 little: Remove "-Os" compile flag
This flag made gcc generate location info of type "location_list" for
'my_struct', which we do not yet support in LibDebug.
2021-01-09 10:55:46 +01:00
Mart G
e575d3fd3d Utilities: Add a disk space usage analyzation program.
SpaceAnalyzer: Partially address code review changes.

- Use GUI::CommonActions::make_about_action().
- Pass large arguments by const reference instead of by value.
- Mark const functions as such.
- Add newline at end of SpaceAnalyzer.af
- Use full words instead of abbreviations in variable names.
- Use application's namespace instead of 'TreeMap'.
- move() certain assignments.
- Use member declaration initialization.
- Initialize TreeNode* member of QueueEntry.
- Rewrite find_mount_for_path to return MountInfo* instead.
- Rename ITreeMap and ITreeMapNode to TreeMap and TreeMapNode.
- Replace ext suffix with rect suffix for rectangles.

SpaceAnalyzer: Further address code review and coding style.

- Remove get prefix from accessor functions.
- Layout algorithm in its own function, with callback.
- Remove nullptr comparisons.
- Store lstat errors in error_accumulator.
- Use Rect::shatter.
- Use Rect's orientation based functions.

SpaceAnalyzer: Make sort_children_by_area const qualified.
2021-01-08 17:08:48 +01:00
Brendan Coles
d0a9954f0e Userland: Add ddate utility
Today is Boomtime, day 7 of Chaos, in the YOLD 3187
2021-01-08 09:42:43 +01:00
Brendan Coles
fb9eb20544 date: Use ArgsParser and add ISO8601 / RFC3339 / RFC5322 output formats 2021-01-07 20:17:44 +01:00
Brendan Coles
81c5b35dce Base: Add tar man page documentation 2021-01-06 15:40:26 +01:00