[node-patches] Change in ovirt-node[master]: Miss to unmount_config "/etc/profile" before edit it

hadong0720 at gmail.com hadong0720 at gmail.com
Sat May 24 06:49:58 UTC 2014


hadong has uploaded a new change for review.

Change subject: Miss to unmount_config "/etc/profile" before edit it
......................................................................

Miss to unmount_config "/etc/profile" before edit it

Change-Id: I479be705f991f7d2542a944d0491e9ac252dc410
Bug-Url:https://bugzilla.redhat.com/show_bug.cgi?id=1100944
Signed-off-by: hadong <hadong at redhat.com>
---
M src/ovirt/node/utils/security.py
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/74/28074/1

diff --git a/src/ovirt/node/utils/security.py b/src/ovirt/node/utils/security.py
index a0acef4..3ea155f 100755
--- a/src/ovirt/node/utils/security.py
+++ b/src/ovirt/node/utils/security.py
@@ -102,7 +102,9 @@
         super(Ssh, self).__init__()
 
     def __update_profile(self, rng_num_bytes, disable_aes):
+        import ovirtnode.ovirtfunctions as ofunc
         additional_lines = []
+        ofunc.unmount_config("/etc/profile")
 
         process.check_call("sed -ic '/OPENSSL_DISABLE_AES_NI/d' /etc/profile",
                            shell=True)
@@ -119,6 +121,7 @@
             self.logger.debug("Updating /etc/profile")
             lines = "\n" + "\n".join(additional_lines)
             File("/etc/profile").write(lines, "a")
+            ofunc.ovirt_store_config("/etc/profile")
 
             self.restart()
 
@@ -166,10 +169,12 @@
         augpath = "/files/etc/ssh/sshd_config/PasswordAuthentication"
         aug = utils.AugeasWrapper()
         if enable in [True, False]:
+            import ovirtnode.ovirtfunctions as ofunc
             value = "yes" if enable else "no"
             self.logger.debug("Setting SSH PasswordAuthentication to " +
                               "%s" % value)
             aug.set(augpath, value)
+            ofunc.ovirt_store_config("/etc/ssh/sshd_config")
             self.restart()
         state = str(aug.get(augpath)).lower()
         if state not in ["yes", "no", "none"]:


-- 
To view, visit http://gerrit.ovirt.org/28074
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I479be705f991f7d2542a944d0491e9ac252dc410
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>



More information about the node-patches mailing list