Bug 5922 - CVAR_PROTECTED is not effective
Status: NEW
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: All All
: P3 major
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2013-04-13 10:56 EDT by Eugene C.
Modified: 2013-04-13 16:13:40 EDT
1 user (show)

See Also:



Description Eugene C. 2013-04-13 10:56:01 EDT
CGame module code can bypass CVAR_PROTECTED flag by sending "set fs_basepath somepath" via trap_SendConsoleCommand syscall for example, UI can do the same via trap_Cmd_ExecuteText
Comment 1 Ben Millwood 2013-04-13 12:42:45 EDT
What if the cvar is also protected against user changes (CVAR_ROM, for example)?

Might be worth mentioning if the given flags leave this loophole, though.
Comment 2 Eugene C. 2013-04-13 14:25:59 EDT
CVAR_ROM works as expected but CVAR_PROTECTED was introduced to prevent _VM_ to modify important user/system cvars if I'm correct
Comment 3 Ben Millwood 2013-04-13 15:40:38 EDT
Well, yes, but currently all the variables that have CVAR_PROTECTED also have CVAR_INIT, so won't that stop the set command from working?
Comment 4 Eugene C. 2013-04-13 16:13:40 EDT
This is true but then corresponding descriptions should be updated too. Because its practically useless without INIT/ROM flags