Commit df480554 authored by Nicolas Delaby's avatar Nicolas Delaby

Wrapp smbpasswd lib to authorised hashing passwords for samba format

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25965 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b75609bb
...@@ -2763,6 +2763,19 @@ class sha(GenericSum): ...@@ -2763,6 +2763,19 @@ class sha(GenericSum):
allow_class(sha) allow_class(sha)
try:
import smbpasswd
class SambaPassword:
def __init__(self):
self.sum = smbpasswd
def hash(self, value):
return smbpasswd.hash(value)
except ImportError:
class SambaPassword:
pass
allow_class(SambaPassword)
##################################################### #####################################################
# Security # Security
##################################################### #####################################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment