Re: 答复: [PATCH] mount.cifs: add a useful "passwd" option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My general opinion on option synonyms is that they can add value when
they match the names of options already used by similar tools (e.g.
smbclient or nfs mount utilities) since that can remove confusion for
users familiar with those tools - but we have to be careful since cifs
exposes a large number of options on mount (due to all the dialects
and server types).

On Wed, Feb 28, 2018 at 6:26 AM, Jeff Layton <jlayton@xxxxxxxxx> wrote:
> On Wed, 2018-02-28 at 15:52 +0800, zhang.xianwei8@xxxxxxxxxx wrote:
>> Dear all,
>>     Could you take a little time to review it? Thanks:)
>>
>>
>> ------------------原始邮件------------------
>> 发件人:张贤伟10129966
>> 收件人:jlayton@xxxxxxxxx <jlayton@xxxxxxxxx>
>> 抄送人:linux-cifs@xxxxxxxxxxxxxxx <linux-cifs@xxxxxxxxxxxxxxx>smfrench@xxxxxxxxx <smfrench@xxxxxxxxx>pshilov@xxxxxxxxxxxxx <pshilov@xxxxxxxxxxxxx>
>> 日 期 :2018年02月14日 14:05
>> 主 题 :[PATCH] mount.cifs: add a useful "passwd" option
>> Add a useful "passwd" option and update mount.cifs manpage.
>>
>> Signed-off-by: Zhang Xianwei
>> ---
>> mount.cifs.c | 1 +
>> mount.cifs.rst | 2 +-
>> 2 files changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/mount.cifs.c b/mount.cifs.c
>> index ae7a899..aa5e6b0 100644
>> --- a/mount.cifs.c
>> +++ b/mount.cifs.c
>> @@ -693,6 +693,7 @@ static int parse_opt_token(const char *token)
>> strcmp(token, "username") == 0)
>> return OPT_USER;
>> if (strcmp(token, "pass") == 0 ||
>> +     strcmp(token, "passwd") == 0 ||
>> strcmp(token, "password") == 0)
>> return OPT_PASS;
>> if (strcmp(token, "sec") == 0)
>> diff --git a/mount.cifs.rst b/mount.cifs.rst
>> index a81c6c4..472ecb9 100644
>> --- a/mount.cifs.rst
>> +++ b/mount.cifs.rst
>> @@ -64,7 +64,7 @@ username=arg|user=arg
>> non-superuser mount. It is therefore recommended to use the full
>> ``username=`` option name.
>>
>> -password=arg|pass=arg
>> +password=arg|pass=arg|passwd=arg
>> specifies the CIFS password. If this option is not given then the
>> environment variable PASSWD is used. If the password is not specified
>> directly or indirectly via an argument to mount, mount.cifs will
>
>
> I won't NAK this, as Pavel and Steve may feel differently, and they're
> more involved with cifs these days than I am, but...
>
> I'm not a fan of adding new option synonyms like this. They're a
> maintenance burden, and they also cause confusing and conflicting usages
> to be spread across the Internet in documentation, blog posts, etc.
>
> We already have some aliased options like this in cifs, but in my
> experience, it really is better to just have _one_ way to specify an
> option.
> --
> Jeff Layton <jlayton@xxxxxxxxx>



-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux