|
|
|
|
|
by jakobegger
2899 days ago
|
|
While it implicitely hides everything on the first call, it unveils the arguments. Reads really natural. I imagine typical usage would be: fork();
unveil("/home/jakob/", "w");
unveil("/etc/some_config_file", "r");
unveil(0,0);
exec();
|
|
I think that's the really weird bit, I guess they didn't want multiple functions but it would make more sense to veil() (hide everything), unveil(path, mode) (show that path) and lockveil(), something along those lines. Or maybe use some sort of mode constants e.g. veil(VEIL_INIT), veil(VEIL_REVEAL, path, mode), veil(VEIL_LOCK).