TELNETs_AuthUser()

Callback function authenticating a user on a telnet session.

Files

telnet-s.h / Application’s source file

Prototype

          CPU_BOOLEAN  TELNETs_AuthUser (CPU_CHAR  *user_name, 
                                         CPU_CHAR  *pw);

Arguments

user_name

User login name.

pw

User password.

Returned Values

DEF_OK, user authenticated;

DEF_FAIL, otherwise.

Required Configuration

None.

Notes / Warnings

This is a callback function that must be implemented in your application.

Example Template

          #define  TELNET_USER     "user"
          #define  TELNET_PW       "password"
           
          CPU_BOOLEAN  TELNETs_AuthUser (CPU_CHAR  *user_name,
                                         CPU_CHAR  *pw)
          {
              if ((Str_Cmp(TELNET_USER, user_name) == 0) && (Str_Cmp(TELNET_PW, pw) == 0)) {
                  return (DEF_OK);
              } else {
                  return (DEF_FAIL);
              }
          }