[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cxenstored] 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:

https://github.com/xen-project/xen/blob/2419a159fb943c24a6f2439604b9fdb1478fcd08/tools/xenstore/xenstored_domain.c#L234

As a result, it will check whether @releaseDomain is a child of the path being 
watched:

https://github.com/xen-project/xen/blob/2419a159fb943c24a6f2439604b9fdb1478fcd08/tools/xenstore/xenstored_watch.c#L195

And when the parent path is /, is_child() unconditionally returns true:

https://github.com/xen-project/xen/blob/2419a159fb943c24a6f2439604b9fdb1478fcd08/tools/xenstore/xenstored_watch.c#L66

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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.