From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-apps@cygwin.com
Subject: Re: [PATCH setup 0/3] Fix "extrakeys" issues
Date: Thu, 30 Nov 2017 12:53:00 -0000 [thread overview]
Message-ID: <b7dbceba-51a8-91e8-ed1f-ffcd03423231@dronecode.org.uk> (raw)
In-Reply-To: <20171128145605.12860-1-kbrown@cornell.edu>
On 28/11/2017 14:56, Ken Brown wrote:
> The "extrakeys" user setting contains saved extra gpg keys. It was
> introduced in 2009 to replace the use of a file
> /etc/setup/last-extrakeys. It has apparently never worked right.
> Here are the issues I've found:
>
> - User settings are read and written as NUL-terminated strings, but
> extra keys are terminated by LF instead. On writing, this causes
> garbage to be written into setup.rc. On reading, this causes the
> final saved key to be discarded.
>
> - The ExtraKeysSetting constructor calls count_keys() without setting
> bufsize to a positive value. This causes *all* saved keys to be
> discarded.
>
> - Saved keys contain several '#' characters. These are treated as
> comment characters in setup.rc, so that all keys are truncated when
> read.
>
> - There are still references to the "last-extrakeys" file in comments
> and in a help string.
>
> This patch series attempts to fix all these problems. In the case of
> '#', the fix is to treat '#' as a comment character only if it's the
> first non-whitespace character on a line. I don't think this will
> cause problems for any existing uses of '#', but I haven't done a
> thorough check of this yet.
Comments in setup.rc seem to have very little value (since they will be
destroyed the next time setup writes it)
>
> Ken Brown (3):
> Fix the reading and writing of the "extrakeys" user setting
> Change the interpretation of '#' in setup.rc
> Remove references to "last-extrakeys"
>
> KeysSetting.cc | 9 ++++++++-
> KeysSetting.h | 2 +-
> UserSettings.cc | 8 ++++----
> crypto.cc | 8 ++++----
> 4 files changed, 17 insertions(+), 10 deletions(-)
Great. Please apply.
prev parent reply other threads:[~2017-11-30 12:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 14:56 Ken Brown
2017-11-28 14:56 ` [PATCH setup 2/3] Change the interpretation of '#' in setup.rc Ken Brown
2017-11-28 14:56 ` [PATCH setup 3/3] Remove references to "last-extrakeys" Ken Brown
2017-11-28 14:56 ` [PATCH setup 1/3] Fix the reading and writing of the "extrakeys" user setting Ken Brown
2017-11-28 15:28 ` [PATCH setup 0/3] Fix "extrakeys" issues Ken Brown
2017-11-30 12:53 ` Jon Turney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7dbceba-51a8-91e8-ed1f-ffcd03423231@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).