From b3976c2ea25732a9f939fbc23020b7ab54c67783 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 16 Nov 2007 22:22:05 +0100 Subject: Fix an implicit cast warning. Michael (This used to be commit d2c7417393e58de12b5747b9d6c19aea3c343ea5) --- source3/lib/readline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/readline.c b/source3/lib/readline.c index 6fed929be0..7c127817be 100644 --- a/source3/lib/readline.c +++ b/source3/lib/readline.c @@ -65,7 +65,7 @@ static char *smb_readline_replacement(const char *prompt, void (*callback)(void) } if (line == NULL) { - line = SMB_MALLOC(BUFSIZ); + line = (char *)SMB_MALLOC(BUFSIZ); if (!line) { return NULL; } -- cgit From 5267c9d2e6ff95687a7121e91496da3ae742d282 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 16 Nov 2007 22:26:26 +0100 Subject: 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 . Michael (This used to be commit 118fd6213d5f6419f654e9226a41d527c04346f7) --- source3/client/umount.cifs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/client/umount.cifs.c b/source3/client/umount.cifs.c index d1195755ca..ab94a20c60 100644 --- a/source3/client/umount.cifs.c +++ b/source3/client/umount.cifs.c @@ -341,6 +341,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); -- cgit