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:
Eric Paris 2011-04-20 15:20:13 -04:00
parent 44121f6624
commit 7190ed6020

View file

@ -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;