Bug 34241 - Regression: Writing of config files should be an atomic operation
Regression: Writing of config files should be an atomic operation
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCR
UCS 3.2
All Linux
: P5 normal (vote)
: UCS 3.2-1-errata
Assigned To: Philipp Hahn
Stefan Gohmann
:
Depends on: 33842
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-04 12:56 CET by Philipp Hahn
Modified: 2014-03-17 13:00 CET (History)
5 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): API change, Troubleshooting
Max CVSS v3 score:
hahn: Patch_Available+


Attachments
Fix atomic write to preserve old file permission (9.65 KB, patch)
2014-03-04 12:56 CET, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-03-04 12:56:50 CET
Created attachment 5810 [details]
Fix atomic write to preserve old file permission

+++ This bug was initially created as a clone of Bug #33842 +++
Regression UCS-3.2-{0→1}, detected through Bug #34233:
With only "Mode" given but without "User" or "Group" the owner/group are not carried over, if the owner/group is changes through an explicit "chown" on the generated file:

# ./51file_permissions -vvvf
FAIL: /tmp/ucs-test-33842-f0 0660 bin!=root bin!=root
FAIL: /tmp/ucs-test-33842-f4 0400 bin!=root bin!=root
FAIL: /tmp/ucs-test-33842-m0 0664 bin!=root bin!=root
FAIL: /tmp/ucs-test-33842-m4 0400 bin!=root bin!=root
FAIL: /tmp/ucs-test-33842-d0 0660 bin!=root bin!=root
FAIL: /tmp/ucs-test-33842-d4 0400 bin!=root bin!=root
Comment 1 Philipp Hahn univentionstaff 2014-03-10 11:47:54 CET
The file permission and ownership information is now copied implicitly from the previous file, before any explicit modifications are applied afterwards.

ucr: r48422
univention-config-registry_9.0.6-5.453.201403101139
ucs-test_4.0.163-1.677.201403101144
yaml: r48423
Comment 2 Stefan Gohmann univentionstaff 2014-03-12 12:04:34 CET
Code: OK
YAML: OK
Tests: OK
Comment 3 Moritz Muehlenhoff univentionstaff 2014-03-17 13:00:28 CET
http://errata.univention.de/ucs/3.2/70.html