- snprintf(command_sock_path, PATH_MAX, "%s", optarg);
+ if (lttng_is_setuid_setgid()) {
+ WARN("Getting '%s' argument from setuid/setgid binary refused for security reasons.",
+ "-c, --consumerd-cmd-sock");
+ } else {
+ snprintf(command_sock_path, PATH_MAX, "%s", optarg);
+ }