diff options
author | Marian Csontos <mcsontos@redhat.com> | 2017-05-17 15:26:05 +0200 |
---|---|---|
committer | Marian Csontos <mcsontos@redhat.com> | 2017-05-17 15:35:20 +0200 |
commit | 16c6d9f11ab581a79fb57fd36142af1dc57a3c61 (patch) | |
tree | ccb47d3e57c141caef28da4bb45b55e4a56616fb /daemons/lvmdbusd/utils.py | |
parent | 9291fb7bf5d5f6265f3fd2f5ec6eff6542d2afb9 (diff) | |
download | lvm2-16c6d9f11ab581a79fb57fd36142af1dc57a3c61.tar.gz |
lvmdbusd: Fix notify_dbus mangling config option
If config option is passed by caller, dbusd appends to the option not to
the value, and also without using delimiter.
Bug: RHBZ#1451612
Diffstat (limited to 'daemons/lvmdbusd/utils.py')
-rw-r--r-- | daemons/lvmdbusd/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/daemons/lvmdbusd/utils.py b/daemons/lvmdbusd/utils.py index af9e10aaf..170824d2b 100644 --- a/daemons/lvmdbusd/utils.py +++ b/daemons/lvmdbusd/utils.py @@ -519,7 +519,9 @@ def add_no_notify(cmdline): if '--config' in cmdline: for i, arg in enumerate(cmdline): if arg == '--config': - cmdline[i] += "global/notify_dbus=0" + if len(cmdline) <= i+1: + raise dbus.exceptions.DBusException("Missing value for --config option.") + cmdline[i+1] += " global/notify_dbus=0" break else: cmdline.extend(['--config', 'global/notify_dbus=0']) |