diff options
author | phk <phk@FreeBSD.org> | 1998-08-14 06:26:58 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-08-14 06:26:58 +0000 |
commit | c737fc04c08a9303e2ca3ef3d0f504a08734e04e (patch) | |
tree | 319af45b21fc8ed25cea644246d50c4a493fca56 /usr.sbin/kbdmap | |
parent | e24de2520e824bf39d15058aa1f0bbd237c79892 (diff) | |
download | FreeBSD-src-c737fc04c08a9303e2ca3ef3d0f504a08734e04e.zip FreeBSD-src-c737fc04c08a9303e2ca3ef3d0f504a08734e04e.tar.gz |
/usr/sbin/spkrtest and /usr/sbin/vidfont (aka kbdmap) use very
predictable /tmp files (static prefix + process number) which are
overwritten blindly, and follow links.
These workarounds change it from a process number to a very random
(9999 with tons of decimal places) number.
PR: 7565
Submitted by: Thomas Stromberg <tstrombe@rtci.com>
Diffstat (limited to 'usr.sbin/kbdmap')
-rw-r--r-- | usr.sbin/kbdmap/kbdmap.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/kbdmap/kbdmap.pl b/usr.sbin/kbdmap/kbdmap.pl index 66180da..9d46c1f 100644 --- a/usr.sbin/kbdmap/kbdmap.pl +++ b/usr.sbin/kbdmap/kbdmap.pl @@ -26,7 +26,7 @@ # # kbdmap/vidfont - front end for syscons # -# $Id: kbdmap.pl,v 1.6 1997/02/22 16:06:02 peter Exp $ +# $Id: kbdmap.pl,v 1.7 1997/05/19 07:30:45 jkh Exp $ # simple test if syscons works @@ -229,8 +229,9 @@ sub menu_read { } sub dialog { + srand; local(@argv) = @_; - local($tmp) = "/tmp/_kbd_lang$$"; + local($tmp) = "/tmp/_kbd_lang" . rand(9999); $dialog = "/usr/bin/dialog \\ --clear \\ |