diff options
author | Marco d'Itri <md@linux.it> | 2015-03-15 04:17:43 +0100 |
---|---|---|
committer | Marco d'Itri <md@linux.it> | 2015-03-23 04:31:02 +0100 |
commit | 09d4a0fe88e37fc2afd543863b34ae4554ccf2e6 (patch) | |
tree | 5f88fe068260ba93fac2895dfce0174289fcecf0 /mkpasswd.c | |
parent | 78d2e38a6416b5e2889eac6868afd7c05c384b57 (diff) | |
download | whois-09d4a0fe88e37fc2afd543863b34ae4554ccf2e6.tar.gz |
mkpasswd: exit if crypt_gensalt on Solaris fails
Diffstat (limited to 'mkpasswd.c')
-rw-r--r-- | mkpasswd.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -279,8 +279,10 @@ int main(int argc, char *argv[]) } else { #ifdef HAVE_SOLARIS_CRYPT_GENSALT salt = crypt_gensalt(salt_prefix, NULL); - if (!salt) + if (!salt) { perror("crypt_gensalt"); + exit(2); + } #elif defined HAVE_LINUX_CRYPT_GENSALT void *entropy = get_random_bytes(64); |