X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Futils.c;h=f1e0148cb9cb9cd28159846141a99fc108b95a58;hp=0eb7ab4fe410e561909e0fb0372fb8b5b5bfa96e;hb=22a1b9316f04f95a904ea724ad51aabcc389aca0;hpb=e6576ba27734c57aa6bb69201e740475c049265b diff --git a/src/common/utils.c b/src/common/utils.c index 0eb7ab4fe..f1e0148cb 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -785,7 +785,11 @@ int utils_create_stream_file(const char *path_name, char *file_name, uint64_t si goto error; } - flags = O_WRONLY | O_CREAT | O_TRUNC; + /* + * With the session rotation feature on the relay, we might need to seek + * and truncate a tracefile, so we need read and write access. + */ + flags = O_RDWR | O_CREAT | O_TRUNC; /* Open with 660 mode */ mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP; @@ -1202,26 +1206,6 @@ end: return home_dir; } -/* - * Obtain the value of LTTNG_KMOD_PROBES environment variable, if exists. - * Otherwise returns NULL. - */ -LTTNG_HIDDEN -char *utils_get_kmod_probes_list(void) -{ - return lttng_secure_getenv(DEFAULT_LTTNG_KMOD_PROBES); -} - -/* - * Obtain the value of LTTNG_EXTRA_KMOD_PROBES environment variable, if - * exists. Otherwise returns NULL. - */ -LTTNG_HIDDEN -char *utils_get_extra_kmod_probes_list(void) -{ - return lttng_secure_getenv(DEFAULT_LTTNG_EXTRA_KMOD_PROBES); -} - /* * With the given format, fill dst with the time of len maximum siz. *