Skip to content

Commit 97c1429

Browse files
committed
Postfix: allow fbsvcmgr action_db_stats sts_hdr_pages in the embedded mode
1 parent 6dda6b1 commit 97c1429

4 files changed

Lines changed: 13 additions & 2 deletions

File tree

src/common/UtilSvc.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ class StandaloneUtilityInterface : public UtilSvc
124124
status_exception::raise(Arg::Gds(isc_utl_trusted_switch));
125125
}
126126

127+
bool hasAuthBlock() override
128+
{
129+
return false;
130+
}
131+
127132
unsigned int getAuthBlock(const unsigned char** bytes) override
128133
{
129134
// Utility has no auth block

src/common/UtilSvc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ class UtilSvc : public Firebird::GlobalStorage
143143
virtual void hidePasswd(ArgvType&, int) = 0;
144144
virtual void fillDpb(Firebird::ClumpletWriter& dpb) = 0;
145145
virtual bool finished() = 0;
146+
virtual bool hasAuthBlock() = 0;
146147
virtual unsigned int getAuthBlock(const unsigned char** bytes) = 0;
147148
virtual bool utf8FileNames() = 0;
148149
virtual Firebird::ICryptKeyCallback* getCryptCallback() = 0;

src/jrd/svc.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ class Service : public Firebird::UtilSvc, public TypedHandle<type_svc>
163163
|| checkForShutdown();
164164
}
165165

166+
bool hasAuthBlock() override
167+
{
168+
return svc_auth_block.hasData();
169+
}
170+
166171
// Get authentication block if present
167172
unsigned int getAuthBlock(const unsigned char** bytes) override;
168173

src/utilities/gstat/dba.epp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ int gstat(Firebird::UtilSvc* uSvc)
672672
Firebird::PathName fileName = name;
673673
const Firebird::PathName connName = fileName;
674674

675-
if (uSvc->isService())
675+
if (uSvc->hasAuthBlock())
676676
{
677677
attachDatabase(status_vector, connName, &DB, uSvc, username, password, role
678678
#ifdef TRUSTED_AUTH
@@ -827,7 +827,7 @@ int gstat(Firebird::UtilSvc* uSvc)
827827
dba_exit(FINI_OK, tddba);
828828
}
829829

830-
if (!uSvc->isService())
830+
if (!uSvc->hasAuthBlock())
831831
{
832832
attachDatabase(status_vector, connName, &DB, uSvc, username, password, role
833833
#ifdef TRUSTED_AUTH

0 commit comments

Comments
 (0)