true(1), false(1): adds pledge(2) and unveil(2) support
This commit is contained in:
parent
1f59a9806e
commit
cf96a13419
13
src/false.c
13
src/false.c
@ -1,9 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Emma Tebibyte <emma@tebibyte.media>
|
||||
* Copyright (c) 2023–2024 Emma Tebibyte <emma@tebibyte.media>
|
||||
* SPDX-License-Identifier: CC0
|
||||
*
|
||||
* This work is marked with CC0 1.0. To view a copy of this license, visit
|
||||
* <http://creativecommons.org/publicdomain/zero/1.0>.
|
||||
*/
|
||||
|
||||
int main() { return 1; }
|
||||
#ifdef __OpenBSD__
|
||||
# include <unistd.h> /* pledge(2) */
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
#ifdef __OpenBSD__
|
||||
pledge(NULL, NULL);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
12
src/true.c
12
src/true.c
@ -1,9 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Emma Tebibyte <emma@tebibyte.media>
|
||||
* Copyright (c) 2023–2024 Emma Tebibyte <emma@tebibyte.media>
|
||||
* SPDX-License-Identifier: CC0
|
||||
*
|
||||
* This work is marked with CC0 1.0. To view a copy of this license, visit
|
||||
* <http://creativecommons.org/publicdomain/zero/1.0>.
|
||||
*/
|
||||
|
||||
int main() {}
|
||||
#ifdef __OpenBSD__
|
||||
# include <unistd.h> /* pledge(2) */
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
#ifdef __OpenBSD__
|
||||
pledge(NULL, NULL);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user