[Rpm-maint] [rpm-software-management/rpm] Fix IMA signature fubar, take III (#1833, RhBug:2018937) (PR #1914)

Panu Matilainen notifications at github.com
Tue Feb 8 09:26:04 UTC 2022


> But now you'll get a NULL return value for empty signatures, because signature is only set if off is not zero.

For IMA yes, because that's arguably the only sane thing to do for a variable length non-existent data - how many zeros should you return? I think returning NULL would be far more meaningful for file digests too but that's a long-standing API and I think even in-tree users may expect the zeros rather than NULL.

> Can't you do the special casing in the lookup instead? I.e.:

Right, that's indeed nicer. Will update.

I don't have specific plans for swapping digests over to offsets but if it ends up removing redundant code and saving some memory... Like noted in my earlier comment, on my system the number of empty file digests is about 33% so its non-trivial.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1914#issuecomment-1032391496
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/1914/c1032391496 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220208/1be54e3d/attachment.html>


More information about the Rpm-maint mailing list