2000-07-06 17:33:45 -04:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# Makefile for src/include
|
|
|
|
|
#
|
2004-10-06 04:50:02 -04:00
|
|
|
# 'make install' installs whole contents of src/include.
|
2000-07-06 17:33:45 -04:00
|
|
|
#
|
2010-09-20 16:08:53 -04:00
|
|
|
# src/include/Makefile
|
2000-07-06 17:33:45 -04:00
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
subdir = src/include
|
|
|
|
|
top_builddir = ../..
|
2000-08-31 12:12:35 -04:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
2000-07-06 17:33:45 -04:00
|
|
|
|
|
|
|
|
|
2012-10-07 21:52:07 -04:00
|
|
|
all: pg_config.h pg_config_ext.h pg_config_os.h
|
2000-07-06 17:33:45 -04:00
|
|
|
|
|
|
|
|
|
2004-10-06 04:50:02 -04:00
|
|
|
# Subdirectories containing headers for server-side dev
|
Empty search_path in Autovacuum and non-psql/pgbench clients.
This makes the client programs behave as documented regardless of the
connect-time search_path and regardless of user-created objects. Today,
a malicious user with CREATE permission on a search_path schema can take
control of certain of these clients' queries and invoke arbitrary SQL
functions under the client identity, often a superuser. This is
exploitable in the default configuration, where all users have CREATE
privilege on schema "public".
This changes behavior of user-defined code stored in the database, like
pg_index.indexprs and pg_extension_config_dump(). If they reach code
bearing unqualified names, "does not exist" or "no schema has been
selected to create in" errors might appear. Users may fix such errors
by schema-qualifying affected names. After upgrading, consider watching
server logs for these errors.
The --table arguments of src/bin/scripts clients have been lax; for
example, "vacuumdb -Zt pg_am\;CHECKPOINT" performed a checkpoint. That
now fails, but for now, "vacuumdb -Zt 'pg_am(amname);CHECKPOINT'" still
performs a checkpoint.
Back-patch to 9.3 (all supported versions).
Reviewed by Tom Lane, though this fix strategy was not his first choice.
Reported by Arseniy Sharoglazov.
Security: CVE-2018-1058
2018-02-26 10:39:44 -05:00
|
|
|
SUBDIRS = access bootstrap catalog commands common datatype \
|
|
|
|
|
executor fe_utils foreign \
|
2013-02-26 15:27:30 -05:00
|
|
|
lib libpq mb nodes optimizer parser postmaster regex replication \
|
|
|
|
|
rewrite storage tcop snowball snowball/libstemmer tsearch \
|
|
|
|
|
tsearch/dicts utils port port/win32 port/win32_msvc \
|
|
|
|
|
port/win32_msvc/sys port/win32/arpa port/win32/netinet \
|
|
|
|
|
port/win32/sys portability
|
2000-07-06 17:33:45 -04:00
|
|
|
|
2004-10-06 04:50:02 -04:00
|
|
|
# Install all headers
|
2004-11-09 01:23:50 -05:00
|
|
|
install: all installdirs
|
2001-08-28 10:20:28 -04:00
|
|
|
# These headers are needed by the public headers of the interfaces.
|
2005-12-09 16:19:36 -05:00
|
|
|
$(INSTALL_DATA) $(srcdir)/postgres_ext.h '$(DESTDIR)$(includedir)'
|
|
|
|
|
$(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h '$(DESTDIR)$(includedir)/libpq'
|
2012-10-07 21:52:07 -04:00
|
|
|
$(INSTALL_DATA) pg_config.h '$(DESTDIR)$(includedir)'
|
|
|
|
|
$(INSTALL_DATA) pg_config_ext.h '$(DESTDIR)$(includedir)'
|
|
|
|
|
$(INSTALL_DATA) pg_config_os.h '$(DESTDIR)$(includedir)'
|
2005-12-09 16:19:36 -05:00
|
|
|
$(INSTALL_DATA) $(srcdir)/pg_config_manual.h '$(DESTDIR)$(includedir)'
|
2001-08-28 10:20:28 -04:00
|
|
|
# These headers are needed by the not-so-public headers of the interfaces.
|
2005-12-09 16:19:36 -05:00
|
|
|
$(INSTALL_DATA) $(srcdir)/c.h '$(DESTDIR)$(includedir_internal)'
|
|
|
|
|
$(INSTALL_DATA) $(srcdir)/port.h '$(DESTDIR)$(includedir_internal)'
|
|
|
|
|
$(INSTALL_DATA) $(srcdir)/postgres_fe.h '$(DESTDIR)$(includedir_internal)'
|
|
|
|
|
$(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h '$(DESTDIR)$(includedir_internal)/libpq'
|
2004-10-06 04:50:02 -04:00
|
|
|
# These headers are needed for server-side development
|
2012-10-07 21:52:07 -04:00
|
|
|
$(INSTALL_DATA) pg_config.h '$(DESTDIR)$(includedir_server)'
|
|
|
|
|
$(INSTALL_DATA) pg_config_ext.h '$(DESTDIR)$(includedir_server)'
|
|
|
|
|
$(INSTALL_DATA) pg_config_os.h '$(DESTDIR)$(includedir_server)'
|
2011-02-04 09:28:06 -05:00
|
|
|
$(INSTALL_DATA) utils/errcodes.h '$(DESTDIR)$(includedir_server)/utils'
|
2009-07-20 16:38:55 -04:00
|
|
|
$(INSTALL_DATA) utils/fmgroids.h '$(DESTDIR)$(includedir_server)/utils'
|
2005-03-25 18:22:54 -05:00
|
|
|
# We don't use INSTALL_DATA for performance reasons --- there are a lot of files
|
2005-12-09 16:19:36 -05:00
|
|
|
cp $(srcdir)/*.h '$(DESTDIR)$(includedir_server)'/ || exit; \
|
|
|
|
|
chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/*.h || exit; \
|
2001-02-09 21:31:31 -05:00
|
|
|
for dir in $(SUBDIRS); do \
|
2005-12-09 16:19:36 -05:00
|
|
|
cp $(srcdir)/$$dir/*.h '$(DESTDIR)$(includedir_server)'/$$dir/ || exit; \
|
|
|
|
|
chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$dir/*.h || exit; \
|
2001-02-09 21:31:31 -05:00
|
|
|
done
|
2011-11-10 13:52:54 -05:00
|
|
|
ifeq ($(vpath_build),yes)
|
|
|
|
|
for file in dynloader.h catalog/schemapg.h parser/gram.h utils/probes.h; do \
|
|
|
|
|
cp $$file '$(DESTDIR)$(includedir_server)'/$$file || exit; \
|
|
|
|
|
chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$file || exit; \
|
|
|
|
|
done
|
|
|
|
|
endif
|
2001-02-09 21:31:31 -05:00
|
|
|
|
2004-10-06 04:50:02 -04:00
|
|
|
installdirs:
|
2009-08-26 18:24:44 -04:00
|
|
|
$(MKDIR_P) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
|
|
|
|
|
$(MKDIR_P) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
|
2001-02-09 21:31:31 -05:00
|
|
|
|
|
|
|
|
|
2000-07-06 17:33:45 -04:00
|
|
|
uninstall:
|
2012-10-07 21:52:07 -04:00
|
|
|
rm -f $(addprefix '$(DESTDIR)$(includedir)'/, pg_config.h pg_config_ext.h pg_config_os.h pg_config_manual.h postgres_ext.h libpq/libpq-fs.h)
|
2005-12-09 16:19:36 -05:00
|
|
|
rm -f $(addprefix '$(DESTDIR)$(includedir_internal)'/, c.h port.h postgres_fe.h libpq/pqcomm.h)
|
2001-08-28 10:20:28 -04:00
|
|
|
# heuristic...
|
2005-12-09 16:19:36 -05:00
|
|
|
rm -rf $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS) *.h)
|
2001-08-28 10:20:28 -04:00
|
|
|
|
2000-07-06 17:33:45 -04:00
|
|
|
|
|
|
|
|
clean:
|
2011-02-03 22:32:49 -05:00
|
|
|
rm -f utils/fmgroids.h utils/errcodes.h parser/gram.h utils/probes.h catalog/schemapg.h
|
2000-07-06 17:33:45 -04:00
|
|
|
|
|
|
|
|
distclean maintainer-clean: clean
|
2012-10-07 21:52:07 -04:00
|
|
|
rm -f pg_config.h pg_config_ext.h pg_config_os.h dynloader.h stamp-h stamp-ext-h
|
2011-03-28 15:53:55 -04:00
|
|
|
|
|
|
|
|
maintainer-check:
|
|
|
|
|
cd catalog && ./duplicate_oids
|