daemon: implemented blacklisting/whitelisting of plugins.
authorKrisztian Litkey <kli@iki.fi>
Wed, 20 Nov 2013 22:45:26 +0000 (00:45 +0200)
committerKrisztian Litkey <kli@iki.fi>
Thu, 21 Nov 2013 11:14:28 +0000 (13:14 +0200)
commit5de22eb4cbf92e3884636690215045847271c42b
tree924c634819b74bc8e866384a5813a9911ad6bb59
parent29e7a1eaccad063c34a694b2b5715b4b2a297d7f
daemon: implemented blacklisting/whitelisting of plugins.

Currently plugins can only be blacklisted/whitelisted on the
command line. You can specify blacklists and whitelists separately
for builtin plugins, dynamic plugins, and plugins of either type.
You can use the special tokens '*' and 'all' as wildcards which
match all tokens. Using wildcards you can easily blacklist or
whitelist all plugins of any or a certain kind then puch holes
on the whiltelists or blacklists.

Examples:
  - to blacklist all builtin plugins, use:
        murphyd --blacklist-builtin '*'

  - to blacklist all builtin plugins except lua and resource-native, use:
        murphyd --blacklist-builtin '*' --whitelist-builtin lua,resource-native

  - to consider all external plugins untrusted and blacklist them, use:
        murphyd --blacklist-dynamic '*'

  - to disable the console:
        murphyd --blacklist console,wrt-console

Note that only the names of builtin plugins can be (somewhat) trusted
and even those cannot be trusted if you don't have any extra mechanisms
for the integrity protection of binaries and libraries. External plugins
can always be copied/moved under a different name, so disabling any
specific external plugin by name should not be considered secure by any
means. One typical usage of these options is to disable loading of any
external plugins.
src/core/context.h
src/core/plugin.c
src/daemon/config.c
src/daemon/daemon.c