diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2015-04-08 14:31:06 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-04-14 11:35:44 +0200 |
commit | cdff114a01f5580e03d45c8ead1dce71181d117c (patch) | |
tree | a95cb740c568b03de7fd608273bde8bbab200328 /src/providers/dp_dyndns.c | |
parent | 843a66170a4e51e0a614498e74f3526afc4bff52 (diff) | |
download | sssd-cdff114a01f5580e03d45c8ead1dce71181d117c.tar.gz sssd-cdff114a01f5580e03d45c8ead1dce71181d117c.tar.xz sssd-cdff114a01f5580e03d45c8ead1dce71181d117c.zip |
dyndns: Log nsupdate stderr with a high debug level
https://fedorahosted.org/sssd/ticket/2224
Reviewed-by: Pavel Reichl <preichl@redhat.com>
Diffstat (limited to 'src/providers/dp_dyndns.c')
-rw-r--r-- | src/providers/dp_dyndns.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/providers/dp_dyndns.c b/src/providers/dp_dyndns.c index 7db21509d..eb69731b5 100644 --- a/src/providers/dp_dyndns.c +++ b/src/providers/dp_dyndns.c @@ -925,6 +925,7 @@ struct tevent_req *be_nsupdate_send(TALLOC_CTX *mem_ctx, struct tevent_req *subreq = NULL; struct be_nsupdate_state *state; char **args; + int debug_fd; req = tevent_req_create(mem_ctx, &state, struct be_nsupdate_state); if (req == NULL) { @@ -952,6 +953,17 @@ struct tevent_req *be_nsupdate_send(TALLOC_CTX *mem_ctx, goto done; } + if (debug_level >= SSSDBG_TRACE_LIBS) { + debug_fd = get_fd_from_debug_file(); + ret = dup2(debug_fd, STDERR_FILENO); + if (ret == -1) { + ret = errno; + DEBUG(SSSDBG_MINOR_FAILURE, + "dup2 failed [%d][%s].\n", ret, strerror(ret)); + /* stderr is not fatal */ + } + } + args = be_nsupdate_args(state, auth_type, force_tcp); if (args == NULL) { ret = ENOMEM; |