Skip to content

Commit

Permalink
Don't allow remote mythbackends to upgrade database.
Browse files Browse the repository at this point in the history
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
sphery committed Aug 5, 2011
1 parent d525265 commit cccad82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mythtv/programs/mythbackend/main_helpers.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit cccad82

Please sign in to comment.