The Samba-Bugzilla – Attachment 8303 Details for
Bug 9479
Support FIPS mode when building Samba
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to see if md5 actually works in Python
samba-abbra-0001-wafsamba-Make-sure-md5-is-really-work-before-using-i.patch (text/plain), 1.27 KB, created by
Alexander Bokovoy
on 2012-12-07 15:41:04 UTC
(
hide
)
Description:
Patch to see if md5 actually works in Python
Filename:
MIME Type:
Creator:
Alexander Bokovoy
Created:
2012-12-07 15:41:04 UTC
Size:
1.27 KB
patch
obsolete
>From 58133e39527999d522fd3e99dd3915192d92735f Mon Sep 17 00:00:00 2001 >From: Alexander Bokovoy <ab@samba.org> >Date: Fri, 7 Dec 2012 17:36:02 +0200 >Subject: [PATCH] wafsamba: Make sure md5 is really work before using it or > overriding the hash function > >In FIPS mode importing md5 Python module will not cause any error but calling md5.md5() >function will throw ValueError since md5 is not available. > >Make sure md5.md5() actually works and if not, fall back to use hash replacement that >we already have in wafsamba. >--- > buildtools/wafsamba/samba_utils.py | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py >index c1869df1c26a6d7cb2c7cef5cced73b229632754..cab87a4dbba2f79c2683cf14a552aaa1d472dd50 100644 >--- a/buildtools/wafsamba/samba_utils.py >+++ b/buildtools/wafsamba/samba_utils.py >@@ -388,9 +388,17 @@ def RUN_COMMAND(cmd, > # make sure we have md5. some systems don't have it > try: > from hashlib import md5 >+ try: >+ foo = md5.md5('abcd') >+ except ValueError: >+ raise > except: > try: > import md5 >+ try: >+ foo = md5.md5('abcd') >+ except ValueError: >+ raise > except: > import Constants > Constants.SIG_NIL = hash('abcd') >-- >1.8.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
asn
:
review+
Actions:
View
Attachments on
bug 9479
: 8303 |
8307
|
8312