Make sure the status return from krb5_scc_store_principal is reflected
authorTheodore Tso <tytso@mit.edu>
Sat, 10 Jun 1995 04:05:32 +0000 (04:05 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 10 Jun 1995 04:05:32 +0000 (04:05 +0000)
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
src/lib/krb5/ccache/stdio/scc_init.c

index 1384554b8a3e65d2b54fd62db816658703dc1d6c..dab9b921a4c080b037603d68a41714b101ed14f2 100644 (file)
@@ -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
index ff765f9fa1ce9b97ce67321ef48773b9c887ae7c..8261535843a42fc32a682b973407f4a059b70b47 100644 (file)
@@ -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;
 }