Prevent pg_ctl from being run as root. Since it uses configuration files
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 22 Oct 2004 00:24:39 +0000 (00:24 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 22 Oct 2004 00:24:39 +0000 (00:24 +0000)
commit6acddf56b43bed91d6014eab99416b669ffb6084
tree2ae6f85a77362d03ca0b861b713b8ac0ca3b80d4
parent02571d4e204d9eaec528e45afb5a9c490bb3db6c
Prevent pg_ctl from being run as root.  Since it uses configuration files
owned by postgres, doing "pg_ctl start" as root could allow a privilege
escalation attack, as pointed out by iDEFENSE.  Of course the postmaster would
fail, but we ought to fail a little sooner to protect sysadmins unfamiliar
with Postgres.  The chosen fix is to disable root use of pg_ctl in all cases,
just to be confident there are no other holes.
src/bin/pg_ctl/pg_ctl.sh