[node-patches] Change in ovirt-node[master]: password: replace unmount_config to unpersist
dougsland at redhat.com
dougsland at redhat.com
Thu Aug 20 02:01:17 UTC 2015
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: password: replace unmount_config to unpersist
......................................................................
password: replace unmount_config to unpersist
The fs.Config().unpersist has better handling to
unperist/unmount bind mount files than unmount_config.
Change-Id: I70c35f260ffaa6182fe406dea115ba6f4384237f
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
---
M src/ovirtnode/password.py
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/16/45116/1
diff --git a/src/ovirtnode/password.py b/src/ovirtnode/password.py
index 53614bb..2c945f4 100755
--- a/src/ovirtnode/password.py
+++ b/src/ovirtnode/password.py
@@ -24,6 +24,8 @@
import string
import augeas
+from ovirt.node import utils
+
def cryptPassword(password):
saltlen = 2
@@ -40,8 +42,8 @@
root = admin.lookupUserByName(user)
passwd = cryptPassword(password)
try:
- _functions.unmount_config("/etc/shadow")
- _functions.unmount_config("/etc/passwd")
+ utils.fs.Config().unpersist("/etc/shadow")
+ utils.fs.Config().unpersist("/etc/passwd")
admin.setpassUser(root, passwd, "is_crypted")
except:
raise
--
To view, visit https://gerrit.ovirt.org/45116
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I70c35f260ffaa6182fe406dea115ba6f4384237f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
More information about the node-patches
mailing list