Skip to content

Commit

Permalink
ini-agent: only change permissions of new files (bnc#743355)
Browse files Browse the repository at this point in the history
*quick* adjustment of tests: only test creation, not yet the
sssd.conf case of implicit existing private

svn path=/branches/SuSE-Code-11-SP2-Branch/core/; revision=67360
  • Loading branch information
mvidner committed Feb 3, 2012
1 parent c8d0263 commit 99d1584
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 24 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.17.43
2.17.44
2 changes: 0 additions & 2 deletions agent-ini/src/IniParser.cc
Expand Up @@ -1000,8 +1000,6 @@ int IniParser::write_file(const string & filename, IniSection & section)

mode_t file_umask = section.isPrivate()? 0077: 0022;
mode_t orig_umask = umask(file_umask);
// rewriting an existing file wouldnt change its mode
unlink(filename.c_str());

ofstream of(filename.c_str());
if (!of.good()) {
Expand Down
6 changes: 3 additions & 3 deletions agent-ini/testsuite/multi/private.err
@@ -1,11 +1,11 @@
[agent-ini] IniParser.cc(parse):XXX Rewriting multi/private.in.1.test to 1
[agent-ini] IniParser.cc(parse):XXX Rewriting multi/private.in.2.test to 2
[agent-ini] IniFile.cc(setValue):XXX Write: adding recursively 1 to .v."1"."Totalise"."Password"
[agent-ini] IniFile.cc(setValue):XXX Write: adding recursively Totalise to .v."1"."Totalise"."Password"
[agent-ini] IniFile.cc(setMyValue):XXX Adding value .v."1"."Totalise"."Password" = "Secret password"
[agent-ini] IniFile.cc(setMyValue):XXX Adding value .v."2"."arcor"."Password" = "Public password"
[agent-ini] IniParser.cc(parse):XXX Rewriting multi/private.in.1.test to 1
[agent-ini] IniParser.cc(parse):XXX Rewriting multi/private.in.2.test to 2
[agent-ini] IniParser.cc(getFileName):XXX Rewriting 1 to multi/private.in.1.test
[agent-ini] IniParser.cc(getFileName):XXX Rewriting 2 to multi/private.in.2.test
[agent-ini] IniParser.cc(getFileName):XXX Rewriting 1 to multi/private.in.1.test
[YCP] multi/private.ycp:XXX secret file mode: $["exit":0, "stderr":"", "stdout":"600\n"]
[YCP] multi/private.ycp:XXX public file mode: $["exit":0, "stderr":"", "stdout":"644\n"]
[agent-ini] IniParser.cc(write):XXX File multi/private.in.*.test did not change. Not saving.
10 changes: 0 additions & 10 deletions agent-ini/testsuite/multi/private.in.1

This file was deleted.

8 changes: 0 additions & 8 deletions agent-ini/testsuite/multi/private.out
@@ -1,16 +1,8 @@
(nil)
multi/private.in.1.test -------------------------------
[Dialer Totalise]
Compuserve = 0
Provider = Totalise
Phone = 08453001470
Password = Secret password
[End]

[Dialer force9]
Provider = Force9
Phone = 08451424000
[End]
multi/private.in.2.test -------------------------------
[Dialer arcor]
Compuserve = 0
Expand Down
6 changes: 6 additions & 0 deletions package/yast2-core.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 3 14:36:31 CET 2012 - mvidner@suse.cz

- ini-agent: only change permissions of new files (bnc#743355)
- 2.17.44

-------------------------------------------------------------------
Thu Jan 5 15:08:14 CET 2012 - mvidner@suse.cz

Expand Down

0 comments on commit 99d1584

Please sign in to comment.