libsepol: store all filename transition rules when parsing a policy
The kernel policy parsing logic was incorrectly believing the list of filename transition rules was always empty because we never updated the tail pointer when we added to the list. This patch updates the pointer to the last entry when a new entry is added. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
44121f6624
commit
7190ed6020
1 changed files with 1 additions and 0 deletions
|
@ -2327,6 +2327,7 @@ int filename_trans_read(filename_trans_t **t, struct policy_file *fp)
|
|||
lft->next = ft;
|
||||
else
|
||||
*t = ft;
|
||||
lft = ft;
|
||||
rc = next_entry(buf, fp, sizeof(uint32_t));
|
||||
if (rc < 0)
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue