Bug 42493 - univention-skel does not check if symlink already exists
univention-skel does not check if symlink already exists
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: univention-base-files
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1-3-errata
Assigned To: Felix Botner
Janek Walkenhorst
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-23 16:48 CEST by Jens Thorp-Hansen
Modified: 2016-09-28 14:05 CEST (History)
2 users (show)

See Also:
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>