Permalink
Browse files

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 889f533)
  • Loading branch information...
1 parent d525265 commit cccad820fc4b04cd9fd07d13e25687d675e0f90c @sphery sphery committed Mar 4, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 mythtv/programs/mythbackend/main_helpers.cpp
View
6 mythtv/programs/mythbackend/main_helpers.cpp
@@ -660,16 +660,16 @@ 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;
}
///////////////////////////////////////////
- bool ismaster = gCoreContext->IsMasterHost();
-
g_pUPnp = new MediaServer(ismaster, !cmdline.IsUPnPEnabled() );
if (!ismaster)

0 comments on commit cccad82

Please sign in to comment.