Skip to content

Commit

Permalink
Fix file signatures not installing
Browse files Browse the repository at this point in the history
Only the first file signature was getting installed. rpmfiNext returns
the next file iterator index and -1 on termination. Now the loop correctly
terminates only when rpmfiNext return value is negative.

(cherry picked from commit 7bcc79b)
  • Loading branch information
Fionnuala Gunter authored and ffesti committed Sep 1, 2015
1 parent 520bce6 commit 1501d18
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions plugins/ima.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ static rpmRC ima_psm_post(rpmPlugin plugin, rpmte te, int res)
goto exit;
}

while (!rc) {
rc = rpmfiNext(fi);
if (rc < 0) {
if (rc == RPMERR_ITER_END)
rc = 0;
break;
}

while (rpmfiNext(fi) >= 0) {
/* Don't install signatures for (mutable) config files */
if (!(rpmfiFFlags(fi) & RPMFILE_CONFIG)) {
fpath = rpmfiFN(fi);
Expand Down

0 comments on commit 1501d18

Please sign in to comment.