The Samba-Bugzilla – Attachment 13120 Details for
Bug 12723
ctdb_event monitor command crashes if event is not specified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for v4-6
BZ12723-v4-6.patch (text/plain), 1.85 KB, created by
Amitay Isaacs
on 2017-03-29 09:11:00 UTC
(
hide
)
Description:
Patches for v4-6
Filename:
MIME Type:
Creator:
Amitay Isaacs
Created:
2017-03-29 09:11:00 UTC
Size:
1.85 KB
patch
obsolete
>From 3ff2378dcf9e9a0bb031b7032bf68d986da74943 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Tue, 7 Mar 2017 14:13:10 +1100 >Subject: [PATCH] ctdb-tools: Avoid deferencing argv[0] if argc == 0 > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12723 > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Martin Schwenke <martin@meltin.net> > >Autobuild-User(master): Martin Schwenke <martins@samba.org> >Autobuild-Date(master): Wed Mar 29 11:07:18 CEST 2017 on sn-devel-144 > >(cherry picked from commit 6e9879f6e2f8974730517fad22875db06f0738de) >--- > ctdb/tools/ctdb_event.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > >diff --git a/ctdb/tools/ctdb_event.c b/ctdb/tools/ctdb_event.c >index 62b4b91..8e2dca7 100644 >--- a/ctdb/tools/ctdb_event.c >+++ b/ctdb/tools/ctdb_event.c >@@ -223,23 +223,26 @@ static int command_status(TALLOC_CTX *mem_ctx, struct tool_context *tctx, > talloc_free(req); > if (! status) { > fprintf(stderr, "Failed to get event %s status, ret=%d\n", >- argv[0], ret); >+ ctdb_event_to_string(event), ret); > return ret; > } > > if (result != 0) { > fprintf(stderr, "Failed to get event %s status, result=%d\n", >- argv[0], result); >+ ctdb_event_to_string(event), result); > return result; > } > > if (script_list == NULL) { > if (state == CTDB_EVENT_LAST_RUN) { >- printf("Event %s has never run\n", argv[0]); >+ printf("Event %s has never run\n", >+ ctdb_event_to_string(event)); > } else if (state == CTDB_EVENT_LAST_PASS) { >- printf("Event %s has never passed\n", argv[0]); >+ printf("Event %s has never passed\n", >+ ctdb_event_to_string(event)); > } else if (state == CTDB_EVENT_LAST_FAIL) { >- printf("Event %s has never failed\n", argv[0]); >+ printf("Event %s has never failed\n", >+ ctdb_event_to_string(event)); > } > } else { > for (i=0; i<script_list->num_scripts; i++) { >-- >2.9.3 >
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
Flags:
martins
:
review+
Actions:
View
Attachments on
bug 12723
: 13120