From 0101407febdc8cba2198dd8fc93452f50fe25787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Thu, 22 Jan 2015 08:42:43 +0100 Subject: [PATCH] Made to ignore the -s ("sloppy") mount option autofs passes the sloppy option to mount(8) for all file systems to mean that mount should not choke on invalid options such as those meant for remote mounting on another operating system through nfs or cifs. Following a recent change, mount(8) passes the -s option on to any file system, even to local ones (which are not expected to get foreign options), so ntfs-3g now has to ignore -s. --- src/ntfs-3g_common.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ntfs-3g_common.c b/src/ntfs-3g_common.c index ed6b01a1..38ccd742 100644 --- a/src/ntfs-3g_common.c +++ b/src/ntfs-3g_common.c @@ -1,7 +1,7 @@ /** * ntfs-3g_common.c - Common definitions for ntfs-3g and lowntfs-3g. * - * Copyright (c) 2010-2012 Jean-Pierre Andre + * Copyright (c) 2010-2015 Jean-Pierre Andre * Copyright (c) 2010 Erik Larsson * * This program/include file is free software; you can redistribute it and/or @@ -555,7 +555,7 @@ int ntfs_parse_options(struct ntfs_options *popts, void (*usage)(void), { int c; - static const char *sopt = "-o:hnvV"; + static const char *sopt = "-o:hnsvV"; static const struct option lopt[] = { { "options", required_argument, NULL, 'o' }, { "help", no_argument, NULL, 'h' }, @@ -609,6 +609,11 @@ int ntfs_parse_options(struct ntfs_options *popts, void (*usage)(void), * no effect - automount passes it, meaning 'no-mtab' */ break; + case 's': + /* + * no effect - automount passes it, meaning sloppy + */ + break; case 'v': /* * We must handle the 'verbose' option even if