Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] cifs: use standard token parser for mount options
Date: Thu, 22 Mar 2012 15:28:15 +0000	[thread overview]
Message-ID: <1332430095.1883.8.camel@localhost> (raw)
In-Reply-To: <CAH2r5mt6NiZmF1JZPG2sZ7bwNFiWpxxQ9Q6OoJXC_st7+oUoZg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wed, 2012-03-21 at 15:33 -0500, Steve French wrote:
> Sachin,
> I am a little worried about merge conflicts - am about 1/3 of the way
> through merging (and reviewing) Pavel's and similarly have started to
> merge Jeff's patches, so make sure you rebase them on what is in
> cifs-2.6.git tree on samba.org
> 

Done. Version 2 of patch sent to the list along with some bug fixes
which Jeff encountered in his testing.

Sachin Prabhu

> On Wed, Mar 21, 2012 at 3:30 PM, Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> > On Wed, 21 Mar 2012 18:33:07 +0000
> > Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> >
> >> On Wed, 2012-03-21 at 13:38 -0400, Jeff Layton wrote:
> >> > On Fri, 09 Mar 2012 15:33:17 +0000
> >> > Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> >> >
> >> > > Use the standard token parser instead of the long if confidtion to parse
> >> > > cifs mount options.
> >> > >
> >> > > This was first proposed by Scott Lovenberg
> >> > > http://lists.samba.org/archive/linux-cifs-client/2010-May/006079.html
> >> > >
> >> > > Mount options have been grouped together in terms of their input types.
> >> > > Aliases for username, password, domain and credentials have been added.
> >> > > The password parser has been modified to make it easier to read.
> >> > >
> >> > > Signed-off-by: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> >> > >
> >> >
> >> >
> >> > In testing this today, I found a problem. I tried to mount up a share
> >> > with sec=none as the options. With that, I got this error:
> >> >
> >> >     CIFS: Unknown mount option pass=
> >> >
> >> > The problem is that the mount.cifs helper will pass a blank "pass="
> >> > option to the kernel. It seems like the standard option parser doesn't
> >> > have a way to allow you to specify an optional argument. That may need
> >> > to be added in order for this to work.
> >>
> >>
> >> We could use it in this manner.
> >>
> >> ----
> >> Allow mount option pass to be a blank value.
> >>
> >> When using sec=none, the mount.cifs helper will pass a blank 'pass='
> >> mount option. This should be handled by the parser.
> >>
> >> Signed-off-by: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> >> ---
> >>  fs/cifs/connect.c |    7 +++++++
> >>  1 files changed, 7 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> >> index 8f83ea0..831f242 100644
> >> --- a/fs/cifs/connect.c
> >> +++ b/fs/cifs/connect.c
> >> @@ -107,6 +107,9 @@ enum {
> >>       /* Mount options to be ignored */
> >>       Opt_ignore,
> >>
> >> +     /* Options which could be blank */
> >> +     Opt_blank_pass,
> >> +
> >>       Opt_err
> >>  };
> >>
> >> @@ -180,6 +183,7 @@ static const match_table_t cifs_mount_option_tokens = {
> >>
> >>       { Opt_user, "user=%s" },
> >>       { Opt_user, "username=%s" },
> >> +     { Opt_blank_pass, "pass=" },
> >>       { Opt_pass, "pass=%s" },
> >>       { Opt_pass, "password=%s" },
> >>       { Opt_ip, "ip=%s" },
> >> @@ -1546,6 +1550,9 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
> >>                       }
> >>                       vol->nullauth = 0;
> >>                       break;
> >> +             case Opt_blank_pass:
> >> +                     vol->password = NULL;
> >> +                     break;
> >>               case Opt_pass:
> >>                       /* passwords have to be handled differently
> >>                        * to allow the character used for deliminator
> >
> > ACK.
> >
> > Since Steve hasn't committed this yet, care to send a respin of the
> > original? I don't think there are any others that require the ability
> > to handle a blank option, but we can always add that later if needed.
> >
> > --
> > Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> 
> 
> 

      parent reply	other threads:[~2012-03-22 15:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09 15:33 [PATCH] cifs: use standard token parser for mount options Sachin Prabhu
     [not found] ` <CAFB9KM0AMO_r0W2grCk2MRfZ9bVf+J5pbP1Yexxw46dacoYynw@mail.gmail.com>
     [not found]   ` <CAFB9KM0AMO_r0W2grCk2MRfZ9bVf+J5pbP1Yexxw46dacoYynw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-09 16:16     ` Scott Lovenberg
     [not found]       ` <4F5A2CCD.6010808-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-03-14 18:17         ` Sachin Prabhu
     [not found]           ` <24dc471d-42ca-45cf-89eb-26dc3117fa1a-s/U0J+63Ool+R5eDjrG6zsCp5Q1pQRjfhaY/URYTgi6ny3qCrzbmXA@public.gmane.org>
2012-03-14 19:18             ` Jeff Layton
     [not found]               ` <20120314151811.65838f6b-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-03-14 19:30                 ` Steve French
     [not found]                   ` <CAH2r5muUm-E5n6Le4JPnBZmKNJ46OJ8dYZdS9b79=O3UGif4Rg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-14 19:43                     ` Scott Lovenberg
     [not found]                       ` <4F60F4E3.5010003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-03-14 19:46                         ` Scott Lovenberg
2012-03-14 19:58                     ` Sachin Prabhu
     [not found]                       ` <90445c03-bbcc-4faf-afbf-fde4b1d17f05-s/U0J+63Ool+R5eDjrG6zsCp5Q1pQRjfhaY/URYTgi6ny3qCrzbmXA@public.gmane.org>
2012-03-14 20:15                         ` Scott Lovenberg
     [not found]                           ` <4F60FC5C.3050507-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-03-14 20:47                             ` Sachin Prabhu
2012-03-14 21:08                         ` Steve French
2012-03-15 11:06                     ` Jeff Layton
2012-03-14 20:30                 ` Sachin Prabhu
2012-03-15 11:44 ` Jeff Layton
2012-03-21 17:38 ` Jeff Layton
     [not found]   ` <20120321133855.52901c60-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-03-21 18:33     ` Sachin Prabhu
2012-03-21 18:36       ` Scott Lovenberg
     [not found]         ` <4F6A1F9F.6070101-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-03-21 19:09           ` Sachin Prabhu
     [not found]             ` <CAFB9KM0YywoKwjMxijp+T-SxqZLjuOhiXkMRa5y57eYuTHOc6Q@mail.gmail.com>
     [not found]               ` <CAFB9KM0YywoKwjMxijp+T-SxqZLjuOhiXkMRa5y57eYuTHOc6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-21 19:16                 ` Sachin Prabhu
2012-03-21 20:30       ` Jeff Layton
     [not found]         ` <20120321163051.0fa2c714-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-03-21 20:33           ` Steve French
     [not found]             ` <CAH2r5mt6NiZmF1JZPG2sZ7bwNFiWpxxQ9Q6OoJXC_st7+oUoZg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-21 20:38               ` Jeff Layton
     [not found]                 ` <20120321163818.0418fd2c-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-03-22 15:26                   ` [PATCH v2] " Sachin Prabhu
2012-03-22 15:30                     ` Jeff Layton
2012-03-22 15:28               ` Sachin Prabhu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332430095.1883.8.camel@localhost \
    --to=sprabhu-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox