summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-06-10 04:05:32 +0000
committerTheodore Tso <tytso@mit.edu>1995-06-10 04:05:32 +0000
commite228371e1e7d1cc027d6104c416dc3b30fba2618 (patch)
tree6ecac0de66802ae379be904bdfeb68702e0ba7b4
parent02694b1ed7b1ce29a2aaa89ba1d9bc00d03f251e (diff)
downloadkrb5-e228371e1e7d1cc027d6104c416dc3b30fba2618.tar.gz
krb5-e228371e1e7d1cc027d6104c416dc3b30fba2618.tar.xz
krb5-e228371e1e7d1cc027d6104c416dc3b30fba2618.zip
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
-rw-r--r--src/lib/krb5/ccache/stdio/ChangeLog6
-rw-r--r--src/lib/krb5/ccache/stdio/scc_init.c20
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 <tytso@dcl>
+
+ * 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 <tytso@rsx-11.mit.edu>
* 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;
}