diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/asshelp.c | 13 | ||||
-rw-r--r-- | common/audit.c | 2 | ||||
-rw-r--r-- | common/gpgrlhelp.c | 2 | ||||
-rw-r--r-- | common/homedir.c | 9 | ||||
-rw-r--r-- | common/logging.c | 4 | ||||
-rw-r--r-- | common/simple-pwquery.c | 4 |
6 files changed, 18 insertions, 16 deletions
diff --git a/common/asshelp.c b/common/asshelp.c index fe328549b..cfbc3ac16 100644 --- a/common/asshelp.c +++ b/common/asshelp.c @@ -265,9 +265,9 @@ lock_spawning (lock_spawn_t *lock, const char *homedir, const char *name, *lock = CreateMutexW (NULL, FALSE, - !strcmp (name, "agent")? L"GnuPG_spawn_agent_sentinel": - !strcmp (name, "dirmngr")? L"GnuPG_spawn_dirmngr_sentinel": - /* */ L"GnuPG_spawn_unknown_sentinel"); + !strcmp (name, "agent")? L"spawn_"GNUPG_NAME"_agent_sentinel": + !strcmp (name, "dirmngr")? L"spawn_"GNUPG_NAME"_dirmngr_sentinel": + /* */ L"spawn_"GNUPG_NAME"_unknown_sentinel"); if (!*lock) { log_error ("failed to create the spawn_%s mutex: %s\n", @@ -378,7 +378,7 @@ start_new_gpg_agent (assuan_context_t *r_ctx, } restart: - infostr = force_pipe_server? NULL : getenv ("GPG_AGENT_INFO"); + infostr = force_pipe_server? NULL : getenv (GPG_AGENT_INFO_NAME); if (!infostr || !*infostr) { char *sockname; @@ -388,7 +388,7 @@ start_new_gpg_agent (assuan_context_t *r_ctx, /* First check whether we can connect at the standard socket. */ - sockname = make_filename (homedir, "S.gpg-agent", NULL); + sockname = make_filename (homedir, GPG_AGENT_SOCK_NAME, NULL); err = assuan_socket_connect (ctx, sockname, 0, 0); if (err) @@ -517,7 +517,8 @@ start_new_gpg_agent (assuan_context_t *r_ctx, infostr = xstrdup (infostr); if ( !(p = strchr (infostr, PATHSEP_C)) || p == infostr) { - log_error (_("malformed GPG_AGENT_INFO environment variable\n")); + log_error (_("malformed %s environment variable\n"), + GPG_AGENT_INFO_NAME); xfree (infostr); force_pipe_server = 1; goto restart; diff --git a/common/audit.c b/common/audit.c index e4522dc19..103120a24 100644 --- a/common/audit.c +++ b/common/audit.c @@ -1187,7 +1187,7 @@ audit_print_result (audit_ctx_t ctx, estream_t out, int use_html) clear_helptags (ctx); if (use_html) - es_fputs ("<div class=\"GnuPGAuditLog\">\n", ctx->outstream); + es_fputs ("<div class=\"" GNUPG_NAME "AuditLog\">\n", ctx->outstream); if (!ctx->log || !ctx->logused) { diff --git a/common/gpgrlhelp.c b/common/gpgrlhelp.c index cc6e9a10b..e2fdb9a4d 100644 --- a/common/gpgrlhelp.c +++ b/common/gpgrlhelp.c @@ -92,6 +92,6 @@ gnupg_rl_initialize (void) cleanup_after_signal, readline, add_history); - rl_readline_name = "GnuPG"; + rl_readline_name = GNUPG_NAME; #endif } diff --git a/common/homedir.c b/common/homedir.c index faf9787d6..682df9ab0 100644 --- a/common/homedir.c +++ b/common/homedir.c @@ -221,7 +221,8 @@ default_homedir (void) { char *tmp; - tmp = read_w32_registry_string (NULL, "Software\\GNU\\GnuPG", + tmp = read_w32_registry_string (NULL, + "Software\\GNU\\" GNUPG_NAME, "HomeDir"); if (tmp && !*tmp) { @@ -585,7 +586,7 @@ dirmngr_socket_name (void) s1 = s1buf; } # endif - s2 = DIRSEP_S "S.dirmngr"; + s2 = DIRSEP_S DIRMNGR_SOCK_NAME; name = xmalloc (strlen (s1) + strlen (s2) + 1); strcpy (stpcpy (name, s1), s2); for (p=name; *p; p++) @@ -594,7 +595,7 @@ dirmngr_socket_name (void) } return name; #else /*!HAVE_W32_SYSTEM*/ - return GNUPG_LOCALSTATEDIR "/run/" PACKAGE_NAME "/S.dirmngr"; + return GNUPG_LOCALSTATEDIR "/run/" PACKAGE_NAME "/"DIRMNGR_SOCK_NAME; #endif /*!HAVE_W32_SYSTEM*/ } @@ -639,7 +640,7 @@ gnupg_module_name (int which) #ifdef GNUPG_DEFAULT_DIRMNGR return GNUPG_DEFAULT_DIRMNGR; #else - X(bindir, "dirmngr"); + X(bindir, DIRMNGR_NAME); #endif case GNUPG_MODULE_NAME_PROTECT_TOOL: diff --git a/common/logging.c b/common/logging.c index f78df9141..e94cdaf3e 100644 --- a/common/logging.c +++ b/common/logging.c @@ -460,7 +460,7 @@ set_file_fd (const char *name, int fd) { HANDLE hd; - ActivateDevice (L"Drivers\\GnuPG_Log", 0); + ActivateDevice (L"Drivers\\"GNUPG_NAME"_Log", 0); /* Ignore a filename and write the debug output to the GPG2: device. */ hd = CreateFile (L"GPG2:", GENERIC_WRITE, @@ -636,7 +636,7 @@ do_logv (int level, int ignore_arg_ptr, const char *fmt, va_list arg_ptr) tmp = (no_registry ? NULL - : read_w32_registry_string (NULL, "Software\\GNU\\GnuPG", + : read_w32_registry_string (NULL, "Software\\GNU\\"GNUPG_NAME, "DefaultLogFile")); log_set_file (tmp && *tmp? tmp : NULL); jnlib_free (tmp); diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c index 08f59d246..7dcc05747 100644 --- a/common/simple-pwquery.c +++ b/common/simple-pwquery.c @@ -329,7 +329,7 @@ agent_open (int *rfd) int nread; *rfd = -1; - infostr = getenv ( "GPG_AGENT_INFO" ); + infostr = getenv (GPG_AGENT_INFO_NAME); if ( !infostr || !*infostr ) infostr = default_gpg_agent_info; if ( !infostr || !*infostr ) @@ -349,7 +349,7 @@ agent_open (int *rfd) || (p-infostr)+1 >= sizeof client_addr.sun_path ) { #ifdef SPWQ_USE_LOGGING - log_error ( _("malformed GPG_AGENT_INFO environment variable\n")); + log_error (_("malformed %s environment variable\n"), GPG_AGENT_INFO_NAME); #endif return SPWQ_NO_AGENT; } |