Re: [HACKERS] execve() vs system() for chrooted filesystems in dbcommands.c

2004-09-20 Thread Andrew Dunstan
Tom F said: > Hi, > > I'm working on running postgresql in a chrooted filesystem. > > /src/backend/commands/dbcommands.c makes use of system(3): as far as I > can see, this is only used to execute rm(1) and cp(1). I'd like to > avoid placing /bin/sh in the root of the filesystem (which system() > r

Re: [HACKERS] execve() vs system() for chrooted filesystems in dbcommands.c

2004-09-20 Thread Magnus Hagander
> The only argument against it, that I'm aware of, is that > system() is ANSI, while execve() is POSIX: i.e. > portability... does windows have execve()? That could be done > the way the current preprocessor conditionals yield rmdir > instead of rm. Windows does have execve(), though it's name

[HACKERS] execve() vs system() for chrooted filesystems in dbcommands.c

2004-09-19 Thread Tom F
Hi, I'm working on running postgresql in a chrooted filesystem. /src/backend/commands/dbcommands.c makes use of system(3): as far as I can see, this is only used to execute rm(1) and cp(1). I'd like to avoid placing /bin/sh in the root of the filesystem (which system() requires). I see four opti