From 87134054ab6a69d311e6a20b1cf3a7a8019f1f42 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sat, 16 Jul 2011 16:08:51 +0000 Subject: [PATCH] Use valid files for 03_chpasswd_no_shadow_file. This avoid a failure. The failure will be tested later. --- .../03_chpasswd_no_shadow_file/chpasswd.test | 19 ++----------------- .../config/etc/passwd | 4 ++-- .../03_chpasswd_no_shadow_file/data/passwd | 4 ++-- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/chpasswd.test b/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/chpasswd.test index 7aa511ed..fb915a18 100755 --- a/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/chpasswd.test +++ b/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/chpasswd.test @@ -22,26 +22,11 @@ echo "OK" echo -n "Change nobody's and lp's password..." echo 'nobody:test -lp:test2' | chpasswd 2>tmp/chpasswd.err && exit 1 || { - status=$? -} +lp:test2' | chpasswd echo "OK" -echo -n "Check returned status ($status)..." -test "$status" = "1" -echo "OK" - -echo "chpasswd reported:" -echo "=======================================================================" -cat tmp/chpasswd.err -echo "=======================================================================" -echo -n "Check that there were a failure message..." -diff -au data/chpasswd.err tmp/chpasswd.err -echo "error message OK." -rm -f tmp/chpasswd.err - echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl data/passwd /etc/passwd echo "OK" echo -n "Check the group file..." ../../../common/compare_file.pl config/etc/group /etc/group diff --git a/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/config/etc/passwd b/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/config/etc/passwd index 43fc135a..bd037066 100644 --- a/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/config/etc/passwd +++ b/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/config/etc/passwd @@ -5,7 +5,7 @@ sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh +lp:bar:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh @@ -15,5 +15,5 @@ backup:x:34:34:backup:/var/backups:/bin/sh list:x:38:38:Mailing List Manager:/var/list:/bin/sh irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +nobody:foo:65534:65534:nobody:/nonexistent:/bin/sh Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/data/passwd b/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/data/passwd index a9a8b927..36fa602b 100644 --- a/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/data/passwd +++ b/tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/data/passwd @@ -5,7 +5,7 @@ sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh -lp:@PASS_DES test2@:7:7:lp:/var/spool/lpd:/bin/sh +lp:@PASS_MD5 test2@:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh @@ -15,5 +15,5 @@ backup:x:34:34:backup:/var/backups:/bin/sh list:x:38:38:Mailing List Manager:/var/list:/bin/sh irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:@PASS_DES test@:65534:65534:nobody:/nonexistent:/bin/sh +nobody:@PASS_MD5 test@:65534:65534:nobody:/nonexistent:/bin/sh Debian-exim:x:102:102::/var/spool/exim4:/bin/false