#include <common/hashtable/utils.h>
#include <common/kernel-ctl/kernel-ctl.h>
#include <common/credentials.h>
-#include <sys/eventfd.h>
#include <sys/stat.h>
#include <time.h>
#include <signal.h>
enum lttng_notification_channel_status nc_status;
struct lttng_action *action;
const struct lttng_credentials session_creds = {
- .uid = session->uid,
- .gid = session->gid,
+ .uid = LTTNG_OPTIONAL_INIT_VALUE(session->uid),
+ .gid = LTTNG_OPTIONAL_INIT_VALUE(session->gid),
};
session->rotate_condition = lttng_condition_session_consumed_size_create();
goto end;
}
+ /* Ensure this trigger is not visible to external users. */
+ lttng_trigger_set_hidden(session->rotate_trigger);
lttng_trigger_set_credentials(
session->rotate_trigger, &session_creds);
}
ret = notification_thread_command_register_trigger(
- notification_thread_handle, session->rotate_trigger);
+ notification_thread_handle, session->rotate_trigger,
+ true);
if (ret < 0 && ret != -LTTNG_ERR_TRIGGER_EXISTS) {
ERR("Register trigger, %s", lttng_strerror(ret));
ret = -1;