Univention Bugzilla – Bug 18444
Fehlendes Escaping für eval "$(ucr shell)" — ucs-test
Last modified: 2019-01-03 07:22:35 CET
Es sollte ein ucs-test-Modul dafür geben. +++ This bug was initially created as a clone of Bug #18443 +++ In vielen Skripten wird nur eval $(ucr shell) statt eval "$(ucr shell)" verwendet. Dies führt dazu, daß nach der Expansion von "ucr shell" die Variablenzuweisungen nochmals durch die Shell expandiert werden. Das folgende Beispiel zeigt das Problem: # echo * sources.list # ucr set test="* * *" Create test # ucr shell test test="* * *" # eval $(ucr shell test) # echo "$test" * sources.list * # eval "$(ucr shell test)" # echo "$test" * * * Das ist insbesondere UCR-Variablen mit Shell-Metazeichen kritisch: # ucr search --brief --value '[*?$`]' ldap/connection/check: */3 * * * * ldap/policy/cron: 5 * * * * mrtg/cron: */15 * * * * Siehe Bug #8417 Comment 7 für weitere Informationen. Ggf. ist Bug #17269 auch auf diese Problematik zurückzuführen. Alle Skripte sollten korrigiert werden und ggf. ein ucs-test-Test oder ucs-lint-Check eingebaut werden, der fehlerhaften Verwendung anprangert.
Created attachment 2417 [details] ucs-test-Skript für eval "$(ucr shell)" Für "univention-config-registry shell" und "univention-policy-result -s"
Gibt es dafür nicht bereits eine ucslint Prüfung?
(In reply to comment #2) > Gibt es dafür nicht bereits eine ucslint Prüfung? Ja, für UCR; aber nur in Join-Skripten und debian/*{pre,post}{inst,rm}: 0001-CheckJoinScript.py 0006-CheckPostinst.py Was fehlt ist univention-policy-result und der Test in allen Programmen.
Kein Blocker für das 3.1 Release.
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018. Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact your partner or Univention for any questions. If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.