Return error on bad service parameter alteration

When a service parameter is being altered and it is not in the list of
dynamic parameters, the alteration function returns an error.
This commit is contained in:
Markus Mäkelä 2017-07-18 20:39:47 +03:00
parent 2e274d0d8b
commit d515094646

View File

@ -1458,6 +1458,11 @@ bool runtime_alter_service_from_json(SERVICE* service, json_t* new_json)
rval = false;
}
}
else
{
runtime_error("Parameter '%s' cannot be modified", key);
rval = false;
}
}
}
}