pinentry-fltk: Created package for FLTK toolkit

The patch (from Debian) fixes the format string handling.
This commit is contained in:
Michael Baeuerle 2019-01-17 12:47:33 +01:00
parent 77f53cf90e
commit 4fa3b662e6
4 changed files with 58 additions and 0 deletions

4
pinentry-fltk/DESCR Normal file
View File

@ -0,0 +1,4 @@
This is a collection of simple PIN or passphrase entry dialogs which
utilize the Assuan protocol as described by the aegypten project.
It provides programs for several graphical toolkits, such as FLTK,
GTK+ and QT, as well as for the console, using curses.

22
pinentry-fltk/Makefile Normal file
View File

@ -0,0 +1,22 @@
# $NetBSD$
PKGNAME= ${DISTNAME:S/pinentry-/pinentry-fltk-/}
COMMENT= Applications for entering PINs or Passphrases, FLTK enabled
.include "../../security/pinentry/Makefile.common"
USE_LANGUAGES+= c c++
USE_TOOLS+= pkg-config
CONFIGURE_ARGS+= --disable-pinentry-gtk2
CONFIGURE_ARGS+= --disable-pinentry-qt
CONFIGURE_ARGS+= --disable-pinentry-curses
CONFIGURE_ARGS+= --disable-pinentry-emacs
#CONFIGURE_ARGS+= --disable-fallback-curses
CONFIGURE_ARGS+= --disable-pinentry-gnome3
CONFIGURE_ARGS+= --disable-libsecret
INSTALL_DIRS= fltk
.include "../../x11/fltk13/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

2
pinentry-fltk/PLIST Normal file
View File

@ -0,0 +1,2 @@
@comment $NetBSD$
bin/pinentry-fltk

View File

@ -0,0 +1,30 @@
$NetBSD$
Fix format string handling (Patch from Debian).
--- fltk/main.cxx.orig 2017-12-03 16:13:05.000000000 +0000
+++ fltk/main.cxx
@@ -241,12 +241,12 @@ static int fltk_cmd_handler(pinentry_t p
if (pe->one_button)
{
fl_ok = ok.c_str();
- fl_message(message);
+ fl_message("%s", message);
result = 1; // OK
}
else if (pe->notok)
{
- switch (fl_choice(message, ok.c_str(), cancel.c_str(), pe->notok))
+ switch (fl_choice("%s", ok.c_str(), cancel.c_str(), pe->notok, message))
{
case 0: result = 1; break;
case 2: result = 0; break;
@@ -256,7 +256,7 @@ static int fltk_cmd_handler(pinentry_t p
}
else
{
- switch (fl_choice(message, ok.c_str(), cancel.c_str(), NULL))
+ switch (fl_choice("%s", ok.c_str(), cancel.c_str(), NULL, message))
{
case 0: result = 1; break;
default: