From 98e0f08e3de3f8f035790adcd614cff6bf6dd34d Mon Sep 17 00:00:00 2001 From: Jan Zeleny Date: Tue, 22 Nov 2011 08:25:01 -0500 Subject: Fixed unchecked value of setenv() in check_and_export_options() https://fedorahosted.org/sssd/ticket/1080 --- src/providers/krb5/krb5_common.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/providers/krb5') diff --git a/src/providers/krb5/krb5_common.c b/src/providers/krb5/krb5_common.c index 4675e0a1..a065727a 100644 --- a/src/providers/krb5/krb5_common.c +++ b/src/providers/krb5/krb5_common.c @@ -171,9 +171,12 @@ errno_t check_and_export_options(struct dp_option *opts, } if (dp_opt_get_bool(opts, KRB5_CANONICALIZE)) { - setenv(SSSD_KRB5_CANONICALIZE, "true", 1); + ret = setenv(SSSD_KRB5_CANONICALIZE, "true", 1); } else { - setenv(SSSD_KRB5_CANONICALIZE, "false", 1); + ret = setenv(SSSD_KRB5_CANONICALIZE, "false", 1); + } + if (ret != EOK) { + DEBUG(2, ("setenv [%s] failed.\n", SSSD_KRB5_CANONICALIZE)); } dummy = dp_opt_get_cstring(opts, KRB5_KDC); -- cgit