Project

General

Profile

Bug #6962

kclient performs incorrect check for /dev/random

Added by Dan McDonald almost 4 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2016-05-10
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

Description

The current kclient.sh check uses the "-h" test for /dev/random, which only works in the global zone. Non-global zones have /dev/random point right to the device node. Fix should be straightforward:

diff --git a/usr/src/cmd/krb5/kadmin/kclient/kclient.sh b/usr/src/cmd/krb5/kadmin/kclient/kclient.sh
index 6d619e6..575f0a8 100644
--- a/usr/src/cmd/krb5/kadmin/kclient/kclient.sh
+++ b/usr/src/cmd/krb5/kadmin/kclient/kclient.sh
@@ -1386,7 +1386,7 @@ EOF
        i=0

       # first check to see if /dev/random exists to generate a new password
-       if [[ ! -h /dev/random ]]; then
+       if [[ ! -e /dev/random ]]; then
               printf "$(gettext "/dev/random does not exist").\n" >&2
               error_message
       fi

History

#1

Updated by Electric Monk almost 3 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 3bf53144544c5875536acef3d1214ec06c34adad

commit  3bf53144544c5875536acef3d1214ec06c34adad
Author: Dan McDonald <danmcd@omniti.com>
Date:   2017-04-14T15:09:37.000Z

    6962 kclient performs incorrect check for /dev/random
    Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
    Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
    Reviewed by: Jens Bauernfeind <bauernfeind@ipk-gatersleben.de>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF