Skip to contentSkip to conversation

fix non-dom0 backend watches

PATCH New John Levon 1 participant 1 message Nov 8, 2006

lore
Share & tools
lore

John Levon

author
#0 lore raw

PATCH 1/1 fix non-dom0 backend watches

(I was personally not sure about this one: it seems to allow someone to watch a 'private' path and receive confirmation of its existence, which previously was prevented. However, it looks like this is what Keir is suggesting in the following discussion:
http://thread.gmane.org/gmane.comp.emulators.xen.devel/31710/focus=31711
Of course I'm far from an expert on how xenstore's permissions system is supposed to work, and the patch certainly fixes a real problem.)

regards
john

# HG changeset patch
# User [email protected]
# Date 1162947187 28800
# Node ID 8b9a88f3b4070bae7892f1e36bcbb7ad896ce674
# Parent 98aaea71c6312dfc80c07194a9b7e1de7f021c94
Fire watch for non-dom0 backend when frontend is removed from xenstore in a transaction.

tools/xenstore/xenstored_watch.c +1 -1
@@ -60,7 +60,7 @@ static void add_event(struct connection 
 	if (!check_event_node(name)) {
 		/* Can this conn load node, or see that it doesn't exist? */
 		struct node *node = get_node(conn, name, XS_PERM_READ);
-		if (!node && errno != ENOENT)
+		if (!node && errno != ENOENT && errno != EACCES)
 			return;
 	}