postmaster dead on startup from unportable SSL patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: postmaster dead on startup from unportable SSL patch
Date: 1999-09-30 03:04:28
Message-ID: 12430.938660668@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Someone had the bright idea that the postmaster's -i switch could
be redefined as
-i same as it ever was
-is accept only SSL connections

Unfortunately, implementing that requires a getopt() that understands
the GNU double-colon extension ("i::"). HPUX's getopt, which claims
to be fully conformant to POSIX.2 and about six other standards,
doesn't grok it. Net result: postmaster is quitting on startup with
a "usage" message for me. Doubtless it will also fail on most other
non-GNU-libc platforms.

Unless we want to get into the business of supplying a substitute
optarg() library routine, we're going to have to pick a more portable
switch syntax for SSL. (I might also point out that "-is" used to
have a quite different interpretation, ie "-i -s", which could trip
up someone somewhere.)

I can see two reasonable choices: (a) pick a currently-unused
switch letter that you specify *in addition to* -i, if you want
only secure connections; (b) pick a currently-unused switch letter
that you specify *instead of* -i, if you want only secure connections.

I'd lean towards (a) except that both of the obvious choices, -s and -S,
are already taken. If we go with (b), -I is available and perhaps not
a totally off-the-wall choice, but I can't say I really like it.

Comments? Ideas? Is it time to give up on getopt and go to multiletter
switch names? (Of course that would break a lot of people's startup
scripts... but we may someday be forced into it... maybe it's better
to bite the bullet now.)

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 1999-09-30 03:52:23 Re: [HACKERS] shared memory 651, freebsd 2.2.7
Previous Message Jan Wieck 1999-09-30 01:16:22 Re: [HACKERS] shared memory 651, freebsd 2.2.7