samuraictf / gatekeeper

GATEKEEPER: Inline and on-target defense
119 stars 15 forks source link

Environment Arguments #5

Closed bool101 closed 9 years ago

bool101 commented 9 years ago

Let's accept input from the environment in addition to command line, like this:

char *chroot_dir = getenv("GK_CHROOT"); ... case 't': chroot_dir = strdup(optarg); break; ... if(chroot_dir) { unshare(CLONE_NEWUSER); chroot(chroot_dir); }

bool101 commented 9 years ago

Complete for all current arguments.