mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
tools/ocaml/xenstored: ignore transaction id for [un]watch
Instead of ignoring the transaction id for XS_WATCH and XS_UNWATCH commands as it is documented in docs/misc/xenstore.txt, it is tested for validity today. Really ignore the transaction id for XS_WATCH and XS_UNWATCH. This is part of XSA-115. Signed-off-by: Edwin Török <edvin.torok@citrix.com> Acked-by: Christian Lindig <christian.lindig@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
0a79a1b1d8
commit
228e5621eb
1 file changed
+8
-1
@@ -498,12 +498,19 @@ let retain_op_in_history ty =
|
||||
| Xenbus.Xb.Op.Reset_watches
|
||||
| Xenbus.Xb.Op.Invalid -> false
|
||||
|
||||
let maybe_ignore_transaction = function
|
||||
| Xenbus.Xb.Op.Watch | Xenbus.Xb.Op.Unwatch -> fun tid ->
|
||||
if tid <> Transaction.none then
|
||||
debug "Ignoring transaction ID %d for watch/unwatch" tid;
|
||||
Transaction.none
|
||||
| _ -> fun x -> x
|
||||
|
||||
(**
|
||||
* Nothrow guarantee.
|
||||
*)
|
||||
let process_packet ~store ~cons ~doms ~con ~req =
|
||||
let ty = req.Packet.ty in
|
||||
let tid = req.Packet.tid in
|
||||
let tid = maybe_ignore_transaction ty req.Packet.tid in
|
||||
let rid = req.Packet.rid in
|
||||
try
|
||||
let fct = function_of_type ty in
|
||||
|
||||