diff options
author | Gary Lockyer <gary@catalyst.net.nz> | 2018-12-11 11:04:25 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-12-19 04:52:59 +0100 |
commit | 8167486b99920f48db48ebc1574b5c8032647555 (patch) | |
tree | 9167285a4914416c30ce5e23d23eee1577ad9b4d /source3/utils/smbcontrol.c | |
parent | 8741af7af68b2d74123dc3f82dad3ca746f4caf5 (diff) | |
download | samba-8167486b99920f48db48ebc1574b5c8032647555.tar.gz |
s4 messaging: support smbcontrol inject fault command
Add support of the smbcontrol inject fault command to the samba daemon.
This is useful for manual testing of process restart etc.
command is only enabled for developer and self test builds
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/utils/smbcontrol.c')
-rw-r--r-- | source3/utils/smbcontrol.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 866217c248b..8ba31c9f841 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -380,11 +380,11 @@ static bool do_inject_fault(struct tevent_context *ev_ctx, return False; } -#ifndef DEVELOPER +#if !defined(DEVELOPER) && !defined(ENABLE_SELFTEST) fprintf(stderr, "Fault injection is only available in " - "developer builds\n"); + "developer and self test builds\n"); return False; -#else /* DEVELOPER */ +#else /* DEVELOPER || ENABLE_SELFTEST */ { int sig = 0; @@ -407,7 +407,7 @@ static bool do_inject_fault(struct tevent_context *ev_ctx, return send_message(msg_ctx, pid, MSG_SMB_INJECT_FAULT, &sig, sizeof(int)); } -#endif /* DEVELOPER */ +#endif /* DEVELOPER || ENABLE_SELFTEST */ } /* Force a browser election */ |