~ubuntu-branches/ubuntu/trusty/postgresql-9.3/trusty-proposed

« back to all changes in this revision

Viewing changes to src/backend/tsearch/ts_utils.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-07-24 16:13:59 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20140724161359-uk325qfv03euxuuh
Tags: 9.3.5-0ubuntu0.14.04.1
* New upstream bug fix release: (LP: #1348176)
  - pg_upgrade: Users who upgraded to version 9.3 using pg_upgrade may have
    an issue with transaction information which causes VACUUM to eventually
    fail. These users should run the script provided in the release notes to
    determine if their installation is affected, and then take the remedy
    steps outlined there.
  - Various data integrity and other bug fixes.
  - Secure Unix-domain sockets of temporary postmasters started during make
    check.
    Any local user able to access the socket file could connect as the
    server's bootstrap superuser, then proceed to execute arbitrary code as
    the operating-system user running the test, as we previously noted in
    CVE-2014-0067. This change defends against that risk by placing the
    server's socket in a temporary, mode 0700 subdirectory of /tmp.
  - See release notes for details:
    http://www.postgresql.org/about/news/1534/
* Remove pg_regress patches to support --host=/path, obsolete with above
  upstream changes and not applicable any more.
* Drop tcl8.6 patch, applied upstream.
* Add missing logrotate test dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
/*
25
25
 * Given the base name and extension of a tsearch config file, return
26
 
 * its full path name.  The base name is assumed to be user-supplied,
27
 
 * and is checked to prevent pathname attacks.  The extension is assumed
 
26
 * its full path name.  The base name is assumed to be user-supplied,
 
27
 * and is checked to prevent pathname attacks.  The extension is assumed
28
28
 * to be safe.
29
29
 *
30
30
 * The result is a palloc'd string.
37
37
        char       *result;
38
38
 
39
39
        /*
40
 
         * We limit the basename to contain a-z, 0-9, and underscores.  This may
 
40
         * We limit the basename to contain a-z, 0-9, and underscores.  This may
41
41
         * be overly restrictive, but we don't want to allow access to anything
42
42
         * outside the tsearch_data directory, so for instance '/' *must* be
43
43
         * rejected, and on some platforms '\' and ':' are risky as well. Allowing
61
61
 
62
62
/*
63
63
 * Reads a stop-word file. Each word is run through 'wordop'
64
 
 * function, if given.  wordop may either modify the input in-place,
 
64
 * function, if given.  wordop may either modify the input in-place,
65
65
 * or palloc a new version.
66
66
 */
67
67
void