[SCM] Samba Shared Repository - branch v3-0-test updated -
initial-v3-0-unstable-22-gea97a10
Michael Adam
obnox at samba.org
Fri Nov 16 21:31:31 GMT 2007
The branch, v3-0-test has been updated
via ea97a10df5732dfcc931197a01d6446ed92b7658 (commit)
from 183eea4909d6678ac382eac16a5873a1fa3fd065 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test
- Log -----------------------------------------------------------------
commit ea97a10df5732dfcc931197a01d6446ed92b7658
Author: Michael Adam <obnox at samba.org>
Date: Fri Nov 16 22:26:26 2007 +0100
Fix for bug #4781: allow cleaning of /etc/mtab by canonicalizing mountpoint.
Canonicalize mountpoint by trimming trailing slashes before unmounting.
This allows for correct cleanup of /etc/mtab after unmounting.
Thanks to Steve Langasek <vorlon at debian.org>.
Michael
-----------------------------------------------------------------------
Summary of changes:
source/client/umount.cifs.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/client/umount.cifs.c b/source/client/umount.cifs.c
index 3869e34..47ddd1e 100644
--- a/source/client/umount.cifs.c
+++ b/source/client/umount.cifs.c
@@ -342,6 +342,13 @@ int main(int argc, char ** argv)
/* fixup path if needed */
+ /* Trim any trailing slashes */
+ while ((strlen(mountpoint) > 1) &&
+ (mountpoint[strlen(mountpoint)-1] == '/'))
+ {
+ mountpoint[strlen(mountpoint)-1] = '\0';
+ }
+
/* make sure that this is a cifs filesystem */
rc = statfs(mountpoint, &statbuf);
--
Samba Shared Repository
More information about the samba-cvs
mailing list