diff options
author | David Shaw <[email protected]> | 2004-12-16 05:16:09 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-12-16 05:16:09 +0000 |
commit | e79f2db8e41acb031fbaaa9bf8638146c90e4653 (patch) | |
tree | a9c1cefb57d2f1962bf917cedb32f5fb2c268b29 /util/secmem.c | |
parent | * apdu.c (apdu_send_le, apdu_send_direct), keylist.c (diff) | |
download | gnupg-e79f2db8e41acb031fbaaa9bf8638146c90e4653.tar.gz gnupg-e79f2db8e41acb031fbaaa9bf8638146c90e4653.zip |
* g10.c (main): Add --require-secmem/--no-require-secmem to cause gpg to
exit if it cannot lock memory. Also remove --nrsign-key and --nrlsign-key
since this can better be done via --edit-key.
* secmem.c (secmem_init): Return a flag to indicate whether we got the
lock.
* memory.h: Return a flag to indicate whether we got the lock.
Diffstat (limited to '')
-rw-r--r-- | util/secmem.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/util/secmem.c b/util/secmem.c index 91cd3eb99..82df884e4 100644 --- a/util/secmem.c +++ b/util/secmem.c @@ -88,8 +88,8 @@ print_warn(void) if (!no_warning) { log_info(_("WARNING: using insecure memory!\n")); - log_info(_("please see http://www.gnupg.org/faq.html " - "for more information\n")); + log_info(_("please see http://www.gnupg.org/faq.html" + " for more information\n")); } } @@ -297,7 +297,8 @@ secmem_get_flags(void) return flags; } -void +/* Returns 1 if memory was locked, 0 if not. */ +int secmem_init( size_t n ) { if( !n ) { @@ -326,6 +327,8 @@ secmem_init( size_t n ) else log_error("Oops, secure memory pool already initialized\n"); } + + return !show_warning; } |