From b100c570a070689f02b189cb02a9942cf9680a3f Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Fri, 15 Dec 2023 11:11:45 +0100 Subject: rest: do not exit() if execlp() fails execlp() should not ever fail, but if it ever happens, return -1 instead of exitting this daemon. --- src/rest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v1.2.3-18-g5258