aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
authorbwarsaw <>2004-12-31 00:02:57 +0000
committerbwarsaw <>2004-12-31 00:02:57 +0000
commit3ffb3db7b629ea2dc84e0fcbef9f2b0725714bee (patch)
treea2bbb97a75239e12dfd314a75814b80e400e7bbd /Mailman/Utils.py
parentf6b424d07ea8c3e2997e3e04c8ddaabdc66a6540 (diff)
downloadmailman2-3ffb3db7b629ea2dc84e0fcbef9f2b0725714bee.tar.gz
mailman2-3ffb3db7b629ea2dc84e0fcbef9f2b0725714bee.tar.xz
mailman2-3ffb3db7b629ea2dc84e0fcbef9f2b0725714bee.zip
Secure_MakeRandomPassword(): Log an error when secure passwords were requested
but urandom is not available.
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index a6e07e10..18b1c468 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -325,6 +325,9 @@ def Secure_MakeRandomPassword(length):
# We have no available source of cryptographically
# secure random characters. Log an error and fallback
# to the user friendly passwords.
+ from Mailman.Logging.Syslog import syslog
+ syslog('error',
+ 'urandom not available, passwords not secure')
return UserFriendly_MakeRandomPassword(length)
newbytes = os.read(fd, length - bytesread)
bytes.append(newbytes)