Commit 97e9a9e
NFSD: Add nfsd4_encode_fattr4_posix_access_acl
The POSIX ACL extension to NFSv4 defines FATTR4_POSIX_ACCESS_ACL
for retrieving the access ACL of a file or directory. This patch
adds the XDR encoder for that attribute.
The access ACL is retrieved via get_inode_acl(). If the filesystem
provides no explicit access ACL, one is synthesized from the file
mode via posix_acl_from_mode(). Each entry is encoded as a
posixace4: tag type, permission bits, and principal name (empty
for structural entries, resolved via idmapping for USER/GROUP
entries).
Unlike the default ACL encoder which applies only to directories,
this encoder handles all inode types and ensures an access ACL is
always available through mode-based synthesis when needed.
Signed-off-by: Rick Macklem <rmacklem@uoguelph.ca>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>1 parent 5e62c90 commit 97e9a9e
1 file changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3016 | 3016 | | |
3017 | 3017 | | |
3018 | 3018 | | |
| 3019 | + | |
3019 | 3020 | | |
3020 | 3021 | | |
3021 | 3022 | | |
| |||
3585 | 3586 | | |
3586 | 3587 | | |
3587 | 3588 | | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
3588 | 3595 | | |
3589 | 3596 | | |
3590 | 3597 | | |
| |||
3699 | 3706 | | |
3700 | 3707 | | |
3701 | 3708 | | |
| 3709 | + | |
3702 | 3710 | | |
3703 | 3711 | | |
3704 | 3712 | | |
3705 | 3713 | | |
| 3714 | + | |
3706 | 3715 | | |
3707 | 3716 | | |
3708 | 3717 | | |
| |||
3746 | 3755 | | |
3747 | 3756 | | |
3748 | 3757 | | |
| 3758 | + | |
3749 | 3759 | | |
3750 | 3760 | | |
3751 | 3761 | | |
| |||
3877 | 3887 | | |
3878 | 3888 | | |
3879 | 3889 | | |
| 3890 | + | |
| 3891 | + | |
| 3892 | + | |
| 3893 | + | |
| 3894 | + | |
| 3895 | + | |
| 3896 | + | |
| 3897 | + | |
| 3898 | + | |
| 3899 | + | |
| 3900 | + | |
| 3901 | + | |
| 3902 | + | |
| 3903 | + | |
| 3904 | + | |
| 3905 | + | |
| 3906 | + | |
| 3907 | + | |
| 3908 | + | |
| 3909 | + | |
| 3910 | + | |
| 3911 | + | |
| 3912 | + | |
3880 | 3913 | | |
3881 | 3914 | | |
3882 | 3915 | | |
| |||
3905 | 3938 | | |
3906 | 3939 | | |
3907 | 3940 | | |
| 3941 | + | |
| 3942 | + | |
3908 | 3943 | | |
3909 | 3944 | | |
3910 | 3945 | | |
| |||
0 commit comments