Compare commits
No commits in common. "8bdb72ece81eccb5bb823118ebace19efa0a70c1" and "7498b283ce2dd9dcc7ae1d404884f49eb09aa91d" have entirely different histories.
8bdb72ece8
...
7498b283ce
@ -8,12 +8,13 @@
|
||||
*/
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
# include <unistd.h> /* pledge(2) */
|
||||
# include <unistd.h> /* NULL, pledge(2), unveil(2) */
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
#ifdef __OpenBSD__
|
||||
(void)pledge("stdio", "");
|
||||
(void)pledge(NULL, NULL);
|
||||
(void)unveil(NULL, NULL);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ int main(int argc, char *argv[]) {
|
||||
char showtab = 0; /* prints tab characters in caret notation */
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
if (pledge("stdio unveil", "") == -1 || unveil(NULL, NULL)) {
|
||||
if (pledge("stdio unveil", NULL) == -1 || unveil(NULL, NULL)) {
|
||||
perror(argv[0] == NULL ? program_name : argv[0]);
|
||||
return EX_OSERR;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ int main(int argc, char *argv[]) {
|
||||
program_name = argv[0] == NULL ? program_name : argv[0];
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
if (pledge("rpath stdio unveil", "") == -1) {
|
||||
if (pledge("rpath stdio unveil", NULL) == -1) {
|
||||
perror(program_name);
|
||||
return EX_OSERR;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ int main(int argc, char *argv[]) {
|
||||
program_name = argv[0] == NULL ? program_name : argv[0];
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
if (pledge("stdio unveil", "") == -1 || unveil(NULL, NULL) == -1) {
|
||||
if (pledge("stdio unveil", NULL) == -1 || unveil(NULL, NULL) == -1) {
|
||||
perror(program_name);
|
||||
return EX_OSERR;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ int main(int argc, char *argv[]) {
|
||||
unsigned int i;
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
if (pledge("stdio unveil", "") == -1 || unveil(NULL, NULL) == -1) {
|
||||
if (pledge("stdio unveil", NULL) == -1 || unveil(NULL, NULL) == -1) {
|
||||
perror(argv[0] == NULL ? program_name : argv[0]);
|
||||
|
||||
return EX_OSERR;
|
||||
|
@ -8,11 +8,12 @@
|
||||
*/
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
# include <unistd.h> /* pledge(2) */
|
||||
# include <unistd.h> /* NULL, pledge(2), unveil(2) */
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
#ifdef __OpenBSD__
|
||||
(void)pledge("stdio", "");
|
||||
(void)pledge(NULL, NULL);
|
||||
(void)unveil(NULL, NULL);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user