HomeFreeBSD

Handle /etc/mtab -> /proc/mounts symlink

Description

Handle /etc/mtab -> /proc/mounts symlink

Under Fedora 15 /etc/mtab is now a symlink to /proc/mounts by
default. When /etc/mtab is a symlink the mount.zfs helper
should not update it. There was code in place to handle this
case but it used stat() which traverses the link and then issues
the stat on /proc/mounts. We need to use lstat() to prevent the
link traversal and instead stat /etc/mtab.

Closes #270

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jun 14 2011, 11:25 PM
Parents
rG2e08aedba456: Always check -Wno-unused-but-set-variable gcc support
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGe130330a874f: Handle /etc/mtab -> /proc/mounts symlink (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Jun 14 2011, 11:48 PM