151 |
|
|
152 |
if (flag & FLAG_PASS) |
if (flag & FLAG_PASS) |
153 |
{ |
{ |
154 |
if (!plaintext) |
if (plaintext == NULL) |
155 |
|
{ |
156 |
printf("Please enter a valid password\n"); |
printf("Please enter a valid password\n"); |
157 |
|
exit(EXIT_FAILURE); |
158 |
|
} |
159 |
|
} |
160 |
|
else if ((plaintext = getpass("plaintext: ")) == NULL) |
161 |
|
{ |
162 |
|
printf("getpass() failed\n"); |
163 |
|
exit(EXIT_FAILURE); |
164 |
} |
} |
|
else |
|
|
plaintext = getpass("plaintext: "); |
|
165 |
|
|
166 |
if ((ret = crypt(plaintext, salt))) |
if ((ret = crypt(plaintext, salt))) |
167 |
printf("%s\n", ret); |
printf("%s\n", ret); |