X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fshm.c;h=55d00e67fdd1cf443ac82c4160be3a003d6f0b18;hb=88f2b785b937a5c2af4e21e925b6242ea6c8362b;hp=64c712e85234a65ce50c37397d0d2cb0ef256f0e;hpb=10a8a2237343699e3923d87e24dbf2d7fe225377;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/shm.c b/src/bin/lttng-sessiond/shm.c index 64c712e85..55d00e67f 100644 --- a/src/bin/lttng-sessiond/shm.c +++ b/src/bin/lttng-sessiond/shm.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include "shm.h" @@ -104,11 +104,15 @@ static int get_wait_shm(char *shm_path, size_t mmap_size, int global) exit(EXIT_FAILURE); } +#ifndef __FreeBSD__ ret = fchmod(wait_shm_fd, mode); if (ret < 0) { perror("fchmod"); exit(EXIT_FAILURE); } +#else +#warning "FreeBSD does not support setting file mode on shm FD. Remember that for secure use, lttng-sessiond should be started before applications linked on lttng-ust." +#endif DBG("Got the wait shm fd %d", wait_shm_fd);