[Ocfs2-tools-commits] jlbec commits r1403 - branches/cman-based/ocfs2_controld

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Aug 23 15:12:01 PDT 2007


Author: jlbec
Date: 2007-08-23 15:12:00 -0700 (Thu, 23 Aug 2007)
New Revision: 1403

Modified:
   branches/cman-based/ocfs2_controld/action.c
Log:

Check the mountpoint passed to do_mount_result().  It should match the
client and mountpoint that do_mount() started.



Modified: branches/cman-based/ocfs2_controld/action.c
===================================================================
--- branches/cman-based/ocfs2_controld/action.c	2007-08-23 02:22:39 UTC (rev 1402)
+++ branches/cman-based/ocfs2_controld/action.c	2007-08-23 22:12:00 UTC (rev 1403)
@@ -393,8 +393,19 @@
 		goto out;
 	}
 
-	/* XXX Check that mountpoint is valid */
+	if (!find_mountpoint(mg, mountpoint, ci)) {
+		if (find_mountpoint(mg, mountpoint, 0))
+			fill_error(mg, ENOENT,
+				   "Mountpoint %s for UUID %s does not match this client",
+				   mountpoint, uuid);
+		else
+			fill_error(mg, ENOENT,
+				   "Mountpoint %s for UUID %s is not in progress",
+				   mountpoint, uuid);
 
+		goto out;
+	}
+
 	err = strtol(errcode, &ptr, 10);
 	if (ptr && *ptr != '\0') {
 		fill_error(mg, EINVAL, "Invalid error code string: %s",




More information about the Ocfs2-tools-commits mailing list