summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
authorGerald (Jerry) Carter <jerry@samba.org>2007-11-01 15:53:44 -0400
committerGerald (Jerry) Carter <jerry@samba.org>2007-11-01 15:53:44 -0400
commit88ee61625a5de5e443d14c54eab91a90d87cda85 (patch)
tree1b0b440e674d05bb30da28b11464ad47c690b2f5 /source3/groupdb
parent8132a7b98b09bb5915559f6ca0ca8eb3ae0e529d (diff)
downloadsamba-88ee61625a5de5e443d14c54eab91a90d87cda85.tar.gz
samba-88ee61625a5de5e443d14c54eab91a90d87cda85.tar.bz2
samba-88ee61625a5de5e443d14c54eab91a90d87cda85.zip
Patch 2 of 3 from Debian Samba packagers:
The point is doing the following associations: - non discardable state data (all TDB files that may need to be backed up) go to statedir - shared data (codepage stuff) go to codepagedir The patch *does not change* the default location for these directories. So, there is no behaviour change when applying it. The main change is for samba developers who have to think when dealing with files that previously pertained to libdir whether they: - go in statedir - go in codepagedir - stay in libdir (This used to be commit d6cdbfd875bb2653e831d314726c3240beb0a96b)
Diffstat (limited to 'source3/groupdb')
-rw-r--r--source3/groupdb/mapping_ldb.c8
-rw-r--r--source3/groupdb/mapping_tdb.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/source3/groupdb/mapping_ldb.c b/source3/groupdb/mapping_ldb.c
index c0b2e82a29..be1f1593fb 100644
--- a/source3/groupdb/mapping_ldb.c
+++ b/source3/groupdb/mapping_ldb.c
@@ -55,7 +55,7 @@ static bool init_group_mapping(void)
/* this is needed as Samba3 doesn't have this globally yet */
ldb_global_init();
- db_path = lock_path("group_mapping.ldb");
+ db_path = state_path("group_mapping.ldb");
ldb = ldb_init(NULL);
if (ldb == NULL) goto failed;
@@ -89,9 +89,9 @@ static bool init_group_mapping(void)
}
/* possibly upgrade */
- tdb_path = lock_path("group_mapping.tdb");
+ tdb_path = state_path("group_mapping.tdb");
if (file_exist(tdb_path, NULL) && !mapping_upgrade(tdb_path)) {
- unlink(lock_path("group_mapping.ldb"));
+ unlink(state_path("group_mapping.ldb"));
goto failed;
}
@@ -638,7 +638,7 @@ static bool mapping_upgrade(const char *tdb_path)
}
pstrcpy(old_path, tdb_path);
- pstrcpy(new_path, lock_path("group_mapping.tdb.upgraded"));
+ pstrcpy(new_path, state_path("group_mapping.tdb.upgraded"));
if (rename(old_path, new_path) != 0) {
DEBUG(0,("Failed to rename old group mapping database\n"));
diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c
index 5bfe96622d..f0f875d082 100644
--- a/source3/groupdb/mapping_tdb.c
+++ b/source3/groupdb/mapping_tdb.c
@@ -42,7 +42,7 @@ static bool init_group_mapping(void)
if (tdb)
return True;
- tdb = tdb_open_log(lock_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+ tdb = tdb_open_log(state_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
if (!tdb) {
DEBUG(0,("Failed to open group mapping database\n"));
return False;