aboutsummaryrefslogtreecommitdiffstats
path: root/g10/g10.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/g10.c')
-rw-r--r--g10/g10.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/g10/g10.c b/g10/g10.c
index d9a524dcc..0b55d742e 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -1285,7 +1285,8 @@ main( int argc, char **argv )
opt.force_v3_sigs = 1;
opt.pgp2_workarounds = 1;
opt.def_cipher_algo = CIPHER_ALGO_IDEA;
- if( cmd==aEncr && check_cipher_algo(CIPHER_ALGO_IDEA) ) {
+ if( (cmd==aEncr || cmd==aSym || cmd==aSignEncr)
+ && check_cipher_algo(CIPHER_ALGO_IDEA) ) {
log_info(_("Encrypting a message to a PGP 2.x user requires "
"the IDEA cipher module.\n"));
log_error(_("Please see http://www.gnupg.org/why-not-idea.html"
@@ -2110,10 +2111,18 @@ check_policy_url( const char *s )
return 0;
}
-const char *get_temp_dir(void)
+const char *
+get_temp_dir(void)
{
char *tmp;
+#ifndef __MINGW32__
+ /* Don't allow to be setuid when we are going to create temporary
+ files or directories - yes, this is a bit paranoid */
+ if (getuid() != geteuid() )
+ BUG ();
+#endif
+
if(opt.temp_dir)
return opt.temp_dir;