[Info-vax] LGI Routines (or how I'm trying to save my users from themselves)

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Tue Mar 5 14:07:57 EST 2019


On 2019-03-05, Tim Lovern <1tim.lovern at gmail.com> 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.
>

One thing immediately comes to mind from looking at those printf()
statements. Are you by any chance adding a null to the username and
password and if you are, are you including that null in the descriptor
length ?

> any suggestions would be very appreciated.
>

If that isn't it, you might get more help if you can post a complete
compilable standalone example. Constructing the standalone example
might also help you isolate the problem.

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



More information about the Info-vax mailing list