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

« back to all changes in this revision

Viewing changes to src/include/libpq/libpq-be.h

  • 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:
93
93
#endif
94
94
 
95
95
/*
96
 
 * This is used by the postmaster in its communication with frontends.  It
 
96
 * This is used by the postmaster in its communication with frontends.  It
97
97
 * contains all state information needed during this communication before the
98
 
 * backend is run.      The Port structure is kept in malloc'd memory and is
99
 
 * still available when a backend is running (see MyProcPort).  The data
 
98
 * backend is run.  The Port structure is kept in malloc'd memory and is
 
99
 * still available when a backend is running (see MyProcPort).  The data
100
100
 * it points to must also be malloc'd, or else palloc'd in TopMemoryContext,
101
101
 * so that it survives into PostgresMain execution!
 
102
 *
 
103
 * remote_hostname is set if we did a successful reverse lookup of the
 
104
 * client's IP address during connection setup.
 
105
 * remote_hostname_resolv tracks the state of hostname verification:
 
106
 *      +1 = remote_hostname is known to resolve to client's IP address
 
107
 *      -1 = remote_hostname is known NOT to resolve to client's IP address
 
108
 *       0 = we have not done the forward DNS lookup yet
 
109
 *      -2 = there was an error in name resolution
 
110
 * If reverse lookup of the client IP address fails, remote_hostname will be
 
111
 * left NULL while remote_hostname_resolv is set to -2.  If reverse lookup
 
112
 * succeeds but forward lookup fails, remote_hostname_resolv is also set to -2
 
113
 * (the case is distinguishable because remote_hostname isn't NULL).  In
 
114
 * either of the -2 cases, remote_hostname_errcode saves the lookup return
 
115
 * code for possible later use with gai_strerror.
102
116
 */
103
117
 
104
118
typedef struct Port
111
125
        char       *remote_host;        /* name (or ip addr) of remote host */
112
126
        char       *remote_hostname;/* name (not ip addr) of remote host, if
113
127
                                                                 * available */
114
 
        int                     remote_hostname_resolv; /* +1 = remote_hostname is known to
115
 
                                                                                 * resolve to client's IP address; -1
116
 
                                                                                 * = remote_hostname is known NOT to
117
 
                                                                                 * resolve to client's IP address; 0 =
118
 
                                                                                 * we have not done the forward DNS
119
 
                                                                                 * lookup yet */
 
128
        int                     remote_hostname_resolv; /* see above */
120
129
        char       *remote_port;        /* text rep of remote port */
121
130
        CAC_state       canAcceptConnections;   /* postmaster connection status */
122
131
 
123
132
        /*
124
133
         * Information that needs to be saved from the startup packet and passed
125
 
         * into backend execution.      "char *" fields are NULL if not set.
 
134
         * into backend execution.  "char *" fields are NULL if not set.
126
135
         * guc_options points to a List of alternating option names and values.
127
136
         */
128
137
        char       *database_name;
178
187
        char       *peer_cn;
179
188
        unsigned long count;
180
189
#endif
 
190
 
 
191
        /* This field will be in a saner place in 9.4 and up */
 
192
        int                     remote_hostname_errcode;                /* see above */
181
193
} Port;
182
194
 
183
195