dbus/bus
Xin Shi 86a89967f2 dbus-daemon: Avoid known options being interpreted as optional arguments
The man page and --help imply that

    dbus-daemon --print-address --print-pid

is a valid/useful thing to do, but because --print-address takes an
optional argument, it is ambiguous whether --print-pid is meant to
be the argument for --print-address (same as --print-address=--print-pid)
or a new option (same as --print-address=1 --print-pid). In fact,
before this commit, the dbus-daemon would interpret --print-pid as
the optional argument to --print-address, and then fail to parse it
because it isn't an integer.

Because none of our options are syntactically valid as arguments for
any option that takes an optional argument, we can avoid the ambiguity
by delaying parsing of optional arguments until all known options
have been tried.

Resolves: dbus/dbus#467

Signed-off-by: Xin Shi <shixin21@huawei.com>
2023-08-01 18:25:07 +00:00
..
legacy-config build: Add machine-readable licensing markers to the Meson build system 2022-07-13 20:36:13 +01:00
systemd-user build: Add machine-readable licensing markers to the Meson build system 2022-07-13 20:36:13 +01:00
sysusers.d build: Add machine-readable licensing markers to the Meson build system 2022-07-13 20:36:13 +01:00
tmpfiles.d build: Add machine-readable licensing markers to the Meson build system 2022-07-13 20:36:13 +01:00
.gitignore .gitignore: Ignore many more generated files 2018-12-14 13:28:50 +00:00
activation-exit-codes.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
activation-helper-bin.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
activation-helper.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
activation-helper.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
activation.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
activation.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
apparmor.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
apparmor.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
audit.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
audit.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
bus.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
bus.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
CMakeLists.txt Use project relative paths in CMake files 2022-07-25 14:14:57 -05:00
config-loader-expat.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser-common.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser-common.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser-trivial.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser-trivial.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
connection.c bus: Assign a serial number for messages from the driver 2023-06-06 12:01:02 +01:00
connection.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
containers.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
containers.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus.service.in bus: Notify systemd when we are ready 2018-03-02 14:48:49 +00:00
dbus.socket.in systemd: enable the dbus service unconditionally 2010-09-06 03:21:17 +02:00
desktop-file.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
desktop-file.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dir-watch-default.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dir-watch-inotify.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dir-watch-kqueue.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dir-watch.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dispatch.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dispatch.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
driver.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
driver.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
example-session-disable-stats.conf.in config: add examples to show how to enable/disable the Stats interface 2014-10-01 16:38:40 +01:00
example-system-enable-stats.conf.in config: add examples to show how to enable/disable the Stats interface 2014-10-01 16:38:40 +01:00
example-system-hardening-without-traditional-activation.conf Configure option to disable traditional activation 2019-03-25 21:51:33 +02:00
expirelist.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
expirelist.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
main.c dbus-daemon: Avoid known options being interpreted as optional arguments 2023-08-01 18:25:07 +00:00
Makefile.am build: Put system bus socket in runstatedir by default 2022-10-11 17:14:11 +01:00
meson.build build: Put system bus socket in runstatedir by default 2022-10-11 17:14:11 +01:00
org.freedesktop.dbus-session.plist.in 10.4 is old so set more sensible launchd defaults. 2010-12-09 08:20:07 +01:00
policy.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
policy.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
selinux.c bus/selinux: Move vsnprintf call to avoid va_list reuse 2023-01-09 20:03:29 +00:00
selinux.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
services.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
services.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
session.conf.in Disable the Containers interface 2021-12-10 16:48:51 +00:00
signals.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
signals.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
stats.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
stats.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
system.conf.in Disable the Containers interface 2021-12-10 16:48:51 +00:00
test.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
test.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
utils.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
utils.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00