Commit a9da84af authored by Linus Nordberg's avatar Linus Nordberg

A DynamicLookupCommand exiting with 10 is treated like an empty server stanza.

This way a script can signal "not found".

The naptr-eduroam.sh and radsec-dynsrv.sh scripts are changed to
behave like this.

Closes RADSECPROXY-22.
parent aae44f48
......@@ -2273,8 +2273,14 @@ int dynamicconfig(struct server *server) {
}
if (status) {
debug(DBG_INFO, "dynamicconfig: command exited with status %d", WEXITSTATUS(status));
goto errexit;
if (WEXITSTATUS(status) == 10) {
debug(DBG_INFO, "dynamicconfig: command signals empty config");
}
else {
debug(DBG_INFO, "dynamicconfig: command exited with status %d",
WEXITSTATUS(status));
goto errexit;
}
}
if (ok)
......
......@@ -70,4 +70,4 @@ if [ -n "${SERVERS}" ]; then
exit 0
fi
exit 0
exit 10 # No server found.
......@@ -48,4 +48,4 @@ if test -n "${SERVERS}" ; then
exit 0
fi
exit 0
exit 10 # No server found.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment