From bacc484b2a99984454bd9e564c96b2be003d29ae Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Tue, 30 Nov 2021 00:58:31 -0600 Subject: [PATCH] krb5: Fix umask issue with SQLite3 --- configure.ac | 1 - include/config.h.w32 | 3 --- lib/krb5/scache.c | 2 -- 3 files changed, 6 deletions(-) diff --git a/configure.ac b/configure.ac index a53131fd5..c04c7ad5d 100644 --- a/configure.ac +++ b/configure.ac @@ -538,7 +538,6 @@ AC_CHECK_FUNCS([ \ setreuid \ setsid \ sigaction \ - umask \ unlockpt \ waitpid \ ]) diff --git a/include/config.h.w32 b/include/config.h.w32 index 658388079..2d03bf264 100644 --- a/include/config.h.w32 +++ b/include/config.h.w32 @@ -1102,9 +1102,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* Define to 1 if the system has the type `uintptr_t'. */ #define HAVE_UINTPTR_T 1 -/* Define to 1 if you have the `umask' function. */ -/* #define HAVE_UMASK 1 */ - /* Define to 1 if you have the `uname' function. */ /* #define HAVE_UNAME 1 */ diff --git a/lib/krb5/scache.c b/lib/krb5/scache.c index 8d57eaba6..553481a92 100644 --- a/lib/krb5/scache.c +++ b/lib/krb5/scache.c @@ -472,9 +472,7 @@ make_database(krb5_context context, krb5_scache *s) ret = open_database(context, s, 0); if (ret) { - mode_t oldumask = umask(077); ret = open_database(context, s, SQLITE_OPEN_CREATE); - umask(oldumask); if (ret) goto out; created_file = 1;