bus1 / dbus-broker

Linux D-Bus Message Broker
https://github.com/bus1/dbus-broker/wiki
Apache License 2.0
675 stars 78 forks source link

bus/match: fix matching against arguments beyond the zeroth #369

Closed jbosboom closed 1 month ago

jbosboom commented 2 months ago

Fixes #367. I hit this too, also for JobRemoved signals, and @dvdhrm pinpointed the fix, so here it is.

I added both white-box and black-box tests. The former are copies of the arg0 tests changed to match arg1. The latter include negative tests (signals that should not be matched), which aren't present in the existing tests, but seem useful. I didn't run the black-box tests against dbus-daemon because I don't see how. I put the tests in the same commit as the fix based on looking at old commits in this repo, but they can be separate if you'd prefer.

@TomasKorbar I gave you Reported-by: under your Red Hat e-mail (based on recent commits in other repos). Let me know if this should be under a personal e-mail instead or just omitted.

@dvdhrm You can add Co-developed-by: yourself if you want, as you did find the fix.

TomasKorbar commented 2 months ago

@jbosboom Red Hat mail is fine.

dvdhrm commented 1 month ago

Thank you so much for moving this forward and supplying the tests on top! I included this in the pending roll-up PR #371, and once this lands I will prepare a release.

Again, thanks a lot to all of you!