parameterize using htons/etc.
authorJohn Kohl <jtkohl@mit.edu>
Fri, 19 Apr 1991 13:34:41 +0000 (13:34 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Fri, 19 Apr 1991 13:34:41 +0000 (13:34 +0000)
don't call abort(), return an error.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2000 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/ccache/file/fcc_maybe.c

index b5d0b34b80e2e2e1fda0247127e3caf8cdef2228..1ff94977a87278f11be33dc04c5e2391abf25370 100644 (file)
@@ -17,7 +17,14 @@ static char rcsid_fcc_maybe_c[] =
 #endif /* !lint & !SABER */
 
 #include "fcc.h"
+#include <krb5/osconf.h>
+
+#ifdef KRB5_USE_INET
 #include <netinet/in.h>                        /* XXX ip only? */
+#else
+ #error find some way to use net-byte-order file version numbers.
+#endif
+
 #include <krb5/libos.h>
 #include <krb5/los-proto.h>
 #include <stdio.h>
@@ -100,9 +107,9 @@ krb5_fcc_close_file (id)
      krb5_fcc_data *data = (krb5_fcc_data *)id->data;
      krb5_error_code retval;
 
-     if (data->fd == -1) {
-        abort ();                      /* XXX? */
-     }
+     if (data->fd == -1)
+        return KRB5_FCC_INTERNAL;
+
      retval = fcc_lock_file(data, data->fd, UNLOCK_IT);
      ret = close (data->fd);
      data->fd = -1;