summaryrefslogtreecommitdiffstats
path: root/g10/g10.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-02-09 18:43:42 +0100
committerWerner Koch <wk@gnupg.org>1998-02-09 18:43:42 +0100
commitd6fa02add60c1d9ef6c7c576de3beb0a5debfade (patch)
tree4d33ad9fa6f8013b274ecb0dfe36cab7b15b47eb /g10/g10.c
parentremoved aclocal (diff)
downloadgnupg2-d6fa02add60c1d9ef6c7c576de3beb0a5debfade.tar.xz
gnupg2-d6fa02add60c1d9ef6c7c576de3beb0a5debfade.zip
release 0.2.3
Diffstat (limited to 'g10/g10.c')
-rw-r--r--g10/g10.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/g10/g10.c b/g10/g10.c
index b64896912..410aeaaf3 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -101,8 +101,12 @@ strusage( int level )
static void
i18n_init(void)
{
- #ifdef ENABLE_NLS
- setlocale( LC_MESSAGES, "" );
+ #ifdef HAVE_LIBINTL
+ #ifdef HAVE_LC_MESSAGES
+ setlocale( LC_MESSAGES, "" );
+ #else
+ setlocale( LC_ALL, "" );
+ #endif
bindtextdomain( PACKAGE, G10_LOCALEDIR );
textdomain( PACKAGE );
#endif
@@ -235,8 +239,10 @@ main( int argc, char **argv )
enum cmd_values cmd = 0;
const char *trustdb_name = NULL;
-
- secmem_init( 16384 );
+ /* Please note that we may running SUID(ROOT), so be very CAREFUL
+ * when adding any stuff between here and the call to
+ * secmem_init() somewhere after the option parsing
+ */
i18n_init();
opt.compress = -1; /* defaults to standard compress level */
@@ -397,6 +403,10 @@ main( int argc, char **argv )
if( errors )
g10_exit(2);
+ /* initialize the secure memory. */
+ secmem_init( 16384 );
+ /* Okay, we are now working under our real uid */
+
write_status( STATUS_ENTER );
set_debug();