Skip to content

Commit

Permalink
A DynamicLookupCommand exiting with 10 is treated like an empty serve…
Browse files Browse the repository at this point in the history
…r 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.
  • Loading branch information
Linus Nordberg committed Oct 8, 2011
1 parent aae44f4 commit a9da84a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions radsecproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tools/naptr-eduroam.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ if [ -n "${SERVERS}" ]; then
exit 0
fi

exit 0
exit 10 # No server found.
2 changes: 1 addition & 1 deletion tools/radsec-dynsrv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ if test -n "${SERVERS}" ; then
exit 0
fi

exit 0
exit 10 # No server found.

0 comments on commit a9da84a

Please sign in to comment.