mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 16:28:30 +00:00
Cherry-pick bug fixes and Landlock Make 1.0.2
This commit is contained in:
parent
c1d99676c4
commit
7e1c78b4f3
13 changed files with 468 additions and 64 deletions
|
@ -343,12 +343,17 @@ int sys_unveil_linux(const char *path, const char *permissions) {
|
|||
* @threadsafe
|
||||
*/
|
||||
int unveil(const char *path, const char *permissions) {
|
||||
int rc;
|
||||
int e, rc;
|
||||
e = errno;
|
||||
if (IsLinux()) {
|
||||
rc = sys_unveil_linux(path, permissions);
|
||||
} else {
|
||||
rc = sys_unveil(path, permissions);
|
||||
}
|
||||
if (rc == -1 && errno == ENOSYS) {
|
||||
errno = e;
|
||||
rc = 0;
|
||||
}
|
||||
STRACE("unveil(%#s, %#s) → %d% m", path, permissions, rc);
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue