summaryrefslogtreecommitdiff
path: root/Userland/Utilities
AgeCommit message (Collapse)Author
2022-10-31Utilities+LibArchive: Don't follow symlinksPeter Elliott
2022-10-31ntpquery: Unveil paths after parsing argumentsTimothy Flynn
This allows running `ntpquery --help` in environments that do not have the LookupServer service running, e.g. when generating man pages. The same was done for netstat in commit 7fba413.
2022-10-31LibELF: Drop the separate file name member from DynamicLoaderTim Schumacher
2022-10-31LibELF: Ensure that DynamicLoader only receives absolute pathsTim Schumacher
While at it, start renaming variables where we know that they store a path, so that we will get less confused in the future.
2022-10-31nologin: Use proper format strings with out() and outln()Timothy Flynn
1. Don't use the sv literal as this bypasses CheckedFormatString. 2. Don't use the content of a file as the format string. If the file contains "{}", the program will crash.
2022-10-31Utilities: Add nologin applicationBeckett Normington
This adds the `nologin` application to the system. This application will look for `/etc/nologin`. If it is present, it will display the message in the file. Otherwise, it will display an error about the current account being unavailable.
2022-10-27ntpquery: Fix pledge and unveil invocationsdemostanis
2022-10-25Kernel+Userland: Move /sys/firmware/power_state to /sys/kernel directoryLiav A
Let's put the power_state global node into the /sys/kernel directory, because that directory represents all global nodes and variables being related to the Kernel. It's also a mutable node, that is more acceptable being in the mentioned directory due to the fact that all other files in the /sys/firmware directory are just firmware blobs and are not mutable at all.
2022-10-25Utilities: Use new global variables at /sys/kernel/ directoryLiav A
2022-10-25sysctl: Use /sys/kernel/variables/ directory instead of /proc/sysLiav A
2022-10-24mv: Support the '--no-clobber' optionEli Youngs
2022-10-24AK+Everywhere: Turn bool keep_empty to an enum in split* functionsdemostanis
2022-10-24wasm: Map the entire input wasm file instead of using Core::FileAli Mohammad Pur
This is a 30x (!) speedup in parsing time as we don't lose time to Core::File's silly memmove()-into-provided-buffer stuff anymore.
2022-10-22Userland: Utilize MS_NOREGULAR mount flagLiav A
For SystemServer, we simply ensure that the /dev mount is now mounted with MS_NOREGULAR flag to ensure only non-regular files are created, thus, achieving what DevTmpFS provided in its implementation, but in a much more sane and clean way than how DevTmpFS did that. For other userland applications, we simply make them being aware of this flag so they can show an indication about this flag being used to the user.
2022-10-22Utilities: Rename `jp` to `json`Maxwell Trussell
With the scope of `jp` expanding beyond just printing JSON (e.g. querying JSON), `json` seems to be a more fitting name.
2022-10-22Utilities: Add jq-like json query functionality to `jp`Maxwell Trussell
2022-10-17route: Accept CIDR notation when specifying networkbrapru
Now that the IPv4Address has the ability to generate valid IP addresses from CIDR notations, this provides a nicer interface to the user when specifying the network address to add or delete.
2022-10-16LibJS+js: Disable console debug messages outside Serenity only for `js`networkException
Previously we would disable console debug messages on all non Serenity platforms as it caused double printing on lagom `js`. This patch limits this to the `js` utility, allowing LibWeb to print debug messages regardless of the operating system :^)
2022-10-15headless-browser: Add ca-certs-path optionsleeight
2022-10-14LibAudio: Get rid of unused method `Loader::file()`Lucas CHOLLET
`aplay` and two files of `SoundPlayer` were relying on the include of `LibCore/File.h` by `Loader.h`.
2022-10-14uname: Report system revision version aka git commit hashkleines Filmröllchen
This can be done with -v and makes uname fully POSIX compliant as far as I can tell.
2022-10-14AK+Userland: Stub out code that isn't currently implemented on AARCH64Gunnar Beutner
Even though this almost certainly wouldn't run properly even if we had a working kernel for AARCH64 this at least lets us build all the userland binaries.
2022-10-13Utilities: Add pkillMaxwell Trussell
2022-10-12checksum: Support the '--check' optionimplicitfield
This commit also updates 'checksum' to use the Core::Stream::File API.
2022-10-12shot: Add ability to edit in PixelPaintJeremy Borgman
2022-10-11test: Guard code paths that may lead to a null pointer dereferenceimplicitfield
test no longer crashes with a segmentation violation if invalid arguments are passed.
2022-10-11pro: Stop closing stdout earlySam Atkins
This was causing a race-condition where sometimes the response body would not get printed. Co-authored-by: Ali Mohammad Pur <mpfard@serenityos.org>
2022-10-11pro: Add argument `--method/-m` for controlling the HTTP methodSam Atkins
This lets you send requests like DELETE.
2022-10-11pro: Print the response code if it's an errorSam Atkins
2022-10-10Userland: Remove unecessary uses of __serenity__ macroAndrew Kaster
2022-10-10Everywhere: Replace uses of __serenity__ with AK_OS_SERENITYAndrew Kaster
Now that we have OS macros for essentially every supported OS, let's try to use them everywhere.
2022-10-09AK+Everywhere: Fix data corruption due to code-point-to-char conversionBen Wiederhake
In particular, StringView::contains(char) is often used with a u32 code point. When this is done, the compiler will for some reason allow data corruption to occur silently. In fact, this is one of two reasons for the following OSS Fuzz issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49184 This is probably a very old bug. In the particular case of URLParser, AK::is_url_code_point got confused: return /* ... */ || "!$&'()*+,-./:;=?@_~"sv.contains(code_point); If code_point is a large code point that happens to have the correct lower bytes, AK::is_url_code_point is then convinced that the given code point is okay, even if it is actually problematic. This commit fixes *only* the silent data corruption due to the erroneous conversion, and does not fully resolve OSS-Fuzz#49184.
2022-10-06rev: Read from stdin if the filename '-' is givenThomas Voss
The implementation of `rev` found on Linux systems does not have this behavior, however other utilities do offer this behavior and so there really isn't too much of an argument to be made for *not* having this as a feature.
2022-10-03Userland: Unveil /proc/all in applications which require itTimothy Flynn
These were missed in 7af5eef. It is needed for any application using e.g. FileSystemAccessServer.
2022-10-03Userland: Tighten promises by removing 'proc' where it isn't usedTimothy Flynn
This is a partial revert of commit 7af5eef. After 97d15e9, the 'proc' promise is not needed for operations using getsid(). This also fixes launching several applications in which 7af5eef added the 'proc' promise only in the second call to pledge().
2022-10-03SystemServer+LoginServer+Userland: Switch to sid-based socketsPeter Elliott
This commit does three things atomically: - switch over Core::Account+SystemServer+LoginServer to sid based socket names. - change socket names with %uid to %sid. - add/update necessary pledges and unveils. Userland: Switch over servers to sid based sockets Userland: Properly pledge and unveil for sid based sockets
2022-10-03Utilities/logout: Refactor to use Core::SessionManagement::logoutPeter Elliott
2022-10-02mount: Report error instead of crashing on failureLucas CHOLLET
Being unable to `open` on the source caused mount to crash. The error is now properly reported to the user.
2022-10-02test: Support more optionsimplicitfield
Adds -g, -G, -k, -O and -u options.
2022-10-02test: Print the correct operator on errorimplicitfield
2022-10-01config: Enable adding and removing groupsthankyouverycool
2022-09-29AK+Everywhere: Replace "protocol" with "scheme" url helpersnetworkException
URL had properly named replacements for protocol(), set_protocol() and create_with_file_protocol() already. This patch removes these function and updates all call sites to use the functions named according to the specification. See https://url.spec.whatwg.org/#concept-url-scheme
2022-09-28less: Show correct line numberdemostanis
This patch makes less start at line 1 instead of 0.
2022-09-28less: Properly stop on EOFdemostanis
2022-09-28pls: Use `LibCore::Account::login()` instead of manually setting the uidLucas CHOLLET
In addition to changing the uid, the method also changes the gid and properly sets groups. So this patch will also mitigate the security issue of `pls`.
2022-09-27LibCore: Propagate errors from LibCore::Account::login()Lucas CHOLLET
2022-09-27su: Add the --login optionLucas CHOLLET
This option, often used with only a lonely dash, allows to "simulate a login". For now, it just changes the current directory to the home of the new user.
2022-09-27LibCore: Use `StringView` instead of `char *` in AccountLucas CHOLLET
2022-09-27Meta: Update my email-addressThomas Voss
2022-09-21headless-browser: Install EventLoop and Font plugins so it doesn't crashSam Atkins