In lib/kadm5/logger.c:krb5_klog_init(), if the configuration requests
STDERR logging, call fdopen() using mode "w" instead of "a+", to avoid
errors when stderr happens to be opened for write only.
(cherry picked from commit
a85923073ad2d1f5d0314ab330fd6c5f07749be8)
ticket: 8001
version_fixed: 1.13
status: resolved
*/
else if (!strcasecmp(cp, "STDERR")) {
log_control.log_entries[i].lfu_filep =
- fdopen(fileno(stderr), "a+");
+ fdopen(fileno(stderr), "w");
if (log_control.log_entries[i].lfu_filep) {
log_control.log_entries[i].log_type = K_LOG_STDERR;
log_control.log_entries[i].lfu_fname =