Bogus-looking SSL code in postmaster wait loop

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Bogus-looking SSL code in postmaster wait loop
Дата
Msg-id 26096.972425041@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
The postmaster contains this code just before it waits for input:

#ifdef USE_SSL       for (curr = DLGetHead(PortList); curr; curr = DLGetSucc(curr))       {           if (((Port *)
DLE_VAL(curr))->ssl&&               SSL_pending(((Port *) DLE_VAL(curr))->ssl) > 0)           {               no_select
=true;               break;           }       }       if (no_select)           FD_ZERO(&rmask);    /* So we don't
accept()anything below */
 
#endif

I am not sure exactly what SSL_pending() is defined to mean, but as
near as I can tell, whenever SSL_pending() returns true, the postmaster
will completely ignore every other input-ready condition.  This spells
"denial of service" from where I sit: a nonresponsive SSL client will
cause the postmaster to freeze up for all other clients.

Can anyone who knows about SSL defend or even explain the above code?
I am strongly inclined to just dike it out.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: relation ### modified while in use
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: length coerce for bpchar is broken since 7.0