1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Remove use of large BUFSIZ for buffers and use the proper struct sizes.

This greatly helps threaded libpq programs.
This commit is contained in:
Bruce Momjian
2004-09-27 23:39:14 +00:00
parent e1c8b37afb
commit b534a5605f
4 changed files with 10 additions and 12 deletions

View File

@ -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;