.IP ignorenislike
If set to 'yes', then all records from the file beginning with the '+'
sign will be ignored. The default is 'no'.
-.IP authtype
-If an entry matches, the Auth-Type for the request will be set to the
-one specified here.
.IP format
The format of the fields in the file, given as an example line from
the file, with the content of the fields as the RADIUS attributes
#
# Field marked as ',' may contain a comma separated list
# of attributes.
- # authtype - if record found this Auth-Type is used to authenticate
- # user
# hashsize - hashtable size. If 0 or not specified records are not
# stored in memory and file is red on every request.
# allowmultiplekeys - if few records for every key are allowed
#passwd etc_smbpasswd {
# filename = /etc/smbpasswd
# format = "*User-Name::LM-Password:NT-Password:SMB-Account-CTRL-TEXT::"
- # authtype = MS-CHAP
# hashsize = 100
# ignorenislike = no
# allowmultiplekeys = no
struct mypasswd *pwdfmt;
char *filename;
char *format;
- char *authtype;
char * delimiter;
int allowmultiple;
int ignorenislike;
offsetof(struct passwd_instance, filename), NULL, NULL },
{ "format", PW_TYPE_STRING_PTR,
offsetof(struct passwd_instance, format), NULL, NULL },
- { "authtype", PW_TYPE_STRING_PTR,
- offsetof(struct passwd_instance, authtype), NULL, NULL },
{ "delimiter", PW_TYPE_STRING_PTR,
offsetof(struct passwd_instance, delimiter), NULL, ":" },
{ "ignorenislike", PW_TYPE_BOOLEAN,
if(inst->ht) release_ht(inst->ht);
if (inst->filename != NULL) free(inst->filename);
if (inst->format != NULL) free(inst->format);
- if (inst->authtype != NULL ) free(inst->authtype);
if (inst->delimiter != NULL) free(inst->delimiter);
free(instance);
return 0;
if(!found) {
return RLM_MODULE_NOTFOUND;
}
- if (inst->authtype &&
- (key = pairmake ("Auth-Type", inst->authtype, T_OP_EQ))) {
- DEBUG("rlm_passwd: Adding \"Auth-Type = %s\"",
- inst->authtype);
- /*
- * Don't call pairadd. pairmove doesn't
- * over-write existing attributes.
- */
- pairmove(&request->config_items, &key);
- pairfree(&key); /* pairmove may have NOT moved it */
- }
return RLM_MODULE_OK;
#undef inst