src/mn-masterd/auth.c
static int
check_client_login(const char *user, const char *pwd)
{
    int x;
    for (x=0; x<srv.auth.num_clients; x++) {
        if (strcmp(srv.auth.clients[x]->name, user) == 0) {
            /* found the username, if the password does not 
             * match then we return -1 */
            if (strcmp(srv.auth.clients[x]->password, pwd) == 0)
                return 0;
            else
                return -1;
        }
    }

    /* username not found */
    return -1;
}
/**
 * verify the client login
 *
 * return 0 if valid
 **/
verify the client login
return 0 if valid
verify the client login return 0 if valid
static int
check_client_login(const char *user, const char *pwd)
{
    int x;
    for (x=0; x<srv.auth.num_clients; x++) {
        if (strcmp(srv.auth.clients[x]->name, user) == 0) {
            if (strcmp(srv.auth.clients[x]->password, pwd) == 0)
                return 0;
            else
                return -1;
        }
    }
    return -1;
}
static int check_client_login ( const char * user , const char * pwd ) { int x ; for ( x = 0 ; x < srv . auth . num_clients ; x ++ ) { if ( strcmp ( srv . auth . clients [ x ] -> name , user ) == 0 ) { if ( strcmp ( srv . auth . clients [ x ] -> password , pwd ) == 0 ) return 0 ; else return -1 ; } } return -1 ; }
verify the client login
 return 0 if valid
verify the client login return 0 if valid
/* found the username, if the password does not 
             * match then we return -1 */ /* username not found */