diff options
author | Tomas Mraz <tm@t8m.info> | 2009-02-26 18:56:12 +0000 |
---|---|---|
committer | Tomas Mraz <tm@t8m.info> | 2009-02-26 18:56:12 +0000 |
commit | 5891c5508e3b9ba699a6a6ba3dae9221a45528e5 (patch) | |
tree | 11f0bfce0b989303da194baff95d4655733b9dcc /xtests/tst-pam_unix4.sh | |
parent | ca06584b38da8c44c26da19399a1bfd802ef5ee4 (diff) | |
download | pam-5891c5508e3b9ba699a6a6ba3dae9221a45528e5.tar.gz pam-5891c5508e3b9ba699a6a6ba3dae9221a45528e5.tar.bz2 pam-5891c5508e3b9ba699a6a6ba3dae9221a45528e5.zip |
Relevant BUGIDs: debian#514437 rhbz#487216
Purpose of commit: bugfix
Commit summary:
---------------
2009-02-26 Tomas Mraz <t8m@centrum.cz>
* xtests/Makefile.am: Add tst-pam_unix4.
* xtests/tst-pam_unix4.c: New test for password change
and shadow min days limit.
* xtests/tst-pam_unix4.pamd: Likewise.
* xtests/tst-pam_unix4.sh: Likewise.
* modules/pam_unix/pam_unix_acct.c (pam_sm_acct_mgmt): Ignore
PAM_AUTHTOK_ERR on shadow verification.
* modules/pam_unix/passverify.c (check_shadow_expiry): Return
PAM_AUTHTOK_ERR if sp_min limit for password change is defied.
Diffstat (limited to 'xtests/tst-pam_unix4.sh')
-rwxr-xr-x | xtests/tst-pam_unix4.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/xtests/tst-pam_unix4.sh b/xtests/tst-pam_unix4.sh new file mode 100755 index 00000000..787c2f90 --- /dev/null +++ b/xtests/tst-pam_unix4.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU +/usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix +# this run must successfully change the password +./tst-pam_unix4 pass +RET=$? +/usr/sbin/usermod -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix +/usr/bin/chage -m 10000 tstpamunix +# this run must fail to change the password +./tst-pam_unix4 fail || RET=$? + +/usr/sbin/userdel -r tstpamunix 2> /dev/null +exit $RET |