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

Commitdcddc3f

Browse files
committed
Revert "Prevent running pg_basebackup as root"
This reverts commit7bae0ad, as this is not ideal with the tar format,and we may want to explore more options like what is done by tar withsome equivalents of --owner and --group, but for pg_basebackup.Per complaints from Magnus Hagander and Stephen Frost.Discussion:https://postgr.es/m/20200205172259.GW3195@tamriel.snowman.net
1 parent414c2fd commitdcddc3f

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

‎src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2090,22 +2090,6 @@ main(int argc, char **argv)
20902090
}
20912091
}
20922092

2093-
/*
2094-
* Don't allow pg_basebackup to be run as root, to avoid creating files in
2095-
* the data directory with ownership rights incompatible with the
2096-
* postmaster.
2097-
*/
2098-
#ifndefWIN32
2099-
if (geteuid()==0)/* 0 is root's uid */
2100-
{
2101-
pg_log_error("cannot be run as root");
2102-
fprintf(stderr,
2103-
_("Please log in (using, e.g., \"su\") as the (unprivileged) user that will\n"
2104-
"own the server process.\n"));
2105-
exit(1);
2106-
}
2107-
#endif
2108-
21092093
atexit(cleanup_directories_atexit);
21102094

21112095
while ((c=getopt_long(argc,argv,"CD:F:r:RS:T:X:l:nNzZ:d:c:h:p:U:s:wWkvP",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp