From e9861e2a75312dbeb8ecc5d666de4302ee188be4 Mon Sep 17 00:00:00 2001 From: Jean Guyader Date: Thu, 30 Jul 2009 23:59:26 +0100 Subject: [PATCH] xenstore chmod the natif node. --- master/dom0-driver | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/master/dom0-driver b/master/dom0-driver index f79bb8b..0f756c1 100644 --- a/master/dom0-driver +++ b/master/dom0-driver @@ -24,10 +24,10 @@ index 14b42f3..97214c0 100644 #endif diff --git a/dom0_driver.c b/dom0_driver.c new file mode 100644 -index 0000000..fdd24ab +index 0000000..5ab64f0 --- /dev/null +++ b/dom0_driver.c -@@ -0,0 +1,697 @@ +@@ -0,0 +1,698 @@ +/* + * QEMU dom0_driver + * @@ -474,6 +474,7 @@ index 0000000..fdd24ab + { + sprintf(str, "%d", domid); + xenstore_write_dom0_driver("natif", str); ++ xenstore_dom_chmod(domid, "dom0_input/natif", "r0"); + xenstore_watch_dom0_driver("command", dom0_driver_command, NULL); + } + else @@ -1259,10 +1260,10 @@ index 0000000..59dfec8 + } +} diff --git a/qemu-xen.h b/qemu-xen.h -index 0cc5dd8..2646ec7 100644 +index 7883718..afe8f22 100644 --- a/qemu-xen.h +++ b/qemu-xen.h -@@ -107,7 +107,13 @@ int xenstore_write(const char *path, const char *val); +@@ -109,7 +109,13 @@ int xenstore_write(const char *path, const char *val); void xenstore_dm_finished_startup(void); @@ -1278,7 +1279,7 @@ index 0cc5dd8..2646ec7 100644 * not be trusted by qemu code. For variables containing xenstore * paths, `danger' can mean that both the path refers to a diff --git a/vl.c b/vl.c -index e519705..0ffe1ec 100644 +index 1738aa5..45e03c1 100644 --- a/vl.c +++ b/vl.c @@ -234,6 +234,7 @@ CharDriverState *virtcon_hds[MAX_VIRTIO_CONSOLES]; @@ -1310,7 +1311,7 @@ index e519705..0ffe1ec 100644 /***********************************************************/ /* x86 ISA bus support */ -@@ -4277,6 +4292,7 @@ enum { +@@ -4289,6 +4304,7 @@ enum { QEMU_OPTION_acpi, QEMU_OPTION_vcpus, QEMU_OPTION_vga_passthrough, @@ -1318,7 +1319,7 @@ index e519705..0ffe1ec 100644 /* Debug/Expert options: */ QEMU_OPTION_serial, -@@ -4451,6 +4467,7 @@ static const QEMUOption qemu_options[] = { +@@ -4463,6 +4479,7 @@ static const QEMUOption qemu_options[] = { { "vncunused", 0, QEMU_OPTION_vncunused }, { "vcpus", HAS_ARG, QEMU_OPTION_vcpus }, { "vga-passthrough", 0, QEMU_OPTION_vga_passthrough }, @@ -1326,7 +1327,7 @@ index e519705..0ffe1ec 100644 #if defined(CONFIG_XEN) && !defined(CONFIG_DM) { "xen-domid", HAS_ARG, QEMU_OPTION_xen_domid }, { "xen-create", 0, QEMU_OPTION_xen_create }, -@@ -5287,6 +5304,9 @@ int main(int argc, char **argv, char **envp) +@@ -5299,6 +5316,9 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_vga_passthrough: vga_passthrough = 1; break; @@ -1336,7 +1337,7 @@ index e519705..0ffe1ec 100644 case QEMU_OPTION_direct_pci: direct_pci = optarg; break; -@@ -6053,6 +6073,9 @@ int main(int argc, char **argv, char **envp) +@@ -6065,6 +6085,9 @@ int main(int argc, char **argv, char **envp) close(fd); } @@ -1345,7 +1346,7 @@ index e519705..0ffe1ec 100644 + xenstore_dm_finished_startup(); - main_loop(); + #ifndef CONFIG_STUBDOM diff --git a/xen-hooks.mak b/xen-hooks.mak index d171928..15ba4d1 100644 --- a/xen-hooks.mak @@ -1360,10 +1361,10 @@ index d171928..15ba4d1 100644 CONFIG_AUDIO=1 diff --git a/xenstore.c b/xenstore.c -index 01afcf0..20ca8cf 100644 +index 3cd2ba6..17136a3 100644 --- a/xenstore.c +++ b/xenstore.c -@@ -1727,3 +1727,63 @@ void xenstore_dm_finished_startup(void) +@@ -1741,3 +1741,63 @@ void xenstore_dm_finished_startup(void) free(buf); free(path); } -- 2.39.5