Process killed on self-exec after pledge+unveil

2020-03-09 Thread int3resting27
Example program: #include #include int main(int argc, char **argv) { char *const args[] = { "Z", NULL, }; char *const env[] = { NULL, }; if (argv[0][0] == 'Z') { printf("success\n"); return (0); } unveil(argv[0], "x");

Re: Process killed on self-exec after pledge+unveil

2020-03-09 Thread Theo de Raadt
int3resting27 wrote: > Example program: > > #include > #include > int main(int argc, char **argv) { > char *const args[] = { "Z", NULL, }; > char *const env[] = { NULL, }; > > if (argv[0][0] == 'Z') { > printf("success\n"); > return (0); > }

Re: Process killed on self-exec after pledge+unveil

2020-03-09 Thread Sebastien Marie
On Sun, Mar 08, 2020 at 12:04:07AM +, int3resting27 wrote: > Example program: > > #include > #include > int main(int argc, char **argv) { > char *const args[] = { "Z", NULL, }; > char *const env[] = { NULL, }; > > if (argv[0][0] == 'Z') { > printf("success\n"

Re: Process killed on self-exec after pledge+unveil

2020-03-09 Thread Theo de Raadt
Sebastien Marie wrote: > On Sun, Mar 08, 2020 at 12:04:07AM +, int3resting27 wrote: > > Example program: > > > > #include > > #include > > int main(int argc, char **argv) { > > char *const args[] = { "Z", NULL, }; > > char *const env[] = { NULL, }; > > > > if (argv[0][0] == 'Z