Add comment for getpwid() safety.

This commit is contained in:
Bruce Momjian 2001-01-24 05:24:43 +00:00
parent 80d24370e0
commit 3f0f30d1a1

View File

@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.38 2001/01/24 03:50:06 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.39 2001/01/24 05:24:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -159,6 +159,7 @@ main(int argc, char *argv[])
fprintf(stderr, "%s: invalid current euid", argv[0]);
exit(1);
}
/* Allocate new memory because later getpwuid() calls can overwrite it */
pw_name_persist = strdup(pw->pw_name);
exit(PostgresMain(argc, argv, argc, argv, pw_name_persist));