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 | 88ee61625a5de5e443d14c54eab91a90d87cda85 (patch) | |
tree | 1b0b440e674d05bb30da28b11464ad47c690b2f5 /source3/registry | |
parent | 8132a7b98b09bb5915559f6ca0ca8eb3ae0e529d (diff) | |
download | samba-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/registry')
-rw-r--r-- | source3/registry/reg_db.c | 10 | ||||
-rw-r--r-- | source3/registry/reg_perfcount.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index 99330120e5..8dd61fcdff 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -230,12 +230,12 @@ bool regdb_init( void ) if ( tdb_reg ) return True; - if ( !(tdb_reg = tdb_wrap_open(NULL, lock_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR, 0600)) ) + if ( !(tdb_reg = tdb_wrap_open(NULL, state_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR, 0600)) ) { - tdb_reg = tdb_wrap_open(NULL, lock_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR|O_CREAT, 0600); + tdb_reg = tdb_wrap_open(NULL, state_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR|O_CREAT, 0600); if ( !tdb_reg ) { DEBUG(0,("regdb_init: Failed to open registry %s (%s)\n", - lock_path("registry.tdb"), strerror(errno) )); + state_path("registry.tdb"), strerror(errno) )); return False; } @@ -278,11 +278,11 @@ WERROR regdb_open( void ) become_root(); - tdb_reg = tdb_wrap_open(NULL, lock_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR, 0600); + tdb_reg = tdb_wrap_open(NULL, state_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR, 0600); if ( !tdb_reg ) { result = ntstatus_to_werror( map_nt_error_from_unix( errno ) ); DEBUG(0,("regdb_open: Failed to open %s! (%s)\n", - lock_path("registry.tdb"), strerror(errno) )); + state_path("registry.tdb"), strerror(errno) )); } unbecome_root(); diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c index 44b5a5e289..1fd9b36a51 100644 --- a/source3/registry/reg_perfcount.c +++ b/source3/registry/reg_perfcount.c @@ -45,7 +45,7 @@ static char* counters_directory( const char *dbname ) fstr_sprintf( path, "%s/%s", PERFCOUNTDIR, dbname ); - pstrcpy( fname, lock_path( path ) ); + pstrcpy( fname, state_path( path ) ); return talloc_strdup(talloc_tos(), fname); } @@ -55,7 +55,7 @@ static char* counters_directory( const char *dbname ) void perfcount_init_keys( void ) { - char *p = lock_path(PERFCOUNTDIR); + char *p = state_path(PERFCOUNTDIR); /* no registry keys; just create the perfmon directory */ |