From cc008d9defb762e5c0dd40e4501d3b7c299354fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 24 Jan 2008 15:55:05 +0000 Subject: [PATCH] Whitelisting. --- include/vlc_configuration.h | 8 +++++--- src/modules/entry.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) 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; -- 2.39.2