krb5: Fix umask issue with SQLite3

This commit is contained in:
Nicolas Williams
2021-11-30 00:58:31 -06:00
committed by Jeffrey Altman
parent aeac1186c8
commit bacc484b2a
3 changed files with 0 additions and 6 deletions

View File

@@ -538,7 +538,6 @@ AC_CHECK_FUNCS([ \
setreuid \
setsid \
sigaction \
umask \
unlockpt \
waitpid \
])

View File

@@ -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 */

View File

@@ -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;