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>
Sun, 15 Dec 2019 11:16:52 +0000 (12:16 +0100)
commit1d75e29b237850f1d666a8d2f3a3846516dca43c
tree5d32bc2b949f816a5e97de0e4b075dd47001aa75
parenta16b1ee7e565d33b50feac9a0ee8b306c4e22bb2
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.

(cherry picked from commit 6da498c28f2598bea4d651756485f57d54e379f4)
src/shared/ask-password-api.c