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

dlopen() failing in pam_start (HELP!)



    Sorry if this comes through twice, I had a mailer problem... 
 
    I'm writing a program, randpass, that creates a random password for
 an account, and then sets the password using PAM. I have no
 compilation problems, but at runtime I either get a segfault
 (dynamically linked libs) or an error 28 "Module is unknown" (static
 libs) from somewhere inside pam_chauthtok.
 
    I've discovered that the dlopen() call in _pam_add_handler is
 failing with this error "/usr/lib/security/pam_pwdb.so: undefined
 symbol: pam_get_item".  
 
 /usr/lib/security/pam_pwdb.so exists.  The /etc/pam.d/randpass file is
 a symbolic link to /etc/pam.d/passwd, and passwd works fine.  I've
 recompiled and reinstalled libpam (0.66), with no change. Relevant
 portions of the code are below.  Any ideas?  Let me know if you need
 more info.
 
 -mike
 
 
   /* init PAM */
   ret = pam_start(PROGNAME, user, &pconv, &pamh);
   if (ret != PAM_SUCCESS) {
     fprintf(stderr, "%s: pam_start() failed: %s\n", PROGNAME, 
 	    pam_strerror(pamh, ret));
     exit (3);
   }
 
   /* set the password */
   ret = pam_chauthtok(pamh, PAM_SILENT);  /* returns 28 here */
   if ( ret != PAM_SUCCESS ) {
     fprintf(stderr, "%s: pam_chauthtok() failed: %s\n", PROGNAME,
 	    pam_strerror(pamh, ret));
     exit (3);
   }
 
 



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