From 592c89dbea03bf81d307e15dfab4a50c4e5411a3 Mon Sep 17 00:00:00 2001 From: roman-simakov Date: Fri, 6 Dec 2013 14:58:07 +0000 Subject: [PATCH] Make comparing of host name case-insensitive --- src/utilities/nbackup/nbackup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utilities/nbackup/nbackup.cpp b/src/utilities/nbackup/nbackup.cpp index fb94e96c96..c0f302bfdc 100644 --- a/src/utilities/nbackup/nbackup.cpp +++ b/src/utilities/nbackup/nbackup.cpp @@ -278,7 +278,7 @@ public: PathName db(_database), host; if (ISC_extract_host(db, host, false) == ISC_PROTOCOL_TCPIP) { - if (strncmp(host.c_str(), localhost, sizeof(localhost) - 1) != 0) + if (host.substr(0, sizeof(localhost) -1) != localhost) pr_error(status, "nbackup needs local access to database file"); }