Hello,
On 11/9/11 3:10 AM, Juha Heinanen wrote:
auth_db/README tells this about www_authorize() negative result codes:
Negative codes may be interpreted as follows: * -1 (generic error) - some generic error occurred and no reply was sent out; * -2 (invalid password) - valid user, but wrong password; * -3 (invalid user) - authentication user does not exist.
whereas in auth_radius i return:
Negative result codes may be interpreted as follows: * -7 (internal error) - some internal error occurred (see syslog); * -6 (nonce reused) - nonce is used more than once; * -5 (no credentials) - credentials were not found in request; * -4 (stale nonce) - stale nonce; * -3 (authorization failed) - RADIUS responded with Access Reject which may be, for example, due to user not found or wrong password; * -1 (error) - some error occured during authorization (see syslog);
since both modules depend on the same auth module, why does www_authorize return the full set of negative result codes or is its README out of date?
quick look into the code and the README seems outdated. But there is no -7 return code in auth and auth_db -- return codes are taken from modules/auth/api.h, structure auth_cfg_result_t. Maybe -7 is specific for radius auth function.
Cheers, Daniel