fix dumb bud

This commit is contained in:
Afonso Franco 2024-05-12 15:52:10 +01:00
parent b29258a2e9
commit 5612d1adca
Signed by: afonso
SSH key fingerprint: SHA256:PQTRDHPH3yALEGtHXnXBp3Orfcn21pK20t0tS1kHg54

View file

@ -1,3 +1,4 @@
#include "../../libs/protocol/protocol.h"
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@ -5,7 +6,6 @@
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "../../libs/protocol/protocol.h"
int main() {
// Change the root of the process so it doesn't have access to anything else.
@ -14,6 +14,7 @@ int main() {
if (chroot("/opt/djumbai/") != 0) {
perror("chroot /opt/djumbai");
return 1;
}
const char *message_queue_path = "fifos/message_queue";
if (access(message_queue_path, F_OK) != -1) {