summaryrefslogtreecommitdiff
path: root/Userland/Services/LaunchServer
AgeCommit message (Collapse)Author
2021-08-22Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to opennetworkException
This patch brings the ConfigFile helpers for opening lib, app and system configs more inline with the regular ConfigFile::open functions.
2021-08-10LaunchServer: Make sure launching absolute symlinks worksGunnar Beutner
This was broken by 31d659d.
2021-08-10LaunchServer: Resolve symlinks when querying for handler applicationLuK1337
This lets us launch proper handler application for symlinks :^)
2021-08-09LaunchServer: Do not provide file handlers for special filesTetsui Ohkubo
With this change, LaunchServer will always return an empty list of file handlers for special files e.g. sockets and devices. Before this change, TextEditor was always returned as a default handler for these files.
2021-07-22LaunchServer: Remove debug spam about incoming connectionsAndreas Kling
2021-07-03Everywhere: Use IPC include syntaxTimothy
Remove superfluous includes from IPCCompiler's generated output and add include directives in IPC definitions where appropriate.
2021-07-02AK+Everywhere: Remove StringView::find_{first,last}_of(char) methodsMax Wipfli
This removes StringView::find_first_of(char) and find_last_of(char) and replaces all its usages with find and find_last respectively. This is because those two methods are functionally equivalent. find_{first,last}_of should only be used if searching for multiple different characters, which is never the case with the char argument. This also adds the [[nodiscard]] to the remaining find_{first,last}_of methods.
2021-06-30AK+Everywhere: Add and use static APIs for LexicalPathMax Wipfli
The LexicalPath instance methods dirname(), basename(), title() and extension() will be changed to return StringView const& in a further commit. Due to this, users creating temporary LexicalPath objects just to call one of those getters will recieve a StringView const& pointing to a possible freed buffer. To avoid this, static methods for those APIs have been added, which will return a String by value to avoid those problems. All cases where temporary LexicalPath objects have been used as described above haven been changed to use the static APIs.
2021-06-24Userland: Remove dummy IPC methodsGunnar Beutner
They're not used anywhere and are unnecessary boilerplate code. So let's remove them and update IPCCompiler to allow for empty endpoint declarations.
2021-06-22LaunchServer: Fix regression in opening files with TextEditorbitwitch
My previous PR had a small error in rebasing and removed a line in open_file_url. This caused opening text files from the terminal to always open with an empty TextEditor. This commit fixes that problem!
2021-06-21LaunchServer: Make all file handlers configurable including directoriesbitwitch
This commit gets rid of hard coded file handlers in Launcher.cpp in favor of using values in the LaunchServer.ini config file. The previous commit adds checks for the existence of handler programs while registering handlers. This commit takes advantage of that and ensures that LaunchServer will not attempt to open a file with a nonexistent program and can properly report failure before spawning a new child process. Resolves #8120
2021-06-21LaunchServer: Check if handler programs exist when registering thembitwitch
This adds checks in load_handlers() and load_config() to see if the programs specified in the config files exist before registering them as handlers. Resolves #8121
2021-06-20LaunchServer: Correctly open file URLs with line numbersAdam Hodgen
PR #5665 updated TextEditor to open files at a specific line/column location using the file:line:col argument, rather than the -l flag. This change updates LaunchServer to use that convention, though note it does only pass the line number and not a column number, as per all previous behaviour.
2021-06-17Everywhere: Add component declarationsGunnar Beutner
This adds component declarations so that users can select to not build certain parts of the OS.
2021-05-23LaunchServer: Remove unnecessary greet() messageAndreas Kling
2021-05-14LibC: Do not include errno.h inside unistd.hJean-Baptiste Boric
POSIX does not mandate this, therefore let's not do it.
2021-05-03Userland: Use snake case names in .ipc filesGunnar Beutner
This updates all .ipc files to have snake case names for IPC methods.
2021-05-03Userland: Update IPC calls to use proxiesGunnar Beutner
This updates all existing code to use the auto-generated client methods instead of post_message/send_sync.
2021-05-03Userland: Split IPC endpoints into proxies and stubsGunnar Beutner
This enables support for automatically generating client methods. With this added the user gets code completion support for all IPC methods which are available on a connection object.
2021-05-03Userland: Change IPC funcs to use plain arguments instead of a structGunnar Beutner
Instead of having a single overloaded handle method each method gets its own unique method name now.
2021-05-02LaunchServer: Only consider path in OpenURLValtteri Koskivuori
This resolves the crash in #6812 where the browser was trying to open a file in the Download directory, but the check against allowed paths was also trying to match the URL fragment. Resolves #6812
2021-05-02LaunchServer: Actually seal the allow-list on SealAllowListAndreas Kling
Fixes #6804.
2021-05-02Userland: Make IPC handlers return void if they don't have any outputsGunnar Beutner
2021-05-02Userland: Get rid of the OwnPtr<...> boilerplate code for IPC handlersGunnar Beutner
2021-04-25IPCCompiler: Remove hardcoded endpoint magic, attempt deuxsin-ack
This patch removes the IPC endpoint numbers that needed to be specified in the IPC files. Since the string hash is a (hopefully) collision free number that depends on the name of the endpoint, we now use that instead. :^) Additionally, endpoint magic is now treated as a u32, because endpoint numbers were never negative anyway. For cases where the endpoint number does have to be hardcoded (a current case is LookupServer because the endpoint number must be known in LibC), the syntax has been made more explicit to avoid confusing those unfamiliar. To hardcode the endpoint magic, the following syntax is now used: endpoint EndpointName [magic=1234]
2021-04-25Revert "IPCCompiler: Use string hashes for IPC endpoint magic"Andreas Kling
This reverts commit 59218007a3034c7770b7fa5277ce1eae85bb1c07.
2021-04-25IPCCompiler: Use string hashes for IPC endpoint magicsin-ack
This patch removes the IPC endpoint numbers that needed to be specified in the IPC files. Since the string hash is a (hopefully) collision free number that depends on the name of the endpoint, we now use that instead. :^)
2021-04-24LaunchServer: Fix argument order to FileManagerAlbert S
Correct the order we pass the arguments to the FileManager so opening file:// URLs works. The path is a positional argument that was passed after the flags. We need to make sure the flags are passed before positional arguments.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-03-15Apply suggestions from code review Elie Donadio
Small adjustments, as suggested by linus. Co-authored-by: Linus Groh <mail@linusgroh.de>
2021-03-15LaunchServer: added additional file parametersElDonad
This small commit should allow to specify additionnal parameters in the form of URL queries, when opening a file via a "file://" url through the LaunchServer.
2021-03-07LaunchServer: Use new FileManager flags instead of two argumentsspeles
2021-03-01FileManager+LaunchServer: Add launching FileManager with focus on filespeles
2021-03-01LaunchServer: Make spawn() helper accept arguments listspeles
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-01LibIPC: Stop sending client ID to clientsAndreas Kling
The client ID is not useful to normal clients anymore, so stop telling everyone what their ID is.
2021-01-12Services: Move to Userland/Services/Andreas Kling