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

[Xen-API] [PATCH 1 of 5] CA-33440: remove an instance of an unsafe direct fork/exec



# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1261410030 0
# Node ID 3b43ad69a94a6ad46e996dd5b2b566d5502111af
# Parent  156116b96b363d9d2227d2583dc58a46c2e0fd7f
CA-33440: remove an instance of an unsafe direct fork/exec

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

diff -r 156116b96b36 -r 3b43ad69a94a ocaml/xapi/xapi_fuse.ml
--- a/ocaml/xapi/xapi_fuse.ml   Sat Dec 19 20:19:39 2009 +0000
+++ b/ocaml/xapi/xapi_fuse.ml   Mon Dec 21 15:40:30 2009 +0000
@@ -49,9 +49,8 @@
            (fun ()->
               Thread.delay (float_of_int Xapi_globs.fuse_time);
               (* this activates firstboot script and reboots the host *)
-              Unix.execv Forkhelpers.close_and_exec
-                          [| Forkhelpers.close_and_exec; "--"; 
"/sbin/service"; "firstboot"; "activate" |];
-               ()
+                  ignore (Forkhelpers.execute_command_get_output 
"/sbin/service" [ "firstboot"; "activate" ]);
+           ()
            ) ())
 
 let light_fuse_and_reboot ?(fuse_length=Xapi_globs.fuse_time) () =
1 file changed, 2 insertions(+), 3 deletions(-)
ocaml/xapi/xapi_fuse.ml |    5 ++---


Attachment: xen-api.hg-5.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

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