aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-01-25 13:57:08 +0000
committerRon Yorston <rmy@pobox.com>2021-01-25 14:15:02 +0000
commiteb0c2bbbaf0722103124a589e3dfe952c2664cbb (patch)
tree3ae3ec89bd7a6041ed5aed1d537f6b2fb3586ed7 /networking
parent6422b0ef38d0835c86b40e6e642f18cdfb933e85 (diff)
downloadbusybox-w32-eb0c2bbbaf0722103124a589e3dfe952c2664cbb.tar.gz
busybox-w32-eb0c2bbbaf0722103124a589e3dfe952c2664cbb.tar.bz2
busybox-w32-eb0c2bbbaf0722103124a589e3dfe952c2664cbb.zip
tls: avoid unnecessary changes to POSIX build, part 2
On reflection, the previous commit may have been ill-advised. There are many calls to open_read_close() and most shouldn't be able to access special devices. (Though in practice only a few are enabled in busybox-w32.) Nonetheless, I've implemented a new mechanism which uses the macro MINGW_SPECIAL() to mark calls to functions that are allowed to access special devices. An unrelated change is to avoid compiling fputs_stdout() in coreutils/printf.c for the POSIX build.
Diffstat (limited to 'networking')
-rw-r--r--networking/tls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/tls.c b/networking/tls.c
index e34acd69f..b05afe1c9 100644
--- a/networking/tls.c
+++ b/networking/tls.c
@@ -349,7 +349,7 @@ static void dump_tls_record(const void *vp, int len)
349 349
350void FAST_FUNC tls_get_random(void *buf, unsigned len) 350void FAST_FUNC tls_get_random(void *buf, unsigned len)
351{ 351{
352 if (len != open_read_close("/dev/urandom", buf, len)) 352 if (len != MINGW_SPECIAL(open_read_close)("/dev/urandom", buf, len))
353 xfunc_die(); 353 xfunc_die();
354} 354}
355 355