Univention Bugzilla – Bug 40031
missing escapes in "univention-lib"
Last modified: 2016-07-11 17:19:32 CEST
Can you please describe what you mean?
When executing some univention commands the following line appears in the terminal: tr: misaligned [:upper:] and/or [:lower:] construct The problem seems to be in the function " is_ucr_true" in the file /usr/share/univention-lib/ucr.sh. there the parameter " [:upper:]" und " [:lower:]" for tr do not escape properly - now all files in the working directory (normally /root/) and with names like u, p, e, r, l, o or w will be matched as shell-pattern. Then the function produces these results.
Fix the following instances of is_ucr_XXX and derivates: base/univention-heimdal/15univention-heimdal-kdc.inst base/univention-lib/shell/base.sh base/univention-lib/shell/ucr.sh base/univention-system-setup/usr/lib/univention-system-setup/scripts/10_basis/10hostname base/univention-system-setup/usr/lib/univention-system-setup/scripts/setup_utils.sh base/univention-updater/script/postup.sh base/univention-updater/script/preup.sh management/univention-directory-manager-modules/test/univention-admin-test management/univention-ldap/10univention-ldap-server.inst services/univention-bind/90univention-bind-post.inst services/univention-samba4/lib/base.sh services/univention-samba4/scripts/setup-dns-in-ucsldap.sh test/ucs-test/tests/10_ldap/42replication_uppercase test/ucs-test/tests/59_udm/udm.sh Package: univention-heimdal Version: 9.0.1-2.159.201601062025 Branch: ucs_4.1-0 Scope: errata4.1-0 Package: univention-lib Version: 5.0.0-13.319.201601062026 Branch: ucs_4.1-0 Scope: errata4.1-0 Package: univention-system-setup Version: 9.0.2-23.939.201601062027 Branch: ucs_4.1-0 Scope: errata4.1-0 Package: univention-updater Version: 11.0.7-11.1441.201601062031 Branch: ucs_4.1-0 Scope: errata4.1-0 Package: univention-directory-manager-modules Version: 11.0.2-10.1361.201601062032 Branch: ucs_4.1-0 Scope: errata4.1-0 Package: univention-ldap Version: 12.1.6-7.792.201601062033 Branch: ucs_4.1-0 Scope: errata4.1-0 Package: univention-bind Version: 10.0.2-5.218.201601062034 Branch: ucs_4.1-0 Scope: errata4.1-0 Package: univention-samba4 Version: 5.0.1-18.638.201601062034 Branch: ucs_4.1-0 Scope: errata4.1-0 Package: ucs-test Version: 6.0.31-8.1378.201601062035 Branch: ucs_4.1-0 Scope: errata4.1-0 r66615 | Bug #40031: Fix shell escaping YAML univention-bind.yaml univention-directory-manager-modules.yaml univention-heimdal.yaml univention-ldap.yaml univention-lib.yaml univention-samba4.yaml univention-system-setup.yaml univention-updater.yaml
Hm, It would have been better to replace all the is_ucr_false copies by that new function in univention-lib. (In reply to Philipp Hahn from comment #3) > Fix the following instances of is_ucr_XXX and derivates: > > base/univention-heimdal/15univention-heimdal-kdc.inst OK > base/univention-lib/shell/base.sh custom_username → OK custom_groupname → OK > base/univention-lib/shell/ucr.sh is_ucr_true → OK is_ucr_false → OK > base/univention-system-setup/usr/lib/univention-system-setup/scripts/ > 10_basis/10hostname OK > base/univention-system-setup/usr/lib/univention-system-setup/scripts/ > setup_utils.sh is_profile_var_true → OK > base/univention-updater/script/postup.sh Code-Review: OK > base/univention-updater/script/preup.sh Code-Review: OK > management/univention-directory-manager-modules/test/univention-admin-test Code-Review: OK > management/univention-ldap/10univention-ldap-server.inst OK > services/univention-bind/90univention-bind-post.inst OK > services/univention-samba4/lib/base.sh univention_samba4_is_ucr_false → OK > services/univention-samba4/scripts/setup-dns-in-ucsldap.sh OK > test/ucs-test/tests/10_ldap/42replication_uppercase Code-Review: OK > test/ucs-test/tests/59_udm/udm.sh Code-Review: OK
<http://errata.software-univention.de/ucs/4.1/49.html> <http://errata.software-univention.de/ucs/4.1/50.html>
Resetting to verified since not all errata updates have been announced.
<http://errata.software-univention.de/ucs/4.1/58.html>
Note: This is the german translation of the error message: tr: fehlerhaft positioniertes [:upper:]- und/oder [:lower:]-Konstrukt We have seen this at Ticket#2016011921000162 on one UCS 4.0-4 DC Slave (errata 386 at the time of analysis), where is_ucr_true failed with this message in a joinscript. As a result it took the wrong if/then/else branch.
<http://errata.software-univention.de/ucs/4.1/68.html>
<http://errata.software-univention.de/ucs/4.1/83.html> <http://errata.software-univention.de/ucs/4.1/84.html> <http://errata.software-univention.de/ucs/4.1/95.html> <http://errata.software-univention.de/ucs/4.1/97.html>