1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-08 16:59:09 +03:00

ldb: Fix permissions of group_mapping.ldb.

This one fixes bug #5715 and CVE-2008-3789.
(cherry picked from commit a94f44c49f)
This commit is contained in:
Andrew Tridgell
2008-08-27 10:45:43 +02:00
committed by Karolin Seeger
parent a7bbd33139
commit 2eaf4ed622

View File

@ -74,7 +74,13 @@ static bool init_group_mapping(void)
if (ret != LDB_SUCCESS) {
goto failed;
}
/* force the permissions on the ldb to 0600 - this will fix
existing databases as well as new ones */
if (chmod(db_path, 0600) != 0) {
goto failed;
}
if (!existed) {
/* initialise the ldb with an index */
struct ldb_ldif *ldif;