amishmm / php-pam

This extension provides PAM (Pluggable Authentication Modules) integration for PHP
Other
10 stars 5 forks source link

Wrong flag in pam_chauthtok ? #13

Closed bcecchinato closed 11 months ago

bcecchinato commented 11 months ago

Hello !

The pam_chauthtok allows only 2 flags which are PAM_SILENT and PAM_CHANGE_EXPIRED_AUTHTOK (cf https://linux.die.net/man/3/pam_chauthtok), but in the source here https://github.com/amishmm/php-pam/blob/bd8de3392283dbbf6598ecaa48c103dc9623c2e2/pam.c#L263C49-L263C49, the flag passed is PAM_DISALLOW_NULL_AUTHTOK.

Is this normal ? Would that explain that i'm seeing an error with conversation failed in /var/log/auth.log ?

Thanks in advance.

amishmm commented 11 months ago

Fixed in https://github.com/amishmm/php-pam/commit/0d9441dec10e1393ddf6f436f8d7fa3f6136b3a6