summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b4d8603)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
{
int ret = LTTCOMM_OK;
int need_tracing_session = 1;
{
int ret = LTTCOMM_OK;
int need_tracing_session = 1;
DBG("Processing client command %d", cmd_ctx->lsm->cmd_type);
DBG("Processing client command %d", cmd_ctx->lsm->cmd_type);
- if (opt_no_kernel && cmd_ctx->lsm->domain.type == LTTNG_DOMAIN_KERNEL) {
+ switch (cmd_ctx->lsm->cmd_type) {
+ case LTTNG_CREATE_SESSION:
+ case LTTNG_DESTROY_SESSION:
+ case LTTNG_LIST_SESSIONS:
+ case LTTNG_LIST_DOMAINS:
+ case LTTNG_START_TRACE:
+ case LTTNG_STOP_TRACE:
+ need_domain = 0;
+ default:
+ need_domain = 1;
+ }
+
+ if (opt_no_kernel && need_domain
+ && cmd_ctx->lsm->domain.type == LTTNG_DOMAIN_KERNEL) {
ret = LTTCOMM_KERN_NA;
goto error;
}
ret = LTTCOMM_KERN_NA;
goto error;
}
/* Commands that DO NOT need a session. */
switch (cmd_ctx->lsm->cmd_type) {
/* Commands that DO NOT need a session. */
switch (cmd_ctx->lsm->cmd_type) {
case LTTNG_CREATE_SESSION:
case LTTNG_CREATE_SESSION:
case LTTNG_LIST_SESSIONS:
case LTTNG_LIST_TRACEPOINTS:
need_tracing_session = 0;
case LTTNG_LIST_SESSIONS:
case LTTNG_LIST_TRACEPOINTS:
need_tracing_session = 0;
+ if (!need_domain) {
+ goto skip_domain;
+ }
/*
* Check domain type for specific "pre-action".
*/
/*
* Check domain type for specific "pre-action".
*/
/*
* Check that the UID or GID match that of the tracing session.
/*
* Check that the UID or GID match that of the tracing session.