is_permitted functionality [ options ]
In recovery scripts global functionality and script functionality can be checked for startup permission.
This enables you to minimize possible by-passes of the denials defined in the DENY_LIST in the edrc config file edrc.cfg(4).
This allows to restrict functionality when an edrc configuration is used for special purposes (as: application- or operation support or to software control but don't want to give the user all freedom of changing things).
If a certain checked functionality (e.g.: /shell) is not permitted to be started, the message
edrc-WARNING: execution of functionality 'shell' not permitted.
is displayed
The functionality is the string defined in the @PROVIDES@ tag in the contributed command or general edrc functionalities.
To list all functionalities, invoke the edrcperm command in edrc.
Non-existing functionalities are treated as permitted.
Check if functionality of the own (e.g: edrcupgrade) contributed command is permitted to be started:
if [ `is_permitted seturl` = True ]; then : : if
Check if global low-level edrc functionality (low level functionality has an underscore '_' in the name) is permitted to start:
if [ `is_permitted edit_file` = True ]; then : : if
Check if a global edrc functionality is permitted to be started:
if [ `is_permitted /shell` = True ]; then : : if if [ `is_permitted /env.new` = True ]; then : : if
Check if a specific functionality start of a specific contributed command is permitted:
if [ `is_permitted /contrib.logs.view` = True ]; then : : if
In addition True is returned to stdout.
In addition False is returned to stdout.
This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.