[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gnu-radius] How to create missing attribute ?
From: |
Sergey Poznyakoff |
Subject: |
Re: [Help-gnu-radius] How to create missing attribute ? |
Date: |
Mon, 29 Sep 2003 00:57:23 +0300 |
Vlad - <address@hidden> wrote:
> 1. Is it possible to verify attribute existence and if it missing create it
> with some rules?
>
> 2. How to check existance attribute in rewriting function?
> What value will be returned by expression
>
> if (%[Attribute])
To check for existence of an attribute, use the following construct:
if (*%[Attribute]) ...
In your case, the rewrite function will look like:
integer
foo()
{
if (!*%[User-Name])
%[User-Name] = "...";
return 0;
}
Invoke the function from your raddb/hints file.
Regards,
Sergey