[krbdev.mit.edu #3277] doubled kerberos logging to stderr
Tom Yu via RT
rt-comment at krbdev.mit.edu
Tue Dec 6 19:01:17 EST 2005
>>>>> "Denis" == Denis Vlasenko via RT <rt-comment at krbdev.mit.edu> writes:
Denis> Looks like krb5-1.4.3/src/lib/kadm5/logger.c:klog_vsyslog(...) routine, which
Denis> formats these messages, outputs them twice.
Denis> Next, when I run exactly the same command, "krb5kdc -n", under daemontools,
Denis> it gets unhappy:
Denis> 2005-12-04 22:05:34 krb5kdc: cannot parse <STDERR>
Denis> 2005-12-04 22:05:34 krb5kdc: warning - logging entry syntax error
Denis> 2005-12-04 22:05:34 krb5kdc: cannot parse <STDERR>
Denis> 2005-12-04 22:05:34 krb5kdc: warning - logging entry syntax error
Denis> Replacing "default = STDERR" with "default = FILE:/proc/self/fd/2"
Denis> helps.
Denis> Fragment of strace output where it happens:
[...]
Denis> fcntl64(2, F_GETFL) = 0x1 (flags O_WRONLY)
Denis> write(2, "krb5kdc: cannot parse <STDERR>\n", 31) = 31
Denis> write(2, "krb5kdc: warning - logging entry"..., 46) = 46
Denis> fcntl64(2, F_GETFL) = 0x1 (flags O_WRONLY)
Denis> write(2, "krb5kdc: cannot parse <STDERR>\n", 31) = 31
Denis> write(2, "krb5kdc: warning - logging entry"..., 46) = 46
Denis> Looks like something fails here:
Denis> krb5-1.4.3/src/lib/kadm5/logger.c
Denis> ...
Denis> else if (!strcasecmp(cp, "STDERR")) {
Denis> log_control.log_entries[i].lfu_filep =
Denis> fdopen(fileno(stderr), "a+");
Denis> if (log_control.log_entries[i].lfu_filep) {
Denis> is not set somehow ===> log_control.log_entries[i].log_type = K_LOG_STDERR;
Denis> log_control.log_entries[i].lfu_fname =
Denis> "standard error";
Denis> }
While the error message is somewhat unhelpful, I suspect that the
actual error is that fdopen(fileno(stderr)) is failing for some
reason. Fredrik Tolf, in a message to the kerberos mailing list,
appears to have discovered the actual reason for the doubled logs,
which is a configuration file being read twice under some
configurations. What flags did you pass to configure when you built
the source?
---Tom
More information about the krb5-bugs
mailing list