[PATCH] Bug fix: chdir ("/") when daemonizing self.

This is quite a serious bug in the daemonization code. If we don't chdir, then an arbitrary directory can be held open. For example: # cd /tmp/foo # /etc/init.d/vhostmd start # pgrep vhostmd 19538 # ls -l /proc/19538/cwd lrwxrwxrwx 1 root root 0 Dec 9 07:20 /proc/19538/cwd -> /tmp/foo [This bug was identified by Dan Berrange] Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw

Richard W.M. Jones wrote:
This is quite a serious bug in the daemonization code. If we don't chdir, then an arbitrary directory can be held open. For example:
# cd /tmp/foo # /etc/init.d/vhostmd start # pgrep vhostmd 19538 # ls -l /proc/19538/cwd lrwxrwxrwx 1 root root 0 Dec 9 07:20 /proc/19538/cwd -> /tmp/foo
[This bug was identified by Dan Berrange]
Wow! Yeah, not good. ACK. Jim -- To unsubscribe, e-mail: vhostmd+unsubscribe@opensuse.org For additional commands, e-mail: vhostmd+help@opensuse.org
participants (2)
-
Jim Fehlig
-
Richard W.M. Jones