Skip to content

Instantly share code, notes, and snippets.

@chantra
Created October 31, 2017 23:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save chantra/4c13f696b3645961d6749651d1a093f7 to your computer and use it in GitHub Desktop.
#include <sodium.h>
#include <unistd.h>
int main(){
if(chroot("/tmp") != 0){
printf("Failed to chroot\n");
return 1;
}
if(sodium_init() < 0) {
printf("Failed to init libsodium\n");
return 1;
}
printf("Hello world,\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment