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
Kirill Smelkov
linux
Commits
8395ebd9
Commit
8395ebd9
authored
May 26, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://cifs.bkbits.net/linux-2.5cifs
into penguin.transmeta.com:/home/torvalds/v2.5/linux
parents
ce4a4076
7d220c8f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
17 deletions
+37
-17
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+8
-4
fs/cifs/connect.c
fs/cifs/connect.c
+18
-6
fs/cifs/netmisc.c
fs/cifs/netmisc.c
+9
-6
fs/cifs/smberr.h
fs/cifs/smberr.h
+2
-1
No files found.
fs/cifs/cifsfs.c
View file @
8395ebd9
...
...
@@ -94,13 +94,17 @@ cifs_read_super(struct super_block *sb, void *data,
sb
->
s_blocksize_bits
=
14
;
/* default 2**14 = CIFS_MAX_MSGSIZE */
inode
=
iget
(
sb
,
ROOT_I
);
if
(
!
inode
)
if
(
!
inode
)
{
rc
=
-
ENOMEM
;
goto
out_no_root
;
}
sb
->
s_root
=
d_alloc_root
(
inode
);
if
(
!
sb
->
s_root
)
if
(
!
sb
->
s_root
)
{
rc
=
-
ENOMEM
;
goto
out_no_root
;
}
return
0
;
...
...
@@ -114,7 +118,7 @@ cifs_read_super(struct super_block *sb, void *data,
unload_nls
(
cifs_sb
->
local_nls
);
if
(
cifs_sb
)
kfree
(
cifs_sb
);
return
-
EINVAL
;
return
rc
;
}
void
...
...
@@ -332,7 +336,7 @@ struct file_operations cifs_file_ops = {
.
release
=
cifs_close
,
.
lock
=
cifs_lock
,
.
fsync
=
cifs_fsync
,
.
flush
=
cifs_flush
,
.
flush
=
cifs_flush
,
.
mmap
=
cifs_file_mmap
,
.
sendfile
=
generic_file_sendfile
,
};
...
...
fs/cifs/connect.c
View file @
8395ebd9
...
...
@@ -346,6 +346,7 @@ parse_mount_options(char *options, const char *devname, struct smb_vol *vol)
{
char
*
value
;
char
*
data
;
int
temp_len
;
memset
(
vol
,
0
,
sizeof
(
struct
smb_vol
));
vol
->
linux_uid
=
current
->
uid
;
/* current->euid instead? */
...
...
@@ -398,8 +399,9 @@ parse_mount_options(char *options, const char *devname, struct smb_vol *vol)
"CIFS: invalid path to network resource
\n
"
);
return
1
;
/* needs_arg; */
}
if
(
strnlen
(
value
,
300
)
<
300
)
{
vol
->
UNC
=
value
;
if
((
temp_len
=
strnlen
(
value
,
300
))
<
300
)
{
vol
->
UNC
=
kmalloc
(
GFP_KERNEL
,
temp_len
);
strcpy
(
vol
->
UNC
,
value
);
if
(
strncmp
(
vol
->
UNC
,
"//"
,
2
)
==
0
)
{
vol
->
UNC
[
0
]
=
'\\'
;
vol
->
UNC
[
1
]
=
'\\'
;
...
...
@@ -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
"
);
return
1
;
}
if
(
strnlen
(
devname
,
300
)
<
300
)
{
vol
->
UNC
=
devname
;
if
((
temp_len
=
strnlen
(
devname
,
300
))
<
300
)
{
vol
->
UNC
=
kmalloc
(
GFP_KERNEL
,
temp_len
);
strcpy
(
vol
->
UNC
,
devname
);
if
(
strncmp
(
vol
->
UNC
,
"//"
,
2
)
==
0
)
{
vol
->
UNC
[
0
]
=
'\\'
;
vol
->
UNC
[
1
]
=
'\\'
;
...
...
@@ -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
));
if
(
parse_mount_options
(
mount_data
,
devname
,
&
volume_info
))
{
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
return
-
EINVAL
;
}
...
...
@@ -852,6 +857,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
(
"Error connecting to IPv4 socket. Aborting operation"
));
if
(
csocket
!=
NULL
)
sock_release
(
csocket
);
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
return
rc
;
}
...
...
@@ -860,6 +867,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
if
(
srvTcp
==
NULL
)
{
rc
=
-
ENOMEM
;
sock_release
(
csocket
);
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
return
rc
;
}
else
{
...
...
@@ -943,6 +952,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
""
,
cifs_sb
->
local_nls
);
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
return
-
ENODEV
;
}
else
{
...
...
@@ -995,7 +1006,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
if
(
tcon
->
ses
->
capabilities
&
CAP_UNIX
)
CIFSSMBQFSUnixInfo
(
xid
,
tcon
,
cifs_sb
->
local_nls
);
}
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
FreeXid
(
xid
);
return
rc
;
}
...
...
@@ -2293,7 +2305,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
length
=
strnlen
(
bcc_ptr
,
BCC
(
smb_buffer_response
)
-
2
);
/* skip service field (NB: this field is always ASCII) */
bcc_ptr
+=
length
+
1
;
strncpy
(
tcon
->
treeName
,
tree
,
MAX_TREE_SIZE
);
strncpy
(
tcon
->
treeName
,
tree
,
MAX_TREE_SIZE
);
if
(
smb_buffer
->
Flags2
&=
SMBFLG2_UNICODE
)
{
length
=
UniStrnlen
((
wchar_t
*
)
bcc_ptr
,
512
);
if
(((
long
)
bcc_ptr
+
(
2
*
length
))
-
...
...
fs/cifs/netmisc.c
View file @
8395ebd9
...
...
@@ -46,7 +46,7 @@ struct smb_to_posix_error {
const
struct
smb_to_posix_error
mapping_table_ERRDOS
[]
=
{
{
ERRbadfunc
,
-
EINVAL
},
{
ERRbadfile
,
-
ENOENT
},
{
ERRbadpath
,
-
ENO
ENT
},
{
ERRbadpath
,
-
ENO
TDIR
},
{
ERRnofids
,
-
EMFILE
},
{
ERRnoaccess
,
-
EACCES
},
{
ERRbadfid
,
-
EBADF
},
...
...
@@ -63,26 +63,29 @@ const struct smb_to_posix_error mapping_table_ERRDOS[] = {
{
ERRnofiles
,
-
ENOENT
},
{
ERRbadshare
,
-
ETXTBSY
},
{
ERRlock
,
-
EACCES
},
{
ERRfilexists
,
-
EINVAL
},
{
ERRunsup
,
-
EINVAL
},
{
ERRnosuchshare
,
-
ENXIO
},
{
ERRfilexists
,
-
EEXIST
},
{
ERRinvparm
,
-
EINVAL
},
{
ERRdiskfull
,
-
ENOSPC
},
{
ERRinvn
um
,
-
EINVAL
},
{
ERRinvn
ame
,
-
ENOENT
},
{
ERRdirnotempty
,
-
ENOTEMPTY
},
{
ERRnotlocked
,
-
ENOLCK
},
{
ERRalreadyexists
,
-
EEXIST
},
{
ERRmoredata
,
-
EOVERFLOW
},
{
ErrQuota
,
-
EDQUOT
},
{
ErrNotALink
,
-
ENOLINK
},
{
ERRnetlogonNotStarted
,
-
ENOPROTOOPT
},
{
0
,
0
}
};
const
struct
smb_to_posix_error
mapping_table_ERRSRV
[]
=
{
{
ERRerror
,
-
EIO
},
{
ERRbadpw
,
-
E
ACCES
},
{
ERRbadpw
,
-
E
PERM
},
{
ERRbadtype
,
-
EREMOTE
},
{
ERRaccess
,
-
EACCES
},
{
ERRinvtid
,
-
ENXIO
},
{
ERRinvnetname
,
-
ENO
ENT
},
{
ERRinvnetname
,
-
ENO
DEV
},
{
ERRinvdevice
,
-
ENXIO
},
{
ERRqfull
,
-
ENOSPC
},
{
ERRqtoobig
,
-
ENOSPC
},
...
...
@@ -617,7 +620,7 @@ static const struct {
ERRHRD
,
ERRgeneral
,
NT_STATUS_EVENTLOG_CANT_START
},
{
ERRDOS
,
ERRnoaccess
,
NT_STATUS_TRUST_FAILURE
},
{
ERRHRD
,
ERRgeneral
,
NT_STATUS_MUTANT_LIMIT_EXCEEDED
},
{
ERRDOS
,
2455
,
NT_STATUS_NETLOGON_NOT_STARTED
},
{
ERRDOS
,
ERRnetlogonNotStarted
,
NT_STATUS_NETLOGON_NOT_STARTED
},
{
ERRSRV
,
2239
,
NT_STATUS_ACCOUNT_EXPIRED
},
{
ERRHRD
,
ERRgeneral
,
NT_STATUS_POSSIBLE_DEADLOCK
},
{
ERRHRD
,
ERRgeneral
,
NT_STATUS_NETWORK_CREDENTIAL_CONFLICT
},
{
...
...
fs/cifs/smberr.h
View file @
8395ebd9
...
...
@@ -59,7 +59,7 @@
#define ERRfilexists 80
/* The file named in the request already exists. */
#define ERRinvparm 87
#define ERRdiskfull 112
#define ERRinvn
um
123
#define ERRinvn
ame
123
#define ERRdirnotempty 145
#define ERRnotlocked 158
#define ERRalreadyexists 183
...
...
@@ -109,4 +109,5 @@ class.*/
#define ERRbadclient 2240
#define ERRbadLogonTime 2241
#define ERRpasswordExpired 2242
#define ERRnetlogonNotStarted 2455
#define ERRnosupport 0xFFFF
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