.IP "LTTNG_CONSUMERD64_LIBDIR"
Allow to specifiy the 32-bit library path containing libconsumer.so.
\fB--consumerd64-libdir\fP override this variable.
+.IP "LTTNG_DEBUG_NOCLONE"
+Debug-mode disabling use of clone/fork. Insecure, but required to allow
+debuggers to work with sessiond on some operating systems.
.SH "SEE ALSO"
.PP
}
static
-int run_as(int (*cmd)(void *data), void *data, uid_t uid, gid_t gid)
+int run_as_clone(int (*cmd)(void *data), void *data, uid_t uid, gid_t gid)
{
struct run_as_data run_as_data;
int ret = 0;
return retval.i;
}
+/*
+ * To be used on setups where gdb has issues debugging programs using
+ * clone/rfork. Note that this is for debuging ONLY, and should not be
+ * considered secure.
+ */
+static
+int run_as_noclone(int (*cmd)(void *data), void *data, uid_t uid, gid_t gid)
+{
+ return cmd(data);
+}
+
+static
+int run_as(int (*cmd)(void *data), void *data, uid_t uid, gid_t gid)
+{
+ if (!getenv("LTTNG_DEBUG_NOCLONE")) {
+ DBG("Using run_as_clone");
+ return run_as_clone(cmd, data, uid, gid);
+ } else {
+ DBG("Using run_as_noclone");
+ return run_as_noclone(cmd, data, uid, gid);
+ }
+}
+
int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid)
{
struct run_as_mkdir_data data;