⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fhs.patch

📁 samba服务器!
💻 PATCH
📖 第 1 页 / 共 2 页
字号:
+		netsamlogon_tdb = tdb_open_log(cache_path(NETSAMLOGON_TDB), 0, 						   TDB_DEFAULT, O_RDWR | O_CREAT, 0600); 	} @@ -67,7 +67,7 @@            winbindd_cache.tdb open.  Open the tdb if a NULL is passed. */  	if (!tdb) {-		tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000,+		tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 5000, 				   TDB_DEFAULT, O_RDWR, 0600); 		if (!tdb) { 			DEBUG(5, ("netsamlogon_clear_cached_user: failed to open cache\n"));--- samba_3_0/source/nmbd/nmbd_serverlistdb.c.orig	2003-09-08 10:53:13.000000000 -0400+++ samba_3_0/source/nmbd/nmbd_serverlistdb.c	2003-09-08 11:22:03.000000000 -0400@@ -327,7 +327,7 @@  	updatecount++;     -	pstrcpy(fname,lp_lockdir());+	pstrcpy(fname,dyn_CACHEDIR()); 	trim_char(fname,'\0' ,'/'); 	pstrcat(fname,"/"); 	pstrcat(fname,SERVER_LIST);--- samba-3.0.0rc2/source/nmbd/nmbd_winsserver.c.orig	2003-08-28 17:42:44.000000000 -0400+++ samba-3.0.0rc2/source/nmbd/nmbd_winsserver.c	2003-08-31 08:09:11.000000000 -0400@@ -228,7 +228,7 @@  	add_samba_names_to_subnet(wins_server_subnet); -	if((fp = x_fopen(lock_path(WINS_LIST),O_RDONLY,0)) == NULL) {+	if((fp = x_fopen(state_path(WINS_LIST),O_RDONLY,0)) == NULL) { 		DEBUG(2,("initialise_wins: Can't open wins database file %s. Error was %s\n", 			WINS_LIST, strerror(errno) )); 		return True;@@ -1759,7 +1759,7 @@ 		} 	} -	slprintf(fname,sizeof(fname)-1,"%s/%s", lp_lockdir(), WINS_LIST);+	slprintf(fname,sizeof(fname)-1,"%s/%s", dyn_STATEDIR(), WINS_LIST); 	all_string_sub(fname,"//", "/", 0); 	slprintf(fnamenew,sizeof(fnamenew)-1,"%s.%u", fname, (unsigned int)sys_getpid()); diff -uNr samba-3.0.0beta2.orig/source/nsswitch/winbindd_cache.c samba-3.0.0beta2/source/nsswitch/winbindd_cache.c--- samba-3.0.0beta2.orig/source/nsswitch/winbindd_cache.c	2003-07-02 23:26:47.000000000 -0500+++ samba-3.0.0beta2/source/nsswitch/winbindd_cache.c	2003-07-02 23:19:02.000000000 -0500@@ -56,7 +56,7 @@ 	if (opt_nocache) 		return; -	wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000, +	wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 5000,  				   TDB_CLEAR_IF_FIRST, O_RDWR|O_CREAT, 0600);  	if (!wcache->tdb) {diff -uNr samba-3.0.0beta2.orig/source/nsswitch/winbindd_util.c samba-3.0.0beta2/source/nsswitch/winbindd_util.c--- samba-3.0.0beta2.orig/source/nsswitch/winbindd_util.c	2003-07-01 15:44:25.000000000 -0500+++ samba-3.0.0beta2/source/nsswitch/winbindd_util.c	2003-07-02 23:19:02.000000000 -0500@@ -813,7 +813,7 @@ 	SMB_STRUCT_STAT stbuf; 	TDB_CONTEXT *idmap_tdb; -	pstrcpy(idmap_name, lock_path("winbindd_idmap.tdb"));+	pstrcpy(idmap_name, state_path("winbindd_idmap.tdb"));  	if (!file_exist(idmap_name, &stbuf)) { 		/* nothing to convert return */diff -uNr samba-3.0.0beta2.orig/source/param/loadparm.c samba-3.0.0beta2/source/param/loadparm.c--- samba-3.0.0beta2.orig/source/param/loadparm.c	2003-07-02 23:26:47.000000000 -0500+++ samba-3.0.0beta2/source/param/loadparm.c	2003-07-02 23:19:02.000000000 -0500@@ -104,6 +104,9 @@ 	char *szAddPrinterCommand; 	char *szDeletePrinterCommand; 	char *szOs2DriverMap;+#ifdef FHS_COMPATIBLE+	char *szLockDirStub;+#endif 	char *szLockDir; 	char *szPidDir; 	char *szRootdir;@@ -1083,8 +1083,13 @@ 	{"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE},  	{"preload", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED},  	{"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED}, +#ifdef FHS_COMPATIBLE+	{"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, NULL, 0}, +	{"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, NULL, 0},+#else 	{"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_ADVANCED},  	{"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_HIDE}, +#endif 	{"pid directory", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, FLAG_ADVANCED},  #ifdef WITH_UTMP 	{"utmp directory", P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, FLAG_ADVANCED}, diff -uNr samba-3.0.0beta2.orig/source/passdb/pdb_tdb.c samba-3.0.0beta2/source/passdb/pdb_tdb.c--- samba-3.0.0beta2.orig/source/passdb/pdb_tdb.c	2003-07-02 23:26:47.000000000 -0500+++ samba-3.0.0beta2/source/passdb/pdb_tdb.c	2003-07-02 23:19:02.000000000 -0500@@ -501,10 +501,7 @@ 	if (location) { 		tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, location); 	} else {-		pstring tdbfile;-		get_private_directory(tdbfile);-		pstrcat(tdbfile, "/");-		pstrcat(tdbfile, PASSDB_FILE_NAME);+		char *tdbfile = state_path(PASSDB_FILE_NAME); 		tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, tdbfile); 	} diff -uNr samba-3.0.0beta2.orig/source/passdb/secrets.c samba-3.0.0beta2/source/passdb/secrets.c--- samba-3.0.0beta2.orig/source/passdb/secrets.c	2003-07-02 23:26:47.000000000 -0500+++ samba-3.0.0beta2/source/passdb/secrets.c	2003-07-02 23:19:02.000000000 -0500@@ -37,8 +37,7 @@ 	if (tdb) 		return True; -	pstrcpy(fname, lp_private_dir());-	pstrcat(fname,"/secrets.tdb");+	pstrcpy(fname, state_path("secrets.tdb"));  	tdb = tdb_open_log(fname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); diff -uNr samba-3.0.0beta2.orig/source/printing/nt_printing.c samba-3.0.0beta2/source/printing/nt_printing.c--- samba-3.0.0beta2.orig/source/printing/nt_printing.c	2003-07-02 23:26:47.000000000 -0500+++ samba-3.0.0beta2/source/printing/nt_printing.c	2003-07-02 23:19:02.000000000 -0500@@ -293,28 +293,28 @@   	if (tdb_drivers) 		tdb_close(tdb_drivers);-	tdb_drivers = tdb_open_log(lock_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);+	tdb_drivers = tdb_open_log(state_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); 	if (!tdb_drivers) { 		DEBUG(0,("nt_printing_init: Failed to open nt drivers database %s (%s)\n",-			lock_path("ntdrivers.tdb"), strerror(errno) ));+			state_path("ntdrivers.tdb"), strerror(errno) )); 		return False; 	}   	if (tdb_printers) 		tdb_close(tdb_printers);-	tdb_printers = tdb_open_log(lock_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);+	tdb_printers = tdb_open_log(state_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); 	if (!tdb_printers) { 		DEBUG(0,("nt_printing_init: Failed to open nt printers database %s (%s)\n",-			lock_path("ntprinters.tdb"), strerror(errno) ));+			state_path("ntprinters.tdb"), strerror(errno) )); 		return False; 	}   	if (tdb_forms) 		tdb_close(tdb_forms);-	tdb_forms = tdb_open_log(lock_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);+	tdb_forms = tdb_open_log(state_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); 	if (!tdb_forms) { 		DEBUG(0,("nt_printing_init: Failed to open nt forms database %s (%s)\n",-			lock_path("ntforms.tdb"), strerror(errno) ));+			state_path("ntforms.tdb"), strerror(errno) )); 		return False; 	}  diff -uNr samba-3.0.0beta2.orig/source/printing/printing.c samba-3.0.0beta2/source/printing/printing.c--- samba-3.0.0beta2.orig/source/printing/printing.c	2003-07-02 23:26:47.000000000 -0500+++ samba-3.0.0beta2/source/printing/printing.c	2003-07-02 23:19:02.000000000 -0500@@ -174,8 +174,8 @@ 	if (local_pid == sys_getpid()) 		return True; -	unlink(lock_path("printing.tdb"));-	pstrcpy(printing_path,lock_path("printing"));+	unlink(cache_path("printing.tdb"));+	pstrcpy(printing_path,cache_path("printing")); 	mkdir(printing_path,0755);  	local_pid = sys_getpid();diff -uNr samba-3.0.0beta2.orig/source/printing/printing_db.c samba-3.0.0beta2/source/printing/printing_db.c--- samba-3.0.0beta2.orig/source/printing/printing_db.c	2003-07-02 23:26:47.000000000 -0500+++ samba-3.0.0beta2/source/printing/printing_db.c	2003-07-02 23:19:02.000000000 -0500@@ -86,7 +86,7 @@ 		DLIST_ADD(print_db_head, p); 	} -	pstrcpy(printdb_path, lock_path("printing/"));+	pstrcpy(printdb_path, cache_path("printing/")); 	pstrcat(printdb_path, printername); 	pstrcat(printdb_path, ".tdb"); diff -uNr samba-3.0.20b.orig/source/registry/reg_db.c samba-3.0.20b/source/registry/reg_db.c--- samba-3.0.20b.orig/source/registry/reg_db.c	2003-07-02 23:26:47.000000000 -0500+++ samba-3.0.20b/source/registry/reg_db.c	2003-07-02 23:19:02.000000000 -0500@@ -198,13 +198,13 @@	if ( tdb_reg )		return True;-	if ( !(tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600)) )+	if ( !(tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600)) )	{-		tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);+		tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);		if ( !tdb_reg ) {			DEBUG(0,("init_registry: Failed to open registry %s (%s)\n",-				lock_path("registry.tdb"), strerror(errno) ));+				state_path("registry.tdb"), strerror(errno) ));			return False;		}				DEBUG(10,("init_registry: Successfully created registry tdb\n"));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--- samba-3.0.0beta2.orig/source/rpc_server/srv_srvsvc_nt.c	2003-07-02 23:26:47.000000000 -0500+++ samba-3.0.0beta2/source/rpc_server/srv_srvsvc_nt.c	2003-07-02 23:19:02.000000000 -0500@@ -133,10 +133,10 @@   	if (share_tdb && local_pid == sys_getpid()) 		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 -uNr samba-3.0.0beta2.orig/source/sam/idmap_tdb.c samba-3.0.0beta2/source/sam/idmap_tdb.c--- samba-3.0.0beta2.orig/source/sam/idmap_tdb.c	2003-07-01 15:44:26.000000000 -0500+++ samba-3.0.0beta2/source/sam/idmap_tdb.c	2003-07-02 23:19:02.000000000 -0500@@ -487,7 +487,7 @@ 	BOOL tdb_is_new = False;  	/* use the old database if present */-	tdbfile = SMB_STRDUP(lock_path("winbindd_idmap.tdb"));+	tdbfile = SMB_STRDUP(state_path("winbindd_idmap.tdb")); 	if (!tdbfile) { 		DEBUG(0, ("idmap_init: out of memory!\n")); 		return NT_STATUS_NO_MEMORY;diff -uNr samba-3.0.0beta2.orig/source/smbd/lanman.c samba-3.0.0beta2/source/smbd/lanman.c--- samba-3.0.0beta2.orig/source/smbd/lanman.c	2003-07-02 23:26:47.000000000 -0500+++ samba-3.0.0beta2/source/smbd/lanman.c	2003-07-02 23:19:02.000000000 -0500@@ -966,9 +966,9 @@   BOOL local_list_only;   int i; -  lines = file_lines_load(lock_path(SERVER_LIST), NULL);+  lines = file_lines_load(cache_path(SERVER_LIST), NULL);   if (!lines) {-    DEBUG(4,("Can't open %s - %s\n",lock_path(SERVER_LIST),strerror(errno)));+    DEBUG(4,("Can't open %s - %s\n",cache_path(SERVER_LIST),strerror(errno)));     return(0);   } diff -uNr samba-3.0.0beta2.orig/source/wrepld/process.c samba-3.0.0beta2/source/wrepld/process.c--- samba-3.0.0beta2.orig/source/wrepld/process.c	2003-07-02 23:26:47.000000000 -0500+++ samba-3.0.0beta2/source/wrepld/process.c	2003-07-02 23:19:02.000000000 -0500@@ -197,7 +197,7 @@ { 	TDB_CONTEXT *tdb; -	tdb = tdb_open_log(lock_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600);+	tdb = tdb_open_log(state_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600); 	if (!tdb) { 		DEBUG(2,("get_our_last_id: Can't open wins database file %s. Error was %s\n", WINS_LIST, strerror(errno) )); 		return;@@ -489,7 +489,7 @@ 		}  -	tdb = tdb_open_log(lock_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600);+	tdb = tdb_open_log(state_path(WINS_LIST), 0, TDB_DEFAULT, O_RDONLY, 0600); 	if (!tdb) { 		DEBUG(2,("send_entry_request: Can't open wins database file %s. Error was %s\n", WINS_LIST, strerror(errno) )); 		return;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -