mirror of
https://github.com/rfc1036/whois.git
synced 2026-05-03 06:51:09 +00:00
Port mkpasswd to Solaris/Dyson
This commit is contained in:
parent
3a408f7f1c
commit
4a77be3e03
@ -12,7 +12,7 @@ close($fh) or die "close($changelog): $!";
|
||||
my ($ver) = $line =~ /^whois \s+ \( ( [^\)]+ ) \) \s+ \S+/x;
|
||||
die "Version number not found in $changelog!\n" if not $ver;
|
||||
|
||||
$ver =~ s/ ( ~deb\d+.* | ubuntu\d+ ) $//x;
|
||||
$ver =~ s/ ( ~deb\d+.* | ubuntu\d+ | \+dyson\d+ ) $//x;
|
||||
|
||||
# The version number must not deviate from this format or the -V option
|
||||
# to RIPE-like servers will break. If needed, update the previous regexp.
|
||||
|
||||
@ -17,8 +17,9 @@
|
||||
*/
|
||||
|
||||
/* for crypt, snprintf and strcasecmp */
|
||||
#define _XOPEN_SOURCE
|
||||
#define _BSD_SOURCE
|
||||
#define _XOPEN_SOURCE 500
|
||||
#define _BSD_SOURCE 1
|
||||
#define __EXTENSIONS__ 1
|
||||
|
||||
/* System library */
|
||||
#include <stdio.h>
|
||||
@ -271,10 +272,9 @@ int main(int argc, char *argv[])
|
||||
strcat(salt, salt_arg);
|
||||
} else {
|
||||
#ifdef HAVE_SOLARIS_CRYPT_GENSALT
|
||||
#error "This code path is untested on Solaris. Please send a patch."
|
||||
salt = crypt_gensalt(salt_prefix, NULL);
|
||||
if (!salt)
|
||||
perror(stderr, "crypt_gensalt");
|
||||
perror("crypt_gensalt");
|
||||
#elif defined HAVE_LINUX_CRYPT_GENSALT
|
||||
void *entropy = get_random_bytes(64);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user