serenity/Kernel
Nico Weber a38754d9f2 Kernel+LibC: Implement seteuid() and friends!
Add seteuid()/setegid() under _POSIX_SAVED_IDS semantics,
which also requires adding suid and sgid to Process, and
changing setuid()/setgid() to honor these semantics.

The exact semantics aren't specified by POSIX and differ
between different Unix implementations. This patch makes
serenity follow FreeBSD. The 2002 USENIX paper
"Setuid Demystified" explains the differences well.

In addition to seteuid() and setegid() this also adds
setreuid()/setregid() and setresuid()/setresgid(), and
the accessors getresuid()/getresgid().

Also reorder uid/euid functions so that they are the
same order everywhere (namely, the order that
geteuid()/getuid() already have).
2020-06-18 23:19:16 +02:00
..
ACPI Kernel: Detect APs and boot them into protected mode 2020-06-04 18:15:23 +02:00
Arch Meta: Scale back overly informal user-facing strings 2020-06-17 18:35:49 +02:00
Devices Kernel: Replace char and u8 data types to u32 for code point 2020-06-16 13:15:17 +02:00
FileSystem Kernel: Use symbolic constants for file modes 2020-06-17 15:02:03 +02:00
Heap Meta: Scale back overly informal user-facing strings 2020-06-17 18:35:49 +02:00
Interrupts Kernel: Detect APs and boot them into protected mode 2020-06-04 18:15:23 +02:00
Modules Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
Net Kernel: Allow File::close() to fail 2020-06-02 21:49:47 +02:00
PCI Meta: Add a script check the presence of "#pragma once" in header files 2020-05-29 07:59:45 +02:00
Tasks Kernel: Move sync and finalization tasks into their own files 2020-04-08 17:19:46 +02:00
Time HPET: Fix accessing HPET registers 2020-06-01 17:35:51 +02:00
TTY Kernel: TTY:VirtualConsole, replace character attribute with code_point 2020-06-16 13:15:17 +02:00
VM Kernel: Add mechanism to identity map the lowest 2MB 2020-06-04 18:15:23 +02:00
.bochsrc
.gitignore
Assertions.h AK+LibC: Add TODO() as an alternative to ASSERT_NOT_REACHED() 2020-05-30 11:31:49 +02:00
CMakeLists.txt Kernel: KeyboardDevice, remove char mapping logic 2020-06-13 12:36:30 +02:00
CMOS.cpp Kernel: Absorb LibBareMetal back into the kernel 2020-05-16 12:00:04 +02:00
CMOS.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
CommandLine.cpp Kernel: Remove CommandLine::get() in favor of lookup() 2020-04-18 14:22:42 +02:00
CommandLine.h Kernel: Remove CommandLine::get() in favor of lookup() 2020-04-18 14:22:42 +02:00
Console.cpp Kernel: Port VirtualConsole to LibVT :^) 2020-05-27 11:19:38 +02:00
Console.h Kernel: Port VirtualConsole to LibVT :^) 2020-05-27 11:19:38 +02:00
DoubleBuffer.cpp AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
DoubleBuffer.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
FB.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Forward.h Kernel: Add convenient ways to map whole BIOS and EBDA into memory 2020-05-22 13:17:38 +02:00
init.cpp AK: Make string-to-number conversion helpers return Optional 2020-06-12 21:28:55 +02:00
IO.h Kernel: Absorb LibBareMetal back into the kernel 2020-05-16 12:00:04 +02:00
KBuffer.h AK: Reduce header dependency graph of String.h 2020-03-23 13:48:44 +01:00
KBufferBuilder.cpp Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
KBufferBuilder.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
KeyCode.h Kernel: Replace char and u8 data types to u32 for code point 2020-06-16 13:15:17 +02:00
kprintf.cpp Kernel: Absorb LibBareMetal back into the kernel 2020-05-16 12:00:04 +02:00
KResult.h Kernel: Always inline some KResult / KResultOr<> methods 2020-06-02 21:49:47 +02:00
kstdio.h Kernel: Remove awkward "#define printf dbgprintf" 2020-05-16 12:03:25 +02:00
KSyms.cpp Kernel: Plumb KResult through FileDescription::read_entire_file() implementation. 2020-05-26 10:15:40 +02:00
KSyms.h Kernel: Update cryptically-named functions related to symbolication 2020-04-08 17:19:46 +02:00
linker.ld Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
Lock.cpp Kernel: Add timeout support to Thread::wait_on 2020-04-26 21:31:52 +02:00
Lock.h AK: Add ALWAYS_INLINE, NEVER_INLINE and FLATTEN macros 2020-04-30 11:43:25 +02:00
mkmap.sh Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
Module.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
MousePacket.h Kernel: Detect 5-button PS/2 mouse if present :^) 2020-05-02 22:06:17 +02:00
Multiboot.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
PerformanceEventBuffer.cpp Kernel: Include the current instruction pointer in profile samples 2020-04-11 21:04:45 +02:00
PerformanceEventBuffer.h AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*) 2020-03-08 13:06:51 +01:00
PhysicalAddress.h Kernel: Absorb LibBareMetal back into the kernel 2020-05-16 12:00:04 +02:00
Process.cpp Kernel+LibC: Implement seteuid() and friends! 2020-06-18 23:19:16 +02:00
Process.h Kernel+LibC: Implement seteuid() and friends! 2020-06-18 23:19:16 +02:00
Profiling.cpp LibELF: Move ELF classes into namespace ELF 2020-04-11 22:41:05 +02:00
Profiling.h Kernel: Bump the max stack frame count in sample profiles to 50 2020-04-12 11:00:38 +02:00
Ptrace.cpp Kernel: Add missing copyright header to Ptrace.cpp 2020-05-09 23:45:16 +02:00
Ptrace.h Meta: Add a script check the presence of "#pragma once" in header files 2020-05-29 07:59:45 +02:00
Random.cpp Kernel: Fix invalid jump in case RDRAND fails 2020-05-20 19:54:56 +02:00
Random.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
RTC.cpp Kernel: Fix awkward RTC log message at boot 2020-04-08 17:19:46 +02:00
RTC.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Scheduler.cpp Kernel: Fix returning random children from waitid(WNOHANG) 2020-05-25 12:38:37 +02:00
Scheduler.h Kernel: Remove the "kernel info page" used for fast gettimeofday() 2020-05-16 11:33:59 +02:00
SharedBuffer.cpp Kernel: Don't remove shbuf permission-to-reattach when releasing 2020-06-17 18:43:50 +02:00
SharedBuffer.h Kernel: Tidy up SharedBuffer interface 2020-05-16 09:44:00 +02:00
StdLib.cpp Kernel: Absorb LibBareMetal back into the kernel 2020-05-16 12:00:04 +02:00
StdLib.h Kernel: Dont't static_assert that size_t is 32-bit :^) 2020-05-23 15:25:43 +02:00
Syscall.cpp Kernel: Add 'ptrace' syscall 2020-03-28 18:27:18 +01:00
Syscall.h Kernel+LibC: Implement seteuid() and friends! 2020-06-18 23:19:16 +02:00
Thread.cpp AK+Kernel: Help the compiler inline a bunch of trivial methods 2020-05-20 14:11:13 +02:00
Thread.h AK+Kernel: Help the compiler inline a bunch of trivial methods 2020-05-20 14:11:13 +02:00
ThreadTracer.cpp ptrace: Add PT_SETREGS 2020-04-13 00:53:22 +02:00
ThreadTracer.h Debugger: Add DebugSession 2020-04-13 00:53:22 +02:00
TimerQueue.cpp Kernel: Update TimerQueue next due timer only when necessary 2020-04-27 11:24:21 +02:00
TimerQueue.h Kernel: Expose timers via a TimerId type 2020-04-27 11:14:41 +02:00
UnixTypes.h Kernel: Use symbolic constants for file modes 2020-06-17 15:02:03 +02:00
VirtualAddress.h Kernel: Absorb LibBareMetal back into the kernel 2020-05-16 12:00:04 +02:00
WaitQueue.cpp Kernel: Implement FUTEX_WAKE of arbitrary count. 2020-04-26 12:35:35 +02:00
WaitQueue.h Kernel: Implement FUTEX_WAKE of arbitrary count. 2020-04-26 12:35:35 +02:00