Discussion of krb5_get_init_creds_password() behavior wasRe:problem with the kinit_prompter in kfw 2.5

John Hascall john at iastate.edu
Thu Feb 19 16:46:01 EST 2004


> >krb5_get_init_creds() is a private function.
> >Perhaps we can modify the "master" parameter to be
> >
> >   int * master
> >
> >and use it as an in/out parameter.

> I'm happy with that, FWIW.

That seems good.
If you were feeling especially generous you could do:

    krb5_get_init_creds(
       ...
       int * master
       ...
    ) {

       int use_master;

       if (master == 0) {			/* doesn't care */
           use_master = 0;
           master = &use_master;
       } else if (master == (int *)1) {		/* deprecated! */
           use_master = 1;
           master = &use_master;
       } else {
           use_master = *master;
       }
       ...
       *master = answer_is_from_master;
       return ...;
   }

And not crush the souls of anyone who happened to
be using this function (which, IIRC, is not declared static).    :)

John


More information about the krbdev mailing list