* Add the config options for DRL.
*/
-static config_entry_t partition = {
+static config_entry_t enforce_on = {
.next = NULL,
+ .key = "enforce_on",
+ .type = CONFIG_TYPE_INT,
+ .options = CONFIG_OPT_NONE,
+ .u = { .value = 1 },
+};
+
+static config_entry_t partition = {
+ .next = &enforce_on,
.key = "partition_set",
.type = CONFIG_TYPE_INT,
.options = CONFIG_OPT_NONE,
fprintf(stderr, "An error has occured starting ulogd_DRL. Refer to your logfile (%s) for additional information.\n", drl_logfile.u.string);
exit(EXIT_FAILURE);
}
+
+ if (enforce_on.u.value) {
+ pthread_rwlock_wrlock(&limiter.limiter_lock);
+ do_enforcement = 1;
+ printlog(LOG_CRITICAL, "--Switching enforcement on.--\n");
+ pthread_rwlock_unlock(&limiter.limiter_lock);
+ }
}
void _init(void)