typo in getmntopts.c?
Johannes Hofmann
Johannes.Hofmann at gmx.de
Fri Sep 3 14:12:21 PDT 2004
mount(8) currently allows e.g. "mount -u -o rough /tmp" to remount /tmp
read-only. This seems to be because of a typo in getmntopts.c which could
be fixed as follows:
Index: sbin/mount/getmntopts.c
===================================================================
RCS file: /home/dcvs/src/sbin/mount/getmntopts.c,v
retrieving revision 1.3
diff -u -r1.3 getmntopts.c
--- sbin/mount/getmntopts.c 28 Sep 2003 14:39:18 -0000 1.3
+++ sbin/mount/getmntopts.c 3 Sep 2004 20:56:18 -0000
@@ -81,8 +81,8 @@
for (m = m0; m->m_option != NULL; ++m) {
len = strlen(m->m_option);
if (strncasecmp(opt, m->m_option, len) == 0)
- if ( m->m_option[len] == '\0'
- || m->m_option[len] == '='
+ if ( opt[len] == '\0'
+ || opt[len] == '='
)
break;
}
Regards,
Johannes
More information about the Bugs
mailing list