Is paths[] going to have permissions defined for each path?

Like:
char *paths[], int *mode, where mode is the same as in dbopen(3). Maybe so
you don't have to clean up previous pledge calls, any pledge calls with a
NULL paths argument doesn't have anything specified for mode. for
simplicity, modes could be only 2,4,5,6,7

So you could still do:
     pledge("stdio tmppath", NULL)

Then have:
char **temp_paths = calloc(2, sizeof(char*));
temp_paths[0] = malloc( strlen("/tmp/luke/file") + 1);
strlcpy(temp_paths[0], "/tmp/luke/file", sizeof(temp_paths[0]));

int *temp_modes = calloc(2, sizeof(int));
temp_modes[0] = 5;

pledge("stdio tmppath", temp_paths, temp_modes);
How about that?

Reply via email to