typo in getmntopts.c?

看板DFBSD_bugs作者時間21年前 (2004/09/04 05:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
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
文章代碼(AID): #11EEBJ00 (DFBSD_bugs)
文章代碼(AID): #11EEBJ00 (DFBSD_bugs)