Bug 42493

Summary: univention-skel does not check if symlink already exists
Product: UCS Reporter: Jens Thorp-Hansen <thorp-hansen>
Component: univention-base-filesAssignee: Felix Botner <botner>
Status: CLOSED FIXED QA Contact: Janek Walkenhorst <walkenhorst>
Severity: normal    
Priority: P5 CC: gohmann, markus.daehlmann
Version: UCS 4.1   
Target Milestone: UCS 4.1-3-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: Bug Report What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034 Enterprise Customer affected?: Yes
School Customer affected?: Yes ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: 2016092321000532 Bug group (optional):
Max CVSS v3 score:

Description Jens Thorp-Hansen univentionstaff 2016-09-23 16:48:11 CEST
steps to reproduce:

root@dc:~# ln -s /doesnotexist /etc/univention/skel/faultylink
root@dc:~# univention-skel
/etc/univention/skel
create_link /root/faultylink
root@dc:~# univention-skel
/etc/univention/skel
create_link /root/faultylink
Traceback (most recent call last):
  File "/usr/bin/univention-skel", line 200, in <module>
    os.path.walk(userconfig_templates, install_files, (hstamps, istamps))
  File "/usr/lib/python2.7/posixpath.py", line 238, in walk
    func(arg, top, names)
  File "/usr/bin/univention-skel", line 135, in install_files
    os.symlink(os.readlink(ifile), hfile)
OSError: [Errno 17] File exists
Comment 1 Jens Thorp-Hansen univentionstaff 2016-09-26 16:11:44 CEST
Ticket#2016092321000532

will gain severity for the customer if not fixed in the intermediate-term.
Comment 2 Felix Botner univentionstaff 2016-09-27 13:00:10 CEST
fixed in univention-skel in errata4.1-3

univention-skel.yaml

merged to 4.2-0
Comment 3 Janek Walkenhorst univentionstaff 2016-09-28 11:30:00 CEST
Tests: OK
Advisory: OK
Code review: OK
Merge: OK
Comment 4 Janek Walkenhorst univentionstaff 2016-09-28 14:05:04 CEST
<https://errata.software-univention.de/ucs/4.1/281.html>