Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5513a510 authored by J. Bruce Fields's avatar J. Bruce Fields
Browse files

nfsd4: fix corruption on setting an ACL.



As of 06f9cc12 "nfsd4: don't create
unnecessary mask acl", any non-trivial ACL will be left with an
unitialized entry, and a trivial ACL may write one entry beyond what's
allocated.

Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent aa07c713
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -590,7 +590,7 @@ posix_state_to_acl(struct posix_acl_state *state, unsigned int flags)
		add_to_mask(state, &state->groups->aces[i].perms);
	}

	if (!state->users->n && !state->groups->n) {
	if (state->users->n || state->groups->n) {
		pace++;
		pace->e_tag = ACL_MASK;
		low_mode_from_nfs4(state->mask.allow, &pace->e_perm, flags);