Re: openbsd 3.2, postgresql 7.3beta3 and openssl 'e_os.h' include file

Lists: pgsql-hackerspgsql-ports
From: "Peter Galbavy" <peter(dot)galbavy(at)knowtion(dot)net>
To: <pgsql-ports(at)postgresql(dot)org>, <ports(at)openbsd(dot)org>
Subject: openbsd 3.2, postgresql 7.3beta3 and openssl 'e_os.h' include file
Date: 2002-11-05 08:13:11
Message-ID: 002001c284a3$2edcc070$29bd10ac@walrus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-ports

[To BOTH postgresql and openbsd ports lists... please reply as appropriate.]

I finally got around to trying to build 7.3beta3 on an fresh OpenBSD
3.2/i386 box, without all the historical lint that gets collected up.
OpenSSL 0.9.x is including in the base release.

The includsion of <openssl/e_os.h> in src/backend/libpq/be-secure.c fails.
Removing this include results in a compile, but a missing reference to
'get_last_socket_error()' in linking. I cannot find that in any openssl
include file :(

I know *nothing* about using the OpenSSL libraries, and I am off away from
the 'net for a week from tonight. :( Sorry.

I will include any patches in the OpenBSD postgresql port that I am working
on, but this may affect other systems that (perhaps) use the newer OpenSSL
libraries ?

Any ideas ?
--
Peter


From: "Peter Galbavy" <peter(dot)galbavy(at)knowtion(dot)net>
To: <pgsql-ports(at)postgresql(dot)org>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: openbsd 3.2, postgresql 7.3beta3 and openssl 'e_os.h' include file
Date: 2002-11-05 13:16:49
Message-ID: 005801c284cd$c742ef90$29bd10ac@walrus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-ports

According to the feedback I have had, e_os.h is no longer a public interface
header file in OpenSSL. 'get_last_socket_error' is a macro that seems to
expand to errno.

Can I suggest someone with better understanding of the postgresql sources,
and ssl support, please pick this up - maybe in time for the 7.3 release ?

rgds,
--
Peter

----- Original Message -----
From: "Peter Galbavy" <peter(dot)galbavy(at)knowtion(dot)net>
To: <pgsql-ports(at)postgresql(dot)org>; <ports(at)openbsd(dot)org>
Sent: Tuesday, November 05, 2002 8:13 AM
Subject: openbsd 3.2, postgresql 7.3beta3 and openssl 'e_os.h' include file

> [To BOTH postgresql and openbsd ports lists... please reply as
appropriate.]
>
> I finally got around to trying to build 7.3beta3 on an fresh OpenBSD
> 3.2/i386 box, without all the historical lint that gets collected up.
> OpenSSL 0.9.x is including in the base release.
>
> The includsion of <openssl/e_os.h> in src/backend/libpq/be-secure.c fails.
> Removing this include results in a compile, but a missing reference to
> 'get_last_socket_error()' in linking. I cannot find that in any openssl
> include file :(
>
> I know *nothing* about using the OpenSSL libraries, and I am off away from
> the 'net for a week from tonight. :( Sorry.
>
> I will include any patches in the OpenBSD postgresql port that I am
working
> on, but this may affect other systems that (perhaps) use the newer OpenSSL
> libraries ?
>
> Any ideas ?
> --
> Peter
>
>


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Galbavy <peter(dot)galbavy(at)knowtion(dot)net>
Cc: pgsql-ports(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: openbsd 3.2, postgresql 7.3beta3 and openssl 'e_os.h' include
Date: 2002-11-05 20:41:07
Message-ID: 200211052041.gA5Kf7b08549@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-ports

Peter Galbavy wrote:
> According to the feedback I have had, e_os.h is no longer a public interface
> header file in OpenSSL. 'get_last_socket_error' is a macro that seems to
> expand to errno.
>
> Can I suggest someone with better understanding of the postgresql sources,
> and ssl support, please pick this up - maybe in time for the 7.3 release ?

OK, I am using:

#$ openssl
OpenSSL> version
OpenSSL 0.9.6e 30 Jul 2002

and ssl compiles fine here. What version are you using, exactly.

Maybe OpenBSD considered e_os.h to be a security risk. ;-)

I don't think this will make 7.3 unless we can find more information. I
am hesitant to make any changes that may break openssl on other
platforms. If we can find a solution, it may be in 7.3.1.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Galbavy <peter(dot)galbavy(at)knowtion(dot)net>, pgsql-ports(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] openbsd 3.2, postgresql 7.3beta3 and openssl 'e_os.h' include
Date: 2002-11-06 00:36:20
Message-ID: 8720.1036542980@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-ports

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Peter Galbavy wrote:
>> According to the feedback I have had, e_os.h is no longer a public interface
>> header file in OpenSSL. 'get_last_socket_error' is a macro that seems to
>> expand to errno.

> OK, I am using:
> #$ openssl
> OpenSSL> version
> OpenSSL 0.9.6e 30 Jul 2002

> and ssl compiles fine here. What version are you using, exactly.

I have OpenSSL 0.9.6g here (which is still the current release according
to www.openssl.org). openssl/e_os.h is certainly still there ... but it
does contain the comment

/* <openssl/e_os2.h> contains what we can justify to make visible
* to the outside; this file e_os.h is not part of the exported
* interface. */

which may have prompted the OpenBSD porter to not include it?

Anyway, get_last_socket_error() seems exactly equivalent to our macro
SOCK_ERRNO in libpq/libpq-int.h. AFAICT, the uses of it in our
code are these:

/home/postgres/pgsql/src/backend/libpq/be-secure.c:
errno = get_last_socket_error();
/home/postgres/pgsql/src/backend/libpq/be-secure.c:
errno = get_last_socket_error();
/home/postgres/pgsql/src/interfaces/libpq/fe-secure.c:
SOCK_ERRNO = get_last_socket_error();
/home/postgres/pgsql/src/interfaces/libpq/fe-secure.c:
SOCK_ERRNO = get_last_socket_error();

and I think every one of these is bogus and should be removed.
At best they're no-ops.

If that is the only use of e_os.h stuff then we can stop including
the file ...

regards, tom lane


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Peter Galbavy <peter(dot)galbavy(at)knowtion(dot)net>, pgsql-ports(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] openbsd 3.2, postgresql 7.3beta3 and openssl 'e_os.h' include
Date: 2002-11-07 18:49:40
Message-ID: 28017.1036694980@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-ports

I said:
> Anyway, get_last_socket_error() seems exactly equivalent to our macro
> SOCK_ERRNO in libpq/libpq-int.h. AFAICT, the uses of it in our
> code are these:

> /home/postgres/pgsql/src/backend/libpq/be-secure.c:
> errno = get_last_socket_error();
> /home/postgres/pgsql/src/backend/libpq/be-secure.c:
> errno = get_last_socket_error();
> /home/postgres/pgsql/src/interfaces/libpq/fe-secure.c:
> SOCK_ERRNO = get_last_socket_error();
> /home/postgres/pgsql/src/interfaces/libpq/fe-secure.c:
> SOCK_ERRNO = get_last_socket_error();

> and I think every one of these is bogus and should be removed.
> At best they're no-ops.

> If that is the only use of e_os.h stuff then we can stop including
> the file ...

These were indeed the only uses of e_os.h symbols. I have removed them
and the #includes.

regards, tom lane