summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-09-05 19:20:16 +0200
committerVolker Lendecke <vl@samba.org>2009-09-07 01:28:32 +0200
commit99f8dcab0c693424c65dce820a2eaed343c5f67e (patch)
tree0713a555d74fe223198d297b26fd53430137eccd /source3/locking
parent03e84a22a85754958de931bda9806eef4c02ae61 (diff)
downloadsamba-99f8dcab0c693424c65dce820a2eaed343c5f67e.tar.gz
samba-99f8dcab0c693424c65dce820a2eaed343c5f67e.tar.bz2
samba-99f8dcab0c693424c65dce820a2eaed343c5f67e.zip
s3:smbd: Add the ntstatus to the smb_panic in share_mode_lock_destructor
This might help finding why bug 6518 happens
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index fba871c704..5b17e3b6e8 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -782,9 +782,18 @@ static int share_mode_lock_destructor(struct share_mode_lock *lck)
status = lck->record->delete_rec(lck->record);
if (!NT_STATUS_IS_OK(status)) {
+ char *errmsg;
+
DEBUG(0, ("delete_rec returned %s\n",
nt_errstr(status)));
- smb_panic("could not delete share entry");
+
+ if (asprintf(&errmsg, "could not delete share "
+ "entry: %s\n",
+ nt_errstr(status)) == -1) {
+ smb_panic("could not delete share"
+ "entry");
+ }
+ smb_panic(errmsg);
}
}
goto done;
@@ -792,8 +801,15 @@ static int share_mode_lock_destructor(struct share_mode_lock *lck)
status = lck->record->store(lck->record, data, TDB_REPLACE);
if (!NT_STATUS_IS_OK(status)) {
+ char *errmsg;
+
DEBUG(0, ("store returned %s\n", nt_errstr(status)));
- smb_panic("could not store share mode entry");
+
+ if (asprintf(&errmsg, "could not store share mode entry: %s",
+ nt_errstr(status)) == -1) {
+ smb_panic("could not store share mode entry");
+ }
+ smb_panic(errmsg);
}
done: