summaryrefslogtreecommitdiff
path: root/Userland/Utilities/pledge.cpp
AgeCommit message (Collapse)Author
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-07-21Utilities+LibELF: Temporary promises for dynamic linker in "pledge"Itamar
This adds a "temporary promises for the dynamic-linker" flag ('-d') to the "pledge" utility. Example usage: pledge -d -p "stdio rpath" id Without the '-d' flag, id would crash because the dynamic linker requires 'prot_exec'. When this flag is used and the program to be run is dynamically linked, "pledge" adds promises that are required by the dynamic linker to the promise set provided by the user. The dynamic linker will later "give up" the pledge promises it no longer requires.
2022-07-14Utilities: Add "pledge" utility for launching a sandboxed commandAndreas Kling
This new command allows you to run any command with an initial set of pledge promises. Note that dynamically linked executables won't be able to bootstrap without at least "stdio rpath prot_exec". Inspired by http://justine.lol/pledge/ :^)