This commit is contained in:
Felix 2022-02-03 18:39:30 +01:00
parent 87082d5d5e
commit ef66510e59

View File

@ -155,10 +155,9 @@ int main(int argc, char *argv[]) {
/* check UID, see setuid(2) */
if (setuid(passwddata->uid) < 0) {
if (setuid(passwddata->uid) < 0) { //replace this with the ID of the user running the program if you don't have sudo rights
perror("Error");
exit(EXIT_FAILURE);
// TODO kommer alltid bara hit
}
/* start a shell, use execve(2) */
if (execve("/bin/bash",NULL,NULL) < 0) {