Set umask before creating credentials database to make sure cache is user only readable
Reported by Anton Lundin <glance@acc.umu.se>
This commit is contained in:
@@ -381,7 +381,9 @@ 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;
|
||||
|
Reference in New Issue
Block a user