Stephen Gallagher wrote:
On 07/02/2010 07:59 AM, Stephen Gallagher wrote:
On 07/01/2010 02:18 PM, Stephen Gallagher wrote:
We will now emit a level 0 debug message on keytab errors, and also write to the syslog (LOG_AUTHPRIV) Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=591677 https://fedorahosted.org/sssd/ticket/485
General question to whoever reviews this: I'm not sure whether LOG_AUTHPRIV or LOG_DAEMON is more appropriate here.
On Fedora, LOG_AUTHPRIV logs by default to /var/log/secure while LOG_DAEMON logs by default to /var/log/messages.
I'm not sure which would be more expected for these errors.
On further reflection, I think LOG_DAEMON is the correct choice. Updated patch attached.
Nack
You are leaking entry in success scenario. I suggest a little bit cleaner approach:
while((ret = krb5_kt_next_entry(context, keytab, &entry, &cursor)) == 0){ krb5_unparse_name(context, entry.principal, &principal); krb5_free_keytab_entry_contents(context, &entry); if (strcmp(full_princ, principal) == 0) found = true; free(principal); if (found) break; }
And I think that if you have explicit syslog messages in case of failures it makes sense to have one also in the case krb5_kt_end_seq_get fails.
-------------------------
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/sssd-devel