/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>
This commit is contained in:
parent
885dc3a91a
commit
c7fb30fbe4
@ -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 \\
|
||||
|
@ -32,7 +32,7 @@
|
||||
#
|
||||
# NOTE for iso-* (latin1) fonts: use TERM=cons25-iso8859-1
|
||||
#
|
||||
# $Id$
|
||||
# $Id: spkrtest.pl,v 1.5 1997/02/22 16:13:37 peter Exp $
|
||||
|
||||
$title = qq{
|
||||
reveille -- Reveille
|
||||
@ -93,7 +93,8 @@ foreach (sort keys %title) {
|
||||
push(@checklist, ($_, $title{$_}, 'OFF'));
|
||||
}
|
||||
|
||||
$tmp = ($ENV{'TMP'} || "/tmp") . "/_spkrtest$$";
|
||||
srand;
|
||||
$tmp = ($ENV{'TMP'} || "/tmp") . "/_spkrtest" . rand(9999);
|
||||
|
||||
if (!open(SPEAKER, "> $speaker")) {
|
||||
warn "You have no write access to $speaker or the speaker device is not " .
|
||||
|
Loading…
Reference in New Issue
Block a user