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
427eab3b
Commit
427eab3b
authored
Nov 17, 2020
by
Chuck Lever
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSD: Update the NFSv2 SETACL argument decoder to use struct xdr_stream
Signed-off-by:
Chuck Lever
<
chuck.lever@oracle.com
>
parent
6bb844b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
18 deletions
+13
-18
fs/nfsd/nfs2acl.c
fs/nfsd/nfs2acl.c
+12
-17
fs/nfsd/xdr3.h
fs/nfsd/xdr3.h
+1
-1
No files found.
fs/nfsd/nfs2acl.c
View file @
427eab3b
...
...
@@ -201,28 +201,23 @@ static int nfsaclsvc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p)
static
int
nfsaclsvc_decode_setaclargs
(
struct
svc_rqst
*
rqstp
,
__be32
*
p
)
{
struct
xdr_stream
*
xdr
=
&
rqstp
->
rq_arg_stream
;
struct
nfsd3_setaclargs
*
argp
=
rqstp
->
rq_argp
;
struct
kvec
*
head
=
rqstp
->
rq_arg
.
head
;
unsigned
int
base
;
int
n
;
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
;
if
(
argp
->
mask
&
~
NFS_ACL_MASK
)
return
0
;
argp
->
mask
=
ntohl
(
*
p
++
);
if
(
argp
->
mask
&
~
NFS_ACL_MASK
||
!
xdr_argsize_check
(
rqstp
,
p
))
if
(
!
nfs_stream_decode_acl
(
xdr
,
NULL
,
(
argp
->
mask
&
NFS_ACL
)
?
&
argp
->
acl_access
:
NULL
))
return
0
;
if
(
!
nfs_stream_decode_acl
(
xdr
,
NULL
,
(
argp
->
mask
&
NFS_DFACL
)
?
&
argp
->
acl_default
:
NULL
))
return
0
;
base
=
(
char
*
)
p
-
(
char
*
)
head
->
iov_base
;
n
=
nfsacl_decode
(
&
rqstp
->
rq_arg
,
base
,
NULL
,
(
argp
->
mask
&
NFS_ACL
)
?
&
argp
->
acl_access
:
NULL
);
if
(
n
>
0
)
n
=
nfsacl_decode
(
&
rqstp
->
rq_arg
,
base
+
n
,
NULL
,
(
argp
->
mask
&
NFS_DFACL
)
?
&
argp
->
acl_default
:
NULL
);
return
(
n
>
0
);
return
1
;
}
static
int
nfsaclsvc_decode_fhandleargs
(
struct
svc_rqst
*
rqstp
,
__be32
*
p
)
...
...
fs/nfsd/xdr3.h
View file @
427eab3b
...
...
@@ -108,7 +108,7 @@ struct nfsd3_getaclargs {
struct
posix_acl
;
struct
nfsd3_setaclargs
{
struct
svc_fh
fh
;
int
mask
;
__u32
mask
;
struct
posix_acl
*
acl_access
;
struct
posix_acl
*
acl_default
;
};
...
...
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