* Cache the password by default.
*/
{ "cache", PW_TYPE_BOOLEAN,
- offsetof(struct unix_instance,cache_passwd), NULL, "yes" },
+ offsetof(struct unix_instance,cache_passwd), NULL, "no" },
{ "passwd", PW_TYPE_STRING_PTR,
offsetof(struct unix_instance,passwd_file), NULL, NULL },
{ "shadow", PW_TYPE_STRING_PTR,
{ "group", PW_TYPE_STRING_PTR,
offsetof(struct unix_instance,group_file), NULL, NULL },
{ "radwtmp", PW_TYPE_STRING_PTR,
- offsetof(struct unix_instance,radwtmp), NULL, "${logdir}/radwtmp" },
+ offsetof(struct unix_instance,radwtmp), NULL, "NULL" },
{ "usegroup", PW_TYPE_BOOLEAN,
offsetof(struct unix_instance,usegroup), NULL, "no" },
{ "cache_reload", PW_TYPE_INTEGER,
free((char *) inst->passwd_file);
free((char *) inst->shadow_file);
free((char *) inst->group_file);
- free((char *) inst->radwtmp);
+ if (inst->radwtmp) free((char *) inst->radwtmp);
free(inst);
return -1;
}
free((char *) inst->passwd_file);
free((char *) inst->shadow_file);
free((char *) inst->group_file);
- free((char *) inst->radwtmp);
+ if (inst->radwtmp) free((char *) inst->radwtmp);
if (inst->cache) {
unix_freepwcache(inst->cache);
}
struct unix_instance *inst = (struct unix_instance *) instance;
/*
+ * No radwtmp. Don't do anything.
+ */
+ if (!inst->radwtmp) {
+ DEBUG2("rlm_unix: No radwtmp file configured. Ignoring accounting request.");
+ return RLM_MODULE_NOOP;
+ }
+
+ /*
* Which type is this.
*/
if ((vp = pairfind(request->packet->vps, PW_ACCT_STATUS_TYPE))==NULL) {