summaryrefslogtreecommitdiffstats
path: root/src/lib/kdb/store_mkey.c
diff options
context:
space:
mode:
authorSam Hartman <hartmans@mit.edu>1995-06-14 18:05:37 +0000
committerSam Hartman <hartmans@mit.edu>1995-06-14 18:05:37 +0000
commit9e6f0fdfd1caf9f9a6c6bafef0c372d4a6c3689e (patch)
tree96d8ba1e0b1b090864f6f45f92fbecc46a19d142 /src/lib/kdb/store_mkey.c
parent9b0098022829e7453b123df33784e4d812d357ff (diff)
downloadkrb5-9e6f0fdfd1caf9f9a6c6bafef0c372d4a6c3689e.tar.gz
krb5-9e6f0fdfd1caf9f9a6c6bafef0c372d4a6c3689e.tar.xz
krb5-9e6f0fdfd1caf9f9a6c6bafef0c372d4a6c3689e.zip
Wed Jun 14 12:37:51 1995 Sam Hartman <hartmans@tardis.MIT.EDU>
* configure.in: Check for umask being defined. * store_mkey.c (krb5_db_store_mkey): Use HAVE_UMASK instead of unix as a preprocessor define for setting the umask. AIX doesn't define unix. * t_kdb.c (main): Declare option as int, not char. When char is unsigned, the comparison to EOF fails and it loops forever. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6060 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/kdb/store_mkey.c')
-rw-r--r--src/lib/kdb/store_mkey.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/kdb/store_mkey.c b/src/lib/kdb/store_mkey.c
index d739e2626b..ddec7d2035 100644
--- a/src/lib/kdb/store_mkey.c
+++ b/src/lib/kdb/store_mkey.c
@@ -57,7 +57,7 @@ krb5_db_store_mkey(context, keyfile, mname, key)
krb5_ui_2 keytype;
char defkeyfile[MAXPATHLEN+1];
krb5_data *realm = krb5_princ_realm(context, mname);
-#if defined(unix) || defined(__unix__)
+#if HAVE_UMASK
int oumask;
#endif
@@ -70,7 +70,7 @@ krb5_db_store_mkey(context, keyfile, mname, key)
keyfile = defkeyfile;
}
-#if defined(unix) || defined(__unix__)
+#if HAVE_UMASK
oumask = umask(077);
#endif
#ifdef ANSI_STDIO
@@ -79,7 +79,7 @@ krb5_db_store_mkey(context, keyfile, mname, key)
if (!(kf = fopen(keyfile, "w")))
#endif
{
-#if defined(unix) || defined(__unix__)
+#if HAVE_UMASK
(void) umask(oumask);
#endif
return errno;
@@ -96,7 +96,7 @@ krb5_db_store_mkey(context, keyfile, mname, key)
}
if (fclose(kf) == EOF)
retval = errno;
-#if defined(unix) || defined(__unix__)
+#if HAVE_UMASK
(void) umask(oumask);
#endif
return retval;