Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen-bOixZGp5f+dBDgjK7y7TUQ@public.gmane.org>
To: Scott Lovenberg
	<scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org"
	<sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
	Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-cifs <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org
Subject: Re: [PATCH 2/2] cifs: Correct comment about domainname length
Date: Mon, 29 Jul 2013 08:27:52 +0800	[thread overview]
Message-ID: <51F5B708.4090404@asianux.com> (raw)
In-Reply-To: <CAFB9KM2zF9m4Y4vcDRkZpMfvWP8NQWYKQTeJTiwgVVVu=4M6Cw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 07/27/2013 02:12 AM, Scott Lovenberg wrote:
> On Thu, Jul 25, 2013 at 8:40 PM, Chen Gang <gang.chen-bOixZGp5f+dBDgjK7y7TUQ@public.gmane.org> wrote:
>> On 07/26/2013 02:34 AM, scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
>>> From: Scott Lovenberg <scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>>
>>> CIFS_MAX_DOMAINNAME_LEN is the max length for a domain name, not a fully qualified domain name.
>>>
>>> Signed-off-by: Scott Lovenberg <scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> ---
>>>  include/uapi/linux/cifs/cifs_mount.h | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/include/uapi/linux/cifs/cifs_mount.h b/include/uapi/linux/cifs/cifs_mount.h
>>> index a58fc6e..d2408ec 100644
>>> --- a/include/uapi/linux/cifs/cifs_mount.h
>>> +++ b/include/uapi/linux/cifs/cifs_mount.h
>>> @@ -17,7 +17,7 @@
>>>  #define _CIFS_MOUNT_H
>>>
>>>  /* Max string lengths for cifs mounting options. */
>>> -#define CIFS_MAX_DOMAINNAME_LEN 256 /* max fully qualified domain name */
>>> +#define CIFS_MAX_DOMAINNAME_LEN 256 /* max domain name length */
>>>  #define CIFS_MAX_USERNAME_LEN   256 /* reasonable max for current servers */
>>>  #define CIFS_MAX_PASSWORD_LEN   512 /* Windows max seems to be 256 wide chars */
>>>  #define CIFS_MAX_SHARE_LEN      256 /* reasonable max share name length */
>>>
>>
>> For our kernel implementation:
>>
>>   for 'CIFS_MAX_DOMAINNAME_LEN', it counts 255 + '\0',
>>   for 'CIFS_MAX_USERNAME_LEN', it counts 256 (may add additional '\0'),
>>
>> And original mail said about 'CIFS_MAX_DOMAINNAME_LEN':
>>
>>   "The maximum length of ... the fully qualified domain name (FQDN) is
>>   63 octets per label and 255 bytes per FQDN. This maximum includes 254
>>   bytes for the FQDN and one byte for the ending dot."
>>
>> And excuse me, I do not know what 'CIFS_MAX_USERNAME_LEN' should be.
>>
>> Do we also need consider about it in our definition comments ?
>>
>>
>> Thanks.
>> --
>> Chen Gang
> 
> Sorry, I misunderstood; I figured that it had to be the domain name
> without the host since we were allowing a host name that's 1024
> characters long.  That documentation should probably be added to the
> cifs_mount.h as well then.
> 
> Still, how can we have a FQDN that's 256 characters long when the host
> name length can be 1024 characters long?
> 

Excuse me, I am not quite familiar about cifs, so can not provide
additional more information (I found it only by reading code).

But I feel, it really need additional discussion and check by the
related experts (related members who are familiar with cifs).

Welcome any members' suggestions and completions.

Thanks.
-- 
Chen Gang

  parent reply	other threads:[~2013-07-29  0:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25 18:34 [PATCH 1/2] cifs: Move and expand MAX_SERVER_SIZE scott.lovenberg
     [not found] ` <1374777285-25639-1-git-send-email-scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-07-25 18:34   ` [PATCH 2/2] cifs: Correct comment about domainname length scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w
     [not found]     ` <1374777285-25639-2-git-send-email-scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-07-26  0:40       ` Chen Gang
     [not found]         ` <51F1C564.5070006-bOixZGp5f+dBDgjK7y7TUQ@public.gmane.org>
2013-07-26 18:12           ` Scott Lovenberg
     [not found]             ` <CAFB9KM2zF9m4Y4vcDRkZpMfvWP8NQWYKQTeJTiwgVVVu=4M6Cw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-29  0:27               ` Chen Gang [this message]
2013-07-29  0:36                 ` Richard Sharpe
     [not found]                   ` <CACyXjPxffbb8VQ55mCWTCP-GDivijXVkHNwtkVTwgAmi1XMyQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-29 18:05                     ` Scott Lovenberg
2013-07-29 20:17                     ` Jeff Layton
     [not found]                       ` <20130729161709.19c52e0f-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2013-07-29 21:10                         ` Scott Lovenberg
     [not found]                           ` <CAFB9KM3CxJcHdFPrGTW595hjNzvYnLgVA6F8J3EMdddz3n0ivw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-30  0:09                             ` Chen Gang
2013-07-30  0:31                               ` Chen Gang
2013-07-25 18:55   ` [PATCH 1/2] cifs: Move and expand MAX_SERVER_SIZE Jeff Layton

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=51F5B708.4090404@asianux.com \
    --to=gang.chen-boixzgp5f+dbdgjk7y7tuq@public.gmane.org \
    --cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
    --cc=scott.lovenberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=sfrench-eUNUBHrolfbYtjvyW6yDsg@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