summaryrefslogtreecommitdiff
path: root/src/lib/ipcp.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-06-20 20:57:25 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-06-20 20:57:25 +0200
commit16323dcc9df15020e368d4324cf1c1d9dceac805 (patch)
treec70e36289153d37f4c642b33d5003e5709d788d0 /src/lib/ipcp.c
parentc4d614e041c693d95d1b62d3e33911b53fabf2c2 (diff)
downloadouroboros-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/ipcp.c')
-rw-r--r--src/lib/ipcp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/ipcp.c b/src/lib/ipcp.c
index 89756235..fcaf9f83 100644
--- a/src/lib/ipcp.c
+++ b/src/lib/ipcp.c
@@ -105,7 +105,7 @@ pid_t ipcp_create(char * ipcp_name,
pid_t pid = 0;
char irmd_pid[10];
size_t len = 0;
- char * ipcp_dir = "bin";
+ char * ipcp_dir = "sbin/";
char * full_name = NULL;
char * exec_name = NULL;
@@ -135,7 +135,7 @@ pid_t ipcp_create(char * ipcp_name,
len += strlen(INSTALL_DIR);
len += strlen(ipcp_dir);
len += strlen(exec_name);
- len += 3;
+ len += 1;
full_name = malloc(len + 1);
if (full_name == NULL) {
@@ -144,9 +144,7 @@ pid_t ipcp_create(char * ipcp_name,
}
strcpy(full_name, INSTALL_DIR);
- strcat(full_name, "/");
strcat(full_name, ipcp_dir);
- strcat(full_name, "/");
strcat(full_name, exec_name);
full_name[len] = '\0';