Mailinglist Archive: yast-commit (135 mails)

< Previous Next >
[yast-commit] r67676 - in /branches/SuSE-Code-11-SP2-Branch/iscsi-client: package/yast2-iscsi-client.changes src/IscsiClientLib.ycp
Author: fehr
Date: Wed Mar 21 11:59:31 2012
New Revision: 67676

URL: http://svn.opensuse.org/viewcvs/yast?rev=67676&view=rev
Log:
change potential race of chmod after file create (bnc#753129)

Modified:

branches/SuSE-Code-11-SP2-Branch/iscsi-client/package/yast2-iscsi-client.changes
branches/SuSE-Code-11-SP2-Branch/iscsi-client/src/IscsiClientLib.ycp

Modified:
branches/SuSE-Code-11-SP2-Branch/iscsi-client/package/yast2-iscsi-client.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/iscsi-client/package/yast2-iscsi-client.changes?rev=67676&r1=67675&r2=67676&view=diff
==============================================================================
---
branches/SuSE-Code-11-SP2-Branch/iscsi-client/package/yast2-iscsi-client.changes
(original)
+++
branches/SuSE-Code-11-SP2-Branch/iscsi-client/package/yast2-iscsi-client.changes
Wed Mar 21 11:59:31 2012
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Wed Mar 21 11:48:21 CET 2012 - fehr@xxxxxxx
+
+- change potential race of chmod after file create (bnc#753129)
+
+-------------------------------------------------------------------
Mon Feb 6 14:05:22 CET 2012 - fehr@xxxxxxx

- 2.17.34

Modified: branches/SuSE-Code-11-SP2-Branch/iscsi-client/src/IscsiClientLib.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/iscsi-client/src/IscsiClientLib.ycp?rev=67676&r1=67675&r2=67676&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/iscsi-client/src/IscsiClientLib.ycp
(original)
+++ branches/SuSE-Code-11-SP2-Branch/iscsi-client/src/IscsiClientLib.ycp Wed
Mar 21 11:59:31 2012
@@ -332,8 +332,7 @@
y2milestone("%1 file exists, create backup", file);
SCR::Execute(.target.bash, sformat("mv %1
/etc/iscsi/initiatorname.yastbackup", file));
}
- ret = (boolean)SCR::Write (.target.string, file,
sformat("InitiatorName=%1\n", new_value));
- SCR::Execute (.target.bash, "chmod 0600 $FILE" ,$["FILE":file]);
+ ret = (boolean)SCR::Write (.target.string, [file,0600],
sformat("InitiatorName=%1\n", new_value));
if (ret){
initiatorname = new_value;
y2milestone("Initiatorname %1 written", initiatorname);
@@ -565,8 +564,7 @@
initiatorname = ay_settings["initiatorname"]:"";
if (size(initiatorname)>0){
string file="/etc/iscsi/initiatorname.iscsi";
- SCR::Write (.target.string, file, sformat("InitiatorName=%1\n",
initiatorname));
- SCR::Execute (.target.bash, "chmod 0600 $FILE" ,$["FILE":file]);
+ SCR::Write (.target.string, [file,0600], sformat("InitiatorName=%1\n",
initiatorname));
} else checkInitiatorName();
// start daemon before
startIScsid();

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages