OPT_CONDITION,
OPT_ACTION,
OPT_ID,
- OPT_USER_ID,
+ OPT_OWNER_UID,
OPT_RATE_POLICY,
OPT_NAME,
{ OPT_CONDITION, '\0', "condition", true },
{ OPT_ACTION, '\0', "action", true },
{ OPT_NAME, '\0', "name", true },
- { OPT_USER_ID, '\0', "user-id", true },
+ { OPT_OWNER_UID, '\0', "owner-uid", true },
ARGPAR_OPT_DESCR_SENTINEL,
};
char *error = NULL;
char *name = NULL;
int i;
- char *user_id = NULL;
+ char *owner_uid = NULL;
lttng_dynamic_pointer_array_init(&actions, lttng_actions_destructor);
break;
}
- case OPT_USER_ID:
+ case OPT_OWNER_UID:
{
- if (!assign_string(&user_id, item_opt->arg,
- "--user-id")) {
+ if (!assign_string(&owner_uid, item_opt->arg,
+ "--owner-uid")) {
goto error;
}
}
}
- if (user_id) {
+ if (owner_uid) {
enum lttng_trigger_status trigger_status;
char *end;
long long uid;
errno = 0;
- uid = strtol(user_id, &end, 10);
- if (end == user_id || *end != '\0' || errno != 0) {
- ERR("Failed to parse `%s` as a user id.", user_id);
+ uid = strtol(owner_uid, &end, 10);
+ if (end == owner_uid || *end != '\0' || errno != 0) {
+ ERR("Failed to parse `%s` as a user id.", owner_uid);
}
trigger_status = lttng_trigger_set_owner_uid(trigger, uid);
lttng_trigger_destroy(trigger);
free(error);
free(name);
- free(user_id);
+ free(owner_uid);
return ret;
}
enum {
OPT_HELP,
OPT_LIST_OPTIONS,
- OPT_USER_ID,
+ OPT_OWNER_UID,
};
static const
struct argpar_opt_descr remove_trigger_options[] = {
{ OPT_HELP, 'h', "help", false },
{ OPT_LIST_OPTIONS, '\0', "list-options", false },
- { OPT_USER_ID, '\0', "user-id", true },
+ { OPT_OWNER_UID, '\0', "owner-uid", true },
ARGPAR_OPT_DESCR_SENTINEL,
};
unsigned int triggers_count;
enum lttng_trigger_status trigger_status;
const struct lttng_trigger *trigger_to_remove = NULL;
- char *user_id = NULL;
+ char *owner_uid = NULL;
long long uid;
argpar_parse_ret = argpar_parse(argc - 1, argv + 1,
remove_trigger_options);
ret = 0;
goto end;
- case OPT_USER_ID:
+ case OPT_OWNER_UID:
{
- if (!assign_string(&user_id, item_opt->arg,
- "--user-id")) {
+ if (!assign_string(&owner_uid, item_opt->arg,
+ "--owner-uid")) {
goto error;
}
break;
goto error;
}
- if (user_id) {
+ if (owner_uid) {
char *end;
errno = 0;
- uid = strtol(user_id, &end, 10);
- if (end == user_id || *end != '\0' || errno != 0) {
- ERR("Failed to parse `%s` as an integer.", user_id);
+ uid = strtol(owner_uid, &end, 10);
+ if (end == owner_uid || *end != '\0' || errno != 0) {
+ ERR("Failed to parse `%s` as an integer.", owner_uid);
}
} else {
uid = geteuid();
end:
argpar_parse_ret_fini(&argpar_parse_ret);
lttng_triggers_destroy(triggers);
- free(user_id);
+ free(owner_uid);
return ret;
}
cat > "${tmp_expected_stdout}" <<- EOF
- name: hello
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: test-name (type: tracepoint, domain: ust)
actions:
cat > "${tmp_expected_stdout}" <<- EOF
- name: A
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: aaa (type: tracepoint, domain: ust, filter: p == 2)
actions:
errors: none
errors: none
- name: B
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: gerboise (type: tracepoint, domain: ust, log level at least INFO)
actions:
errors: none
errors: none
- name: C
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: * (type: tracepoint, domain: ust)
actions:
errors: none
errors: none
- name: D
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: hello* (type: tracepoint, domain: ust, exclusions: hello2,hello3,hello4)
actions:
errors: none
errors: none
- name: E
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: lemming (type: tracepoint, domain: ust, log level is WARNING)
actions:
errors: none
errors: none
- name: F
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: capture-payload-field (type: tracepoint, domain: ust)
captures:
errors: none
errors: none
- name: G
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: capture-array (type: tracepoint, domain: ust)
captures:
errors: none
errors: none
- name: H
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: capture-chan-ctx (type: tracepoint, domain: ust)
captures:
errors: none
errors: none
- name: I
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: capture-app-ctx (type: tracepoint, domain: ust)
captures:
errors: none
errors: none
- name: J
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: lemming (type: tracepoint, domain: ust)
actions:
cat > "${tmp_expected_stdout}" <<- EOF
- name: T0
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: my_channel_enable (type: probe, location: lttng_channel_enable)
actions:
errors: none
errors: none
- name: T1
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: my_channel_enable (type: probe, location: ${base_symbol}+${offset_hex})
actions:
errors: none
errors: none
- name: T2
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: my_channel_enable (type: probe, location: 0x${channel_enable_addr})
actions:
cat > "${tmp_expected_stdout}" <<- EOF
- name: T0
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: ma-probe-elf (type: userspace probe, location type: ELF, location: ${uprobe_elf_binary}:${elf_function_name})
actions:
cat > "${tmp_expected_stdout}" <<- EOF
- name: T0
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: open (type: syscall)
actions:
errors: none
errors: none
- name: T1
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: ptrace (type: syscall, filter: a > 2)
actions:
cat > "${tmp_expected_stdout}" <<- EOF
- name: T0
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions:
errors: none
errors: none
- name: T1
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions:
errors: none
errors: none
- name: T2
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions:
errors: none
errors: none
- name: T3
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions:
errors: none
errors: none
- name: T4
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions:
errors: none
errors: none
- name: T5
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions:
errors: none
errors: none
- name: T6
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions:
errors: none
errors: none
- name: T7
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions:
errors: none
errors: none
- name: T8
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions:
errors: none
errors: none
- name: T9
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions:
cat > "${tmp_expected_stdout}" <<- EOF
- name: T0
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions:
errors: none
errors: none
- name: T1
- user id: ${uid}
+ owner uid: ${uid}
condition: event rule hit
rule: some-event (type: tracepoint, domain: ust)
actions: