Prevent password snooping with ps

This commit is contained in:
Fredrik Öhrn 2004-03-15 22:10:54 +00:00
parent a502ab31d1
commit 2a5ea8b9ee

View File

@ -293,6 +293,11 @@ int main(int argc, char ** argv)
break;
case 'P':
password = strdup(optarg);
/* Prevent password snooping with ps */
i = strlen (optarg);
memset (optarg, 'X', i);
break;
case 'U':
username = strdup(optarg);