From e228371e1e7d1cc027d6104c416dc3b30fba2618 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 10 Jun 1995 04:05:32 +0000 Subject: [PATCH] Make sure the status return from krb5_scc_store_principal is reflected in the return status of krb5_scc_initialize(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6031 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/stdio/ChangeLog | 6 ++++++ src/lib/krb5/ccache/stdio/scc_init.c | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/lib/krb5/ccache/stdio/ChangeLog b/src/lib/krb5/ccache/stdio/ChangeLog index 1384554b8..dab9b921a 100644 --- a/src/lib/krb5/ccache/stdio/ChangeLog +++ b/src/lib/krb5/ccache/stdio/ChangeLog @@ -1,3 +1,9 @@ +Sat Jun 10 00:04:02 1995 Theodore Y. Ts'o + + * scc_init.c (krb5_scc_initialize): Make sure the status return + from krb5_scc_store_principal is reflected in the return + status of krb5_scc_initialize(). + Fri Jun 9 19:30:35 1995 * configure.in: Remove standardized set of autoconf macros, which diff --git a/src/lib/krb5/ccache/stdio/scc_init.c b/src/lib/krb5/ccache/stdio/scc_init.c index ff765f9fa..826153584 100644 --- a/src/lib/krb5/ccache/stdio/scc_init.c +++ b/src/lib/krb5/ccache/stdio/scc_init.c @@ -46,27 +46,27 @@ krb5_scc_initialize(context, id, princ) krb5_ccache id; krb5_principal princ; { - int ret; + krb5_error_code kret; - ret = krb5_scc_open_file (context, id, SCC_OPEN_AND_ERASE); - if (ret < 0) + kret = krb5_scc_open_file (context, id, SCC_OPEN_AND_ERASE); + if (kret < 0) return krb5_scc_interpret(context, errno); #if 0 - ret = fchmod(((krb5_scc_data *) id->data)->fd, S_IREAD | S_IWRITE); - if (ret == -1) { - ret = krb5_scc_interpret(context, errno); + kret = fchmod(((krb5_scc_data *) id->data)->fd, S_IREAD | S_IWRITE); + if (kret == -1) { + kret = krb5_scc_interpret(context, errno); if (OPENCLOSE(id)) { close(((krb5_scc_data *)id->data)->fd); ((krb5_scc_data *) id->data)->fd = -1; } - return ret; + return kret; } #endif - krb5_scc_store_principal(context, id, princ); + kret = krb5_scc_store_principal(context, id, princ); - MAYBE_CLOSE (context, id, ret); - return ret; + MAYBE_CLOSE (context, id, kret); + return kret; } -- 2.26.2