]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Make ksu work when unsetenv() returns NULL 342/head
authorGreg Hudson <ghudson@mit.edu>
Sun, 4 Oct 2015 23:54:35 +0000 (19:54 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 23 Oct 2015 15:57:47 +0000 (11:57 -0400)
Some older platforms (OS X 10.4, glibc 2.2.1) declare unsetenv() as
returning void, as does ksu's compatibility definition of unsetenv().
Don't use the return value in get_configured_defccname().

ticket: 8267
target_version: 1.14
tags: pullup

src/clients/ksu/main.c

index 453dae65a24f463822dfc44473877128a9c637e4..2f8d8e1122f307451255836a53b50598f128c781 100644 (file)
@@ -810,12 +810,7 @@ get_configured_defccname(krb5_context context, char **target_out)
 
     *target_out = NULL;
 
-    if (unsetenv(KRB5_ENV_CCNAME) != 0) {
-        retval = errno;
-        com_err(prog_name, retval, _("while clearing the value of %s"),
-                KRB5_ENV_CCNAME);
-        return retval;
-    }
+    unsetenv(KRB5_ENV_CCNAME);
 
     /* Make sure we don't have a cached value for a different uid. */
     retval = krb5_cc_set_default_name(context, NULL);