Bug 23968 - UCR gibt (Fehler-)Meldungen nach STDOUT statt STDERR aus
UCR gibt (Fehler-)Meldungen nach STDOUT statt STDERR aus
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCR
UCS 2.4
All Linux
: P5 normal (vote)
: UCS 3.1
Assigned To: Philipp Hahn
Stefan Gohmann
: interim-1
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-06 12:34 CEST by Philipp Hahn
Modified: 2012-12-12 21:09 CET (History)
1 user (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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2011-10-06 12:34:43 CEST
Ruft man ucr mit falschen Parametern auf oder kommt es zu unvorhergesehenen Problemen, so gibt univention-config-registry auf STDOUT seinen Hilfetext aus. Insbesonderen in eval "$(ucr shell)"-Konstrukten führt das dazu, das die Shell probiert den Hilfetext zu parsen und auszuführen, was im günstigen Fall nur zu vielen Fehlermeldungen führt, im schlimmsten Fall zu Datenverlust führt.

UCR sollte von daher alle Fehlermeldungen wie bei UNIX-Programmen üblich auf STDERR ausgeben.

$ /usr/sbin/ucr foo | wc -l
74
Comment 1 Philipp Hahn univentionstaff 2012-08-03 22:15:08 CEST
Umgesetzt: Die echten Fehlermeldungen gehen jetzt alle nach STDERR, während die Ausgabe von get/search/dump sowie Meldungen beim Aktualisieren von Dateien und von Modulen und Skripten (set/commit) weiterhin nach STDOUT geschrieben werden.

svn34615, univention-config-registry_8.0.1-1.389.201208032206
Comment 2 Stefan Gohmann univentionstaff 2012-09-17 09:11:39 CEST
Changelog: OK

Tests: OK

root@backup132:~# /usr/sbin/ucr foo >/dev/null
E: unknown action "foo", see --help
root@backup132:~# /usr/sbin/ucr set >/dev/null
E: too few arguments for command [set]
try `univention-config-registry --help` for more information
root@backup132:~# /usr/sbin/ucr set x=y >/dev/null
root@backup132:~# /usr/sbin/ucr unset x >/dev/null
root@backup132:~# /usr/sbin/ucr unset x >/dev/null
W: The config registry variable 'x' does not exist
root@backup132:~# /usr/sbin/ucr commit /etc/ldap/slapd.conf >/dev/null
root@backup132:~#
Comment 3 Stefan Gohmann univentionstaff 2012-12-12 21:09:20 CET
UCS 3.1-0 has been released: 
 http://forum.univention.de/viewtopic.php?f=54&t=2125

If this error occurs again, please use "Clone This Bug".