diff options
author | Werner Koch <wk@gnupg.org> | 2007-02-20 15:55:32 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2007-02-20 15:55:32 +0100 |
commit | e8402d514edc8ff537a46aff963634e028af56c5 (patch) | |
tree | 59d123e88f2e704d9531d21adf64a5eb8085ee08 /agent | |
parent | doc/ (diff) | |
download | gnupg2-e8402d514edc8ff537a46aff963634e028af56c5.tar.xz gnupg2-e8402d514edc8ff537a46aff963634e028af56c5.zip |
* call-pinentry.c (start_pinentry): Fix for OS X to allow loading
of the bundle. Tested by Benjamin Donnachie.
Diffstat (limited to 'agent')
-rw-r--r-- | agent/ChangeLog | 5 | ||||
-rw-r--r-- | agent/call-pinentry.c | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog index cd19f35cf..e78d2dc5c 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog @@ -1,3 +1,8 @@ +2007-02-20 Werner Koch <wk@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@g10code.com> * gpg-agent.c: New option --pinentry-touch-file. diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index 8b527b2d5..14e6476d8 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -214,12 +214,21 @@ start_pinentry (ctrl_t ctrl) 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"; |