tools/oxenstored: Reject invalid watch paths early
authorEdwin Török <edvin.torok@citrix.com>
Fri, 15 Jan 2021 19:28:37 +0000 (19:28 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 4 Feb 2021 14:17:44 +0000 (14:17 +0000)
commitdc8caf214fb882546b0e93317b9828247a7c9da8
treef088459b62540581e250320da4f7aa0486dfe5d5
parentc8b96708252a436da44005307f7c195d699bd7c5
tools/oxenstored: Reject invalid watch paths early

Watches on invalid paths were accepted, but they would never trigger.  The
client also got no notification that its watch is bad and would never trigger.

Found again by the structured fuzzer, due to an error on live update reload:
the invalid watch paths would get rejected during live update and the list of
watches would be different pre/post live update.

The testcase is watch on `//`, which is an invalid path.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
tools/ocaml/xenstored/connection.ml
tools/ocaml/xenstored/connections.ml