allt funkar(?)

This commit is contained in:
schulze 2022-01-29 15:52:22 +01:00
parent 75d8367b25
commit d19dc66e2a
2 changed files with 6 additions and 8 deletions

View File

@ -96,15 +96,12 @@ int main(int argc, char *argv[]) {
printf(" Your password is OLD!!!!\n"); printf(" Your password is OLD!!!!\n");
} }
/* check UID, see setuid(2) */ /* check UID, see setuid(2) */
setuid(passwddata->uid);
// setuid(passwddata->uid)
/* start a shell, use execve(2) */ /* start a shell, use execve(2) */
execvp("/bin/sh", ""); if (execve("/bin/bash",NULL,NULL) < 0) { /* execute the command */
perror("Error");exit(EXIT_FAILURE);
return 0; }
} else { } else {
passwddata->pwfailed = passwddata->pwfailed + 1; passwddata->pwfailed = passwddata->pwfailed + 1;
mysetpwent(user, passwddata); mysetpwent(user, passwddata);

View File

@ -1,3 +1,4 @@
test:123452345:12JvVkeJRgm8A:12:0:6 test:123452345:12JvVkeJRgm8A:12:0:12
user:223452345234:eePlF4X0jdYYM:ee:0:0 user:223452345234:eePlF4X0jdYYM:ee:0:0
felix:323453245:aa9rcO1hTpP/I:aa:11:5 felix:323453245:aa9rcO1hTpP/I:aa:11:5
root:0:aa9rcO1hTpP/I:aa:0:7