/*
* Also make sure that real and effective uids are the same.
* Executing Postgres as a setuid program from a root shell is a
* security hole, since on many platforms a nefarious subroutine
* could setuid back to root if real uid is root. (Since nobody
* actually uses Postgres as a setuid program, trying to actively
* fix this situation seems more trouble than it's worth; we'll
* just expend the effort to check for it.)
*/
if (getuid() != geteuid())
{
fprintf(stderr, gettext("%s: real and effective user ids must match\n"),
argv[0]);
exit(1);
}
}
// source: postgresql-7.3.1/src/backend/main/main.c
// their security check
return to top