mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-05 04:59:42 +00:00
532469a251
When CIL parses sets or conditional expressions, any identifier that matches an operator name will always be taken as an operator. If a declaration has the same name as an operator, then there is the possibility of causing either confusion or a syntax error if it is used in an expression. The potential for problems is much greater than any possible advantage in allowing a declaration to share the name of a reserved word. Create a new function, __cil_is_reserved_name() that is called when an identifier is declared and its name is being validated. In this function, check if the declaration has the same name as a reserved word for an expression operator that can be used with the identifer's flavor and exit with an error if it does. Also, move the check for types, type aliases, and type attributes matching the reserved word "self" to this new function. Finally, change the name of the function __cil_verify_name() to cil_verify_name(), since this function is neither static nor a helper function. Signed-off-by: James Carter <jwcart2@gmail.com> |
||
---|---|---|
.. | ||
cil | ||
include | ||
man | ||
src | ||
tests | ||
utils | ||
.gitignore | ||
COPYING | ||
Makefile | ||
VERSION |