summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2005-11-16 02:13:27 +0000
committerrodrigc <rodrigc@FreeBSD.org>2005-11-16 02:13:27 +0000
commitb6bd744326afe4135b44dfa824e7c26219583b8c (patch)
tree6df103a23d736d7791e39c503bb9b8f408db73c9
parent68c0bba1009fcf8754734a31034ecd76c88d16e7 (diff)
downloadFreeBSD-src-b6bd744326afe4135b44dfa824e7c26219583b8c.zip
FreeBSD-src-b6bd744326afe4135b44dfa824e7c26219583b8c.tar.gz
Do not pass noauto to nmount() or external mount program.
Noticed by: maxim
-rw-r--r--sbin/mount/mount.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index f2eeff5..d950216 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -626,7 +626,16 @@ mangle(options, argcp, argv)
argc = *argcp;
for (s = options; (p = strsep(&s, ",")) != NULL;)
if (*p != '\0') {
- if (*p == '-') {
+ if (strcmp(p, "noauto") == 0) {
+ /*
+ * Do not pass noauto option to nmount().
+ * or external mount program. noauto is
+ * only used to prevent mounting a filesystem
+ * when 'mount -a' is specified, and is
+ * not a real mount option.
+ */
+ continue;
+ } else if (*p == '-') {
argv[argc++] = p;
p = strchr(p, '=');
if (p != NULL) {
OpenPOWER on IntegriCloud