mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
If the first argument is --version or --help, skip the root check.
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.40 2001/01/24 19:42:56 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.41 2001/02/06 17:00:01 petere Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@@ -109,7 +109,10 @@ main(int argc, char *argv[])
|
|||||||
* be temporarily disabled there...
|
* be temporarily disabled there...
|
||||||
*/
|
*/
|
||||||
#ifndef __BEOS__
|
#ifndef __BEOS__
|
||||||
if (geteuid() == 0)
|
if (!(argc > 1
|
||||||
|
&& ( strcmp(argv[1], "--help")==0 || strcmp(argv[1], "-?")==0
|
||||||
|
|| strcmp(argv[1], "--version")==0 || strcmp(argv[1], "-V")==0 ))
|
||||||
|
&& (geteuid() == 0) )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s", NOROOTEXEC);
|
fprintf(stderr, "%s", NOROOTEXEC);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user