~ubuntu-branches/ubuntu/utopic/postgresql-9.4/utopic-security

« back to all changes in this revision

Viewing changes to contrib/pg_upgrade/test.sh

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, CVE-2014-8161
  • Date: 2015-02-06 12:31:46 UTC
  • mfrom: (1.1.5) (7.1.2 utopic-proposed)
  • Revision ID: package-import@ubuntu.com-20150206123146-vtmf30jbkm7w16p8
Tags: 9.4.1-0ubuntu0.14.10
* New upstream security/bug fix release (LP: #1418928)
  - Fix buffer overruns in to_char() [CVE-2015-0241]
  - Fix buffer overruns in contrib/pgcrypto [CVE-2015-0243]
  - Fix possible loss of frontend/backend protocol synchronization after an
    error [CVE-2015-0244]
  - Fix information leak via constraint-violation error messages
    [CVE-2014-8161]
  - See release notes for details about other fixes:
    http://www.postgresql.org/about/news/1569/

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
unset MAKEFLAGS
18
18
unset MAKELEVEL
19
19
 
 
20
# Run a given "initdb" binary and overlay the regression testing
 
21
# authentication configuration.
 
22
standard_initdb() {
 
23
        "$1" -N
 
24
        ../../src/test/regress/pg_regress --config-auth "$PGDATA"
 
25
}
 
26
 
20
27
# Establish how the server will listen for connections
21
28
testhost=`uname -s`
22
29
 
23
30
case $testhost in
24
31
        MINGW*)
25
32
                LISTEN_ADDRESSES="localhost"
26
 
                PGHOST=""; unset PGHOST
 
33
                PGHOST=localhost
27
34
                ;;
28
35
        *)
29
36
                LISTEN_ADDRESSES=""
49
56
                        trap 'rm -rf "$PGHOST"' 0
50
57
                        trap 'exit 3' 1 2 13 15
51
58
                fi
52
 
                export PGHOST
53
59
                ;;
54
60
esac
55
61
 
56
62
POSTMASTER_OPTS="-F -c listen_addresses=$LISTEN_ADDRESSES -k \"$PGHOST\""
 
63
export PGHOST
57
64
 
58
65
temp_root=$PWD/tmp_check
59
66
 
141
148
# enable echo so the user can see what is being executed
142
149
set -x
143
150
 
144
 
$oldbindir/initdb -N
 
151
standard_initdb "$oldbindir"/initdb
145
152
$oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -o "$POSTMASTER_OPTS" -w
146
153
if "$MAKE" -C "$oldsrc" installcheck; then
147
154
        pg_dumpall -f "$temp_root"/dump1.sql || pg_dumpall1_status=$?
181
188
 
182
189
PGDATA=$BASE_PGDATA
183
190
 
184
 
initdb -N
 
191
standard_initdb 'initdb'
185
192
 
186
193
pg_upgrade $PG_UPGRADE_OPTS -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B "$bindir" -p "$PGPORT" -P "$PGPORT"
187
194