--- src/xine-engine/configfile.c 3 Mar 2004 20:09:16 -0000 1.62 +++ src/xine-engine/configfile.c 16 Mar 2004 20:50:08 -0000 @@ -969,6 +969,15 @@ int handled = 0; lprintf ("change_opt '%s'\n", opt); + + if ((entry = config->lookup_entry(config, "misc.implicit_config")) && + entry->type == CONFIG_TYPE_BOOL) { + if (!entry->num_value) + /* changing config entries implicitly is denied */ + return -1; + } else + /* someone messed with the config entry */ + return -1; if(config && opt) { char *key, *value; --- src/xine-engine/xine.c 3 Mar 2004 20:09:18 -0000 1.284 +++ src/xine-engine/xine.c 16 Mar 2004 20:50:09 -0000 @@ -1429,6 +1429,21 @@ _("Path for saving streams"), _("Streams will be saved only into this directory"), XINE_CONFIG_SECURITY, __config_save_cb, this); + + /* + * implicit configuration changes + */ + this->config->register_bool(this->config, + "misc.implicit_config", 0, + _("allow implicit changes to the configuration (e.g. by MRL)"), + _("If enabled, you allow xine to change your configuration without " + "explicit actions from your side. For example configuration changes " + "demanded by MRLs or embedded into playlist will be executed.\n" + "This setting is security critcal, because xine can receive MRLs or " + "playlists from untrusted remote sources. If you allow them to " + "arbitrarily change your configuration, you might end with a totally " + "messed up xine."), + XINE_CONFIG_SECURITY, NULL, this); /* * keep track of all opened streams