[Patch] Make credentials file parameters consistent with command line parameters
Scott Lovenberg <[email protected]>
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
This patch makes the mount.cifs credentials file parameters consistent with the command line parameters to remove ambiguity between the command line parameter format and the credentials file format. That is, it parses for both short and long form of the 'username', 'password', and 'domain' parameters. This patch is against the current cifs-utils-4.2. I'm also thinking of adding a second patch that allows for parsing a "domain/user", "domain%user" and "domain/user%password" formats as allowed from the command line. Comments are appreciated. -- Peace and Blessings, -Scott. _______________________________________________ linux-cifs-client mailing list [email protected] https://lists.samba.org/mailman/listinfo/linux-cifs-client
mount.cifs.c.patch
(text/x-patch, 871 B)
@@ -358,7 +358,7 @@
if (newline)
*newline = '\0';
- if (strncasecmp("username", line_buf + i, 8) == 0) {
+ if (strncasecmp("user", line_buf + i, 4) == 0) {
temp_val = strchr(line_buf + i, '=');
if (temp_val) {
/* go past equals sign */
@@ -380,7 +380,7 @@
strlcpy(parsed_info->username, temp_val,
sizeof(parsed_info->username));
}
- } else if (strncasecmp("password", line_buf + i, 8) == 0) {
+ } else if (strncasecmp("pass", line_buf + i, 4) == 0) {
temp_val = strchr(line_buf + i, '=');
if (!temp_val)
continue;
@@ -388,7 +388,7 @@
i = set_password(parsed_info, temp_val);
if (i)
return i;
- } else if (strncasecmp("domain", line_buf + i, 6) == 0) {
+ } else if (strncasecmp("dom", line_buf + i, 3) == 0) {
temp_val = strchr(line_buf + i, '=');
if (temp_val) {
/* go past equals sign */