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
635a45d3
Commit
635a45d3
authored
Nov 17, 2020
by
Chuck Lever
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSD: Update the NFSv2 GETACL argument decoder to use struct xdr_stream
Signed-off-by:
Chuck Lever
<
chuck.lever@oracle.com
>
parent
5650682e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
7 deletions
+17
-7
fs/nfsd/nfs2acl.c
fs/nfsd/nfs2acl.c
+5
-5
fs/nfsd/nfsxdr.c
fs/nfsd/nfsxdr.c
+10
-1
fs/nfsd/xdr.h
fs/nfsd/xdr.h
+1
-0
fs/nfsd/xdr3.h
fs/nfsd/xdr3.h
+1
-1
No files found.
fs/nfsd/nfs2acl.c
View file @
635a45d3
...
...
@@ -188,17 +188,17 @@ static __be32 nfsacld_proc_access(struct svc_rqst *rqstp)
static
int
nfsaclsvc_decode_getaclargs
(
struct
svc_rqst
*
rqstp
,
__be32
*
p
)
{
struct
xdr_stream
*
xdr
=
&
rqstp
->
rq_arg_stream
;
struct
nfsd3_getaclargs
*
argp
=
rqstp
->
rq_argp
;
p
=
nfs2svc_decode_fh
(
p
,
&
argp
->
fh
);
if
(
!
p
)
if
(
!
svcxdr_decode_fhandle
(
xdr
,
&
argp
->
fh
))
return
0
;
if
(
xdr_stream_decode_u32
(
xdr
,
&
argp
->
mask
)
<
0
)
return
0
;
argp
->
mask
=
ntohl
(
*
p
);
p
++
;
return
xdr_argsize_check
(
rqstp
,
p
)
;
return
1
;
}
static
int
nfsaclsvc_decode_setaclargs
(
struct
svc_rqst
*
rqstp
,
__be32
*
p
)
{
struct
nfsd3_setaclargs
*
argp
=
rqstp
->
rq_argp
;
...
...
fs/nfsd/nfsxdr.c
View file @
635a45d3
...
...
@@ -38,7 +38,16 @@ decode_fh(__be32 *p, struct svc_fh *fhp)
return
p
+
(
NFS_FHSIZE
>>
2
);
}
static
bool
/**
* svcxdr_decode_fhandle - Decode an NFSv2 file handle
* @xdr: XDR stream positioned at an encoded NFSv2 FH
* @fhp: OUT: filled-in server file handle
*
* Return values:
* %false: The encoded file handle was not valid
* %true: @fhp has been initialized
*/
bool
svcxdr_decode_fhandle
(
struct
xdr_stream
*
xdr
,
struct
svc_fh
*
fhp
)
{
__be32
*
p
;
...
...
fs/nfsd/xdr.h
View file @
635a45d3
...
...
@@ -165,5 +165,6 @@ void nfssvc_release_readres(struct svc_rqst *rqstp);
/* Helper functions for NFSv2 ACL code */
__be32
*
nfs2svc_encode_fattr
(
struct
svc_rqst
*
rqstp
,
__be32
*
p
,
struct
svc_fh
*
fhp
,
struct
kstat
*
stat
);
__be32
*
nfs2svc_decode_fh
(
__be32
*
p
,
struct
svc_fh
*
fhp
);
bool
svcxdr_decode_fhandle
(
struct
xdr_stream
*
xdr
,
struct
svc_fh
*
fhp
);
#endif
/* LINUX_NFSD_H */
fs/nfsd/xdr3.h
View file @
635a45d3
...
...
@@ -102,7 +102,7 @@ struct nfsd3_commitargs {
struct
nfsd3_getaclargs
{
struct
svc_fh
fh
;
int
mask
;
__u32
mask
;
};
struct
posix_acl
;
...
...
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