bool need_domain;
bool need_consumerd;
+ if (!lttcomm_sessiond_command_is_valid((enum lttcomm_sessiond_command) cmd_ctx->lsm.cmd_type)) {
+ ERR("Unknown client command received: command id = %" PRIu32,
+ cmd_ctx->lsm.cmd_type);
+ ret = LTTNG_ERR_UND;
+ goto error;
+ }
+
DBG("Processing client command '%s\' (%d)",
lttcomm_sessiond_command_str(cmd_ctx->lsm.cmd_type),
cmd_ctx->lsm.cmd_type);
* ret will be set to LTTNG_OK at the end of
* this function.
*/
- } else if (pending_ret < 0) {
+ } else if (pending_ret <= LTTNG_OK || pending_ret >= LTTNG_ERR_NR) {
ret = LTTNG_ERR_UNK;
- goto setup_error;
+ goto error;
} else {
ret = pending_ret;
- goto setup_error;
+ goto error;
}
pending_ret_byte = (uint8_t) pending_ret;
static int create_client_sock(void)
{
int ret, client_sock;
- const mode_t old_umask = umask(0);
/* Create client tool unix socket */
client_sock = lttcomm_create_unix_sock(
DBG("Created client socket (fd = %i)", client_sock);
ret = client_sock;
end:
- umask(old_umask);
return ret;
}