summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-15 11:11:45 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-15 11:12:49 +0100
commitb100c570a070689f02b189cb02a9942cf9680a3f (patch)
tree66cc174df0041773ab7def922acd1cd4b81a22bd /src
parent5e8e1c6467e7d31a5042dc603d0da07f8f6e738e (diff)
rest: do not exit() if execlp() failsv1.2.5-6
execlp() should not ever fail, but if it ever happens, return -1 instead of exitting this daemon.
Diffstat (limited to 'src')
-rw-r--r--src/rest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rest.c b/src/rest.c
index a6dafbc..fba807f 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -1247,7 +1247,7 @@ static int og_set_client_mode(struct og_dbi *dbi, const char *mac,
"/opt/opengnsys/bin/setclientmode", filename, NULL);
syslog(LOG_ERR, "failed script execution (%s:%d)\n",
__func__, __LINE__);
- exit(EXIT_FAILURE);
+ return -1;
} else {
wait(&status);
}