# HG changeset patch
# User Pascal Volk <neverseen@users.sourceforge.net>
# Date 1273096231 0
# Node ID 142f188f75524cc20eba020e73cef17a72bc3951
# Parent  01cb71c1ae33e60d02649f0cf12220b3aacbaefd
VMM/password: generate all crypt() salts w/o trailing $ sign

diff -r 01cb71c1ae33 -r 142f188f7552 VirtualMailManager/password.py
--- a/VirtualMailManager/password.py	Tue May 04 22:26:04 2010 +0000
+++ b/VirtualMailManager/password.py	Wed May 05 21:50:31 2010 +0000
@@ -140,7 +140,7 @@
         rounds = 4
     elif rounds > 31:
         rounds = 31
-    return '$2a$%02d$%s$' % (rounds, _get_salt(22))
+    return '$2a$%02d$%s' % (rounds, _get_salt(22))
 
 
 def _get_crypt_shaxxx_salt(crypt_id):
@@ -157,7 +157,7 @@
         rounds = 1000
     elif rounds > 999999999:
         rounds = 999999999
-    return '$%d$rounds=%d$%s$' % (crypt_id, rounds, _get_salt(16))
+    return '$%d$rounds=%d$%s' % (crypt_id, rounds, _get_salt(16))
 
 
 def _crypt_hash(password, scheme, encoding):
@@ -172,7 +172,7 @@
         else:
             salt = _get_salt(2)
     else:
-        salt = '$1$%s$' % _get_salt(8)
+        salt = '$1$%s' % _get_salt(8)
     encrypted = crypt(password, salt)
     if encoding:
         if encoding == 'HEX':