1 diff -uNr samba-3.0.0beta2.orig/source/Makefile.in samba-3.0.0beta2/source/Makefile.in
2 --- samba-3.0.0beta2.orig/source/Makefile.in 2003-07-02 23:26:46.000000000 -0500
3 +++ samba-3.0.0beta2/source/Makefile.in 2003-07-02 23:19:46.000000000 -0500
5 # the directory where lock files go
8 +# FHS directories; equal to LOCKDIR if not using --with-fhs
10 +STATEDIR = @statedir@
12 +# Where to look for (and install) codepage databases.
13 +CODEPAGEDIR = @codepagedir@
15 # the directory where pid files go
17 # man pages language(s)
19 PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\"
20 PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \
21 -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\"
22 -PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\"
23 +PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\" -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" -DCACHEDIR=\"$(CACHEDIR)\" -DSTATEDIR=\"$(STATEDIR)\"
24 PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS)
26 # Note that all executable programs now provide for an optional executable suffix.
28 @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS) $(DESTDIR)$(BINDIR) $(SCRIPTS)
30 installdat: installdirs
31 - @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(LIBDIR) $(srcdir)
32 + @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(CODEPAGEDIR) $(srcdir)
34 installswat: installdirs
35 @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
36 diff -uNr samba-3.0.0beta2.orig/source/configure.in samba-3.0.0beta2/source/configure.in
37 --- samba-3.0.0beta2.orig/source/configure.in 2003-07-02 23:26:47.000000000 -0500
38 +++ samba-3.0.0beta2/source/configure.in 2003-07-02 23:19:02.000000000 -0500
40 [ --with-fhs Use FHS-compliant paths (default=no)],
43 - lockdir="\${VARDIR}/lib/samba"
44 + lockdir="\${VARDIR}/run/samba"
45 - piddir="\${VARDIR}/run"
46 + piddir="\${VARDIR}/run/samba"
47 mandir="\${prefix}/share/man"
48 logfilebase="\${VARDIR}/log/samba"
49 privatedir="\${CONFIGDIR}/private"
50 libdir="\${prefix}/lib/samba"
51 configdir="${sysconfdir}/samba"
52 - swatdir="\${DATADIR}/samba/swat"
53 + swatdir="\${DATADIR}/samba/swat"
54 + codepagedir="\${DATADIR}/samba"
55 + statedir="\${VARDIR}/lib/samba"
56 + cachedir="\${VARDIR}/cache/samba"
57 + AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths])
65 +AC_SUBST(codepagedir)
69 dnl Unique-to-Samba variables we'll be playing with.
71 diff -uNr samba-3.0.0beta2.orig/source/dynconfig.c samba-3.0.0beta2/source/dynconfig.c
72 --- samba-3.0.0beta2.orig/source/dynconfig.c 2003-07-02 23:26:47.000000000 -0500
73 +++ samba-3.0.0beta2/source/dynconfig.c 2003-07-02 23:19:02.000000000 -0500
75 pstring dyn_LMHOSTSFILE = LMHOSTSFILE;
78 + * @brief Samba data directory.
80 + * @sa data_path() to get the path to a file inside the CODEPAGEDIR.
82 +pstring dyn_CODEPAGEDIR = CODEPAGEDIR;
85 * @brief Samba library directory.
87 * @sa lib_path() to get the path to a file inside the LIBDIR.
90 const pstring dyn_SMB_PASSWD_FILE = SMB_PASSWD_FILE;
91 const pstring dyn_PRIVATE_DIR = PRIVATE_DIR;
94 +/* In non-FHS mode, these should be configurable using 'lock dir =';
95 + but in FHS mode, they are their own directory. Implement as wrapper
96 + functions so that everything can still be kept in dynconfig.c.
99 +char *dyn_STATEDIR(void)
101 +#ifdef FHS_COMPATIBLE
104 + return lp_lockdir();
108 +char *dyn_CACHEDIR(void)
110 +#ifdef FHS_COMPATIBLE
113 + return lp_lockdir();
116 diff -uNr samba-3.0.0beta2.orig/source/groupdb/mapping.c samba-3.0.0beta2/source/groupdb/mapping.c
117 --- samba-3.0.0beta2.orig/source/groupdb/mapping.c 2003-07-02 23:26:47.000000000 -0500
118 +++ samba-3.0.0beta2/source/groupdb/mapping.c 2003-07-02 23:19:02.000000000 -0500
121 if (tdb && local_pid == sys_getpid())
123 - tdb = tdb_open_log(lock_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
124 + tdb = tdb_open_log(state_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
126 DEBUG(0,("Failed to open group mapping database\n"));
128 diff -uNr samba-3.0.0beta2.orig/source/include/dynconfig.h samba-3.0.0beta2/source/include/dynconfig.h
129 --- samba-3.0.0beta2.orig/source/include/dynconfig.h 2003-07-02 23:26:47.000000000 -0500
130 +++ samba-3.0.0beta2/source/include/dynconfig.h 2003-07-02 23:19:02.000000000 -0500
132 extern pstring dyn_CONFIGFILE;
133 extern pstring dyn_LOGFILEBASE, dyn_LMHOSTSFILE;
134 extern pstring dyn_LIBDIR;
135 +extern pstring dyn_CODEPAGEDIR;
136 extern const fstring dyn_SHLIBEXT;
137 extern const pstring dyn_LOCKDIR;
138 extern const pstring dyn_PIDDIR;
139 extern const pstring dyn_SMB_PASSWD_FILE;
140 extern const pstring dyn_PRIVATE_DIR;
142 +char *dyn_STATEDIR(void);
143 +char *dyn_CACHEDIR(void);
144 diff -uNr samba-3.0.0beta2.orig/source/intl/lang_tdb.c samba-3.0.0beta2/source/intl/lang_tdb.c
145 --- samba-3.0.0beta2.orig/source/intl/lang_tdb.c 2003-07-02 23:26:47.000000000 -0500
146 +++ samba-3.0.0beta2/source/intl/lang_tdb.c 2003-07-02 23:19:02.000000000 -0500
148 /* if no lang then we don't translate */
149 if (!lang) return True;
151 - asprintf(&msg_path, "%s.msg", lib_path((const char *)lang));
152 + asprintf(&msg_path, "%s.msg", data_path((const char *)lang));
153 if (stat(msg_path, &st) != 0) {
154 /* the msg file isn't available */
160 - asprintf(&path, "%s%s.tdb", lock_path("lang_"), lang);
161 + asprintf(&path, "%s%s.tdb", state_path("lang_"), lang);
163 tdb = tdb_open_log(path, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0644);
165 diff -uNr samba-3.0.0beta2.orig/source/lib/account_pol.c samba-3.0.0beta2/source/lib/account_pol.c
166 --- samba-3.0.0beta2.orig/source/lib/account_pol.c 2003-07-02 23:26:47.000000000 -0500
167 +++ samba-3.0.0beta2/source/lib/account_pol.c 2003-07-02 23:19:02.000000000 -0500
170 if (tdb && local_pid == sys_getpid())
172 - tdb = tdb_open_log(lock_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
173 + tdb = tdb_open_log(state_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
175 DEBUG(0,("Failed to open account policy database\n"));
177 diff -uNr samba-3.0.0beta2.orig/source/lib/util.c samba-3.0.0beta2/source/lib/util.c
178 --- samba-3.0.0beta2.orig/source/lib/util.c 2003-07-02 23:26:47.000000000 -0500
179 +++ samba-3.0.0beta2/source/lib/util.c 2003-07-02 23:19:02.000000000 -0500
180 @@ -2190,6 +2190,61 @@
184 + * @brief Returns an absolute path to a file in the Samba data directory.
186 + * @param name File to find, relative to CODEPAGEDIR.
188 + * @retval Pointer to a static #pstring containing the full path.
191 +char *data_path(const char *name)
193 + static pstring fname;
194 + snprintf(fname, sizeof(fname), "%s/%s", dyn_CODEPAGEDIR, name);
198 +/*****************************************************************
199 +a useful function for returning a path in the Samba state directory
200 + *****************************************************************/
201 +char *state_path(char *name)
203 + static pstring fname;
205 + pstrcpy(fname,dyn_STATEDIR());
206 + trim_string(fname,"","/");
208 + if (!directory_exist(fname,NULL)) {
212 + pstrcat(fname,"/");
213 + pstrcat(fname,name);
218 +/*****************************************************************
219 +a useful function for returning a path in the Samba cache directory
220 + *****************************************************************/
221 +char *cache_path(char *name)
223 + static pstring fname;
225 + pstrcpy(fname,dyn_CACHEDIR());
226 + trim_string(fname,"","/");
228 + if (!directory_exist(fname,NULL)) {
232 + pstrcat(fname,"/");
233 + pstrcat(fname,name);
239 * @brief Returns the platform specific shared library extension.
241 * @retval Pointer to a static #fstring containing the extension.
242 diff -uNr samba-3.0.0beta2.orig/source/lib/util_unistr.c samba-3.0.0beta2/source/lib/util_unistr.c
243 --- samba-3.0.0beta2.orig/source/lib/util_unistr.c 2003-07-02 23:26:47.000000000 -0500
244 +++ samba-3.0.0beta2/source/lib/util_unistr.c 2003-07-02 23:19:02.000000000 -0500
246 if (initialised) return;
249 - upcase_table = map_file(lib_path("upcase.dat"), 0x20000);
250 - lowcase_table = map_file(lib_path("lowcase.dat"), 0x20000);
251 + upcase_table = map_file(data_path("upcase.dat"), 0x20000);
252 + lowcase_table = map_file(data_path("lowcase.dat"), 0x20000);
254 /* we would like Samba to limp along even if these tables are
260 - valid_file = map_file(lib_path("valid.dat"), 0x10000);
261 + valid_file = map_file(data_path("valid.dat"), 0x10000);
263 valid_table = valid_file;
265 diff -uNr samba-3.0.0beta2.orig/source/libsmb/samlogon_cache.c samba-3.0.0beta2/source/libsmb/samlogon_cache.c
266 --- samba-3.0.0beta2.orig/source/libsmb/samlogon_cache.c 2003-07-01 09:40:37.000000000 -0500
267 +++ samba-3.0.0beta2/source/libsmb/samlogon_cache.c 2003-07-02 23:19:02.000000000 -0500
269 BOOL netsamlogon_cache_init(void)
271 if (!netsamlogon_tdb) {
272 - netsamlogon_tdb = tdb_open_log(lock_path(NETSAMLOGON_TDB), 0,
273 + netsamlogon_tdb = tdb_open_log(cache_path(NETSAMLOGON_TDB), 0,
274 TDB_DEFAULT, O_RDWR | O_CREAT, 0600);
278 winbindd_cache.tdb open. Open the tdb if a NULL is passed. */
281 - tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000,
282 + tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 5000,
283 TDB_DEFAULT, O_RDWR, 0600);
285 DEBUG(5, ("netsamlogon_clear_cached_user: failed to open cache\n"));
286 --- samba_3_0/source/nmbd/nmbd_serverlistdb.c.orig 2003-09-08 10:53:13.000000000 -0400
287 +++ samba_3_0/source/nmbd/nmbd_serverlistdb.c 2003-09-08 11:22:03.000000000 -0400
292 - pstrcpy(fname,lp_lockdir());
293 + pstrcpy(fname,dyn_CACHEDIR());
294 trim_char(fname,'\0' ,'/');
296 pstrcat(fname,SERVER_LIST);
297 --- samba-3.0.0rc2/source/nmbd/nmbd_winsserver.c.orig 2003-08-28 17:42:44.000000000 -0400
298 +++ samba-3.0.0rc2/source/nmbd/nmbd_winsserver.c 2003-08-31 08:09:11.000000000 -0400
301 add_samba_names_to_subnet(wins_server_subnet);
303 - if((fp = x_fopen(lock_path(WINS_LIST),O_RDONLY,0)) == NULL) {
304 + if((fp = x_fopen(state_path(WINS_LIST),O_RDONLY,0)) == NULL) {
305 DEBUG(2,("initialise_wins: Can't open wins database file %s. Error was %s\n",
306 WINS_LIST, strerror(errno) ));
308 @@ -1759,7 +1759,7 @@
312 - slprintf(fname,sizeof(fname)-1,"%s/%s", lp_lockdir(), WINS_LIST);
313 + slprintf(fname,sizeof(fname)-1,"%s/%s", dyn_STATEDIR(), WINS_LIST);
314 all_string_sub(fname,"//", "/", 0);
315 slprintf(fnamenew,sizeof(fnamenew)-1,"%s.%u", fname, (unsigned int)sys_getpid());
317 diff -uNr samba-3.0.0beta2.orig/source/nsswitch/winbindd_cache.c samba-3.0.0beta2/source/nsswitch/winbindd_cache.c
318 --- samba-3.0.0beta2.orig/source/nsswitch/winbindd_cache.c 2003-07-02 23:26:47.000000000 -0500
319 +++ samba-3.0.0beta2/source/nsswitch/winbindd_cache.c 2003-07-02 23:19:02.000000000 -0500
324 - wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000,
325 + wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 5000,
326 TDB_CLEAR_IF_FIRST, O_RDWR|O_CREAT, 0600);
329 diff -uNr samba-3.0.0beta2.orig/source/nsswitch/winbindd_util.c samba-3.0.0beta2/source/nsswitch/winbindd_util.c
330 --- samba-3.0.0beta2.orig/source/nsswitch/winbindd_util.c 2003-07-01 15:44:25.000000000 -0500
331 +++ samba-3.0.0beta2/source/nsswitch/winbindd_util.c 2003-07-02 23:19:02.000000000 -0500
333 SMB_STRUCT_STAT stbuf;
334 TDB_CONTEXT *idmap_tdb;
336 - pstrcpy(idmap_name, lock_path("winbindd_idmap.tdb"));
337 + pstrcpy(idmap_name, state_path("winbindd_idmap.tdb"));
339 if (!file_exist(idmap_name, &stbuf)) {
340 /* nothing to convert return */
341 diff -uNr samba-3.0.0beta2.orig/source/param/loadparm.c samba-3.0.0beta2/source/param/loadparm.c
342 --- samba-3.0.0beta2.orig/source/param/loadparm.c 2003-07-02 23:26:47.000000000 -0500
343 +++ samba-3.0.0beta2/source/param/loadparm.c 2003-07-02 23:19:02.000000000 -0500
345 char *szAddPrinterCommand;
346 char *szDeletePrinterCommand;
347 char *szOs2DriverMap;
348 +#ifdef FHS_COMPATIBLE
349 + char *szLockDirStub;
354 @@ -1083,8 +1083,13 @@
355 {"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE},
356 {"preload", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED},
357 {"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED},
358 +#ifdef FHS_COMPATIBLE
359 + {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, NULL, 0},
360 + {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, NULL, 0},
362 {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_ADVANCED},
363 {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_HIDE},
365 {"pid directory", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, FLAG_ADVANCED},
367 {"utmp directory", P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, FLAG_ADVANCED},
368 diff -uNr samba-3.0.0beta2.orig/source/passdb/pdb_tdb.c samba-3.0.0beta2/source/passdb/pdb_tdb.c
369 --- samba-3.0.0beta2.orig/source/passdb/pdb_tdb.c 2003-07-02 23:26:47.000000000 -0500
370 +++ samba-3.0.0beta2/source/passdb/pdb_tdb.c 2003-07-02 23:19:02.000000000 -0500
373 tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, location);
376 - get_private_directory(tdbfile);
377 - pstrcat(tdbfile, "/");
378 - pstrcat(tdbfile, PASSDB_FILE_NAME);
379 + char *tdbfile = state_path(PASSDB_FILE_NAME);
380 tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, tdbfile);
383 diff -uNr samba-3.0.0beta2.orig/source/passdb/secrets.c samba-3.0.0beta2/source/passdb/secrets.c
384 --- samba-3.0.0beta2.orig/source/passdb/secrets.c 2003-07-02 23:26:47.000000000 -0500
385 +++ samba-3.0.0beta2/source/passdb/secrets.c 2003-07-02 23:19:02.000000000 -0500
390 - pstrcpy(fname, lp_private_dir());
391 - pstrcat(fname,"/secrets.tdb");
392 + pstrcpy(fname, state_path("secrets.tdb"));
394 tdb = tdb_open_log(fname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
396 diff -uNr samba-3.0.0beta2.orig/source/printing/nt_printing.c samba-3.0.0beta2/source/printing/nt_printing.c
397 --- samba-3.0.0beta2.orig/source/printing/nt_printing.c 2003-07-02 23:26:47.000000000 -0500
398 +++ samba-3.0.0beta2/source/printing/nt_printing.c 2003-07-02 23:19:02.000000000 -0500
399 @@ -293,28 +293,28 @@
402 tdb_close(tdb_drivers);
403 - tdb_drivers = tdb_open_log(lock_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
404 + tdb_drivers = tdb_open_log(state_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
406 DEBUG(0,("nt_printing_init: Failed to open nt drivers database %s (%s)\n",
407 - lock_path("ntdrivers.tdb"), strerror(errno) ));
408 + state_path("ntdrivers.tdb"), strerror(errno) ));
413 tdb_close(tdb_printers);
414 - tdb_printers = tdb_open_log(lock_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
415 + tdb_printers = tdb_open_log(state_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
417 DEBUG(0,("nt_printing_init: Failed to open nt printers database %s (%s)\n",
418 - lock_path("ntprinters.tdb"), strerror(errno) ));
419 + state_path("ntprinters.tdb"), strerror(errno) ));
424 tdb_close(tdb_forms);
425 - tdb_forms = tdb_open_log(lock_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
426 + tdb_forms = tdb_open_log(state_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
428 DEBUG(0,("nt_printing_init: Failed to open nt forms database %s (%s)\n",
429 - lock_path("ntforms.tdb"), strerror(errno) ));
430 + state_path("ntforms.tdb"), strerror(errno) ));
434 diff -uNr samba-3.0.0beta2.orig/source/printing/printing.c samba-3.0.0beta2/source/printing/printing.c
435 --- samba-3.0.0beta2.orig/source/printing/printing.c 2003-07-02 23:26:47.000000000 -0500
436 +++ samba-3.0.0beta2/source/printing/printing.c 2003-07-02 23:19:02.000000000 -0500
438 if (local_pid == sys_getpid())
441 - unlink(lock_path("printing.tdb"));
442 - pstrcpy(printing_path,lock_path("printing"));
443 + unlink(cache_path("printing.tdb"));
444 + pstrcpy(printing_path,cache_path("printing"));
445 mkdir(printing_path,0755);
447 local_pid = sys_getpid();
448 diff -uNr samba-3.0.0beta2.orig/source/printing/printing_db.c samba-3.0.0beta2/source/printing/printing_db.c
449 --- samba-3.0.0beta2.orig/source/printing/printing_db.c 2003-07-02 23:26:47.000000000 -0500
450 +++ samba-3.0.0beta2/source/printing/printing_db.c 2003-07-02 23:19:02.000000000 -0500
452 DLIST_ADD(print_db_head, p);
455 - pstrcpy(printdb_path, lock_path("printing/"));
456 + pstrcpy(printdb_path, cache_path("printing/"));
457 pstrcat(printdb_path, printername);
458 pstrcat(printdb_path, ".tdb");
460 diff -uNr samba-3.0.0beta2.orig/source/registry/reg_db.c samba-3.0.0beta2/source/registry/reg_db.c
461 --- samba-3.0.0beta2.orig/source/registry/reg_db.c 2003-07-02 23:26:47.000000000 -0500
462 +++ samba-3.0.0beta2/source/registry/reg_db.c 2003-07-02 23:19:02.000000000 -0500
463 @@ -131,13 +131,13 @@
464 * if we need to init the data in the registry
467 - tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
468 + tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
471 - tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
472 + tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
474 DEBUG(0,("init_registry: Failed to open registry %s (%s)\n",
475 - lock_path("registry.tdb"), strerror(errno) ));
476 + state_path("registry.tdb"), strerror(errno) ));
480 diff -uNr samba-3.0.0beta2.orig/source/rpc_server/srv_srvsvc_nt.c samba-3.0.0beta2/source/rpc_server/srv_srvsvc_nt.c
481 --- samba-3.0.0beta2.orig/source/rpc_server/srv_srvsvc_nt.c 2003-07-02 23:26:47.000000000 -0500
482 +++ samba-3.0.0beta2/source/rpc_server/srv_srvsvc_nt.c 2003-07-02 23:19:02.000000000 -0500
483 @@ -133,10 +133,10 @@
485 if (share_tdb && local_pid == sys_getpid())
487 - share_tdb = tdb_open_log(lock_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
488 + share_tdb = tdb_open_log(state_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
490 DEBUG(0,("Failed to open share info database %s (%s)\n",
491 - lock_path("share_info.tdb"), strerror(errno) ));
492 + state_path("share_info.tdb"), strerror(errno) ));
496 diff -uNr samba-3.0.0beta2.orig/source/sam/idmap_tdb.c samba-3.0.0beta2/source/sam/idmap_tdb.c
497 --- samba-3.0.0beta2.orig/source/sam/idmap_tdb.c 2003-07-01 15:44:26.000000000 -0500
498 +++ samba-3.0.0beta2/source/sam/idmap_tdb.c 2003-07-02 23:19:02.000000000 -0500
500 BOOL tdb_is_new = False;
502 /* use the old database if present */
503 - tdbfile = SMB_STRDUP(lock_path("winbindd_idmap.tdb"));
504 + tdbfile = SMB_STRDUP(state_path("winbindd_idmap.tdb"));
506 DEBUG(0, ("idmap_init: out of memory!\n"));
507 return NT_STATUS_NO_MEMORY;
508 diff -uNr samba-3.0.0beta2.orig/source/smbd/lanman.c samba-3.0.0beta2/source/smbd/lanman.c
509 --- samba-3.0.0beta2.orig/source/smbd/lanman.c 2003-07-02 23:26:47.000000000 -0500
510 +++ samba-3.0.0beta2/source/smbd/lanman.c 2003-07-02 23:19:02.000000000 -0500
512 BOOL local_list_only;
515 - lines = file_lines_load(lock_path(SERVER_LIST), NULL);
516 + lines = file_lines_load(cache_path(SERVER_LIST), NULL);
518 - DEBUG(4,("Can't open %s - %s\n",lock_path(SERVER_LIST),strerror(errno)));
519 + DEBUG(4,("Can't open %s - %s\n",cache_path(SERVER_LIST),strerror(errno)));
523 diff -uNr samba-3.0.0beta2.orig/source/wrepld/process.c samba-3.0.0beta2/source/wrepld/process.c
524 --- samba-3.0.0beta2.orig/source/wrepld/process.c 2003-07-02 23:26:47.000000000 -0500
525 +++ samba-3.0.0beta2/source/wrepld/process.c 2003-07-02 23:19:02.000000000 -0500
530 - tdb = tdb_open_log(lock_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600);
531 + tdb = tdb_open_log(state_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600);
533 DEBUG(2,("get_our_last_id: Can't open wins database file %s. Error was %s\n", WINS_LIST, strerror(errno) ));
539 - tdb = tdb_open_log(lock_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600);
540 + tdb = tdb_open_log(state_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600);
542 DEBUG(2,("send_entry_request: Can't open wins database file %s. Error was %s\n", WINS_LIST, strerror(errno) ));