From: RĂ©mi Denis-Courmont Date: Thu, 24 Jan 2008 15:55:05 +0000 (+0000) Subject: Whitelisting. X-Git-Tag: 0.9.0-test0~3244 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=cc008d9defb762e5c0dd40e4501d3b7c299354fc;p=vlc Whitelisting. --- diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h index 9432b32016..3af9f90141 100644 --- a/include/vlc_configuration.h +++ b/include/vlc_configuration.h @@ -282,7 +282,7 @@ enum vlc_config_properties VLC_CONFIG_OLDNAME, /* former option name (args=const char *) */ - VLC_CONFIG_UNSAFE, + VLC_CONFIG_SAFE, /* tag as modifiable by untrusted input item "sources" (args=none) */ }; @@ -472,8 +472,10 @@ VLC_EXPORT( int, vlc_config_set, (module_config_t *, int, ...) ); #define change_unsaveable() \ vlc_config_set (p_config, VLC_CONFIG_VOLATILE) -#define change_unsafe() \ - vlc_config_set (p_config, VLC_CONFIG_UNSAFE) +#define change_unsafe() (void)0 /* no-op */ + +#define change_safe() \ + vlc_config_set (p_config, VLC_CONFIG_SAFE) /**************************************************************************** * config_chain_t: diff --git a/src/modules/entry.c b/src/modules/entry.c index fa57d2b3c5..2e3edcef81 100644 --- a/src/modules/entry.c +++ b/src/modules/entry.c @@ -411,7 +411,7 @@ int vlc_config_set (module_config_t *restrict item, int id, ...) break; } - case VLC_CONFIG_UNSAFE: + case VLC_CONFIG_SAFE: item->b_unsafe = VLC_TRUE; ret = 0; break;