Re: [HACKERS] text patch -- sugg cmd when run as root

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: brett(at)work(dot)chicken(dot)org (Brett McCormick)
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] text patch -- sugg cmd when run as root
Date: 1998-05-12 20:17:28
Message-ID: 199805122017.QAA13560@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> When you run postgresql as root, the command it gives for putting in
> your startup script is a little weird. The main issue is that 2>&1
> only works in bash, not tcsh. >& works in both, so it seems
> preferable. Another minor issue is that it echoes the command and
> pipes it through su. Shouldn't this be "su - postgres -c 'cmd'"? Do
> all versions of su have the '-c' argument? piping it through seems
> weird, but maybe it isn't.
>
> this is a straight diff for src/backend/main/main.c
>
> --cut here--
> 38c38
> < echo \"postmaster -B 256 >/var/log/pglog 2>&1 &\" | su - postgres\n\n"
> ---
> > su - postgres -c 'postmaster -B 256 >& /var/log/pglog' &\n\n"
> --cut here--
>
>

I have changed the text to:

\n\"root\" execution of the PostgreSQL backend is not permitted.\n\n\
The backend must be started under it's own userid to prevent\n\
a possible system security compromise. See the INSTALL file for\n\
more information on how to properly start the postmaster.\n\n"

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Gould 1998-05-12 20:21:30 Re: [HACKERS] Re: [PATCHES] Try again: S_LOCK reduced contentionh]
Previous Message ocie 1998-05-12 19:40:47 Re: [HACKERS] mmap and MAP_ANON