diff options
author | June McEnroe <june@causal.agency> | 2021-09-02 18:11:51 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-09-02 18:12:17 -0400 |
commit | 404807039d3636a97a0337880c1339db6c8b6d1b (patch) | |
tree | 6334e6e06ea7528547c00037805ec3ca6ef612e6 | |
parent | OpenBSD: pledge(2) printCert code path separately (diff) | |
download | pounce-404807039d3636a97a0337880c1339db6c8b6d1b.tar.gz pounce-404807039d3636a97a0337880c1339db6c8b6d1b.zip |
OpenBSD: pledge(2) the hashPass code path
Diffstat (limited to '')
-rw-r--r-- | bounce.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bounce.c b/bounce.c index 2fe6589..d8e9b87 100644 --- a/bounce.c +++ b/bounce.c @@ -577,9 +577,11 @@ int main(int argc, char *argv[]) { #ifdef __OpenBSD__ static void hashPass(void) { + int error = pledge("stdio tty", NULL); + if (error) err(EX_OSERR, "pledge"); char hash[_PASSWORD_LEN]; char *pass = getpass("Password: "); - int error = crypt_newhash(pass, "bcrypt,a", hash, sizeof(hash)); + error = crypt_newhash(pass, "bcrypt,a", hash, sizeof(hash)); if (error) err(EX_OSERR, "crypt_newhash"); printf("%s\n", hash); } |