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).
  • Loading branch information...
1 parent e8ca189 commit 889f53315d5f62f8c95c8805b2f5a57d9f694749 @sphery sphery committed Mar 4, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 mythtv/programs/mythbackend/main_helpers.cpp
@@ -661,16 +661,16 @@ int run_backend(const MythCommandLineParser &cmdline)
if (!setup_context(cmdline))
return GENERIC_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 GENERIC_EXIT_DB_OUTOFDATE;
}
///////////////////////////////////////////
- bool ismaster = gCoreContext->IsMasterHost();
-
g_pUPnp = new MediaServer(ismaster, !cmdline.IsUPnPEnabled() );
if (!ismaster)

0 comments on commit 889f533

Please sign in to comment.