logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 8e5f0c715e833e0ec45da5616ffb3d041f7a4ef3
parent 36f4ec81cd0331af1819a333ed1bcee9455258b0
Author: Michael Forney <mforney@mforney.org>
Date:   Fri, 14 Aug 2020 00:20:16 -0700

pounce: Update to 1.4p1

Diffstat:

M.gitmodules1+
Apkg/pounce/patch/0001-Switch-back-to-arc4random_buf.patch57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -249,6 +249,7 @@ [submodule "pkg/pounce/src"] path = pkg/pounce/src url = https://git.causal.agency/pounce + ignore = all [submodule "pkg/qbe/src"] path = pkg/qbe/src url = git://c9x.me/qbe.git diff --git a/pkg/pounce/patch/0001-Switch-back-to-arc4random_buf.patch 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 +