]> gitweb.michael.orlitzky.com - apply-default-acl.git/commitdiff
src/libadacl.c: only update entries with matching qualifiers.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 11 Dec 2018 05:40:17 +0000 (00:40 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 11 Dec 2018 21:19:54 +0000 (16:19 -0500)
This fixes the bug reported by MichaƂ Bartoszkiewicz wherein multiple
named user/group entries clobber one another. Now, when updating an
existing ACL entry with a given one, we check that their qualifiers
match. This can mean one of three things:

  1. Both entries are named user entries, and their UIDs match.

  2. Both entries are named group entries, and their GIDs match.

  3. Both entries are neither named user or group entries, and
     their qualifiers "match vacuously." That is to say: they
     don't have any qualifiers that should match in the first
     place, so we want to update the entry regardless.

This passes the regression test case that I recently added, and (I
hope) fixes the problem entirely.


No differences found