From: Daniel Caujolle-B. <f1...@us...> - 2003-10-25 01:24:22
|
Update of /cvsroot/xine/xine-ui/src/xitk In directory sc8-pr-cvs1:/tmp/cvs-serv14507 Modified Files: config_wrapper.c Log Message: don't allow configuration changing for exp_level >= 30 (like in the lib) using cfg:/ mrl type Index: config_wrapper.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/config_wrapper.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- config_wrapper.c 14 Jul 2003 22:44:09 -0000 1.14 +++ config_wrapper.c 25 Oct 2003 01:20:55 -0000 1.15 @@ -27,7 +27,15 @@ #include "common.h" -extern gGui_t *gGui; +extern gGui_t *gGui; + +/* + * experience level above this level + * can't be changed by cfg:/ mrl type. + * This reflect xine-lib policy about security issue + */ +#define XINE_CONFIG_SECURITY 30 + static void config_update(xine_cfg_entry_t *entry, int type, int min, int max, int value, char *string) { @@ -148,6 +156,12 @@ xine_cfg_entry_t entry; if(xine_config_lookup_entry(gGui->xine, key, &entry)) { + + if(entry.exp_level >= XINE_CONFIG_SECURITY) { + xine_info(_("For security reason, you're not allowed to change " + "the configuration entry named '%s'."), entry.key); + return; + } switch(entry.type) { |