All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix map option parsing for 'strictatime'
       [not found] <DUB122-W3438A418D6CC75FC3C903D8A240@phx.gbl>
@ 2015-02-10 17:04 ` Pete Beardmore
  2015-02-11  1:19   ` Ian Kent
  0 siblings, 1 reply; 2+ messages in thread
From: Pete Beardmore @ 2015-02-10 17:04 UTC (permalink / raw)
  To: autofs

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]




Hi,

I tried adding the 'strictatime' fs option in a map today to no avail. It looks like the current logic for the automount 'strict' option is erroneously consuming that option. Trivial patch attached.

Cheers,
Pete.


 		 	   		  
 		 	   		  

[-- Attachment #2: fix.map.option.parsing.for.'strictatime'.diff --]
[-- Type: application/octet-stream, Size: 1264 bytes --]

From f9e7685844d81f36367d0ba222c6cf9b550f025b Mon Sep 17 00:00:00 2001
From: Pete Beardmore <pete.beardmore@msn.com>
Date: Tue, 10 Feb 2015 15:37:10 +0000
Subject: fix map option parsing for 'strictatime'

Added a trivial token length check to ensure the 'strictatime'
mount option is not consumed by string logic for the 'strict'
automount option.

Pre-patch, adding the 'strictatime' to a map effectively switched
strict mode (for multi-mount handling) on, and failed to pass the
'strictatime' option through to 'mount'.

This will have been an issue since 'strictatime' was introduced
for the 2.6.30 kernel.
---
 modules/parse_sun.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index b881ee9..86ee279 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -509,7 +509,8 @@ static int sun_mount(struct autofs_point *ap, const char *root,
 				fstype[typelen] = '\0';
 			} else if (_strncmp("nonstrict", cp, 9) == 0) {
 				nonstrict = 1;
-			} else if (_strncmp("strict", cp, 6) == 0) {
+			} else if (_strncmp("strict", cp, 6) == 0 &&
+				   comma - cp == 6) {
 				nonstrict = 0;
 			} else if (_strncmp("nobrowse", cp, 8) == 0 ||
 				   _strncmp("browse", cp, 6) == 0 ||
-- 
1.8.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix map option parsing for 'strictatime'
  2015-02-10 17:04 ` [PATCH] fix map option parsing for 'strictatime' Pete Beardmore
@ 2015-02-11  1:19   ` Ian Kent
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Kent @ 2015-02-11  1:19 UTC (permalink / raw)
  To: Pete Beardmore; +Cc: autofs

On Tue, 2015-02-10 at 17:04 +0000, Pete Beardmore wrote:
> 
> 
> Hi,
> 
> I tried adding the 'strictatime' fs option in a map today to no avail.
> It looks like the current logic for the automount 'strict' option is
> erroneously consuming that option. Trivial patch attached.

Yep, I see the problem, the patch looks fine, I'll add it to the queue.
Can't say when I'll commit it upstream, but the next group of patches
should be pushed fairly soon.

Thanks.

Ian



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-11  1:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <DUB122-W3438A418D6CC75FC3C903D8A240@phx.gbl>
2015-02-10 17:04 ` [PATCH] fix map option parsing for 'strictatime' Pete Beardmore
2015-02-11  1:19   ` Ian Kent

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.