afsd: Trim trailing slashes on Linux mntent
authorAndrew Deason <adeason@sinenomine.net>
Wed, 6 Apr 2011 21:56:22 +0000 (16:56 -0500)
committerDerrick Brashear <shadow@dementia.org>
Fri, 8 Apr 2011 13:09:54 +0000 (06:09 -0700)
commit325443e6178f9dcdba7326bdb675447ac72bd540
tree735ce38d53278d07164bb8e733b4a3319b4c7975
parentf1e04bedb26f84f061518a68a2dd75761b85c195
afsd: Trim trailing slashes on Linux mntent

When we write a mount entry on Linux when mounting /afs, trim trailing
slashes on the mount path. Otherwise, the umount utility can get
slightly confused, and leave the /afs mount entry in /etc/mtab after
it's been unmounted.

For full correctness we should probably completely canonicalize the
path like the mount utility does, but it's unlikely that anyone will
provide significantly weird paths for cacheMountDir, so don't bother.

Change-Id: Ie8330f08918d52eee319dff5f6ad275c30164c67
Reviewed-on: http://gerrit.openafs.org/4442
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afsd/afsd_kernel.c