summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael T. Dean <mdean@mythtv.org>2011-03-04 00:39:26 (GMT)
committer Michael T. Dean <mdean@mythtv.org>2011-08-05 02:03:47 (GMT)
commitcccad820fc4b04cd9fd07d13e25687d675e0f90c (patch)
tree6fc80393f24fdbfaccb9473012889b1812ec19d5
parentd525265399ac8352265dbc12d7d29b9d50a852c3 (diff)
Don't allow remote mythbackends to upgrade database.
Only allow the mythbackend application running on the master backend host to upgrade the database. Upgrades can still be performed by mythtv-setup on any host (including master backend host, remote backend hosts, and dedicated mythfrontend hosts). (cherry picked from commit 889f53315d5f62f8c95c8805b2f5a57d9f694749)
-rw-r--r--mythtv/programs/mythbackend/main_helpers.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/mythtv/programs/mythbackend/main_helpers.cpp b/mythtv/programs/mythbackend/main_helpers.cpp
index 623cc5d..b843ad5 100644
--- a/mythtv/programs/mythbackend/main_helpers.cpp
+++ b/mythtv/programs/mythbackend/main_helpers.cpp
@@ -660,7 +660,9 @@ int run_backend(const MythCommandLineParser &cmdline)
if (!setup_context(cmdline))
return BACKEND_EXIT_NO_MYTHCONTEXT;
- if (!UpgradeTVDatabaseSchema(true, true))
+ bool ismaster = gCoreContext->IsMasterHost();
+
+ if (!UpgradeTVDatabaseSchema(ismaster, ismaster))
{
VERBOSE(VB_IMPORTANT, "Couldn't upgrade database to new schema");
return BACKEND_EXIT_DB_OUTOFDATE;
@@ -668,8 +670,6 @@ int run_backend(const MythCommandLineParser &cmdline)
///////////////////////////////////////////
- bool ismaster = gCoreContext->IsMasterHost();
-
g_pUPnp = new MediaServer(ismaster, !cmdline.IsUPnPEnabled() );
if (!ismaster)