From: Theodore Tso Date: Sat, 10 Jun 1995 04:05:32 +0000 (+0000) Subject: Make sure the status return from krb5_scc_store_principal is reflected X-Git-Tag: krb5-1.0-beta6~1772 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e228371e1e7d1cc027d6104c416dc3b30fba2618;p=krb5.git 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 --- 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; }