Here's a patch to use pwmd for form history. pwmd is a daemon that
listens on a local socket and waits for commands from clients to
manipulate data. The data is an encrypted XML file. The password to
open/save the file is gotten with gpg-agent. Read
src/formhist/README.pwmd for more info.
--
Benjamin J. Kibbey [EMAIL PROTECTED]/jabber/freenode
3019 F5FC AA33 5BC7 BE9F 09D2 393E DBD2 40D5 FA7E
commit df755b42e5d58413a43c8243e68fbdc9b6842824
Author: Ben Kibbey [EMAIL PROTECTED]
Date: Sun Jan 28 08:28:14 2007 -0500
Only #include what is needed in pwmd.[ch].
elinks-git-18771fd+libpwmd-2.0.x-3.diff
commit 131a990d372ddf25a4a6103440cd5a6c05eab390
Author: Ben Kibbey [EMAIL PROTECTED]
Date: Sun Jan 28 08:16:30 2007 -0500
Include pwmd.h where needed to silence prototype warnings.
A couple more variable renamings to avoid confusion with libpwmd
names.
Cleaner 'struct string' usage.
Fixed a couple memory leaks from pwmd_command().
commit 74369b109e3ab3257e45a19012bd88002a0ce37f
Author: Ben Kibbey [EMAIL PROTECTED]
Date: Sun Jan 28 05:13:05 2007 -0500
Don't abort configure if libpwmd is not found or if formhist was
disabled. Also use pkg-config to configure libpwmd.
commit 3589f40931ce0954894adf298708e8952b00795a
Author: Ben Kibbey [EMAIL PROTECTED]
Date: Sat Jan 27 20:54:06 2007 -0500
Use N_() to set internationalization strings.
commit 04601083f58d4b5abfe423406e0e6ddcf01fa534
Author: Ben Kibbey [EMAIL PROTECTED]
Date: Sat Jan 27 20:41:24 2007 -0500
Don't do save_pwmd_formhist() in anonymous mode.
commit daaa0835464cb41cc444c9e26de1099e0fcf1823
Author: Ben Kibbey [EMAIL PROTECTED]
Date: Sat Jan 27 20:32:40 2007 -0500
Renamed some functions to be less confusing with libpwmd function
names.
commit 29a4b2606577f61fb4c3e8be061c2b586c6d5040
Author: Ben Kibbey [EMAIL PROTECTED]
Date: Sat Jan 27 20:23:00 2007 -0500
Better configuration option description strings.
diff --git a/Makefile.config.in b/Makefile.config.in
index 98afd5b..d7ff8ec 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -132,6 +132,7 @@ CONFIG_INTERLINK = @CONFIG_INTERLINK@
CONFIG_IPV6 = @CONFIG_IPV6@
CONFIG_JW = @CONFIG_JW@
CONFIG_LEDS = @CONFIG_LEDS@
+CONFIG_PWMD = @CONFIG_PWMD@
CONFIG_LZMA = @CONFIG_LZMA@
CONFIG_MAILCAP = @CONFIG_MAILCAP@
CONFIG_MANUAL = @CONFIG_MANUAL@
diff --git a/configure.in b/configure.in
index 4ee940a..920f858 100644
--- a/configure.in
+++ b/configure.in
@@ -483,6 +483,7 @@ EL_ARG_ENABLE(CONFIG_LZMA, lzma, [lzma],
[ --enable-lzma enable lzma encoding support])
dnl ===
+
dnl Check for GSSAPI, optional even if installed.
dnl ===
@@ -1192,6 +1193,37 @@ EL_ARG_ENABLE(CONFIG_COOKIES, cookies, [Cookies],
EL_ARG_ENABLE(CONFIG_FORMHIST, formhist, [Form history],
[ --disable-formhist disable form history support])
+
+CONFIG_PWMD=no
+AC_ARG_ENABLE(pwmd,
+ [ --enable-pwmd enable Password Manager Daemon support],
+ [if test $enableval != no; then enableval=yes; fi
+ CONFIG_PWMD=$enableval;])
+
+if test x$CONFIG_PWMD = xyes; then
+ if test x$CONFIG_FORMHIST = xyes; then
+ PKG_CHECK_EXISTS([libpwmd], have_libpwmd=1,
+ AC_MSG_WARN([Could not find libpwmd pkg-config module. Disabling pwmd support.]))
+
+ if test $have_libpwmd = 1; then
+ PKG_CHECK_MODULES([libpwmd], [libpwmd = 2.0.0], have_libpwmd=1)
+
+ if test $have_libpwmd = 1; then
+EL_CONFIG(CONFIG_PWMD, [pwmd])
+LIBS=$LIBS $libpwmd_LIBS
+CFLAGS=$CFLAGS $libpwmd_CFLAGS
+ else
+AC_MSG_WARN($libpwmd_PKG_ERRORS)
+ fi
+ fi
+ else
+ AC_MSG_WARN([--enable-pwmd requires --enable-formhist. Disabling pwmd support.])
+ CONFIG_PWMD=no
+ fi
+fi
+
+EL_LOG_CONFIG(CONFIG_PWMD, [Password Manager Daemon], $CONFIG_PWMD)
+
EL_ARG_ENABLE(CONFIG_GLOBHIST, globhist, [Global history],
[ --disable-globhist disable global history support])
diff --git a/features.conf b/features.conf
index 0a756f7..ab9fe20 100644
--- a/features.conf
+++ b/features.conf
@@ -115,6 +115,15 @@ CONFIG_COOKIES=yes
CONFIG_FORMHIST=yes
+### libPWMD Support
+#
+# Storage and retrieval of form data from the Password Manager Daemon.
+#
+# Default: disabled
+
+CONFIG_PWMD=no
+
+
### Global History
#
# This device records each and every page you visit (to a configurable limit).
diff --git a/src/config/actions-main.inc b/src/config/actions-main.inc
index 9626c9d..cd9a55a 100644
--- a/src/config/actions-main.inc
+++ b/src/config/actions-main.inc
@@ -24,6 +24,7 @@ ACTION_(MAIN, file-menu, FILE_MENU, N__(Open the File menu), 0),
ACTION_(MAIN, find-next, FIND_NEXT, N__(Find the next occurrence of the current search text), ACTION_REQUIRE_VIEW_STATE | ACTION_REQUIRE_LOCATION),
ACTION_(MAIN, find-next-back, FIND_NEXT_BACK, N__(Find the previous occurrence of the current search