~ubuntu-branches/ubuntu/precise/maas/precise-updates

« back to all changes in this revision

Viewing changes to debian/patches/99_fix_ipmi_power_command_lp1171418.patch

Tags: 1.2+bzr1373+dfsg-0ubuntu1~12.04.4
* SECURITY UPDATE: failure to authenticate downloaded content (LP: #1039513)
  - debian/patches/CVE-2013-1058.patch: Authenticate downloaded files with
    GnuPG and MD5SUM files. Thanks to Julian Edwards.
  - CVE-2013-1058
* SECURITY UPDATE: configuration options may be loaded from current working
  directory (LP: #1158425)
  - debian/patches/CVE-2013-1057-1-2.patch: Do not load configuration
    options from the current working directory. Thanks to Julian Edwards.
  - CVE-2013-1057

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Ensures that commands are always executed.
 
2
 Do not check current node state when executing an ipmi
 
3
 command, which ensures that nodes are always turned on/off
 
4
 regardless of their power state. This fixes corner cases
 
5
 found when running automated tests.
 
6
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1171418
 
7
 
 
8
--- maas-1.2+bzr1373+dfsg.orig/src/provisioningserver/power/templates/ipmi.template     2013-03-20 13:59:10.000000000 -0400
 
9
+++ maas-1.2+bzr1373+dfsg/src/provisioningserver/power/templates/ipmi.template  2013-08-12 13:36:17.241183232 -0400
 
10
@@ -45,7 +45,7 @@
 
11
     driver_option=""
 
12
     if [ -n "$power_driver" ]
 
13
         then
 
14
-          driver_option="--driver-type=$power_driver"
 
15
+          driver_option="--driver-type=${power_driver}"
 
16
     fi
 
17
 
 
18
     echo workaround |\
 
19
@@ -54,16 +54,8 @@
 
20
     ${ipmipower} ${driver_option} -h ${power_address} -u ${power_user} -p ${power_pass} "$@"
 
21
 }
 
22
 
 
23
-
 
24
-# Get the given system's power state: 'on' or 'off'.
 
25
-get_power_state() {
 
26
-    ipmi_state=$(issue_ipmi_command stat)
 
27
-    formulate_power_state ${ipmi_state}
 
28
-}
 
29
-
 
30
-
 
31
-if [ "$(get_power_state)" != "${power_change}" ]
 
32
-then
 
33
-    power_command=$(formulate_power_command ${power_change})
 
34
-    issue_ipmi_command ${power_command}
 
35
-fi
 
36
+# This script deliberately does not check the current power state
 
37
+# before issuing the requested power command. See bug 1171418 for an
 
38
+# explanation.
 
39
+power_command=$(formulate_power_command ${power_change})
 
40
+issue_ipmi_command ${power_command}