diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-05-02 13:46:27 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-05-06 10:24:37 -0400 |
commit | d818283d39d56204ffe710b6c9b83a2cf497f946 (patch) | |
tree | 0177903f733ba54c56cfc4fbfefc6c81927d8878 /src/responder | |
parent | 28a410f423bf9bcdf43ed14cd4c50634753b51f3 (diff) | |
download | sssd-d818283d39d56204ffe710b6c9b83a2cf497f946.tar.gz sssd-d818283d39d56204ffe710b6c9b83a2cf497f946.tar.bz2 sssd-d818283d39d56204ffe710b6c9b83a2cf497f946.zip |
Allow changing the log level without restart
We will now re-read the confdb debug_level value when processing
the monitor_common_logrotate() function, which occurs when the
monitor receives a SIGHUP.
Diffstat (limited to 'src/responder')
-rw-r--r-- | src/responder/common/responder.h | 3 | ||||
-rw-r--r-- | src/responder/common/responder_common.c | 12 | ||||
-rw-r--r-- | src/responder/nss/nsssrv.c | 2 | ||||
-rw-r--r-- | src/responder/pam/pamsrv.c | 2 |
4 files changed, 17 insertions, 2 deletions
diff --git a/src/responder/common/responder.h b/src/responder/common/responder.h index 6b81aada..321cedda 100644 --- a/src/responder/common/responder.h +++ b/src/responder/common/responder.h @@ -171,4 +171,7 @@ int sss_dp_send_acct_req(struct resp_ctx *rctx, TALLOC_CTX *callback_memctx, bool fast_reply, int type, const char *opt_name, uint32_t opt_id); +int responder_logrotate(DBusMessage *message, + struct sbus_connection *conn); + #endif /* __SSS_RESPONDER_H__ */ diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c index 4ddb549c..37761ae9 100644 --- a/src/responder/common/responder_common.c +++ b/src/responder/common/responder_common.c @@ -652,3 +652,15 @@ int sss_dp_get_domain_conn(struct resp_ctx *rctx, const char *domain, return EOK; } +int responder_logrotate(DBusMessage *message, + struct sbus_connection *conn) +{ + errno_t ret; + struct resp_ctx *rctx = talloc_get_type(sbus_conn_get_private_data(conn), + struct resp_ctx); + + ret = monitor_common_rotate_logs(rctx->cdb, rctx->confdb_service_path); + if (ret != EOK) return ret; + + return monitor_common_pong(message, conn); +} diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c index 95a1549f..9ae6f05e 100644 --- a/src/responder/nss/nsssrv.c +++ b/src/responder/nss/nsssrv.c @@ -51,7 +51,7 @@ struct sbus_method monitor_nss_methods[] = { { MON_CLI_METHOD_PING, monitor_common_pong }, { MON_CLI_METHOD_RES_INIT, monitor_common_res_init }, - { MON_CLI_METHOD_ROTATE, monitor_common_rotate_logs }, + { MON_CLI_METHOD_ROTATE, responder_logrotate }, { NULL, NULL } }; diff --git a/src/responder/pam/pamsrv.c b/src/responder/pam/pamsrv.c index 91ee4a89..86283eae 100644 --- a/src/responder/pam/pamsrv.c +++ b/src/responder/pam/pamsrv.c @@ -50,7 +50,7 @@ struct sbus_method monitor_pam_methods[] = { { MON_CLI_METHOD_PING, monitor_common_pong }, { MON_CLI_METHOD_RES_INIT, monitor_common_res_init }, - { MON_CLI_METHOD_ROTATE, monitor_common_rotate_logs }, + { MON_CLI_METHOD_ROTATE, responder_logrotate }, { NULL, NULL } }; |