From 115cc768599d7df4b3206426652d3e7a3971d597 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 9 Oct 2012 19:02:05 +0200 Subject: Two fixes to child processes There was an unused structure member in the krb5_child. Declaration of __krb5_error_msg was shadowing the same variable from sss_krb5.h which is not nice. Also we might actually use the error context directly instead of passing it as parameter. --- src/providers/krb5/krb5_child.c | 2 -- src/providers/ldap/ldap_child.c | 9 +++++---- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/providers') diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c index 00da7ea35..0116dbb70 100644 --- a/src/providers/krb5/krb5_child.c +++ b/src/providers/krb5/krb5_child.c @@ -69,8 +69,6 @@ struct krb5_child_ctx { char *ccache_dir; char *ccname_template; int auth_timeout; - - int child_debug_fd; }; struct krb5_req { diff --git a/src/providers/ldap/ldap_child.c b/src/providers/ldap/ldap_child.c index 888a1249f..35e0c0f5b 100644 --- a/src/providers/ldap/ldap_child.c +++ b/src/providers/ldap/ldap_child.c @@ -35,12 +35,13 @@ #include "providers/dp_backend.h" static krb5_context krb5_error_ctx; +#define LDAP_CHILD_DEBUG(level, error) KRB5_DEBUG(level, krb5_error_ctx, error) -static const char *__krb5_error_msg; +static const char *__ldap_child_krb5_error_msg; #define KRB5_SYSLOG(krb5_error) do { \ - __krb5_error_msg = sss_krb5_get_error_message(krb5_error_ctx, krb5_error); \ - sss_log(SSS_LOG_ERR, "%s", __krb5_error_msg); \ - sss_krb5_free_error_message(krb5_error_ctx, __krb5_error_msg); \ + __ldap_child_krb5_error_msg = sss_krb5_get_error_message(krb5_error_ctx, krb5_error); \ + sss_log(SSS_LOG_ERR, "%s", __ldap_child_krb5_error_msg); \ + sss_krb5_free_error_message(krb5_error_ctx, __ldap_child_krb5_error_msg); \ } while(0) struct input_buffer { -- cgit