[Info-vax] LGI Routines (or how I'm trying to save my users from themselves)
Mark Berryman
mark at theberrymans.com
Tue Mar 5 16:23:24 EST 2019
On 3/5/19 10:59 AM, Tim Lovern wrote:
> Ok, I'm stumped. I've written code to implement the callout_authenticate routine.
> did all the requisite compiles, installs, sysgen stuff, etc.
>
> Login calls into my code - this is good.
>
> In my code, I do a call back to get the users password and validate it. This call always returns an invalid password. no matter what I do - this is bad.
>
> I mess with the password prompt to know my code is active. will remove this once it works.
>
> code:
> $DESCRIPTOR(prompt, "\r\nPass >>> ");
>
> pwdCount = *arg_vector->LGI$A_ICR_PWDCOUNT;
> if (pwdCount != 0)
> {
> one_ok = 0;
> two_ok = 0;
> need_check = 0;
>
> status = arg_vector->LGI$ICB_PASSWORD(0, &prompt);
>
> userName = arg_vector->LGI$A_ICR_USERNAME;
> password1 = arg_vector->LGI$A_ICR_PWD1;
>
> #ifdef DEBUG_LOGGING
>
> printf("\nuser name: %-16s", userName->dsc$a_pointer);
> printf("\npassword value: %-32s", password1->dsc$a_pointer);
> printf("\npassword length: %d", password1->dsc$w_length);
> printf("\nStatus value: %d", status);
> #endif
>
> if (status == SS$_NORMAL)
> one_ok = 1;
> else
> if (status == LGI$_NOSUCHUSER)
> return status;
>
> The return status is always LGI$_INVPWD (13861116) - The username and password are 100% correct. User is not set up for PWDMIX in authorize, but the entered case doesn't seem to matter.
>
> I know it's something stupid, but it is eluding me.
>
> any suggestions would be very appreciated.
Try issuing the arg_vector->LGI$ICB_PASSWORD call with an argument of
-3, plus a buffer, and verify that the password coming back is what you
expect it to be. If it is, then try calling LGI$ICB_VALIDATE with that
data and see what that returns.
Mark Berryman
More information about the Info-vax
mailing list