Create dbs with correct permissions.

This commit is contained in:
Dimitri John Ledkov
2015-02-27 16:26:57 +00:00
parent 46a72bc342
commit bab349b46e
7 changed files with 27 additions and 4 deletions

View File

@ -968,11 +968,10 @@ int commonio_close (struct commonio_db *db)
} else {
/*
* Default permissions for new [g]shadow files.
* (passwd and group always exist...)
*/
sb.st_mode = 0400;
sb.st_uid = 0;
sb.st_gid = 0;
sb.st_mode = db->st_mode;
sb.st_uid = db->st_uid;
sb.st_gid = db->st_gid;
}
snprintf (buf, sizeof buf, "%s+", db->filename);