[sysadmin-bin] Hashlib's attr sha isn't available on RHEL6 since it ships a newer version of python, change it to h
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Hashlib's attr sha isn't available on RHEL6 since it ships a newer version of python, change it to h
- Date: Mon, 18 Mar 2013 19:48:39 +0000 (UTC)
commit dd6c473db396f488ceb9194477d9575b1db03780
Author: Andrea Veri <av gnome org>
Date: Mon Mar 18 20:47:46 2013 +0100
Hashlib's attr sha isn't available on RHEL6 since it ships a newer version of python, change it to
hashlib.sha1.
handle-ldap-modules | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/handle-ldap-modules b/handle-ldap-modules
index e5d7474..05184fb 100755
--- a/handle-ldap-modules
+++ b/handle-ldap-modules
@@ -94,7 +94,7 @@ def gen_passwd(length=8, chars=string.letters + string.digits):
def hash_ssha(password):
salt = ''.join([chr(randrange(0,255)) for i in range(4)])
- ctx = hashlib.sha(password + salt)
+ ctx = hashlib.sha1(password + salt)
hash = "{SSHA}" + b64encode(ctx.digest() + salt)
return hash
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]