diff options
author | Gerald (Jerry) Carter <jerry@samba.org> | 2007-11-01 15:53:44 -0400 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-11-01 15:53:44 -0400 |
commit | d6cdbfd875bb2653e831d314726c3240beb0a96b (patch) | |
tree | b87fff1652cd8570dd93e0e20319e1f0501c5eea /source/lib | |
parent | b7d2fadbef044a89920da613b1aafc74a3d94e24 (diff) | |
download | samba-d6cdbfd875bb2653e831d314726c3240beb0a96b.tar.gz samba-d6cdbfd875bb2653e831d314726c3240beb0a96b.tar.xz samba-d6cdbfd875bb2653e831d314726c3240beb0a96b.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
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/account_pol.c | 4 | ||||
-rw-r--r-- | source/lib/sharesec.c | 4 | ||||
-rw-r--r-- | source/lib/util_unistr.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/lib/account_pol.c b/source/lib/account_pol.c index 96a471cf06e..2540b493149 100644 --- a/source/lib/account_pol.c +++ b/source/lib/account_pol.c @@ -212,9 +212,9 @@ bool init_account_policy(void) return True; } - tdb = tdb_open_log(lock_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); + tdb = tdb_open_log(state_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); if (!tdb) { /* the account policies files does not exist or open failed, try to create a new one */ - tdb = tdb_open_log(lock_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + tdb = tdb_open_log(state_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); if (!tdb) { DEBUG(0,("Failed to open account policy database\n")); return False; diff --git a/source/lib/sharesec.c b/source/lib/sharesec.c index 244a6d7285c..e2320b2953c 100644 --- a/source/lib/sharesec.c +++ b/source/lib/sharesec.c @@ -46,10 +46,10 @@ bool share_info_db_init(void) return True; } - share_tdb = tdb_open_log(lock_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + share_tdb = tdb_open_log(state_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); if (!share_tdb) { DEBUG(0,("Failed to open share info database %s (%s)\n", - lock_path("share_info.tdb"), strerror(errno) )); + state_path("share_info.tdb"), strerror(errno) )); return False; } diff --git a/source/lib/util_unistr.c b/source/lib/util_unistr.c index 2b91ea9c80b..e9e2c33fb38 100644 --- a/source/lib/util_unistr.c +++ b/source/lib/util_unistr.c @@ -87,11 +87,11 @@ void load_case_tables(void) } initialised = 1; - upcase_table = (smb_ucs2_t *)map_file(lib_path("upcase.dat"), + upcase_table = (smb_ucs2_t *)map_file(data_path("upcase.dat"), 0x20000); upcase_table_use_unmap = ( upcase_table != NULL ); - lowcase_table = (smb_ucs2_t *)map_file(lib_path("lowcase.dat"), + lowcase_table = (smb_ucs2_t *)map_file(data_path("lowcase.dat"), 0x20000); lowcase_table_use_unmap = ( lowcase_table != NULL ); @@ -229,7 +229,7 @@ void init_valid_table(void) return; } - valid_file = (uint8 *)map_file(lib_path("valid.dat"), 0x10000); + valid_file = (uint8 *)map_file(data_path("valid.dat"), 0x10000); if (valid_file) { valid_table = valid_file; mapped_file = 1; |