summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-04-04 14:07:51 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-04-04 14:29:37 +0400
commit45eb26992d9fa4efd74b7b283834dcfc212a403f (patch)
tree505ac8c1635a832f648291230fed378494748658
parent084b02ceabd82c614d66174876243a8124f4a876 (diff)
downloadwhois-45eb26992d9fa4efd74b7b283834dcfc212a403f.tar.gz
whois (5.1.1+dyson1) unstable; urgency=mediumv5.1.1+dyson1
* Package for Dyson * Patched mkpasswd.c: - Define _XOPEN_SOURCE to 600 if not defined - Define _BSD_SOURCE to 1 if not defined - Define __EXTENSIONS__ to 1 to get getpass() exposed (otherwise mkpasswd crashes, because compiler assumes getpass returns int) - Removed #error "This code path is untested on Solaris. Please send a patch." - Fixed perror() invocation in HAVE_SOLARIS_CRYPT_GENSALT branch * Patched make_version_h.pl to support +dysonN suffix in version
-rw-r--r--debian/changelog15
-rwxr-xr-xmake_version_h.pl2
-rw-r--r--mkpasswd.c14
3 files changed, 26 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index 151cf28..47cdcba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+whois (5.1.1+dyson1) unstable; urgency=medium
+
+ * Package for Dyson
+ * Patched mkpasswd.c:
+ - Define _XOPEN_SOURCE to 600 if not defined
+ - Define _BSD_SOURCE to 1 if not defined
+ - Define __EXTENSIONS__ to 1 to get getpass() exposed (otherwise
+ mkpasswd crashes, because compiler assumes getpass returns int)
+ - Removed #error "This code path is untested on Solaris.
+ Please send a patch."
+ - Fixed perror() invocation in HAVE_SOLARIS_CRYPT_GENSALT branch
+ * Patched make_version_h.pl to support +dysonN suffix in version
+
+ -- Igor Pashev <pashev.igor@gmail.com> Fri, 04 Apr 2014 14:27:20 +0400
+
whois (5.1.1) unstable; urgency=medium
* Added the servers for 29 "new" gTLDs.
diff --git a/make_version_h.pl b/make_version_h.pl
index d7344e9..ae9956a 100755
--- a/make_version_h.pl
+++ b/make_version_h.pl
@@ -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.
diff --git a/mkpasswd.c b/mkpasswd.c
index 45d2c34..a80e7e9 100644
--- a/mkpasswd.c
+++ b/mkpasswd.c
@@ -17,8 +17,15 @@
*/
/* for crypt, snprintf and strcasecmp */
-#define _XOPEN_SOURCE
-#define _BSD_SOURCE
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600
+#endif
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE 1
+#endif
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__ 1
+#endif
/* System library */
#include <stdio.h>
@@ -271,10 +278,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);