1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-13 00:31:07 +00:00
serenity/Kernel
Jelle Raaijmakers 30abfc2b21 Kernel: Pass absolute path to shebang interpreter
When you invoke a binary with a shebang line, the `execve` syscall
makes sure to pass along command line arguments to the shebang
interpreter including the path to the binary to execute.

This does not work well when the binary lives in $PATH. For example,
given this script living in `/usr/local/bin/my-script`:

  #!/bin/my-interpreter
  echo "well hello friends"

When executing it as `my-script` from outside `/usr/local/bin/`, it is
executed as `/bin/my-interpreter my-script`. To make sure that the
interpreter can find the binary to execute, we need to replace the
first argument with an absolute path to the binary, so that the
resulting command is:

  /bin/my-interpreter /usr/local/bin/my-script
2021-06-13 21:19:51 +02:00
..
ACPI Kernel/ACPI: Sprinkle links to the specification all over 2021-05-31 19:06:46 +01:00
API Kernel: Add statvfs & fstatvfs Syscalls 2021-05-19 21:33:29 +02:00
Arch Kernel: Print stack traces for crashes in release builds 2021-06-11 11:32:01 +02:00
Devices USB: Further Implement USB Structures 2021-06-12 18:17:25 +04:30
FileSystem AK: Rename Vector::append(Vector) => Vector::extend(Vector) 2021-06-12 13:24:45 +02:00
Graphics Kernel: Use IO ports instad of MMIO with Bochs graphics in VirtualBox 2021-06-04 13:02:32 +02:00
Heap Kernel: Don't log profile data before/after the process/thread lifetime 2021-05-30 19:03:03 +02:00
Interrupts AK+Kernel: Disallow implicitly lifting pointers to OwnPtr's 2021-05-31 17:09:12 +04:30
Modules Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Net Kernel: Block writes while we're establishing the TCP connection 2021-06-11 11:32:40 +02:00
PCI Kernel: Add driver for RTL8168 & RTL8111 NICs 2021-06-10 21:54:51 +02:00
Storage Documentation: Add explanation about AHCI locking 2021-05-31 18:28:25 +01:00
Syscalls Kernel: Pass absolute path to shebang interpreter 2021-06-13 21:19:51 +02:00
Tasks Kernel: Mark SyncTask::spawn() as UNMAP_AFTER_INIT 2021-06-09 10:57:51 +02:00
Time Kernel: Fix return value for {enable,disable}_profile_timer() 2021-05-17 21:53:04 +02:00
TTY Kernel: Add missing BrightWhite color to VirtualConsole 2021-06-11 11:38:15 +02:00
VirtIO Kernel: Mark VirtIOConsole constructor as UNMAP_AFTER_INIT 2021-06-09 10:57:51 +02:00
VM AK: Rename Vector::append(Vector) => Vector::extend(Vector) 2021-06-12 13:24:45 +02:00
AddressSanitizer.cpp Everywhere: Use bgianf@serenityos.org for my copyright attribution 2021-04-22 21:15:54 +02:00
AddressSanitizer.h Everywhere: Use bgianf@serenityos.org for my copyright attribution 2021-04-22 21:15:54 +02:00
Assertions.h Kernel: Enable VERIFY() checks even if the DEBUG macro is not defined 2021-06-11 11:32:01 +02:00
CMakeLists.txt USB: Further Implement USB Structures 2021-06-12 18:17:25 +04:30
CMOS.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CMOS.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CommandLine.cpp Kernel/CommandLine: Add option to disable physical networking hardware 2021-06-09 22:44:09 +04:30
CommandLine.h Kernel/CommandLine: Add option to disable physical networking hardware 2021-06-09 22:44:09 +04:30
ConsoleDevice.cpp Kernel: Rename instances of IO port 0xe9 to BOCHS_DEBUG_PORT 2021-05-31 19:06:13 +01:00
ConsoleDevice.h Kernel: Rename Console => ConsoleDevice 2021-05-16 19:58:33 +02:00
CoreDump.cpp Kernel: Unnamed regions still need a null-terminator in core dumps 2021-05-30 20:00:03 +02:00
CoreDump.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Debug.h.in USB: Further Implement USB Structures 2021-06-12 18:17:25 +04:30
DMI.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
DMI.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
DoubleBuffer.cpp Kernel: Don't update write_pos in DoubleBuffer if userspace copy fails 2021-05-18 16:47:26 +02:00
DoubleBuffer.h Kernel: Implement peek() function for DoubleBuffer 2021-04-29 08:09:53 +02:00
Forward.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
FutexQueue.cpp Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
FutexQueue.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
init.cpp Kernel: Introduce the NetworkingManagement singleton 2021-06-09 22:44:09 +04:30
IO.h Kernel: Rename instances of IO port 0xe9 to BOCHS_DEBUG_PORT 2021-05-31 19:06:13 +01:00
KBuffer.h Kernel: Make KBuffer APIs OOM safe 2021-05-29 09:04:05 +02:00
KBufferBuilder.cpp Kernel: Replace make<T>() with adopt_own_if_nonnull() in KBufferBuilder 2021-05-13 16:21:53 +02:00
KBufferBuilder.h Kernel: Avoid allocations in KBufferBuilder::appendff 2021-05-13 08:27:42 +02:00
kprintf.cpp Kernel: Support new lines when doing critical printing 2021-06-03 16:16:22 +01:00
KResult.h Kernel: Add missing AK/Format.h include in KResult.h 2021-05-28 09:37:09 +02:00
kstdio.h Kernel/Graphics + SystemServer: Support text mode properly 2021-05-16 19:58:33 +02:00
KString.cpp Kernel: Add operator delete for KString 2021-06-02 22:59:39 +01:00
KString.h Kernel: Add operator delete for KString 2021-06-02 22:59:39 +01:00
KSyms.cpp Kernel: Check kernel symbol's name length matches searched name 2021-04-28 22:14:32 +02:00
KSyms.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
linker.ld Kernel: Define a KERNEL_VIRTUAL_BASE in the linker script 2021-03-04 18:25:01 +01:00
Lock.cpp Kernel: Utilize AK::SourceLocation for LOCK_DEBUG instrumentation. 2021-04-25 09:38:27 +02:00
Lock.h Kernel: Add ScopedLockRelease to temporarily release a Lock 2021-05-25 10:35:41 +02:00
LockMode.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
mkmap.sh Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
Module.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Multiboot.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Panic.cpp Kernel/Graphics + SystemServer: Support text mode properly 2021-05-16 19:58:33 +02:00
Panic.h Kernel/Graphics + SystemServer: Support text mode properly 2021-05-16 19:58:33 +02:00
PerformanceEventBuffer.cpp Kernel: Make PerformanceEventBuffer creation API OOM safe 2021-05-29 09:04:05 +02:00
PerformanceEventBuffer.h Kernel: Add support for profiling kmalloc()/kfree() 2021-05-19 22:51:42 +02:00
PerformanceManager.h Kernel: Don't log profile data before/after the process/thread lifetime 2021-05-30 19:03:03 +02:00
PhysicalAddress.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Process.cpp Kernel: Switch Process to InstrusiveList from InlineLinkedList 2021-06-07 09:42:55 +02:00
Process.h Kernel: Allow unveiling subfolders regardless of parent's permissions 2021-06-08 12:15:04 +02:00
ProcessGroup.cpp Kernel: Switch ProcessGroup to IntrusiveList from InlineLinkedList 2021-06-03 13:27:40 +02:00
ProcessGroup.h Kernel: Switch ProcessGroup to IntrusiveList from InlineLinkedList 2021-06-03 13:27:40 +02:00
Random.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
Random.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RTC.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RTC.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Scheduler.cpp Kernel: Don't finalize a thread while it still has code running 2021-06-06 15:58:48 +02:00
Scheduler.h Kernel: Don't log profile data before/after the process/thread lifetime 2021-05-30 19:03:03 +02:00
SpinLock.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StdLib.cpp Kernel: Add try_copy_kstring_from_user() 2021-05-28 09:37:09 +02:00
StdLib.h Kernel: Add try_copy_kstring_from_user() 2021-05-28 09:37:09 +02:00
Syscall.cpp Meta: Disable -Wmaybe-uninitialized 2021-06-09 23:05:32 +04:30
Thread.cpp Kernel: Remove incorrect VERIFY() in Thread::relock_process 2021-06-07 14:45:38 +04:30
Thread.h Kernel: Don't log profile data before/after the process/thread lifetime 2021-05-30 19:03:03 +02:00
ThreadBlockers.cpp Kernel: Fix error propagation if Thread::WaitBlocker constructor fails 2021-06-07 09:43:30 +02:00
ThreadTracer.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ThreadTracer.h Kernel: Make Process::start_tracing_from API OOM safe 2021-05-13 16:21:53 +02:00
TimerQueue.cpp Kernel: Remove an allocation when blocking a thread 2021-05-20 09:09:10 +02:00
TimerQueue.h Kernel: Remove an allocation when blocking a thread 2021-05-20 09:09:10 +02:00
UBSanitizer.cpp Kernel+AK: Move UBSanitizer to AK, and to AK namespace 2021-05-27 15:18:03 +02:00
UnixTypes.h LibC: Define MSG_OOB 2021-06-04 10:39:41 +02:00
UnveilNode.h Kernel: Allow unveiling subfolders regardless of parent's permissions 2021-06-08 12:15:04 +02:00
UserOrKernelBuffer.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
UserOrKernelBuffer.h Kernel: Make UserOrKernelBuffer R/W helpers return KResultOr<size_t> 2021-05-13 23:28:40 +02:00
VirtualAddress.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
WaitQueue.cpp Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
WaitQueue.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
WorkQueue.cpp Kernel: Mark WorkQueue initailzation functions as UNMAP_AFTER_INIT 2021-06-09 10:57:51 +02:00
WorkQueue.h Kernel: Use plain Function objects for the WorkQueue 2021-05-19 21:36:57 +02:00