* 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
+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.
+
+
Sun Jun 11 09:26:48 1995 Ezra Peisach <epeisach@kangaroo.mit.edu>
* Makefile.in (clean): Remove t_kdb and t_kdb.o
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_HAVE_HEADERS(unistd.h)
-AC_HAVE_FUNCS(srand48 srand srandom)
+AC_CHECK_FUNCS(srand48 srand srandom umask)
AppendRule([all:: libkdb5.a])
V5_AC_OUTPUT_MAKEFILE
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
keyfile = defkeyfile;
}
-#if defined(unix) || defined(__unix__)
+#if HAVE_UMASK
oumask = umask(077);
#endif
#ifdef ANSI_STDIO
if (!(kf = fopen(keyfile, "w")))
#endif
{
-#if defined(unix) || defined(__unix__)
+#if HAVE_UMASK
(void) umask(oumask);
#endif
return errno;
}
if (fclose(kf) == EOF)
retval = errno;
-#if defined(unix) || defined(__unix__)
+#if HAVE_UMASK
(void) umask(oumask);
#endif
return retval;
int argc;
char *argv[];
{
- char option;
+ int option;
extern char *optarg;
int do_time, do_random, num_passes, check_cont, verbose, error;