Activity log for bug #1041377

Date Who What changed Old value New value Message
2012-08-24 21:02:50 Rolf Anders bug added bug
2012-08-24 21:02:50 Rolf Anders attachment added rz-t-apport.mountall.txt https://bugs.launchpad.net/bugs/1041377/+attachment/3275880/+files/rz-t-apport.mountall.txt
2012-08-25 06:23:26 Steve Langasek mountall (Ubuntu): status New Triaged
2012-08-25 06:23:28 Steve Langasek mountall (Ubuntu): importance Undecided Medium
2012-10-19 17:53:41 Peter Matulis bug added subscriber Peter Matulis
2012-12-11 17:20:59 Dave Chiluk tags precise
2012-12-11 17:36:59 Chris J Arges nominated for series Ubuntu Precise
2012-12-11 17:36:59 Chris J Arges bug task added mountall (Ubuntu Precise)
2012-12-11 17:36:59 Chris J Arges nominated for series Ubuntu Quantal
2012-12-11 17:36:59 Chris J Arges bug task added mountall (Ubuntu Quantal)
2012-12-11 17:36:59 Chris J Arges nominated for series Ubuntu Raring
2012-12-11 17:36:59 Chris J Arges bug task added mountall (Ubuntu Raring)
2012-12-11 17:37:07 Chris J Arges mountall (Ubuntu Precise): importance Undecided Medium
2012-12-11 17:37:09 Chris J Arges mountall (Ubuntu Quantal): importance Undecided Medium
2012-12-11 17:37:31 Chris J Arges mountall (Ubuntu Precise): assignee Dave Chiluk (chiluk)
2012-12-11 17:37:44 Chris J Arges mountall (Ubuntu Quantal): assignee Dave Chiluk (chiluk)
2012-12-11 17:37:46 Chris J Arges mountall (Ubuntu Raring): assignee Chris J Arges (christopherarges)
2012-12-11 17:37:53 Chris J Arges mountall (Ubuntu Raring): assignee Chris J Arges (christopherarges) Dave Chiluk (chiluk)
2012-12-11 18:02:46 Dave Chiluk mountall (Ubuntu Quantal): status New Confirmed
2012-12-11 18:02:50 Dave Chiluk mountall (Ubuntu Precise): status New Incomplete
2012-12-11 18:02:53 Dave Chiluk mountall (Ubuntu Precise): status Incomplete Confirmed
2012-12-11 22:02:02 Chris J Arges bug added subscriber Sustaining Engineering
2012-12-11 22:22:37 Dave Chiluk branch linked lp:~chiluk/ubuntu/raring/mountall/lp1041377_timeo_fix
2012-12-11 22:32:50 Dave Chiluk branch linked lp:~chiluk/ubuntu/precise/mountall/lp1041377_timeo_fix
2012-12-11 22:33:10 Dave Chiluk branch linked lp:~chiluk/ubuntu/quantal/mountall/lp1041377_timeo_fix
2012-12-11 22:43:13 Dave Chiluk bug added subscriber Ubuntu Sponsors Team
2012-12-11 22:43:28 Dave Chiluk bug added subscriber Ubuntu Stable Release Updates Team
2012-12-14 20:10:02 Dave Chiluk removed subscriber Ubuntu Sponsors Team
2012-12-14 20:10:05 Dave Chiluk removed subscriber Ubuntu Stable Release Updates Team
2012-12-14 20:10:48 Chris J Arges branch unlinked lp:~chiluk/ubuntu/raring/mountall/lp1041377_timeo_fix
2012-12-14 20:10:55 Chris J Arges branch unlinked lp:~chiluk/ubuntu/precise/mountall/lp1041377_timeo_fix
2012-12-14 20:11:01 Chris J Arges branch unlinked lp:~chiluk/ubuntu/quantal/mountall/lp1041377_timeo_fix
2012-12-19 17:05:39 Dave Chiluk branch linked lp:~chiluk/ubuntu/quantal/mountall/lp1041377_timeo_fix
2012-12-19 17:06:36 Dave Chiluk branch linked lp:~chiluk/ubuntu/raring/mountall/lp1041377_timeo_fix
2012-12-19 17:06:57 Dave Chiluk branch linked lp:~chiluk/ubuntu/precise/mountall/lp1041377_timeo_fix
2012-12-19 17:35:33 Dave Chiluk description If the mount option "timeo" is specified for an NFS mount in /etc/fstab, mountall does not pass it to mount.nfs. The bug is in the function cut_options() in mountall.c. It is called with the following arguments: opts = cut_options (NULL, mnt, "showthrough", "optional", "bootwait", "nobootwait", "timeout", NULL); Although it should only remove the specified options, it also removes any option that is a prefix of one of those, e.g. "timeo". The call to strncmp() in line 661 compares only up to the length of the option from the fstab, without comparing the length of both strings. Hence I propose the following patch: --- mountall-2.36/src/mountall.c.orig 2012-08-24 20:25:07.445892095 +0200 +++ mountall-2.36/src/mountall.c 2012-08-24 21:29:10.098595843 +0200 @@ -658,7 +658,8 @@ va_copy (options, args); while ((option = va_arg (options, const char *)) != NULL) { - if (j && ! strncmp (opts + i, option, j)) + if (j && option[j] == '\0' + && ! strncmp (opts + i, option, j)) break; } va_end (options); If the mount option "timeo" is specified for an NFS mount in /etc/fstab, mountall does not pass it to mount.nfs. The bug is in the function cut_options() in mountall.c. It is called with the following arguments:         opts = cut_options (NULL, mnt, "showthrough", "optional",                             "bootwait", "nobootwait", "timeout",                             NULL); Although it should only remove the specified options, it also removes any option that is a prefix of one of those, e.g. "timeo". The call to strncmp() in line 661 compares only up to the length of the option from the fstab, without comparing the length of both strings. Hence I propose the following patch: *(updated patch in comment #6). --- mountall-2.36/src/mountall.c.orig 2012-08-24 20:25:07.445892095 +0200 +++ mountall-2.36/src/mountall.c 2012-08-24 21:29:10.098595843 +0200 @@ -658,7 +658,8 @@                 va_copy (options, args);                 while ((option = va_arg (options, const char *)) != NULL) { - if (j && ! strncmp (opts + i, option, j)) + if (j && option[j] == '\0' + && ! strncmp (opts + i, option, j))                                 break;                 }                 va_end (options); [Impact] Mounts that have options that are substrings of (showthrough, optional, bootwait, nobootwait or timeout) Are being stripped by mountall and not being passed to the mount. Such is the case of timeo in nfs. The change is minimal, and simply checks that the option being stripped matches the length of option being checked against. This solves the case where one is a substring of the other. [Test Case] 1. Create an nfs mount option in /etc/fstab with the timeo=2 option. Like the below. server:/raid /raid nfs user,timeo=2,timeout=6 0 0 2. Run mountall as root 3. run mount and verify that the nfs mount specified above has the options user,timeo=2 , but not timeout=6. [Regression Potential] Regression potential is minimal, but regressions are most likely to manifest themselves in mount options disappearing or new options appearing (some new options appearing will be valid as is the case of timeo).
2012-12-19 17:36:12 Dave Chiluk bug added subscriber Ubuntu Sponsors Team
2012-12-19 17:36:26 Dave Chiluk bug added subscriber Ubuntu Stable Release Updates Team
2012-12-19 20:34:29 Launchpad Janitor branch linked lp:ubuntu/mountall
2012-12-19 21:27:26 Dave Chiluk attachment added Precise Debdiff https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/1041377/+attachment/3464247/+files/mountall_2.36.2.precise.debdiff
2012-12-19 21:28:21 Dave Chiluk attachment added Quantal Debdiff https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/1041377/+attachment/3464249/+files/mountall-2.42ubuntu0.2.quantal.debdiff
2012-12-21 19:19:38 Adam Conrad mountall (Ubuntu Precise): status Confirmed Fix Committed
2012-12-21 19:19:43 Adam Conrad bug added subscriber SRU Verification
2012-12-21 19:19:50 Adam Conrad tags precise precise verification-needed
2012-12-21 19:20:35 Adam Conrad mountall (Ubuntu Quantal): status Confirmed Fix Committed
2012-12-27 11:36:53 Rolf Anders tags precise verification-needed precise verification-done
2013-01-03 20:29:17 Brian Murray tags precise verification-done precise verification-done-precise verification-needed
2013-01-03 20:31:14 Launchpad Janitor mountall (Ubuntu Precise): status Fix Committed Fix Released
2013-01-03 21:07:26 Dave Chiluk tags precise verification-done-precise verification-needed precise verification-done-precise verification-done-quantal
2013-01-03 21:12:55 Brian Murray removed subscriber Ubuntu Stable Release Updates Team
2013-01-03 21:13:16 Launchpad Janitor mountall (Ubuntu Quantal): status Fix Committed Fix Released
2013-01-15 23:55:18 Launchpad Janitor mountall (Ubuntu Raring): status Triaged Fix Released
2013-02-27 21:53:24 Benjamin Drung removed subscriber Ubuntu Sponsors Team
2013-12-11 02:04:17 Launchpad Janitor branch linked lp:debian/mountall
2013-12-11 02:04:41 Launchpad Janitor branch linked lp:~ubuntu-branches/ubuntu/precise/mountall/precise-proposed
2013-12-11 02:05:06 Launchpad Janitor branch linked lp:~ubuntu-branches/ubuntu/quantal/mountall/quantal-proposed
2014-02-07 15:46:19 Curtis Hovey removed subscriber Registry Administrators