projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge v5.14-rc3 into usb-next
[linux-2.6-microblaze.git]
/
fs
/
cifs
/
cifs_dfs_ref.c
diff --git
a/fs/cifs/cifs_dfs_ref.c
b/fs/cifs/cifs_dfs_ref.c
index
ec57cdb
..
007427b
100644
(file)
--- a/
fs/cifs/cifs_dfs_ref.c
+++ b/
fs/cifs/cifs_dfs_ref.c
@@
-151,6
+151,9
@@
char *cifs_compose_mount_options(const char *sb_mountdata,
return ERR_PTR(-EINVAL);
if (ref) {
return ERR_PTR(-EINVAL);
if (ref) {
+ if (WARN_ON_ONCE(!ref->node_name || ref->path_consumed < 0))
+ return ERR_PTR(-EINVAL);
+
if (strlen(fullpath) - ref->path_consumed) {
prepath = fullpath + ref->path_consumed;
/* skip initial delimiter */
if (strlen(fullpath) - ref->path_consumed) {
prepath = fullpath + ref->path_consumed;
/* skip initial delimiter */
@@
-173,7
+176,7
@@
char *cifs_compose_mount_options(const char *sb_mountdata,
}
}
}
}
- rc = dns_resolve_server_name_to_ip(name, &srvIP);
+ rc = dns_resolve_server_name_to_ip(name, &srvIP
, NULL
);
if (rc < 0) {
cifs_dbg(FYI, "%s: Failed to resolve server part of %s to IP: %d\n",
__func__, name, rc);
if (rc < 0) {
cifs_dbg(FYI, "%s: Failed to resolve server part of %s to IP: %d\n",
__func__, name, rc);
@@
-208,6
+211,10
@@
char *cifs_compose_mount_options(const char *sb_mountdata,
else
noff = tkn_e - (sb_mountdata + off) + 1;
else
noff = tkn_e - (sb_mountdata + off) + 1;
+ if (strncasecmp(sb_mountdata + off, "cruid=", 6) == 0) {
+ off += noff;
+ continue;
+ }
if (strncasecmp(sb_mountdata + off, "unc=", 4) == 0) {
off += noff;
continue;
if (strncasecmp(sb_mountdata + off, "unc=", 4) == 0) {
off += noff;
continue;