From 4f1b37669c0d1b4aeb5b401a6dc75ebdc80ab42f Mon Sep 17 00:00:00 2001 From: skidder Date: Sun, 28 Oct 2007 14:23:20 +0000 Subject: [PATCH] Allow local protocol to work with servers running both under restricted accounts (e.g. Vista regular user) and unrestricted accounts (e.g. LocalService) --- src/common/utils.cpp | 5 ++++- src/common/utils_proto.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/utils.cpp b/src/common/utils.cpp index 4b86bb0ec9..4acc388af3 100644 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -326,7 +326,10 @@ void prefix_kernel_object_name(char* name, size_t bufsize) bInitDone = true; } - if (bGlobalPrefix) + // Backwards compatibility feature with Firebird 2.0.3 and earlier. + // If the name already contains some prefix (specified by the user, as was + // recommeded in firebird.conf) additional prefix is not added + if (bGlobalPrefix && !strchr(name, '\\')) { const char *prefix = "Global\\"; const size_t len_prefix = strlen(prefix); diff --git a/src/common/utils_proto.h b/src/common/utils_proto.h index c44968a68c..292622f105 100644 --- a/src/common/utils_proto.h +++ b/src/common/utils_proto.h @@ -98,7 +98,7 @@ namespace fb_utils } #ifdef WIN_NT - void prefix_kernel_object_name(char*, size_t); + void prefix_kernel_object_name(char* name, size_t bufsize); #endif Firebird::PathName get_process_name();