diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.ja | 7 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | src/main.c | 3 | ||||
-rw-r--r-- | src/passphrase.c | 8 |
5 files changed, 24 insertions, 4 deletions
@@ -1,5 +1,11 @@ 2005-11-09 + * src/passphrase.c + configure.in: check the availability of mlock(). + src/main.c: check_gpg(): check if OpenPGP protocol is available. + +2005-11-09 + * src/account_dialog.c src/prefs_filter.c: win32: fixed window focus problem. diff --git a/ChangeLog.ja b/ChangeLog.ja index 4a2b740d..775079bd 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,12 @@ 2005-11-09 + * src/passphrase.c + configure.in: mlock() が利用可能かどうかをチェック。 + src/main.c: check_gpg(): OpenPGP プロトコルが利用可能かどうかを + チェック。 + +2005-11-09 + * src/account_dialog.c src/prefs_filter.c: win32: ウィンドウフォーカスの問題を修正。 diff --git a/configure.in b/configure.in index 11f818c0..9056aec1 100644 --- a/configure.in +++ b/configure.in @@ -317,7 +317,7 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \ sys/param.h sys/utsname.h sys/select.h \ - netdb.h regex.h) + netdb.h regex.h sys/mman.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -338,7 +338,7 @@ dnl Checks for library functions. AC_FUNC_ALLOCA AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \ uname flock lockf inet_aton inet_addr \ - fchmod truncate getuid regcomp) + fchmod truncate getuid regcomp mlock) AC_OUTPUT([ Makefile @@ -626,7 +626,8 @@ static void idle_function_for_gpgme(void) static void check_gpg(void) { #if USE_GPGME - if (gpgme_check_version("0.4.5")) { + if (gpgme_check_version("0.4.5") && + !gpgme_engine_check_version(GPGME_PROTOCOL_OpenPGP)) { /* Also does some gpgme init */ gpgme_engine_info_t engineInfo; diff --git a/src/passphrase.c b/src/passphrase.c index d4f50489..84c1c5b2 100644 --- a/src/passphrase.c +++ b/src/passphrase.c @@ -44,7 +44,9 @@ #include <gtk/gtkstock.h> #include <string.h> #include <sys/types.h> -#include <sys/mman.h> +#if HAVE_SYS_MMAN_H +# include <sys/mman.h> +#endif #include "passphrase.h" #include "prefs_common.h" @@ -263,7 +265,9 @@ create_description(const gchar *uid_hint, const gchar *pass_hint, gint prev_bad) static int free_passphrase(gpointer _unused) { if (last_pass != NULL) { +#if HAVE_MLOCK munlock(last_pass, strlen(last_pass)); +#endif g_free(last_pass); last_pass = NULL; debug_print("%% passphrase removed"); @@ -295,8 +299,10 @@ gpgmegtk_passphrase_cb(void *opaque, const char *uid_hint, else { if (prefs_common.store_passphrase) { last_pass = g_strdup(pass); +#if HAVE_MLOCK if (mlock(last_pass, strlen(last_pass)) == -1) debug_print("%% locking passphrase failed"); +#endif if (prefs_common.store_passphrase_timeout > 0) { gtk_timeout_add(prefs_common.store_passphrase_timeout*60*1000, |