Potential bug in special watch event firing
While reading C xenstored code, I noticed that it may send special events like @releaseDomain to (privileged) clients that only watch the root node (/). That's probably not the intended behaviour.
For example, when firing @releaseDomain, fire_watches() is called with exact == false:
As a result, it will check whether @releaseDomain is a child of the path being watched:
And when the parent path is /, is_child() unconditionally returns true:
The xenstore documentation is not clear about whether @<wspecial> should be considered children of /. But I find it counterintuitive that clients may be notified about a special event without explicitly subscribing to it. Is it a bug?
Thanks,
Raphael
Hi Raphael,
Quoted 8 lines · Raphael Ning
While reading C xenstored code, I noticed that it may send special events like @releaseDomain to (privileged) clients that only watch the root node (/). That's probably not the intended behaviour.
For example, when firing @releaseDomain,
fire_watches()is called with exact == false:As a result, it will check whether @releaseDomain is a child of the path being watched:
Quoted 7 lines
And when the parent path is /,
is_child()unconditionally returns true:The xenstore documentation is not clear about whether @<wspecial> should be considered children of /. But I find it counterintuitive that clients may be notified about a special event without explicitly subscribing to it. Is it a bug?
I agree this is a bug.
Juergen
Hi Juergen,
Quoted 4 lines · Juergen Gross
[...]
Quoted 1 line
The xenstore documentation is not clear about whether @<wspecial> should be considered children of /. But I find it counterintuitive that clients may be notified about a special event without explicitly subscribing to it. Is it a bug?
I agree this is a bug.
Thanks for confirming that. I can send a patch to fix it, but it probably won't happen until later next week. If anyone else can get it done sooner, please feel free to do so.
Raphael