The Samba-Bugzilla – Attachment 17754 Details for
Bug 15282
smbstatus leaking files in msg.sock and msg.lock
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix for v4-16-test, cherry-picked from master
0001-s3-smbstatus-go-to-cmdline_messaging_context_free.patch (text/plain), 1.77 KB, created by
Jones Syue
on 2023-02-09 03:31:38 UTC
(
hide
)
Description:
fix for v4-16-test, cherry-picked from master
Filename:
MIME Type:
Creator:
Jones Syue
Created:
2023-02-09 03:31:38 UTC
Size:
1.77 KB
patch
obsolete
>From 5b57067cda9e7815b15887d1a505be74045ee4f0 Mon Sep 17 00:00:00 2001 >From: Jones Syue <jonessyue@qnap.com> >Date: Wed, 11 Jan 2023 16:59:42 +0800 >Subject: [PATCH] s3:smbstatus: go to cmdline_messaging_context_free > >If the locking.tdb is not found, >(for example, fresh new installed samba server is not running yet) >smbstatus utility would exit earlier, >and lock files are left behind in the directory 'msg.sock' and 'msg.lock'. >Consider that a script to run smbstatus utility in a loop, >this might result in used space slowly growing-up on the underlying filesystem. >Since the samba server is not running yet, >there is no cleanupd daemon could delete these files to reclaim space. > >Supposed to use 'ret = 0; goto done;' instead of exit(0), >this would go through the cmdline_messaging_context_free() which deletes >the lock files in the directory msg.sock and msg.lock before smbstatus >utility is exiting. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15282 > >Signed-off-by: Jones Syue <jonessyue@qnap.com> >Reviewed-by: Ralph Boehme <slow@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> > >Autobuild-User(master): Volker Lendecke <vl@samba.org> >Autobuild-Date(master): Wed Jan 11 17:08:10 UTC 2023 on sn-devel-184 > >(cherry picked from commit de5d31f452b2445bd92b1746efb05aa096716af8) >--- > source3/utils/status.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/source3/utils/status.c b/source3/utils/status.c >index f982edf..41862d1 100644 >--- a/source3/utils/status.c >+++ b/source3/utils/status.c >@@ -859,7 +859,8 @@ int main(int argc, const char *argv[]) > d_printf("This is normal if an SMB client has never " > "connected to your server.\n"); > TALLOC_FREE(db_path); >- exit(0); >+ ret = 0; >+ goto done; > } else { > TALLOC_FREE(db); > TALLOC_FREE(db_path); >-- >2.1.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 15282
:
17724
| 17754