[svn] GnuPG - r4436 - trunk/agent

svn author wk cvs at cvs.gnupg.org
Tue Feb 20 15:55:32 CET 2007


Author: wk
Date: 2007-02-20 15:55:32 +0100 (Tue, 20 Feb 2007)
New Revision: 4436

Modified:
   trunk/agent/ChangeLog
   trunk/agent/call-pinentry.c
Log:
	* call-pinentry.c (start_pinentry): Fix for OS X to allow loading
	of the bundle.  Tested by Benjamin Donnachie.


Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog	2007-02-18 13:48:03 UTC (rev 4435)
+++ trunk/agent/ChangeLog	2007-02-20 14:55:32 UTC (rev 4436)
@@ -1,3 +1,8 @@
+2007-02-20  Werner Koch  <wk at g10code.com>
+
+	* call-pinentry.c (start_pinentry): Fix for OS X to allow loading
+	of the bundle.  Tested by Benjamin Donnachie.
+
 2007-02-14  Werner Koch  <wk at g10code.com>
 
 	* gpg-agent.c: New option --pinentry-touch-file.

Modified: trunk/agent/call-pinentry.c
===================================================================
--- trunk/agent/call-pinentry.c	2007-02-18 13:48:03 UTC (rev 4435)
+++ trunk/agent/call-pinentry.c	2007-02-20 14:55:32 UTC (rev 4436)
@@ -214,12 +214,21 @@
 
   if (!opt.pinentry_program || !*opt.pinentry_program)
     opt.pinentry_program = GNUPG_DEFAULT_PINENTRY;
+    pgmname = opt.pinentry_program;
   if ( !(pgmname = strrchr (opt.pinentry_program, '/')))
     pgmname = opt.pinentry_program;
   else
     pgmname++;
 
+  /* OS X needs the entire file name in argv[0], so that it can locate
+     the resource bundle.  For other systems we stick to the the usual
+     convention of supplying only the name of the program.  */
+#ifdef __APPLE__
+  argv[0] = opt.pinentry_program;
+#else /*!__APPLE__*/
   argv[0] = pgmname;
+#endif /*__APPLE__*/
+
   if (ctrl->display && !opt.keep_display)
     {
       argv[1] = "--display";




More information about the Gnupg-commits mailing list