*/
#define _LGPL_SOURCE
-#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <common/lttng-kernel.h>
#include <common/common.h>
#include <common/utils.h>
+#include <common/compat/errno.h>
#include <common/compat/getenv.h>
#include <common/compat/string.h>
#include <common/unix.h>
LTTNG_HIDDEN
int run_as_generate_filter_bytecode(const char *filter_expression,
- uid_t uid,
- gid_t gid,
+ const struct lttng_credentials *creds,
struct lttng_filter_bytecode **bytecode)
{
int ret;
struct run_as_ret run_as_ret = {};
const struct lttng_filter_bytecode *view_bytecode = NULL;
struct lttng_filter_bytecode *local_bytecode = NULL;
+ const uid_t uid = lttng_credentials_get_uid(creds);
+ const gid_t gid = lttng_credentials_get_gid(creds);
DBG3("generate_filter_bytecode() from expression=\"%s\" for uid %d and gid %d",
filter_expression, (int) uid, (int) gid);