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

Re: dlopen failure



Dimitri Priimak wrote:
> 
> Oh my god. This is shame, but I forgot to return result from pam_convf(...)
> I added following two lines at the end of pam_convf(...)
>   *resp = reply;
>   return PAM_SUCCESS;
> and it works now. BTW, as soon as I added that running this prog gave me
> sigfault in version without strdup(). Anyway I don't think that message I
> was getting before is very informative, it should be some other message I
> guess.

You "returned" random value from your conv. function (btw, this is
compiler
warnings was designed for; gcc will give you "warning: control reaches
non-void function").  Typically, modules uses something like:

  retcode = conv->conv(...) /* call to app's conv func */
  if (retcode != PAM_SUCCESS)
    return retcode;
  ..

So -- what was returned from your conv is what you got! :)
This is a bit surprising (but not strange) that this random
value was constant in practice (1 = PAM_OPEN_ERR).

> Thanks a lot for your help.
> Dmitri Priimak.
>





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