[node-patches] Change in ovirt-node[master]: make sure to only edit the Domain line in idmapd.conf

mburns at redhat.com mburns at redhat.com
Wed May 15 15:08:36 UTC 2013


Michael Burns has uploaded a new change for review.

Change subject: make sure to only edit the Domain line in idmapd.conf
......................................................................

make sure to only edit the Domain line in idmapd.conf

previously, if you set the domain to some value that is found
elsewhere in the idmapd.conf file, and then updated again, it would
replace all occurences of the value in the file.

This is especially bad if you do something like "nobody" since that
changes the user that nfsv4 runs as.

rhbz#962737

Change-Id: I6ceda931405e6c55152ac9044ff982c78095ad8b
Signed-off-by: Mike Burns <mburns at redhat.com>
---
M src/ovirtnode/network.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/51/14751/1

diff --git a/src/ovirtnode/network.py b/src/ovirtnode/network.py
index 5365999..41e10ff 100644
--- a/src/ovirtnode/network.py
+++ b/src/ovirtnode/network.py
@@ -584,7 +584,7 @@
         _functions.system("sed -i 's/%s/Domain = %s/g' %s" \
             % (current_domain, domain, idmap_conf))
     else:
-        _functions.system("sed -i 's/%s/%s/g' %s" \
+        _functions.system("sed -i '/^Domain/ s/%s/%s/g' %s" \
             % (current_domain, domain, idmap_conf))
     if _functions.ovirt_store_config(idmap_conf):
         logger.info("NFSv4 domain set as: " + domain)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ceda931405e6c55152ac9044ff982c78095ad8b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Michael Burns <mburns at redhat.com>



More information about the node-patches mailing list