mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-02 01:28:16 +02:00
Trivial config parser: enumerate the elements we don't care about
This quiets -Wswitch-enum warnings. The trivial config parser is used by the setuid activation helper, and only handles the elements whose contents influence the operation of that helper: system service directories, the setuid activation helper itself, the bus uid, and the bus type. [smcv: split out from a larger commit; add justification; move ELEMENT_SERVICEDIR start handler to a functionally equivalent list of elements whose content we are going to process later] Reviewed-by: Simon McVittie <smcv@debian.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191
This commit is contained in:
parent
21eb3317c5
commit
8fba673e92
1 changed files with 43 additions and 0 deletions
|
|
@ -162,6 +162,7 @@ bus_config_parser_start_element (BusConfigParser *parser,
|
|||
|
||||
switch (parser->type)
|
||||
{
|
||||
case ELEMENT_SERVICEDIR:
|
||||
case ELEMENT_SERVICEHELPER:
|
||||
case ELEMENT_USER:
|
||||
case ELEMENT_CONFIGTYPE:
|
||||
|
|
@ -185,6 +186,26 @@ bus_config_parser_start_element (BusConfigParser *parser,
|
|||
break;
|
||||
}
|
||||
|
||||
case ELEMENT_NONE:
|
||||
case ELEMENT_BUSCONFIG:
|
||||
case ELEMENT_INCLUDE:
|
||||
case ELEMENT_LISTEN:
|
||||
case ELEMENT_AUTH:
|
||||
case ELEMENT_POLICY:
|
||||
case ELEMENT_LIMIT:
|
||||
case ELEMENT_ALLOW:
|
||||
case ELEMENT_DENY:
|
||||
case ELEMENT_FORK:
|
||||
case ELEMENT_PIDFILE:
|
||||
case ELEMENT_INCLUDEDIR:
|
||||
case ELEMENT_SELINUX:
|
||||
case ELEMENT_ASSOCIATE:
|
||||
case ELEMENT_STANDARD_SESSION_SERVICEDIRS:
|
||||
case ELEMENT_KEEP_UMASK:
|
||||
case ELEMENT_SYSLOG:
|
||||
case ELEMENT_ALLOW_ANONYMOUS:
|
||||
case ELEMENT_APPARMOR:
|
||||
/* fall through */
|
||||
default:
|
||||
{
|
||||
/* we really don't care about the others... */
|
||||
|
|
@ -286,6 +307,28 @@ bus_config_parser_content (BusConfigParser *parser,
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ELEMENT_NONE:
|
||||
case ELEMENT_BUSCONFIG:
|
||||
case ELEMENT_INCLUDE:
|
||||
case ELEMENT_LISTEN:
|
||||
case ELEMENT_AUTH:
|
||||
case ELEMENT_POLICY:
|
||||
case ELEMENT_LIMIT:
|
||||
case ELEMENT_ALLOW:
|
||||
case ELEMENT_DENY:
|
||||
case ELEMENT_FORK:
|
||||
case ELEMENT_PIDFILE:
|
||||
case ELEMENT_INCLUDEDIR:
|
||||
case ELEMENT_SELINUX:
|
||||
case ELEMENT_ASSOCIATE:
|
||||
case ELEMENT_STANDARD_SESSION_SERVICEDIRS:
|
||||
case ELEMENT_STANDARD_SYSTEM_SERVICEDIRS:
|
||||
case ELEMENT_KEEP_UMASK:
|
||||
case ELEMENT_SYSLOG:
|
||||
case ELEMENT_ALLOW_ANONYMOUS:
|
||||
case ELEMENT_APPARMOR:
|
||||
/* fall through */
|
||||
default:
|
||||
{
|
||||
/* we don't care about the others... really */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue