[PATCH] doc: elaborate on --default-cache-ttl and --max-cache-ttl
wk at gnupg.org
Wed Oct 29 16:08:46 CET 2014
On Wed, 29 Oct 2014 14:04, iomartin at iomartin.net said:
> The gpg-agent cache supports infinite ttl, through the --default-cache-ttl
> option, which was not documented. That, however, is still subject to
> --max-cache-ttl. This patch adds this documentation.
Well, what you see is a buglet. It is not intentional.
What happens is that the argument is converted to an unsigned long using
strtoul but at some point that value is assigned to an int which may
then turn to a negative. This is due to a strange strtoul feature which
I almost always forget about: a sign in the string is legal.
I also do not think that it makes sense to have such a feature in
particular not due to the explict limit set by --max-cache-ttl.
However, if this is desired the argument parser needs to be changed to
explicitly take a signed argument.
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
More information about the Gnupg-devel