PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include <signal.h>
#include <fcntl.h>
#include <ctype.h>
#include <sys/socket.h>
#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <sys/stat.h>
#include <pthread.h>
#include "fe-auth.h"
#include "libpq-fe.h"
#include "libpq-int.h"
Go to the source code of this file.
Data Structures | |
struct | sigpipe_info |
Macros | |
#define | SIGPIPE_MASKED(conn) ((conn)->sigpipe_so || (conn)->sigpipe_flag) |
#define | DECLARE_SIGPIPE_INFO(spinfo) struct sigpipe_info spinfo |
#define | DISABLE_SIGPIPE(conn, spinfo, failaction) |
#define | REMEMBER_EPIPE(spinfo, cond) |
#define | RESTORE_SIGPIPE(conn, spinfo) |
#define DECLARE_SIGPIPE_INFO | ( | spinfo | ) | struct sigpipe_info spinfo |
Definition at line 64 of file fe-secure.c.
#define DISABLE_SIGPIPE | ( | conn, | |
spinfo, | |||
failaction | |||
) |
Definition at line 66 of file fe-secure.c.
#define REMEMBER_EPIPE | ( | spinfo, | |
cond | |||
) |
Definition at line 77 of file fe-secure.c.
#define RESTORE_SIGPIPE | ( | conn, | |
spinfo | |||
) |
Definition at line 83 of file fe-secure.c.
Definition at line 55 of file fe-secure.c.
int pq_block_sigpipe | ( | sigset_t * | osigset, |
bool * | sigpipe_pending | ||
) |
Definition at line 504 of file fe-secure.c.
References SIGPIPE, SOCK_ERRNO, and SOCK_ERRNO_SET.
Referenced by PQprint().
Definition at line 554 of file fe-secure.c.
References SIGPIPE, SOCK_ERRNO, and SOCK_ERRNO_SET.
Referenced by PQprint().
int PQdefaultSSLKeyPassHook_OpenSSL | ( | char * | buf, |
int | size, | ||
PGconn * | conn | ||
) |
Definition at line 473 of file fe-secure.c.
void* PQgetgssctx | ( | PGconn * | conn | ) |
Definition at line 483 of file fe-secure.c.
void* PQgetssl | ( | PGconn * | conn | ) |
Definition at line 428 of file fe-secure.c.
PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook_OpenSSL | ( | void | ) |
Definition at line 461 of file fe-secure.c.
int PQgssEncInUse | ( | PGconn * | conn | ) |
Definition at line 489 of file fe-secure.c.
void PQinitOpenSSL | ( | int | do_ssl, |
int | do_crypto | ||
) |
Definition at line 129 of file fe-secure.c.
void PQinitSSL | ( | int | do_init | ) |
Definition at line 117 of file fe-secure.c.
void pqsecure_close | ( | PGconn * | conn | ) |
Definition at line 152 of file fe-secure.c.
References conn, and pgtls_close().
Referenced by pqDropConnection().
PostgresPollingStatusType pqsecure_open_client | ( | PGconn * | conn | ) |
Definition at line 138 of file fe-secure.c.
References conn, PGRES_POLLING_FAILED, and pgtls_open_client().
Referenced by PQconnectPoll().
ssize_t pqsecure_raw_read | ( | PGconn * | conn, |
void * | ptr, | ||
size_t | len | ||
) |
Definition at line 193 of file fe-secure.c.
References conn, EAGAIN, ECONNRESET, EINTR, EWOULDBLOCK, len, libpq_append_conn_error(), PG_STRERROR_R_BUFLEN, recv, pg_conn::sock, SOCK_ERRNO, SOCK_ERRNO_SET, and SOCK_STRERROR.
Referenced by gss_read(), pg_GSS_read(), pgconn_bio_read(), and pqsecure_read().
ssize_t pqsecure_raw_write | ( | PGconn * | conn, |
const void * | ptr, | ||
size_t | len | ||
) |
Definition at line 316 of file fe-secure.c.
References conn, DECLARE_SIGPIPE_INFO, DISABLE_SIGPIPE, EAGAIN, ECONNRESET, EINTR, EWOULDBLOCK, len, libpq_gettext, PG_STRERROR_R_BUFLEN, REMEMBER_EPIPE, RESTORE_SIGPIPE, send, pg_conn::sigpipe_flag, snprintf, pg_conn::sock, SOCK_ERRNO, SOCK_ERRNO_SET, SOCK_STRERROR, strlcat(), pg_conn::write_err_msg, and pg_conn::write_failed.
Referenced by pg_GSS_write(), pgconn_bio_write(), pqsecure_open_gss(), and pqsecure_write().
ssize_t pqsecure_read | ( | PGconn * | conn, |
void * | ptr, | ||
size_t | len | ||
) |
Definition at line 167 of file fe-secure.c.
References conn, len, pg_GSS_read(), pgtls_read(), pqsecure_raw_read(), and pg_conn::ssl_in_use.
Referenced by pqReadData().
ssize_t pqsecure_write | ( | PGconn * | conn, |
const void * | ptr, | ||
size_t | len | ||
) |
Definition at line 267 of file fe-secure.c.
References conn, len, pg_GSS_write(), pgtls_write(), pqsecure_raw_write(), and pg_conn::ssl_in_use.
Referenced by pqSendSome().
void PQsetSSLKeyPassHook_OpenSSL | ( | PQsslKeyPassHook_OpenSSL_type | hook | ) |
Definition at line 467 of file fe-secure.c.
const char* PQsslAttribute | ( | PGconn * | conn, |
const char * | attribute_name | ||
) |
Definition at line 440 of file fe-secure.c.
const char* const* PQsslAttributeNames | ( | PGconn * | conn | ) |
Definition at line 446 of file fe-secure.c.
int PQsslInUse | ( | PGconn * | conn | ) |
Definition at line 103 of file fe-secure.c.
References conn, and pg_conn::ssl_in_use.
Referenced by printSSLInfo().
void* PQsslStruct | ( | PGconn * | conn, |
const char * | struct_name | ||
) |
Definition at line 434 of file fe-secure.c.