summaryrefslogtreecommitdiff
path: root/Userland/Utilities
AgeCommit message (Collapse)Author
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
2022-09-16LibWeb+LibWebView+WebContent: Add Web::Platform::ImageCodecPluginAndreas Kling
This replaces the previous Web::ImageDecoding::Decoder interface. While we're doing this, also move the SerenityOS implementation of this interface from LibWebView to WebContent. That means we no longer have to link with LibImageDecoderClient in applications that use a web view.
2022-09-09uniq: Improve POSIX compliancedemostanis
Adds -d, -c, -i, -f and -s options. It differs a little bit from other implementations, but it does the trick and corresponds to POSIX's description
2022-09-09Meta: Update jakt build support for fully bootstrapped compilerAndrew Kaster
Remove the Corrosion dependency, and use the now-builtin add_jakt_executable function from the Jakt install rules to build our example application. By using find_package(Jakt), we now have to set ENABLE_JAKT manually on both serenity and Lagom at the same time, so the preferred method to do this for now is: cmake -B Build/superbuild<arch><toolchain> \ -S Meta/CMake/Superbuild \ -DENABLE_JAKT=ON \ -DJAKT_SOURCE_DIR=/path/to/jakt Where omitting JAKT_SOURCE_DIR will still pull from the main branch of SerenityOS/jakt. This can be done after runing Meta/serenity.sh run.
2022-09-05Userland: Move files destined for LibLocale to the Locale namespaceTimothy Flynn
2022-09-05LibUnicode+Userland: Migrate generated CLDR data to LibLocaleDataTimothy Flynn
Currently, LibUnicodeData contains the generated UCD and CLDR data. Move the UCD data to the main LibUnicode library, and rename LibUnicodeData to LibLocaleData. This is another prepatory change to migrate to LibLocale.
2022-09-04Utilities/lsusb: Fix uninitialized variable errorJesse Buhagiar
The variable `print_verbose` (which prints verbose information about the USB devices connected to the system) was uninitialized in `lsusb`. This was causing the verbose information to be printed if `-v` was NOT seen on the command line.
2022-08-28LibJS: Turn initialize_global_object() into a regular initialize()Linus Groh
There's nothing special about global object initialization anymore, this can just work the same way as for any other object now.
2022-08-28LibJS: Move Console ownership from GlobalObject to ConsoleObjectLinus Groh
GlobalObject is now a regular object with no special properties :^)
2022-08-27LibJS: Move intrinsics to the realmLinus Groh
Intrinsics, i.e. mostly constructor and prototype objects, but also things like empty and new object shape now live on a new heap-allocated JS::Intrinsics object, thus completing the long journey of taking all the magic away from the global object. This represents the Realm's [[Intrinsics]] slot in the spec and matches its existing [[GlobalObject]] / [[GlobalEnv]] slots in terms of architecture. In the majority of cases it should now be possibly to fully allocate a regular object without the global object existing, and in fact that's what we do now - the realm is allocated before the global object, and the intrinsics between both :^)
2022-08-23Userland: Consolidate most PATH resolving into a single implementationTim Schumacher
We previously had at least three different implementations for resolving executables in the PATH, all of which had slightly different characteristics. Merge those into a single implementation to keep the behaviour consistent, and maybe to make that implementation more configurable in the future.
2022-08-23LibJS: Remove {Bytecode::,}Interpreter::global_object()Linus Groh
The basic idea is that a global object cannot just come out of nowhere, it must be associated to a realm - so get it from there, if needed. This is to enforce the changes from all the previous commits by not handing out global objects unless you actually have an initialized realm (either stored somewhere, or the VM's current realm).
2022-08-23LibJS+LibWeb: Reduce use of GlobalObject as an intermediaryLinus Groh
- Prefer VM::current_realm() over GlobalObject::associated_realm() - Prefer VM::heap() over GlobalObject::heap() - Prefer Cell::vm() over Cell::global_object() - Prefer Wrapper::vm() over Wrapper::global_object() - Inline Realm::global_object() calls used to access intrinsics as they will later perform a direct lookup without going through the global object
2022-08-23LibJS: Pass Realm to define_native_{accessor,function}()Linus Groh
This is needed so that the allocated NativeFunction receives the correct realm, usually forwarded from the Object's initialize() function, rather than using the current realm.
2022-08-23LibJS: Pass Realm to GlobalObject::initialize_global_object()Linus Groh
Global object initialization is tightly coupled to realm creation, so simply pass it to the function instead of relying on the non-standard 'associated realm' concept, which I'd like to remove later. This works essentially the same way as regular Object::initialize() now. Additionally this allows us to forward the realm to GlobalObject's add_constructor() / initialize_constructor() helpers, so they set the correct realm on the allocated constructor function object.
2022-08-23LibJS: Remove GlobalObject parameter from native functionsLinus Groh
2022-08-23LibJS: Replace GlobalObject with VM in common AOs [Part 18/19]Linus Groh
2022-08-23LibJS: Replace GlobalObject with VM in Reference AOs [Part 6/19]Linus Groh
2022-08-23LibJS: Replace GlobalObject with VM in Value AOs [Part 4/19]Linus Groh
This is where the fun begins. :^)
2022-08-23LibJS: Replace GlobalObject with VM in Intl AOs [Part 1/19]Linus Groh
Instead of passing a GlobalObject everywhere, we will simply pass a VM, from which we can get everything we need: common names, the current realm, symbols, arguments, the heap, and a few other things. In some places we already don't actually need a global object and just do it for consistency - no more `auto& vm = global_object.vm();`! This will eventually automatically fix the "wrong realm" issue we have in some places where we (incorrectly) use the global object from the allocating object, e.g. in call() / construct() implementations. When only ever a VM is passed around, this issue can't happen :^) I've decided to split this change into a series of patches that should keep each commit down do a somewhat manageable size.
2022-08-23LibJS: Remove GlobalObject from VM::throw_completion()Linus Groh
This is a continuation of the previous five commits. A first big step into the direction of no longer having to pass a realm (or currently, a global object) trough layers upon layers of AOs! Unlike the create() APIs we can safely assume that this is only ever called when a running execution context and therefore current realm exists. If not, you can always manually allocate the Error and put it in a Completion :^) In the spec, throw exceptions implicitly use the current realm's intrinsics as well: https://tc39.es/ecma262/#sec-throw-an-exception
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in create() functionsLinus Groh
This is a continuation of the previous two commits. As allocating a JS cell already primarily involves a realm instead of a global object, and we'll need to pass one to the allocate() function itself eventually (it's bridged via the global object right now), the create() functions need to receive a realm as well. The plan is for this to be the highest-level function that actually receives a realm and passes it around, AOs on an even higher level will use the "current realm" concept via VM::current_realm() as that's what the spec assumes; passing around realms (or global objects, for that matter) on higher AO levels is pointless and unlike for allocating individual objects, which may happen outside of regular JS execution, we don't need control over the specific realm that is being used there.
2022-08-20strace: Pledge `rpath` for searching binariesTim Schumacher
After commit 91a03bc6ae134f76560c8bba49b6704b1bbbeaae we no longer try to discover files for exec-ing by simply trying to exec on them, but we check for the files existence by using `Core::file::exists()` first. Contrary to the old solution, this now requires the `rpath` pledge, so pledge it to keep `strace` from crashing when using non-absolute paths.
2022-08-16Utilities/file: Handle all supported audio MIME typeskleines Filmröllchen
2022-08-14Base: Launch AudioServer at session start-upLucas CHOLLET
2022-08-14Utilities/lsblk: Remove Interface Type columnLiav A
We are going to remove this slice of data from the SysFS later on, so lsblk must not try to read it.
2022-08-05LibJS: Let Shape store a Realm instead of a GlobalObjectAndreas Kling
This is a cautious first step towards being able to create JS objects before a global object has been instantiated.
2022-08-05LibWeb: Remove page_did_set_document_in_top_level_browsing_context()Andreas Kling
This PageClient callback was never used for anything.
2022-08-02wallpaper: Add pledge promisesnetworkException
2022-08-02Utilities+Base: Rename `pape` utility to `wallpaper`networkException
2022-08-01Userland+Base: Make the window titlebar font configurable separatelyAndreas Kling
Instead of defaulting to "bold variant of the system default font", let's allow the user to set any font they want as the titlebar font.
2022-07-28Utilities/lsusb: Allow the utility to work without existing USB IDs fileLiav A
In case we failed to open /res/usb.ids or the user requested to not use that file, we simply don't try to resolve the USB IDs and print them without any identification.
2022-07-27grep: Fix out of bounds StringView indexingMacDue
This is another case of out of bounds indexing exposed by 13406b8.