Add 4-byte MD5 salt.
authorBruce Momjian <bruce@momjian.us>
Fri, 17 Aug 2001 02:59:20 +0000 (02:59 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 17 Aug 2001 02:59:20 +0000 (02:59 +0000)
connection.c

index 42196df9eedd2e005edc350f51b15ba32643f388..8c9719745f3988fcc9d9dbcf457e1af6fdc23870 100644 (file)
@@ -507,7 +507,7 @@ CC_connect(ConnectionClass *self, char do_password)
    int         areq = -1;
    int         beresp;
    char        msgbuffer[ERROR_MSG_LENGTH];
-   char        salt[2];
+   char        salt[5];
    static char *func = "CC_connect";
 
    mylog("%s: entering...\n", func);
@@ -677,7 +677,9 @@ CC_connect(ConnectionClass *self, char do_password)
                        mylog("auth got 'R'\n");
 
                        areq = SOCK_get_int(sock, 4);
-                       if (areq == AUTH_REQ_CRYPT || areq == AUTH_REQ_MD5)
+                       if (areq == AUTH_REQ_MD5)
+                           SOCK_get_n_char(sock, salt, 4);
+                       if (areq == AUTH_REQ_CRYPT)
                            SOCK_get_n_char(sock, salt, 2);
 
                        mylog("areq = %d\n", areq);