]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/ask-password-api: modify keyctl break value
authorKevin Kuehler <keur@xcf.berkeley.edu>
Thu, 28 Nov 2019 00:35:15 +0000 (16:35 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Nov 2019 07:58:29 +0000 (08:58 +0100)
commit6da498c28f2598bea4d651756485f57d54e379f4
tree48524a78ab1754cbf54c6678d3653d521e9b317b
parenta434236accc8bf072f919bb4c6e85b0dbc36e71f
shared/ask-password-api: modify keyctl break value

We can break if KEYCTL_READ return value is equal to our buffer size.

From keyctl(2):

On a successful return, the return value is always the total size of
the payload data.  To determine whether the buffer was of sufficient
size, check to see that the return value is less than or equal to the
value supplied in arg4.
src/shared/ask-password-api.c