Browse Source

* disable set jail 'state' param at runtime (closes #11)

master
Alex 'AdUser' Z 4 years ago
parent
commit
42185ab77d
  1. 9
      src/jail.c

9
src/jail.c

@ -71,6 +71,7 @@ f2b_jail_set_param(f2b_jail_t *jail, const char *param, const char *value) {
assert(param != NULL);
assert(value != NULL);
/* only 'safe to set at runtime' parameters here */
if (strcmp(param, "enabled") == 0) {
if (strcmp(value, "yes") == 0) {
jail->flags |= JAIL_ENABLED;
@ -79,14 +80,6 @@ f2b_jail_set_param(f2b_jail_t *jail, const char *param, const char *value) {
}
return true;
}
if (strcmp(param, "state") == 0) {
if (strcmp(value, "yes") == 0) {
jail->flags |= JAIL_HAS_STATE;
} else {
jail->flags &= ~JAIL_HAS_STATE;
}
return true;
}
if (strcmp(param, "bantime") == 0) {
jail->bantime = atoi(value);
if (jail->bantime <= 0)

Loading…
Cancel
Save