summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/common/responder.h3
-rw-r--r--src/responder/common/responder_common.c12
-rw-r--r--src/responder/nss/nsssrv.c2
-rw-r--r--src/responder/pam/pamsrv.c2
4 files changed, 17 insertions, 2 deletions
diff --git a/src/responder/common/responder.h b/src/responder/common/responder.h
index 6b81aadac..321cedda8 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 4ddb549c1..37761ae9a 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 95a1549f4..9ae6f05e1 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 91ee4a899..86283eaec 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 }
};