From: Jim S. <jim...@us...> - 2005-09-12 17:47:43
|
Update of /cvsroot/firebird/vulcan/src/jrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25859/src/jrd Modified Files: UserData.cpp enc.cpp pwd.cpp Log Message: Fixed "encrypted" passwords Index: UserData.cpp =================================================================== RCS file: /cvsroot/firebird/vulcan/src/jrd/UserData.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -b -U3 -r1.2 -r1.3 --- UserData.cpp 7 Sep 2005 20:03:20 -0000 1.2 +++ UserData.cpp 12 Sep 2005 17:47:36 -0000 1.3 @@ -351,7 +351,7 @@ ENC_crypt(pw2, sizeof(pw2), pw1 + 2, PASSWORD_SALT); } else - ENC_crypt(pw2, sizeof(pw2), encryptedPassword, PASSWORD_SALT); + ENC_crypt(pw2, sizeof(pw2), (const char*) encryptedPassword + 2, PASSWORD_SALT); return pw2 + 2; Index: enc.cpp =================================================================== RCS file: /cvsroot/firebird/vulcan/src/jrd/enc.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -b -U3 -r1.2 -r1.3 --- enc.cpp 7 Sep 2005 20:03:20 -0000 1.2 +++ enc.cpp 12 Sep 2005 17:47:36 -0000 1.3 @@ -436,6 +436,7 @@ */ void ENC_crypt(TEXT* buf, size_t bufSize, const TEXT* key, const TEXT* setting) { + const TEXT *orgKey = key; fb_assert(bufSize >= RESULT_SIZE); SLONG i; Index: pwd.cpp =================================================================== RCS file: /cvsroot/firebird/vulcan/src/jrd/pwd.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -b -U3 -r1.4 -r1.5 --- pwd.cpp 7 Sep 2005 20:03:20 -0000 1.4 +++ pwd.cpp 12 Sep 2005 17:47:36 -0000 1.5 @@ -354,7 +354,7 @@ TEXT pw2[ENCRYPT_SIZE]; //strcpy(pw2, ENC_crypt(password_enc, PASSWORD_SALT)); - ENC_crypt(pw2, sizeof(pw2), password_enc, PASSWORD_SALT); + ENC_crypt(pw2, sizeof(pw2), password_enc + 2, PASSWORD_SALT); if (strncmp(pw1, pw2 + 2, 11)) ERR_post(isc_login, 0); |