.data_size = payload_len,
};
- lttng_dynamic_buffer_set_size(&cmd_ctx->reply_payload.buffer, 0);
+ ret = lttng_dynamic_buffer_set_size(&cmd_ctx->reply_payload.buffer, 0);
+ if (ret) {
+ goto end;
+ }
+
lttng_dynamic_pointer_array_clear(&cmd_ctx->reply_payload._fd_handles);
cmd_ctx->lttng_msg_size = total_msg_size;
int ret;
const struct lttcomm_lttng_msg llm = {};
- lttng_dynamic_buffer_set_size(&cmd_ctx->reply_payload.buffer, 0);
+ ret = lttng_dynamic_buffer_set_size(&cmd_ctx->reply_payload.buffer, 0);
+ if (ret) {
+ goto end;
+ }
/* Append place-holder reply header. */
ret = lttng_dynamic_buffer_append(
struct ltt_session *session;
const struct ltt_session_list *session_list = session_get_list();
- DBG("Counting number of available session for UID %d GID %d",
- uid, gid);
+ DBG("Counting number of available session for UID %d", uid);
cds_list_for_each_entry(session, &session_list->head, list) {
if (!session_get(session)) {
continue;
}
session_lock(session);
/* Only count the sessions the user can control. */
- if (session_access_ok(session, uid, gid) &&
+ if (session_access_ok(session, uid) &&
!session->destroyed) {
i++;
}
}
/*
- * Check that the UID or GID match that of the tracing session.
+ * Check that the UID matches that of the tracing session.
* The root user can interact with all sessions.
*/
if (need_tracing_session) {
if (!session_access_ok(cmd_ctx->session,
- LTTNG_SOCK_GET_UID_CRED(&cmd_ctx->creds),
- LTTNG_SOCK_GET_GID_CRED(&cmd_ctx->creds)) ||
+ LTTNG_SOCK_GET_UID_CRED(&cmd_ctx->creds)) ||
cmd_ctx->session->destroyed) {
ret = LTTNG_ERR_EPERM;
goto error;