All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] mount.cifs: don't send a mandatory ver= option to the kernel
Date: Thu, 17 May 2012 17:44:06 +0100	[thread overview]
Message-ID: <1337273046.2275.1.camel@localhost> (raw)
In-Reply-To: <1336763001-7315-1-git-send-email-jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

On Fri, 2012-05-11 at 15:03 -0400, Jeff Layton wrote:
> Traditionally, this ver= option was used to specify the "options
> version" that we're passing in. It has always been set to '1' though
> and we have never changed that.
> 
> Eventually we want to have a ver= (or vers=) option that allows users
> to specify the SMB version that they want to use to talk to the server.
> 
> At that point, this option will just get in the way. Let's go ahead
> and remove it now in preparation for that day.
> 

Do we need 'ver=' mount option to specify the SMB version number? Isn't
'vers=' sufficient for this?

Sachin Prabhu

> Signed-off-by: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
> ---
>  mount.cifs.c |   20 +++++++-------------
>  1 files changed, 7 insertions(+), 13 deletions(-)
> 
> diff --git a/mount.cifs.c b/mount.cifs.c
> index 0408158..3041987 100644
> --- a/mount.cifs.c
> +++ b/mount.cifs.c
> @@ -100,12 +100,6 @@
>  #define MAX_DOMAIN_SIZE 64
>  
>  /*
> - * value of the ver= option that gets passed to the kernel. Used to indicate
> - * behavioral changes introduced in the mount helper.
> - */
> -#define OPTIONS_VERSION "1"
> -
> -/*
>   * mount.cifs has been the subject of many "security" bugs that have arisen
>   * because of users and distributions installing it as a setuid root program
>   * before it had been audited for security holes. The default behavior is
> @@ -1833,21 +1827,21 @@ assemble_mountinfo(struct parsed_mount_info *parsed_info,
>  			goto assemble_exit;
>  	}
>  
> -	/* copy in ver= string. It's not really needed, but what the hell */
> -	if (*parsed_info->options)
> -		strlcat(parsed_info->options, ",", sizeof(parsed_info->options));
> -	strlcat(parsed_info->options, "ver=", sizeof(parsed_info->options));
> -	strlcat(parsed_info->options, OPTIONS_VERSION, sizeof(parsed_info->options));
> -
>  	/* copy in user= string */
>  	if (parsed_info->got_user) {
> -		strlcat(parsed_info->options, ",user=",
> +		if (*parsed_info->options)
> +			strlcat(parsed_info->options, ",",
> +				sizeof(parsed_info->options));
> +		strlcat(parsed_info->options, "user=",
>  			sizeof(parsed_info->options));
>  		strlcat(parsed_info->options, parsed_info->username,
>  			sizeof(parsed_info->options));
>  	}
>  
>  	if (*parsed_info->domain) {
> +		if (*parsed_info->options)
> +			strlcat(parsed_info->options, ",",
> +				sizeof(parsed_info->options));
>  		strlcat(parsed_info->options, ",domain=",
>  			sizeof(parsed_info->options));
>  		strlcat(parsed_info->options, parsed_info->domain,

  parent reply	other threads:[~2012-05-17 16:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 19:03 [PATCH] mount.cifs: don't send a mandatory ver= option to the kernel Jeff Layton
     [not found] ` <1336763001-7315-1-git-send-email-jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
2012-05-17 10:48   ` Jeff Layton
2012-05-17 16:44   ` Sachin Prabhu [this message]
2012-05-17 17:03     ` Steve French
     [not found]       ` <CAH2r5muvJ=QUt6MsYQiZpZDWp+GRzviJRnJ6Q7O5eE1zYNOnJg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-17 17:54         ` Jeff Layton
     [not found]           ` <20120517135437.6af5c851-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2012-05-17 17:58             ` Steve French
     [not found]               ` <CAH2r5mviuR0VK-j-G1h9WBzexji92u5KW5x613Xbvb4rAmB-1w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-17 18:25                 ` Jeff Layton
     [not found]                   ` <20120517142532.26ef58f9-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2012-05-17 18:30                     ` Scott Lovenberg
     [not found]                       ` <4FB543D4.4020202-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-05-17 18:32                         ` Steve French

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=1337273046.2275.1.camel@localhost \
    --to=sprabhu-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@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 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.