From 027a73a903af306449710ce12bc09e0e3550c6c9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 4 Aug 2016 10:16:59 -0500 Subject: Make xopen() skip stdin/stdout/stderr, add xopen_stdio() if you want stdout, add xopenro() that takes one argument and understands "-" means stdin, and switch over lots of users. --- lib/password.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/password.c') diff --git a/lib/password.c b/lib/password.c index bf13c441..eab2d669 100644 --- a/lib/password.c +++ b/lib/password.c @@ -24,7 +24,7 @@ int get_salt(char *salt, char *algo) if (al[i].id) s += sprintf(s, "$%c$", '0'+al[i].id); // Read appropriate number of random bytes for salt - i = xopen("/dev/urandom", O_RDONLY); + i = xopenro("/dev/urandom"); xreadall(i, libbuf, ((len*6)+7)/8); close(i); -- cgit v1.2.3