diff options
| author | CoprDistGit <infra@openeuler.org> | 2024-08-05 01:54:09 +0000 | 
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2024-08-05 01:54:09 +0000 | 
| commit | 1654da5838d87e37b18f17c20723110adff0edd9 (patch) | |
| tree | d338e64c26d86c31821227b5e62daf1144fdd1f1 /expect-5.32.2-random.patch | |
| parent | 7ff7f4d65c761776cfc1232d691c16250a649d5f (diff) | |
automatic import of expectopeneuler24.03_LTS
Diffstat (limited to 'expect-5.32.2-random.patch')
| -rw-r--r-- | expect-5.32.2-random.patch | 19 | 
1 files changed, 19 insertions, 0 deletions
| diff --git a/expect-5.32.2-random.patch b/expect-5.32.2-random.patch new file mode 100644 index 0000000..0cac294 --- /dev/null +++ b/expect-5.32.2-random.patch @@ -0,0 +1,19 @@ +diff -up expect-5.44.1.15/example/mkpasswd.orig expect-5.44.1.15/example/mkpasswd +--- expect-5.44.1.15/example/mkpasswd.orig	2010-03-08 16:01:05.518378075 +0100 ++++ expect-5.44.1.15/example/mkpasswd	2010-03-08 16:01:27.408388162 +0100 +@@ -92,7 +92,14 @@ proc insert {pvar char} { + } +  + proc rand {m} { +-    expr {int($m*rand())} ++    set device /dev/urandom            ;# /dev/random can block ++    set fileId [open $device r] ++    binary scan [read $fileId 4] i1 number ++    set clipped [expr $number % $m] ++#    puts "number is $number" ++#    puts "clipped is $clipped" ++    close $fileId ++    return $clipped + } +  + # choose left or right starting hand | 
