[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rhost hack needed



I need help writing a hack!  I have an agreement with an ISP that allows
me to use there terminal server for ppp traffic and rhost login to my
machine.  My users have to put .pokey after the login name to access my
system.  the problem I have is my system doesn't have the .pokey after
the users login name in the passwd file, and I don't want them to!.   is
there a way to strip it off?  I tried the following in 
pam_rhosts_auth.c


static int pam_get_ruser(pam_handle_t *pamh, const char **ruser
                         , const char *prompt)
{
    int retval;
    const char   *current;
    char *ps;

    retval = pam_get_item (pamh, PAM_RUSER, (const void **)&current);
    if (retval != PAM_SUCCESS)
        return retval;

    if (current == NULL) {
        return PAM_AUTH_ERR;
    }

/*  ******************* */
    ps=strstr(current,".pokey");
    if(ps) *ps='\0';
/*  ******************* */
    *ruser = current;

    return retval;        /* pass on any error from conversation */
}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []