Merge branch 'tmp-ev-script-fix' into 'master'

remove_proc: remove script watcher from libev list

Closes #208

See merge request openconnect/ocserv!105
This commit is contained in:
Nikos Mavrogiannopoulos
2019-07-01 19:55:16 +00:00
3 changed files with 11 additions and 0 deletions

2
NEWS
View File

@@ -1,5 +1,7 @@
* Version 0.12.4 (unreleased)
- Added support for radius access-challenge (multifactor) authentication.
- Fixed race condition when connect-script and disconnect-script are
set, which could potentially cause a crash (#208).
* Version 0.12.3 (released 2019-03-12)

View File

@@ -430,9 +430,17 @@ int main(int argc, char **argv)
switch(c) {
case 'c':
if (fpasswd) {
fprintf(stderr, "-c option cannot be specified multiple time\n");
exit(1);
}
fpasswd = strdup(optarg);
break;
case 'g':
if (groupname) {
fprintf(stderr, "-g option cannot be specified multiple time\n");
exit(1);
}
groupname = strdup(optarg);
break;
case 'd':

View File

@@ -57,6 +57,7 @@ inline static pid_t remove_from_script_list(main_server_st* s, struct proc_st* p
list_for_each_safe(&s->script_list.head, stmp, spos, list) {
if (stmp->proc == proc) {
list_del(&stmp->list);
ev_child_stop(loop, &stmp->ev_child);
if (stmp->pid > 0) {
kill(stmp->pid, SIGTERM);
ret = stmp->pid;