Clear passwords provided via arguments

If a password is gived as an argument, that password is shown to other users.
Changed it so that the password is copied locally and the argument cleared.
This commit is contained in:
Markus Makela 2016-01-22 06:42:53 +02:00
parent d054f5d7bd
commit 0902297fe5

View File

@ -139,6 +139,7 @@ main(int argc, char **argv)
case 'p':
passwd = strdup(optarg);
memset(optarg, '\0', strlen(optarg));
break;
case 'P':