Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
7d220c8f
Commit
7d220c8f
authored
May 27, 2003
by
Steve French
Committed by
Steve French
May 27, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjust for change of devname to const char (new mount format)
parent
161651c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
fs/cifs/connect.c
fs/cifs/connect.c
+18
-6
No files found.
fs/cifs/connect.c
View file @
7d220c8f
...
@@ -346,6 +346,7 @@ parse_mount_options(char *options, const char *devname, struct smb_vol *vol)
...
@@ -346,6 +346,7 @@ parse_mount_options(char *options, const char *devname, struct smb_vol *vol)
{
{
char
*
value
;
char
*
value
;
char
*
data
;
char
*
data
;
int
temp_len
;
memset
(
vol
,
0
,
sizeof
(
struct
smb_vol
));
memset
(
vol
,
0
,
sizeof
(
struct
smb_vol
));
vol
->
linux_uid
=
current
->
uid
;
/* current->euid instead? */
vol
->
linux_uid
=
current
->
uid
;
/* current->euid instead? */
...
@@ -398,8 +399,9 @@ parse_mount_options(char *options, const char *devname, struct smb_vol *vol)
...
@@ -398,8 +399,9 @@ parse_mount_options(char *options, const char *devname, struct smb_vol *vol)
"CIFS: invalid path to network resource
\n
"
);
"CIFS: invalid path to network resource
\n
"
);
return
1
;
/* needs_arg; */
return
1
;
/* needs_arg; */
}
}
if
(
strnlen
(
value
,
300
)
<
300
)
{
if
((
temp_len
=
strnlen
(
value
,
300
))
<
300
)
{
vol
->
UNC
=
value
;
vol
->
UNC
=
kmalloc
(
GFP_KERNEL
,
temp_len
);
strcpy
(
vol
->
UNC
,
value
);
if
(
strncmp
(
vol
->
UNC
,
"//"
,
2
)
==
0
)
{
if
(
strncmp
(
vol
->
UNC
,
"//"
,
2
)
==
0
)
{
vol
->
UNC
[
0
]
=
'\\'
;
vol
->
UNC
[
0
]
=
'\\'
;
vol
->
UNC
[
1
]
=
'\\'
;
vol
->
UNC
[
1
]
=
'\\'
;
...
@@ -472,8 +474,9 @@ parse_mount_options(char *options, const char *devname, struct smb_vol *vol)
...
@@ -472,8 +474,9 @@ parse_mount_options(char *options, const char *devname, struct smb_vol *vol)
printk
(
KERN_WARNING
"CIFS: Missing UNC name for mount target
\n
"
);
printk
(
KERN_WARNING
"CIFS: Missing UNC name for mount target
\n
"
);
return
1
;
return
1
;
}
}
if
(
strnlen
(
devname
,
300
)
<
300
)
{
if
((
temp_len
=
strnlen
(
devname
,
300
))
<
300
)
{
vol
->
UNC
=
devname
;
vol
->
UNC
=
kmalloc
(
GFP_KERNEL
,
temp_len
);
strcpy
(
vol
->
UNC
,
devname
);
if
(
strncmp
(
vol
->
UNC
,
"//"
,
2
)
==
0
)
{
if
(
strncmp
(
vol
->
UNC
,
"//"
,
2
)
==
0
)
{
vol
->
UNC
[
0
]
=
'\\'
;
vol
->
UNC
[
0
]
=
'\\'
;
vol
->
UNC
[
1
]
=
'\\'
;
vol
->
UNC
[
1
]
=
'\\'
;
...
@@ -812,6 +815,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
...
@@ -812,6 +815,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cFYI
(
1
,
(
"Entering cifs_mount. Xid: %d with: %s"
,
xid
,
mount_data
));
cFYI
(
1
,
(
"Entering cifs_mount. Xid: %d with: %s"
,
xid
,
mount_data
));
if
(
parse_mount_options
(
mount_data
,
devname
,
&
volume_info
))
{
if
(
parse_mount_options
(
mount_data
,
devname
,
&
volume_info
))
{
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
FreeXid
(
xid
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -852,6 +857,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
...
@@ -852,6 +857,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
(
"Error connecting to IPv4 socket. Aborting operation"
));
(
"Error connecting to IPv4 socket. Aborting operation"
));
if
(
csocket
!=
NULL
)
if
(
csocket
!=
NULL
)
sock_release
(
csocket
);
sock_release
(
csocket
);
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
FreeXid
(
xid
);
return
rc
;
return
rc
;
}
}
...
@@ -860,6 +867,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
...
@@ -860,6 +867,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
if
(
srvTcp
==
NULL
)
{
if
(
srvTcp
==
NULL
)
{
rc
=
-
ENOMEM
;
rc
=
-
ENOMEM
;
sock_release
(
csocket
);
sock_release
(
csocket
);
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
FreeXid
(
xid
);
return
rc
;
return
rc
;
}
else
{
}
else
{
...
@@ -943,6 +952,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
...
@@ -943,6 +952,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
""
,
""
,
cifs_sb
->
cifs_sb
->
local_nls
);
local_nls
);
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
FreeXid
(
xid
);
return
-
ENODEV
;
return
-
ENODEV
;
}
else
{
}
else
{
...
@@ -995,7 +1006,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
...
@@ -995,7 +1006,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
if
(
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
if
(
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
CIFSSMBQFSUnixInfo
(
xid
,
tcon
,
cifs_sb
->
local_nls
);
CIFSSMBQFSUnixInfo
(
xid
,
tcon
,
cifs_sb
->
local_nls
);
}
}
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
FreeXid
(
xid
);
return
rc
;
return
rc
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment