2c2240c2f4
Vulnerabilities in PostgreSQL SET ROLE/SET SESSION AUTHORIZATION By issuing SET ROLE with a specially crafted argument, it is possible for any logged-in database user to acquire the privileges of any other database user, including superusers. Database superuser status allows access to the machine's filesystem and hence might be used to mount remote attacks against the rest of the server's operating system. This error exists in PostgreSQL releases 8.1.0 - 8.1.2 and is fixed in 8.1.3. The same underlying bug exists in SET SESSION AUTHORIZATION in all releases back to 7.3. This variant cannot be exploited for privilege escalation, because one must already be superuser to use SET SESSION AUTHORIZATION. However, if the server has been compiled with Asserts enabled (which is not the default), then it is possible to trigger an Assert failure before the privilege check is reached. This would cause a momentary denial of service to other database users. This is repaired in PostgreSQL releases 8.1.3, 8.0.7, 7.4.12, and 7.3.14.
123 lines
3.4 KiB
Makefile
123 lines
3.4 KiB
Makefile
# $OpenBSD: Makefile,v 1.85 2006/02/14 18:59:36 mbalmer Exp $
|
|
|
|
COMMENT= "PostgreSQL RDBMS (client)"
|
|
COMMENT-server= "PostgreSQL RDBMS (server)"
|
|
COMMENT-docs= "PostgreSQL RDBMS documentation"
|
|
|
|
VERSION= 8.1.3
|
|
DISTNAME= postgresql-${VERSION}
|
|
FULLPKGNAME= postgresql-client-${VERSION}
|
|
PKGNAME-server= postgresql-server-${VERSION}
|
|
PKGNAME-docs= postgresql-docs-${VERSION}
|
|
|
|
CATEGORIES= databases
|
|
SHARED_LIBS= ecpg 5.1 \
|
|
ecpg_compat 2.1 \
|
|
pgtypes 2.1 \
|
|
pq 4.1
|
|
|
|
HOMEPAGE= http://www.postgresql.org/
|
|
|
|
MAINTAINER= Marc Balmer <mbalmer@openbsd.org>
|
|
|
|
# BSD
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
WANTLIB= c com_err crypto m readline ssl termcap util z
|
|
|
|
MASTER_SITES= ftp://ftp3.us.postgresql.org/pub/postgresql/source/v${VERSION}/ \
|
|
ftp://ftp.postgresql.org/pub/source/v${VERSION}/
|
|
|
|
MULTI_PACKAGES= -server -docs
|
|
SUBPACKAGE?=
|
|
|
|
# The -client SUBPACKAGE should build and run fine on static arches,
|
|
# but the server requires loadable library support. Until we figure
|
|
# out the correct incantation to not build the server on those systems,
|
|
# simply don't build for them, yet.
|
|
NOT_FOR_ARCHS= ${NO_SHARED_ARCHS}
|
|
|
|
MAKE_FILE= GNUmakefile
|
|
|
|
SUBST_VARS= VERSION
|
|
|
|
USE_GMAKE= Yes
|
|
CONFIGURE_STYLE=gnu
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
CONFIGURE_ARGS= --disable-rpath --with-openssl=/usr \
|
|
--with-perl \
|
|
--enable-integer-datetimes \
|
|
--includedir="${PREFIX}/include/postgresql" \
|
|
--datadir="${PREFIX}/share/postgresql" \
|
|
--with-docdir="${PREFIX}/share/doc/postgresql" \
|
|
--with-openssl
|
|
|
|
.if ${KERBEROS5} == "yes"
|
|
CONFIGURE_ARGS+=--with-krb5 --with-includes=/usr/include/kerberosV
|
|
.endif
|
|
|
|
# There is no spinlock support for hppa yet. Until we have access to
|
|
# a system to get this working, disable them for now. There is
|
|
# (apparently) a serious performance hit doing this.
|
|
|
|
.if ${MACHINE_ARCH} == "hppa"
|
|
CONFIGURE_ARGS+=--disable-spinlocks
|
|
.endif
|
|
|
|
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/config
|
|
|
|
INSTALL_TARGET= install
|
|
|
|
.if !defined(PACKAGING) || ${SUBPACKAGE} == "-server"
|
|
WANTLIB+= perl
|
|
.endif
|
|
|
|
.if defined(PACKAGING)
|
|
. if ${SUBPACKAGE} == "-server"
|
|
LIB_DEPENDS= pq.4:postgresql-client-${VERSION}:databases/postgresql
|
|
. elif ${SUBPACKAGE} == "-docs"
|
|
WANTLIB=
|
|
PKG_ARCH= *
|
|
. endif
|
|
.endif
|
|
|
|
MAKE_ENV= LIBpq_MAJOR=${LIBpq_VERSION:R} \
|
|
LIBpq_MINOR=${LIBpq_VERSION:E} \
|
|
LIBecpg_MAJOR=${LIBecpg_VERSION:R} \
|
|
LIBecpg_MINOR=${LIBecpg_VERSION:E} \
|
|
LIBecpg_compat_MAJOR=${LIBecpg_compat_VERSION:R} \
|
|
LIBecpg_compat_MINOR=${LIBecpg_compat_VERSION:E} \
|
|
LIBpgtypes_MAJOR=${LIBpgtypes_VERSION:R} \
|
|
LIBpgtypes_MINOR=${LIBpgtypes_VERSION:E}
|
|
|
|
|
|
# Regression tests must be done manually and not as root. Successful
|
|
# runs have been achieved on the i386 using the following:
|
|
#
|
|
# $ ulimit -p 128
|
|
# $ ulimit -n 1024
|
|
# $ make regress NO_REGRESS=No
|
|
#
|
|
# Note, you may also need to change a variety of SYSV IPC parameters.
|
|
# See files/README.OpenBSD for more details
|
|
NO_REGRESS= Yes
|
|
|
|
DOCS= ${WRKSRC}/COPYRIGHT ${WRKSRC}/HISTORY \
|
|
${WRKSRC}/INSTALL ${WRKSRC}/README \
|
|
${WRKSRC}/doc/README.mb.big5 ${WRKSRC}/doc/README.mb.jp \
|
|
${WRKSRC}/doc/FAQ ${WRKSRC}/doc/FAQ_DEV ${WRKSRC}/doc/TODO
|
|
|
|
post-install:
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/postgresql
|
|
${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/postgresql
|
|
@sed -e s#!!PREFIX!!#${TRUEPREFIX}#g ${FILESDIR}/README.OpenBSD > \
|
|
${WRKBUILD}/README.OpenBSD
|
|
${INSTALL_DATA} ${WRKBUILD}/README.OpenBSD \
|
|
${PREFIX}/share/doc/postgresql
|
|
|
|
.include <bsd.port.mk>
|