Index: uspace/lib/c/generic/str.c
===================================================================
--- uspace/lib/c/generic/str.c	(revision 9ba040a78117125d1d44fb23cefc1bd1c88ff152)
+++ uspace/lib/c/generic/str.c	(revision da680b4b4a258b7464a3f60a90d226a51447f783)
@@ -1134,4 +1134,26 @@
 			return (char *) (str + last);
 		last = off;
+	}
+
+	return NULL;
+}
+
+/** Find first occurence of substring in string.
+ *
+ * @param hs  Haystack (string)
+ * @param n   Needle (substring to look for)
+ *
+ * @return Pointer to character in @a hs or @c NULL if not found.
+ */
+char *str_str(const char *hs, const char *n)
+{
+	size_t off = 0;
+
+	if (str_lcmp(hs, n, str_length(n)) == 0)
+		return (char *)hs;
+
+	while (str_decode(hs, &off, STR_NO_LIMIT) != 0) {
+		if (str_lcmp(hs + off, n, str_length(n)) == 0)
+			return (char *)(hs + off);
 	}
 
Index: uspace/lib/c/include/str.h
===================================================================
--- uspace/lib/c/include/str.h	(revision 9ba040a78117125d1d44fb23cefc1bd1c88ff152)
+++ uspace/lib/c/include/str.h	(revision da680b4b4a258b7464a3f60a90d226a51447f783)
@@ -108,4 +108,5 @@
 extern char *str_chr(const char *str, wchar_t ch);
 extern char *str_rchr(const char *str, wchar_t ch);
+extern char *str_str(const char *hs, const char *n);
 
 extern void str_rtrim(char *str, wchar_t ch);
Index: uspace/lib/c/test/str.c
===================================================================
--- uspace/lib/c/test/str.c	(revision 9ba040a78117125d1d44fb23cefc1bd1c88ff152)
+++ uspace/lib/c/test/str.c	(revision da680b4b4a258b7464a3f60a90d226a51447f783)
@@ -88,4 +88,33 @@
 }
 
+PCUT_TEST(str_str_found)
+{
+	const char *hs = "abracadabra";
+	const char *n = "raca";
+	char *p;
+
+	p = str_str(hs, n);
+	PCUT_ASSERT_TRUE((const char *)p == hs + 2);
+}
+
+PCUT_TEST(str_str_not_found)
+{
+	const char *hs = "abracadabra";
+	const char *n = "racab";
+	char *p;
+
+	p = str_str(hs, n);
+	PCUT_ASSERT_TRUE(p == NULL);
+}
+
+PCUT_TEST(str_str_empty_n)
+{
+	const char *hs = "abracadabra";
+	const char *n = "";
+	char *p;
+
+	p = str_str(hs, n);
+	PCUT_ASSERT_TRUE((const char *)p == hs);
+}
 
 PCUT_EXPORT(str);
Index: uspace/srv/volsrv/part.c
===================================================================
--- uspace/srv/volsrv/part.c	(revision 9ba040a78117125d1d44fb23cefc1bd1c88ff152)
+++ uspace/srv/volsrv/part.c	(revision da680b4b4a258b7464a3f60a90d226a51447f783)
@@ -256,4 +256,23 @@
 }
 
+/** Determine if partition is allowed to be mounted by default.
+ *
+ * @param part Partition
+ * @return @c true iff partition is allowed to be mounted by default
+ */
+static bool vol_part_allow_mount_by_def(vol_part_t *part)
+{
+	/* CDFS is safe to mount (after all, it is read-only) */
+	if (part->pcnt == vpc_fs && part->fstype == fs_cdfs)
+		return true;
+
+	/* For other file systems disallow mounting from ATA hard drive */
+	if (str_str(part->svc_name, "\\ata-c") != NULL)
+		return false;
+
+	/* Allow otherwise (e.g. USB mass storage) */
+	return true;
+}
+
 static errno_t vol_part_mount(vol_part_t *part)
 {
@@ -265,4 +284,10 @@
 		/* Don't mount nameless volumes */
 		log_msg(LOG_DEFAULT, LVL_NOTE, "Not mounting nameless partition.");
+		return EOK;
+	}
+
+	if (!vol_part_allow_mount_by_def(part)) {
+		/* Don't mount partition by default */
+		log_msg(LOG_DEFAULT, LVL_NOTE, "Not mounting per default policy.");
 		return EOK;
 	}
