make reset-admin-pwd work with sqlserver as db backend
the pyodbc sqlserver db backend depends on being passed the cw_upassword value
as a buffer object to bind it to a binary column (which is usually done when
CW is dealing with passwords).
--- a/server/serverctl.py Tue Sep 28 12:22:17 2010 +0200
+++ b/server/serverctl.py Tue Sep 28 14:52:45 2010 +0200
@@ -501,7 +501,7 @@
passwdmsg='new password for %s' % adminlogin)
try:
cursor.execute("UPDATE cw_CWUser SET cw_upassword=%(p)s WHERE cw_login=%(l)s",
- {'p': crypt_password(passwd), 'l': adminlogin})
+ {'p': buffer(crypt_password(passwd)), 'l': adminlogin})
sconfig = Configuration(options=USER_OPTIONS)
sconfig['login'] = adminlogin
sconfig['password'] = passwd