[node-patches] Change in ovirt-node[master]: Fix ovirt-node covers the orginal /etc/profile file when con...

fabiand at fedoraproject.org fabiand at fedoraproject.org
Tue Jul 9 07:20:58 UTC 2013


Fabian Deutsch has posted comments on this change.

Change subject: Fix ovirt-node covers the orginal /etc/profile file when configuring AES-NI
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(2 inline comments)

....................................................
File src/ovirt/node/utils/fs.py
Line 53:         with open(dst, "wb") as dstf:
Line 54:             dstf.write(srcf.read())
Line 55: 
Line 56: 
Line 57: def atomic_write(filename, contents, mode):
For backwards compatibility mode should have a default value, so it's still possible to call atomic_write with two arguments.

  def atomic_write(filename, contents, mode="wb"):
  ...
Line 58:     backup = BackupedFiles([filename], ".temp")
Line 59:     backup.create()
Line 60:     backup_filename = backup.of(filename)
Line 61: 


....................................................
File src/ovirt/node/utils/security.py
Line 129: 
Line 130:     def strong_rng(self, num_bytes=None):
Line 131:         import ovirtnode.ovirtfunctions as ofunc
Line 132:         rng, aes = ofunc.rng_status()
Line 133:         if valid.Number(bounds=[0, None]).validate(num_bytes):
You can just modify this line to achieve the same result:

  if (valid.Empty() | valid.Number(bounds=[0, None])).validate(num_bytes):
  ...
Line 134:             self.__update_profile(num_bytes, aes)
Line 135:         elif num_bytes == "":
Line 136:             self.__update_profile(num_bytes, aes)
Line 137:         elif num_bytes is None:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If0c424136b5abe794c720d4dc33cda6c72b59b1d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the node-patches mailing list