[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-86-g67328bd

Volker Lendecke vl at sernet.de
Sun Oct 21 17:25:03 GMT 2007


The branch, v3-2-test has been updated
       via  67328bd27b1e881a4bcdd5160133afa9a267eaac (commit)
      from  04d660bbb371f859cc50a9f3ea7d358f74acfa8b (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 67328bd27b1e881a4bcdd5160133afa9a267eaac
Author: Volker Lendecke <vl at sernet.de>
Date:   Sun Oct 21 17:05:34 2007 +0200

    Don't segfault if locking.tdb can't be opened
    
    Thanks to Steve Langasek <vorlon at debian.org>

-----------------------------------------------------------------------

Summary of changes:
 source/utils/status.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/utils/status.c b/source/utils/status.c
index 8bf1de0..9a4b3a4 100644
--- a/source/utils/status.c
+++ b/source/utils/status.c
@@ -426,6 +426,19 @@ static int traverse_sessionid(struct db_record *db, void *state)
 
 	if ( show_locks ) {
 		int result;
+		struct db_context *db;
+		db = db_open(NULL, lock_path("locking.tdb"), 0,
+			     TDB_DEFAULT, O_RDONLY, 0);
+
+		if (!db) {
+			d_printf("%s not initialised\n",
+				 lock_path("locking.tdb"));
+			d_printf("This is normal if an SMB client has never "
+				 "connected to your server.\n");
+			exit(0);
+		} else {
+			TALLOC_FREE(db);
+		}
 
 		if (!locking_init(1)) {
 			d_printf("Can't initialise locking module - exiting\n");


-- 
Samba Shared Repository


More information about the samba-cvs mailing list