diff options
author | Jeff Layton <jlayton@samba.org> | 2012-05-02 14:25:28 -0400 |
---|---|---|
committer | Jeff Layton <jlayton@samba.org> | 2012-05-02 14:25:28 -0400 |
commit | bab572a89bd0d989bd761e8cea926dfcf48b938d (patch) | |
tree | e94b0acff407f167885855b4652b642fc383db87 | |
parent | a91fb0671273e4ef9079ee7860574c460aa94a51 (diff) | |
download | cifs-utils-bab572a89bd0d989bd761e8cea926dfcf48b938d.tar.gz cifs-utils-bab572a89bd0d989bd761e8cea926dfcf48b938d.tar.bz2 cifs-utils-bab572a89bd0d989bd761e8cea926dfcf48b938d.zip |
mount.cifs: don't pass credentials= option to the kernel
We handle this option in userspace, so there's little value in also
passing it to the kernel.
Also fix minor double-comma nit in the options string.
Reported-by: Ronald <ronald645@gmail.com>
Signed-off-by: Jeff Layton <jlayton@samba.org>
-rw-r--r-- | mount.cifs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mount.cifs.c b/mount.cifs.c index c90ce3e..0408158 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -1023,7 +1023,7 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info) rc, strerror(rc), value); return rc; } - break; + goto nocopy; case OPT_UID: if (!value || !*value) @@ -1834,7 +1834,9 @@ assemble_mountinfo(struct parsed_mount_info *parsed_info, } /* copy in ver= string. It's not really needed, but what the hell */ - strlcat(parsed_info->options, ",ver=", sizeof(parsed_info->options)); + 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 */ |