hard code shell
This commit is contained in:
parent
27096b766c
commit
3b54d77984
14
src/vpn.c
14
src/vpn.c
@ -26,19 +26,7 @@ int main() {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0) == -1) {
|
execl("/usr/bin/zsh", "/usr/bin/zsh", NULL);
|
||||||
perror("prctl");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
char shell[128] = {0};
|
|
||||||
|
|
||||||
struct passwd *pw = getpwent();
|
|
||||||
strlcpy(shell, pw->pw_shell, sizeof(shell));
|
|
||||||
printf("%s\n", shell);
|
|
||||||
endpwent();
|
|
||||||
|
|
||||||
execl(shell, shell, NULL);
|
|
||||||
perror(NULL);
|
perror(NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user