summary refs log tree commit diff
path: root/bounce.c
diff options
context:
space:
mode:
Diffstat (limited to 'bounce.c')
-rw-r--r--bounce.c4
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);
 }