Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3f0f30d

Browse files
committed
Add comment for getpwid() safety.
1 parent80d2437 commit3f0f30d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/main/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*
1515
* IDENTIFICATION
16-
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.38 2001/01/2403:50:06 momjian Exp $
16+
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.39 2001/01/2405:24:43 momjian Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -159,6 +159,7 @@ main(int argc, char *argv[])
159159
fprintf(stderr,"%s: invalid current euid",argv[0]);
160160
exit(1);
161161
}
162+
/* Allocate new memory because later getpwuid() calls can overwrite it */
162163
pw_name_persist=strdup(pw->pw_name);
163164

164165
exit(PostgresMain(argc,argv,argc,argv,pw_name_persist));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp