[devel] Q: pam(auth) и set_pam_item() - нет пути

Alexey I. Froloff raorn at altlinux.org
Tue Aug 4 21:02:43 MSD 2009


Есть модуль (pam_pkcs11), которому необязательно знать имя
пользователя.  Он маппит сертификат с токена в логин (например
через GECOS).  Вот код:

483     if ( is_spaced_str(user) ) {
484       /*
485         if provided user is null or empty extract and set user
486         name from certificate
487       */
488         DBG("Empty login: try to deduce from certificate");
489         user=find_user(x509);
490         if (!user) {
...
495         } else {
496           DBG1("certificate is valid and matches user %s",user);
497           /* try to set up PAM user entry with evaluated value */
498           rv = pam_set_item(pamh, PAM_USER,(const void *)user);
...
505           chosen_cert = cert_list[i];
506           break; /* end loop, as find user success */
507       }
508     } else {

Код выполняется, pam_set_item() успешно отрабатывает, этот модуль
возвращает PAM_SUCCESS, только ни login, ни gdm пользователя не
пускают.  pam_authenticate() отвечает login'у что "User not known
to underlying authentication module".  system-auth выглядит так:

auth    [success=1 default=ignore]    pam_pkcs11.so
auth    required    pam_tcb.so shadow fork prefix=$2a$ count=8 nullok
auth    required    pam_permit.so

Тем не менее хотелось бы невозбранно достигнуть желаемого?

-- 
Regards,
Sir Raorn.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.altlinux.org/pipermail/devel/attachments/20090804/ef56a6b7/attachment.bin>


More information about the Devel mailing list