diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-06-20 20:57:25 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-06-20 20:57:25 +0200 |
commit | 16323dcc9df15020e368d4324cf1c1d9dceac805 (patch) | |
tree | c70e36289153d37f4c642b33d5003e5709d788d0 /src/lib/sockets.c | |
parent | c4d614e041c693d95d1b62d3e33911b53fabf2c2 (diff) | |
download | ouroboros-16323dcc9df15020e368d4324cf1c1d9dceac805.tar.gz ouroboros-16323dcc9df15020e368d4324cf1c1d9dceac805.zip |
build: Change install directories and set correct permissions
This sets the correct install directories for all the binaries,
library and header files. It also sets the right permissions on the
sockets and shared memory so that regular users can also use the
ouroboros library. Root privileges are required to run the irmd.
Fixes #7
Diffstat (limited to 'src/lib/sockets.c')
-rw-r--r-- | src/lib/sockets.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/sockets.c b/src/lib/sockets.c index 6c51e916..403d2833 100644 --- a/src/lib/sockets.c +++ b/src/lib/sockets.c @@ -22,6 +22,7 @@ #define OUROBOROS_PREFIX "libouroboros-sockets" +#include <ouroboros/config.h> #include <ouroboros/logs.h> #include <ouroboros/common.h> #include <ouroboros/sockets.h> @@ -153,7 +154,7 @@ char * ipcp_sock_path(pid_t pid) char * full_name = NULL; char * pid_string = NULL; size_t len = 0; - char * delim = "-"; + char * delim = "_"; len = n_digits(pid); pid_string = malloc(len + 1); @@ -164,6 +165,8 @@ char * ipcp_sock_path(pid_t pid) len += strlen(IPCP_SOCK_PATH_PREFIX); len += strlen(delim); + len += strlen(SOCK_PATH_SUFFIX); + full_name = malloc(len + 1); if (full_name == NULL) { free(pid_string); @@ -173,6 +176,7 @@ char * ipcp_sock_path(pid_t pid) strcpy(full_name, IPCP_SOCK_PATH_PREFIX); strcat(full_name, delim); strcat(full_name, pid_string); + strcat(full_name, SOCK_PATH_SUFFIX); free(pid_string); |