From: Theodore Tso Date: Tue, 23 Feb 1993 00:45:00 +0000 (+0000) Subject: Added include for errno.h; added support for fchmod() X-Git-Tag: krb5-1.0-beta3~335 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4ccadc338cd26ccb2434a27c2dca17166fe5739b;p=krb5.git Added include for errno.h; added support for fchmod() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2494 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/ccache/file/fcc_init.c b/src/lib/krb5/ccache/file/fcc_init.c index 625519599..ea63662cd 100644 --- a/src/lib/krb5/ccache/file/fcc_init.c +++ b/src/lib/krb5/ccache/file/fcc_init.c @@ -30,7 +30,7 @@ static char rcsid_fcc_init_c[] = "$Id$"; #endif /* !lint && !SABER */ - +#include #include "fcc.h" /* @@ -54,7 +54,11 @@ krb5_fcc_initialize(id, princ) MAYBE_OPEN(id, FCC_OPEN_AND_ERASE); +#ifdef NOFCHMOD + ret = chmod(((krb5_fcc_data *) id->data)->filename, S_IREAD | S_IWRITE); +#else ret = fchmod(((krb5_fcc_data *) id->data)->fd, S_IREAD | S_IWRITE); +#endif if (ret == -1) { ret = krb5_fcc_interpret(errno); MAYBE_CLOSE(id, ret);