Description of problem: logger.c incorrectly checks errno after strtol without clearing it first. This leads to the following regression in Fedora 21: [root@localhost yum.repos.d]# logger -p3 test logger: unknown priority name: 3 The strtol() manual page specifically states: NOTES Since strtol() can legitimately return 0, LONG_MAX, or LONG_MIN (LLONG_MAX or LLONG_MIN for strtoll()) on both success and failure, the calling program should set errno to 0 before the call, and then deter‐ mine if an error occurred by checking whether errno has a nonzero value after the call. Version-Release number of selected component (if applicable): util-linux-2.25.2-2.fc21.x86_64 How reproducible: On our Cockpit integration test images this happens every time. Steps to Reproduce: 1. logger -p3 test Actual results: logger: unknown priority name: 3 Expected results: Logged message Additional info: Since this uses an uninitialized value in errno, from a previous failure, it's possible that it cannot be reliably reproduced on every system. However it's very clear from reading the code where the problem is.
Scratch build with fix.
Created attachment 1001946 [details] logger: Fix use of uninitialized errno Adds patch and updates spec file to fix the issue.
Patch posted to upstream mailing list. http://vger.kernel.org/vger-lists.html#util-linux
Fixed by upstream commit 8d341322dbf4ef80dea7821c858292c7ba5e0b25. Thanks! Fedora package will be updated ASAP.