Use POSIX constants instead of S_IREAD/S_IWRITE
authorGreg Hudson <ghudson@mit.edu>
Tue, 22 Nov 2011 17:52:55 +0000 (17:52 +0000)
committerGreg Hudson <ghudson@mit.edu>
Tue, 22 Nov 2011 17:52:55 +0000 (17:52 +0000)
S_IREAD and S_IWRITE are ancient names for S_IRUSR and S_IWUSR, and
are not defined on some modern platforms (such as Android).  Use the
POSIX names instead.

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

src/lib/krb5/ccache/cc_file.c

index 39f81d8b4eacfdb694d21841a4681ff0778e5595..36133797c923dcfb36c8951f61ddafe16335d63e 100644 (file)
@@ -1449,9 +1449,9 @@ krb5_fcc_initialize(krb5_context context, krb5_ccache id, krb5_principal princ)
 #if defined(HAVE_FCHMOD) || defined(HAVE_CHMOD)
     {
 #ifdef HAVE_FCHMOD
-        reti = fchmod(((krb5_fcc_data *) id->data)->file, S_IREAD | S_IWRITE);
+        reti = fchmod(((krb5_fcc_data *)id->data)->file, S_IRUSR | S_IWUSR);
 #else
-        reti = chmod(((krb5_fcc_data *) id->data)->filename, S_IREAD | S_IWRITE);
+        reti = chmod(((krb5_fcc_data *)id->data)->filename, S_IRUSR | S_IWUSR);
 #endif
         if (reti == -1) {
             kret = krb5_fcc_interpret(context, errno);