From: Jochen Topf <jochen@remote.org>
To: Gree3776@rowan.edu
Cc: pgsql-admin@postgresql.org
Subject: Re: Running Postgres 7.0.2 in a chroot environment
Date: Tue, 11 Jul 2000 09:01:01 +0200
Message-ID: <20000711090101.A15331@eldorado.remote.org> (raw)
I didn't quite follow everything you did, it looks a lot more complicated then
what is needed. Maybe some tips will get you on the right path:
1) You can give arguments to a program started by su by quoting, like:
su user -c 'program arg1 arg2'
2) argv[0] should be the name of the program and not the first argument.
3) The 'chroot' command (at least on my system here) does *only* a chroot
system call and starts a shell. This is *not* enough to be secure. At
least you have to do a chdir("/") after the chroot().
4) There a programs around which do a chroot, chdir("/") and the setuid/gid
to something sensible and start another programs. I have no reference handy
but look around on freshmeat or the big FTP archives.
Using chroot in itself is not enough! If you don't really know what you are
doing and do kludgy things like the ones you describe in your posting, you
will probabely create more security holes then you will fix.
Jochen
--
Jochen Topf - jochen@remote.org - http://www.remote.org/jochen/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jochen@remote.org, Gree3776@rowan.edu
Subject: Re: Running Postgres 7.0.2 in a chroot environment
In-Reply-To: <20000711090101.A15331@eldorado.remote.org>
References: <20000711090101.A15331@eldorado.remote.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox