aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/interfaces/libpq/fe-auth.c4
-rw-r--r--src/interfaces/libpq/fe-secure.c10
-rw-r--r--src/port/getaddrinfo.c4
-rw-r--r--src/port/thread.c4
4 files changed, 10 insertions, 12 deletions
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c
index 8d1f669fd3b..71159134b63 100644
--- a/src/interfaces/libpq/fe-auth.c
+++ b/src/interfaces/libpq/fe-auth.c
@@ -10,7 +10,7 @@
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.91 2004/08/29 04:13:12 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.92 2004/09/27 23:38:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -749,7 +749,7 @@ fe_getauthname(char *PQerrormsg)
if (GetUserName(username, &namesize))
name = username;
#else
- char pwdbuf[BUFSIZ];
+ char pwdbuf[sizeof(struct passwd)];
struct passwd pwdstr;
struct passwd *pw = NULL;
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index 3fbeffe01e6..d4f93733da4 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.52 2004/09/26 22:51:49 tgl Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.53 2004/09/27 23:38:45 momjian Exp $
*
* NOTES
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
@@ -512,7 +512,7 @@ verify_peer(PGconn *conn)
{
struct hostent hpstr;
- char buf[BUFSIZ];
+ char buf[sizeof(struct hostent)];
int herrno = 0;
/*
@@ -598,7 +598,7 @@ load_dh_file(int keylength)
#ifdef WIN32
return NULL;
#else
- char pwdbuf[BUFSIZ];
+ char pwdbuf[sizeof(struct passwd)];
struct passwd pwdstr;
struct passwd *pwd = NULL;
FILE *fp;
@@ -745,7 +745,7 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
#ifdef WIN32
return 0;
#else
- char pwdbuf[BUFSIZ];
+ char pwdbuf[sizeof(struct passwd)];
struct passwd pwdstr;
struct passwd *pwd = NULL;
struct stat buf,
@@ -952,7 +952,7 @@ initialize_SSL(PGconn *conn)
{
#ifndef WIN32
struct stat buf;
- char pwdbuf[BUFSIZ];
+ char pwdbuf[sizeof(struct passwd)];
struct passwd pwdstr;
struct passwd *pwd = NULL;
char fnbuf[MAXPGPATH];
diff --git a/src/port/getaddrinfo.c b/src/port/getaddrinfo.c
index 59da098f85a..283d45b26fc 100644
--- a/src/port/getaddrinfo.c
+++ b/src/port/getaddrinfo.c
@@ -12,7 +12,7 @@
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/getaddrinfo.c,v 1.13 2004/09/27 23:24:45 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/getaddrinfo.c,v 1.14 2004/09/27 23:39:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -85,7 +85,7 @@ getaddrinfo(const char *node, const char *service,
#ifdef FRONTEND
struct hostent hpstr;
- char buf[BUFSIZ];
+ char buf[sizeof(struct hostent)];
int herrno = 0;
pqGethostbyname(node, &hpstr, buf, sizeof(buf),
diff --git a/src/port/thread.c b/src/port/thread.c
index f950e419a14..cbf8f4ddefb 100644
--- a/src/port/thread.c
+++ b/src/port/thread.c
@@ -7,7 +7,7 @@
*
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/port/thread.c,v 1.26 2004/09/27 23:24:45 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/thread.c,v 1.27 2004/09/27 23:39:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -103,7 +103,6 @@ pqGetpwuid(uid_t uid, struct passwd * resultbuf, char *buffer,
/* POSIX version */
getpwuid_r(uid, resultbuf, buffer, buflen, result);
#else
-
/*
* Early POSIX draft of getpwuid_r() returns 'struct passwd *'.
* getpwuid_r(uid, resultbuf, buffer, buflen)
@@ -111,7 +110,6 @@ pqGetpwuid(uid_t uid, struct passwd * resultbuf, char *buffer,
*result = getpwuid_r(uid, resultbuf, buffer, buflen);
#endif
#else
-
/* no getpwuid_r() available, just use getpwuid() */
*result = getpwuid(uid);
#endif