From: | Neil Conway <neilc(at)samurai(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: minor auth code cleanup |
Date: | 2002-08-27 14:37:43 |
Message-ID: | 87r8gk9xl4.fsf@mailbox.samurai.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Neil Conway <neilc(at)samurai(dot)com> writes:
>
> > ! /*
> > ! * We don't actually use the startup packet length the frontend sent
> > ! * us; however, it's a reasonable sanity check to ensure that we
> > ! * read as much data as we expected to.
> > ! *
> > ! * The actual startup packet size is the length of the buffer, plus
> > ! * the size part of the message (4 bytes), plus a terminator.
> > ! */
> > ! Assert(len == (buf.len + 4 + 1));
>
> This takes a non-problem and converts it into a problem, no?
>
> There may be existing clients out there that miscompute the password
> packet length. Right now that does no harm. With an Assert in place
> in the backend, it will cause a database system restart.
Good point. However, I still think a sanity check would be appropriate
here. How about an elog(WARNING) ?
> On the subject of the timeout calculations, this code still looks
> utterly bizarre:
[...]
Yes, I agree. I tried to improve things a little bit, but there's
still some code that I was scratching my head over. If you'd like to
take a shot at rewriting it, go ahead; otherwise I might do it
eventually...
Cheers,
Neil
--
Neil Conway <neilc(at)samurai(dot)com> || PGP Key ID: DB3C29FC
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-08-27 14:52:27 | Re: minor auth code cleanup |
Previous Message | Bruce Momjian | 2002-08-27 14:23:02 | Re: cygwin rename instead of link (7.2.2) |