X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fshm.c;fp=src%2Fbin%2Flttng-sessiond%2Fshm.c;h=432d07ecea5eb4462d36a6a4727737532e97791f;hp=ce1844fe887e654c26847e0842759485fced349f;hb=e71aad1fa4b06a5f91ddceace42366f3d79bd77e;hpb=4c462e790c62ed5f6c5d61b3a182762fe02f7e9a diff --git a/src/bin/lttng-sessiond/shm.c b/src/bin/lttng-sessiond/shm.c index ce1844fe8..432d07ece 100644 --- a/src/bin/lttng-sessiond/shm.c +++ b/src/bin/lttng-sessiond/shm.c @@ -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);