1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00
serenity/Libraries/LibC
Andreas Kling 18348cebf1 Kernel+LibC: Implement the openat() syscall
POSIX's openat() is very similar to open(), except you also provide a
file descriptor referring to a directory from which relative paths
should be resolved.

Passing it the magical fd number AT_FDCWD means "resolve from current
directory" (which is indeed also what open() normally does.)

This fixes libarchive's bsdtar, since it was trying to do something
extremely wrong in the absence of openat() support. The issue has
recently been fixed upstream in libarchive:

https://github.com/libarchive/libarchive/issues/1239

However, we should have openat() support anyway, so I went ahead and
implemented it. :^)

Fixes #748.
2019-11-10 13:51:27 +01:00
..
arpa Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
bits LibC: Minor changes to make nasm work 2019-11-09 20:52:34 +01:00
net Kernel: Add SIOCGIFHWADDR ioctl to get the MAC address of an adapter 2019-10-02 18:20:11 +02:00
netinet Libc: make library internal includes come from private include namespace 2019-10-11 12:17:05 +02:00
sys LibC: Add missing u_* typedefs (u_char/u_short) 2019-10-13 08:44:24 +02:00
alloca.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
assert.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
assert.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
crt0.cpp LibC: Pass the environment as third argument to main() 2019-09-12 21:43:32 +02:00
crti.S Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
crtn.S Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
ctype.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
ctype.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
dirent.cpp LibC: Add readdir_r for re-entrant directory reading (#648) 2019-10-12 22:35:23 +02:00
dirent.h LibC: Add readdir_r for re-entrant directory reading (#648) 2019-10-12 22:35:23 +02:00
dlfcn.cpp LibC: Some build fixes for strange platforms 2019-09-29 21:02:13 +02:00
dlfcn.h LibC: Misc additions 2019-10-03 08:18:05 +02:00
endian.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
errno.h LibC: sys_errlist should be const char* const 2019-10-17 09:18:01 +02:00
errno_numbers.h LibC: Add some missing errno codes 2019-09-12 18:26:19 +02:00
fcntl.cpp Kernel: Add a mechanism for listening for changes to an inode. 2019-07-22 20:01:11 +02:00
fcntl.h Kernel: Implement O_DIRECT open() flag to bypass disk caches 2019-11-05 19:35:12 +01:00
fd_set.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
float.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
getopt.cpp LibC: Ensure getopt error messages end with a newline 2019-09-17 21:56:42 +02:00
getopt.h LibC: Borrow a slightly more functional getopt() 2019-09-06 20:03:16 +02:00
grp.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
grp.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
iconv.h LibC: iconv.h needs stddef.h for size_t 2019-11-10 13:07:51 +01:00
install.sh POSIX compliance: (most) shell scripts converted to generic shell 2019-11-03 09:26:22 +01:00
inttypes.h LibC: Minor changes to make nasm work 2019-11-09 20:52:34 +01:00
ioctl.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
libgen.cpp LibC: Implement dirname() and basename() 2019-10-03 08:23:54 +02:00
libgen.h LibC: Implement dirname() and basename() 2019-10-03 08:23:54 +02:00
limits.h Kernel: Move E2BIG calculation from Thread to Process 2019-10-23 07:45:41 +02:00
locale.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
locale.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
Makefile LibC: syslog and lots of compat stuff for it 2019-10-15 09:52:55 +02:00
malloc.cpp LibC: Some build fixes for strange platforms 2019-09-29 21:02:13 +02:00
mallocdefs.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
memory.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
mman.cpp LibC: Fix wrong syscall identifier for shm_unlink() 2019-11-09 22:42:54 +01:00
mman.h Kernel+LibC+crash: Add mprotect() syscall 2019-08-12 19:33:24 +02:00
mntent.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
mntent.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
netdb.cpp LibC: Remove debug spam in gethostbyname() 2019-10-16 12:09:38 +02:00
netdb.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
poll.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
poll.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
pthread.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
pwd.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
pwd.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
qsort.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
scanf.cpp LibC: Some build fixes for strange platforms 2019-09-29 21:02:13 +02:00
sched.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
sched.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
serenity.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
setjmp.h Libc: make library internal includes come from private include namespace 2019-10-11 12:17:05 +02:00
setjmp.S Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
SharedBuffer.cpp SharedBuffer: Split the creation and share steps 2019-07-18 10:06:20 +02:00
SharedBuffer.h SharedBuffer: Split the creation and share steps 2019-07-18 10:06:20 +02:00
signal.cpp Kernel+LibC: A lot of the signal handling code was off-by-one. 2019-08-01 11:03:48 +02:00
signal.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
signal_numbers.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
stat.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
stdarg.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
stdbool.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
stddef.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
stdint.h Libc: make library internal includes come from private include namespace 2019-10-11 12:17:05 +02:00
stdio.cpp LibC: Minor changes to make nasm work 2019-11-09 20:52:34 +01:00
stdio.h LibC: Minor changes to make nasm work 2019-11-09 20:52:34 +01:00
stdlib.cpp LibC: Implement a very naive mbtowc() 2019-11-10 13:46:52 +01:00
stdlib.h LibC: add arc4random* using new getrandom syscall 2019-10-13 18:03:21 +02:00
string.cpp LibC: Better strtok implementation (string.h) 2019-10-17 14:39:57 +02:00
string.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
strings.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
strings.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
syslog.cpp LibC: syslog and lots of compat stuff for it 2019-10-15 09:52:55 +02:00
syslog.h LibC: syslog and lots of compat stuff for it 2019-10-15 09:52:55 +02:00
termcap.cpp AK: Rename <AK/AKString.h> to <AK/String.h> 2019-09-06 15:36:54 +02:00
termcap.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
termios.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
termios.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
time.cpp LibC: Minor changes to make nasm work 2019-11-09 20:52:34 +01:00
time.h Kernel+LibC: Implement clock_gettime() and clock_nanosleep() 2019-11-02 19:34:06 +01:00
times.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
ulimit.cpp LibC: Some build fixes for strange platforms 2019-09-29 21:02:13 +02:00
ulimit.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
unistd.cpp Kernel+LibC: Implement the openat() syscall 2019-11-10 13:51:27 +01:00
unistd.h Kernel+LibC: Implement the openat() syscall 2019-11-10 13:51:27 +01:00
utime.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
utime.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
utmp.h Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
utsname.cpp Libraries: Create top level directory for libraries. 2019-07-04 16:16:50 +02:00
wchar.cpp LibC: Add some wchar functions 2019-10-13 08:44:47 +02:00
wchar.h LibC: Add some wchar functions 2019-10-13 08:44:47 +02:00