]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Detect special character in dbus interface name
authorGaurav <g.gupta@samsung.com>
Fri, 4 Dec 2020 11:15:15 +0000 (16:45 +0530)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 15 Dec 2020 16:47:03 +0000 (17:47 +0100)
Added debug log to detect special character in dbus interface names.
Helps to detect a case mentioned in https://github.com/systemd/systemd/issues/14636

src/libsystemd/sd-bus/bus-internal.c

index 3f03ad7c4115d8ffa8511bd55b905b543f2ae6c0..c66056dcc4cd0cb063d58293104ff246d3be85c5 100644 (file)
@@ -91,8 +91,10 @@ bool interface_name_is_valid(const char *p) {
                                 (!dot && *q >= '0' && *q <= '9') ||
                                 *q == '_';
 
-                        if (!good)
+                        if (!good) {
+                                log_debug("The interface %s is invalid as it contains special character %c", p, *q);
                                 return false;
+                        }
 
                         dot = false;
                 }