Compare commits
7 Commits
7498b283ce
...
8bdb72ece8
Author | SHA1 | Date | |
---|---|---|---|
8bdb72ece8 | |||
ba73f50527 | |||
579bb98874 | |||
8f1e570b50 | |||
a43daf2cf2 | |||
f25a499ca0 | |||
e0b5467fb6 |
@ -8,13 +8,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
# include <unistd.h> /* NULL, pledge(2), unveil(2) */
|
# include <unistd.h> /* pledge(2) */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
(void)pledge(NULL, NULL);
|
(void)pledge("stdio", "");
|
||||||
(void)unveil(NULL, NULL);
|
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ int main(int argc, char *argv[]) {
|
|||||||
char showtab = 0; /* prints tab characters in caret notation */
|
char showtab = 0; /* prints tab characters in caret notation */
|
||||||
|
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
if (pledge("stdio unveil", NULL) == -1 || unveil(NULL, NULL)) {
|
if (pledge("stdio unveil", "") == -1 || unveil(NULL, NULL)) {
|
||||||
perror(argv[0] == NULL ? program_name : argv[0]);
|
perror(argv[0] == NULL ? program_name : argv[0]);
|
||||||
return EX_OSERR;
|
return EX_OSERR;
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ int main(int argc, char *argv[]) {
|
|||||||
program_name = argv[0] == NULL ? program_name : argv[0];
|
program_name = argv[0] == NULL ? program_name : argv[0];
|
||||||
|
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
if (pledge("rpath stdio unveil", NULL) == -1) {
|
if (pledge("rpath stdio unveil", "") == -1) {
|
||||||
perror(program_name);
|
perror(program_name);
|
||||||
return EX_OSERR;
|
return EX_OSERR;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ int main(int argc, char *argv[]) {
|
|||||||
program_name = argv[0] == NULL ? program_name : argv[0];
|
program_name = argv[0] == NULL ? program_name : argv[0];
|
||||||
|
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
if (pledge("stdio unveil", NULL) == -1 || unveil(NULL, NULL) == -1) {
|
if (pledge("stdio unveil", "") == -1 || unveil(NULL, NULL) == -1) {
|
||||||
perror(program_name);
|
perror(program_name);
|
||||||
return EX_OSERR;
|
return EX_OSERR;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ int main(int argc, char *argv[]) {
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
if (pledge("stdio unveil", NULL) == -1 || unveil(NULL, NULL) == -1) {
|
if (pledge("stdio unveil", "") == -1 || unveil(NULL, NULL) == -1) {
|
||||||
perror(argv[0] == NULL ? program_name : argv[0]);
|
perror(argv[0] == NULL ? program_name : argv[0]);
|
||||||
|
|
||||||
return EX_OSERR;
|
return EX_OSERR;
|
||||||
|
@ -8,12 +8,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
# include <unistd.h> /* NULL, pledge(2), unveil(2) */
|
# include <unistd.h> /* pledge(2) */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
(void)pledge(NULL, NULL);
|
(void)pledge("stdio", "");
|
||||||
(void)unveil(NULL, NULL);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user