krb5 commit: Make ksu work when unsetenv() returns NULL

Greg Hudson ghudson at mit.edu
Fri Oct 23 12:06:08 EDT 2015


https://github.com/krb5/krb5/commit/7eee546db10e907666e02fdded4f512e8d0faf4c
commit 7eee546db10e907666e02fdded4f512e8d0faf4c
Author: Greg Hudson <ghudson at mit.edu>
Date:   Sun Oct 4 19:54:35 2015 -0400

    Make ksu work when unsetenv() returns NULL
    
    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 |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/src/clients/ksu/main.c b/src/clients/ksu/main.c
index 453dae6..2f8d8e1 100644
--- a/src/clients/ksu/main.c
+++ b/src/clients/ksu/main.c
@@ -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);


More information about the cvs-krb5 mailing list