summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-08-14 00:20:16 -0700
committerMichael Forney <mforney@mforney.org>2020-08-14 01:07:03 -0700
commit8e5f0c715e833e0ec45da5616ffb3d041f7a4ef3 (patch)
tree1cfb6a4102ee6d5c1de8ee8090666d99f245a277 /pkg
parent36f4ec81cd0331af1819a333ed1bcee9455258b0 (diff)
pounce: Update to 1.4p1
Diffstat (limited to 'pkg')
-rw-r--r--pkg/pounce/patch/0001-Switch-back-to-arc4random_buf.patch57
m---------pkg/pounce/src0
2 files changed, 57 insertions, 0 deletions
diff --git a/pkg/pounce/patch/0001-Switch-back-to-arc4random_buf.patch b/pkg/pounce/patch/0001-Switch-back-to-arc4random_buf.patch
new file mode 100644
index 00000000..9f1a3123
--- /dev/null
+++ b/pkg/pounce/patch/0001-Switch-back-to-arc4random_buf.patch
@@ -0,0 +1,57 @@
+From 8482f0d8fb9196755bcbe3466ac592f94e78345a Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Fri, 14 Aug 2020 00:15:58 -0700
+Subject: [PATCH] Switch back to arc4random_buf
+
+This partially reverts commit 04ad4ecc7b4b5db1bbe10372a6820ed88e2799e8.
+---
+ bounce.c | 9 +++------
+ configure | 2 +-
+ 2 files changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/bounce.c b/bounce.c
+index 8f8d38f..21dddce 100644
+--- a/bounce.c
++++ b/bounce.c
+@@ -31,7 +31,6 @@
+ #include <fcntl.h>
+ #include <getopt.h>
+ #include <limits.h>
+-#include <openssl/rand.h>
+ #include <poll.h>
+ #include <pwd.h>
+ #include <signal.h>
+@@ -61,14 +60,12 @@
+ bool verbose;
+
+ static void hashPass(void) {
++ void arc4random_buf(void *, size_t);
++ char *pass = getpass("Password: ");
+ byte rand[12];
+- int n = RAND_bytes(rand, sizeof(rand));
+- if (n < 1) errx(EX_OSERR, "RAND_bytes failure");
+-
++ arc4random_buf(rand, sizeof(rand));
+ char salt[3 + BASE64_SIZE(sizeof(rand))] = "$6$";
+ base64(&salt[3], rand, sizeof(rand));
+-
+- char *pass = getpass("Password: ");
+ printf("%s\n", crypt(pass, salt));
+ }
+
+diff --git a/configure b/configure
+index 5911471..0fe0f97 100755
+--- a/configure
++++ b/configure
+@@ -32,7 +32,7 @@ done
+
+ case "$(uname)" in
+ (FreeBSD)
+- ldlibs -lcrypt -lcrypto
++ ldlibs -lcrypt
+ config libtls
+ defstr OPENSSL_BIN /usr/bin/openssl
+ defstr CERTBOT_PATH /usr/local/etc/letsencrypt
+--
+2.28.0
+
diff --git a/pkg/pounce/src b/pkg/pounce/src
-Subproject 953ecc31e8e8aba1592e68f5cd8848c79b73a88
+Subproject 8f6397137cb25f593a581605ed0126ade395813