#include #include #include #include #include #include #include extern char **environ; int main(int argc, char **argv) { if (argc < 2) { fprintf(stderr,"%s\n", "Must supply an executable path"); exit(1); } int ev = personality(PER_LINUX | UNAME26); if (ev == -1) { fprintf(stderr,"%s\n", "Could not set execution domain"); exit(1); } pid_t child = fork(); if (child == 0) { ev = execve(argv[1], &argv[1], environ); if (ev) { perror("Exec error"); exit(1); } } else { int status; waitpid(child, &status, 0); printf("%s\n", "welcome back"); } return 0; }