[Pkg-shadow-commits] r3407 - in debian/trunk/tests/cktools/grpck: . 26_grpck_no_gshadow_file 26_grpck_no_gshadow_file/config 26_grpck_no_gshadow_file/config/etc 26_grpck_no_gshadow_file/data 27_grpck_sort_no_gshadow_file 27_grpck_sort_no_gshadow_file/config 27_grpck_sort_no_gshadow_file/config/etc 27_grpck_sort_no_gshadow_file/data 28_grpck_usage 28_grpck_usage/config 28_grpck_usage/config/etc 28_grpck_usage/config/etc/default 28_grpck_usage/data 29_grpck_sort_readonly 29_grpck_sort_readonly/config 29_grpck_sort_readonly/config/etc 29_grpck_sort_readonly/config/etc/default 29_grpck_sort_readonly/data 30_grpck_3_files 30_grpck_3_files/config 30_grpck_3_files/config/etc 30_grpck_3_files/config/etc/default 30_grpck_3_files/data 31_grpck_missing_field_group_local_no_gshadow 31_grpck_missing_field_group_local_no_gshadow/config 31_grpck_missing_field_group_local_no_gshadow/config/etc 31_grpck_missing_field_group_local_no_gshadow/data 32_grpck_sort_nis 32_grpck_sort_nis/config 32_grpck_sort_nis/config/etc 32_grpck_sort_nis/data

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Thu Jul 14 17:08:39 UTC 2011


Author: nekral-guest
Date: 2011-07-14 17:08:39 +0000 (Thu, 14 Jul 2011)
New Revision: 3407

Added:
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config.txt
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/group
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/gshadow
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/passwd
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/shadow
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/group
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/grpck.out
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/passwd
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/shadow
   debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/grpck.test
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config.txt
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/group
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/gshadow
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/passwd
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/shadow
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/group
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/passwd
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/shadow
   debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/grpck.test
   debian/trunk/tests/cktools/grpck/28_grpck_usage/
   debian/trunk/tests/cktools/grpck/28_grpck_usage/config.txt
   debian/trunk/tests/cktools/grpck/28_grpck_usage/config/
   debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/
   debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/default/
   debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/default/useradd
   debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/group
   debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/gshadow
   debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/passwd
   debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/shadow
   debian/trunk/tests/cktools/grpck/28_grpck_usage/data/
   debian/trunk/tests/cktools/grpck/28_grpck_usage/data/usage.out
   debian/trunk/tests/cktools/grpck/28_grpck_usage/grpck.test
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config.txt
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/default/
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/default/useradd
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/group
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/gshadow
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/passwd
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/shadow
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/data/
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/data/usage.out
   debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/grpck.test
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/config.txt
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/default/
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/default/useradd
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/group
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/gshadow
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/passwd
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/shadow
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/data/
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/data/usage.out
   debian/trunk/tests/cktools/grpck/30_grpck_3_files/grpck.test
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config.txt
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/group
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/gshadow
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/passwd
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/shadow
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/data/
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/data/group
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.exp
   debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.test
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config.txt
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/group
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/gshadow
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/passwd
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/shadow
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/data/
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/data/group
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/data/gshadow
   debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/grpck.test
Log:
Added grpck tests.


Added: debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/group
===================================================================
--- debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/group	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,42 @@
+daemon:x:1:
+bin:x:2:
+kmem:x:15:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+root:x:0:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+shadow:x:42:
+gnats:x:41:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:bar

Added: debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/gshadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,41 @@
+daemon:*::
+bin:*::
+kmem:*::
+sys:*::
+adm:*::
+tty:*::
+disk:*::
+lp:*::
+root:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::
+floppy:*::
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+shadow:*::
+gnats:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+foo:*::

Added: debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/passwd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+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
+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
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+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
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000:::/bin/false

Added: debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/shadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
+daemon:*:12977:0:99999:7:::
+bin:*:12977:0:99999:7:::
+sys:*:12977:0:99999:7:::
+sync:*:12977:0:99999:7:::
+games:*:12977:0:99999:7:::
+man:*:12977:0:99999:7:::
+lp:*:12977:0:99999:7:::
+mail:*:12977:0:99999:7:::
+news:*:12977:0:99999:7:::
+uucp:*:12977:0:99999:7:::
+proxy:*:12977:0:99999:7:::
+www-data:*:12977:0:99999:7:::
+backup:*:12977:0:99999:7:::
+list:*:12977:0:99999:7:::
+irc:*:12977:0:99999:7:::
+gnats:*:12977:0:99999:7:::
+nobody:*:12977:0:99999:7:::
+Debian-exim:!:12977:0:99999:7:::
+foo:!:12977:0:99999:7:::

Added: debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config.txt
===================================================================
--- debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/config.txt	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,5 @@
+# no testsuite password
+# root password: rootF00barbaz
+# myuser password: myuserF00barbaz
+
+user foo, in group users

Added: debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/group
===================================================================
--- debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/group	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/group	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,42 @@
+daemon:x:1:
+bin:x:2:
+kmem:x:15:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+root:x:0:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+shadow:x:42:
+gnats:x:41:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:bar

Added: debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/grpck.out
===================================================================
--- debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/grpck.out	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/grpck.out	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,3 @@
+group foo: no user bar
+delete member 'bar'? No
+grpck: no changes

Added: debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/passwd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/passwd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+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
+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
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+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
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000:::/bin/false

Added: debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/shadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/data/shadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
+daemon:*:12977:0:99999:7:::
+bin:*:12977:0:99999:7:::
+sys:*:12977:0:99999:7:::
+sync:*:12977:0:99999:7:::
+games:*:12977:0:99999:7:::
+man:*:12977:0:99999:7:::
+lp:*:12977:0:99999:7:::
+mail:*:12977:0:99999:7:::
+news:*:12977:0:99999:7:::
+uucp:*:12977:0:99999:7:::
+proxy:*:12977:0:99999:7:::
+www-data:*:12977:0:99999:7:::
+backup:*:12977:0:99999:7:::
+list:*:12977:0:99999:7:::
+irc:*:12977:0:99999:7:::
+gnats:*:12977:0:99999:7:::
+nobody:*:12977:0:99999:7:::
+Debian-exim:!:12977:0:99999:7:::
+foo:!:12977:0:99999:7:::

Added: debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/grpck.test
===================================================================
--- debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/grpck.test	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/grpck.test	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "grpck can sort the group entries"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Remove the gshadow file..."
+rm -f /etc/gshadow
+echo "done"
+
+echo -n "Check the group entries (grpck -r)..."
+grpck -r >tmp/grpck.out && exit 1 || {
+        status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "grpck reported:"
+echo "======================================================================="
+cat tmp/grpck.out
+echo "======================================================================="
+echo -n "Check that there were a failure message..."
+diff -au data/grpck.out tmp/grpck.out
+echo "error message OK."
+rm -f tmp/grpck.out
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl data/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl data/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl data/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+test ! -f /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/cktools/grpck/26_grpck_no_gshadow_file/grpck.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/group
===================================================================
--- debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/group	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,42 @@
+daemon:x:1:
+bin:x:2:
+kmem:x:15:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+root:x:0:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+shadow:x:42:
+gnats:x:41:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/gshadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,41 @@
+daemon:*::
+bin:*::
+kmem:*::
+sys:*::
+adm:*::
+tty:*::
+disk:*::
+lp:*::
+root:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::
+floppy:*::
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+shadow:*::
+gnats:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+foo:*::

Added: debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/passwd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+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
+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
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+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
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000:::/bin/false

Added: debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/shadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
+daemon:*:12977:0:99999:7:::
+bin:*:12977:0:99999:7:::
+sys:*:12977:0:99999:7:::
+sync:*:12977:0:99999:7:::
+games:*:12977:0:99999:7:::
+man:*:12977:0:99999:7:::
+lp:*:12977:0:99999:7:::
+mail:*:12977:0:99999:7:::
+news:*:12977:0:99999:7:::
+uucp:*:12977:0:99999:7:::
+proxy:*:12977:0:99999:7:::
+www-data:*:12977:0:99999:7:::
+backup:*:12977:0:99999:7:::
+list:*:12977:0:99999:7:::
+irc:*:12977:0:99999:7:::
+gnats:*:12977:0:99999:7:::
+nobody:*:12977:0:99999:7:::
+Debian-exim:!:12977:0:99999:7:::
+foo:!:12977:0:99999:7:::

Added: debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config.txt
===================================================================
--- debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config.txt	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,5 @@
+# no testsuite password
+# root password: rootF00barbaz
+# myuser password: myuserF00barbaz
+
+user foo, in group users

Added: debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/group
===================================================================
--- debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/group	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/group	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:
+nogroup:x:65534:

Added: debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/passwd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/passwd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+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
+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
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+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
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000:::/bin/false

Added: debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/shadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/shadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
+daemon:*:12977:0:99999:7:::
+bin:*:12977:0:99999:7:::
+sys:*:12977:0:99999:7:::
+sync:*:12977:0:99999:7:::
+games:*:12977:0:99999:7:::
+man:*:12977:0:99999:7:::
+lp:*:12977:0:99999:7:::
+mail:*:12977:0:99999:7:::
+news:*:12977:0:99999:7:::
+uucp:*:12977:0:99999:7:::
+proxy:*:12977:0:99999:7:::
+www-data:*:12977:0:99999:7:::
+backup:*:12977:0:99999:7:::
+list:*:12977:0:99999:7:::
+irc:*:12977:0:99999:7:::
+gnats:*:12977:0:99999:7:::
+nobody:*:12977:0:99999:7:::
+Debian-exim:!:12977:0:99999:7:::
+foo:!:12977:0:99999:7:::

Added: debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/grpck.test
===================================================================
--- debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/grpck.test	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/grpck.test	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "grpck can sort the group entries"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Remove the gshadow file..."
+rm -f /etc/gshadow
+echo "done"
+
+echo -n "Sort the group entries (grpck -s)..."
+grpck -s
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl data/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl data/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl data/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+test ! -f /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/grpck.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/default/useradd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,36 @@
+# Default values for useradd(8)
+#
+# The SHELL variable specifies the default login shell on your
+# system.
+# Similar to DHSELL in adduser. However, we use "sh" here because
+# useradd is a low level utility and should be as general
+# as possible
+SHELL=/bin/foobar
+#
+# The default group for users
+# 100=users on Debian systems
+# Same as USERS_GID in adduser
+# This argument is used when the -n flag is specified.
+# The default behavior (when -n and -g are not specified) is to create a
+# primary user group with the same name as the user being added to the
+# system.
+GROUP=10
+#
+# The default home directory. Same as DHOME for adduser
+HOME=/tmp
+#
+# The number of days after a password expires until the account 
+# is permanently disabled
+INACTIVE=12
+#
+# The default expire date
+EXPIRE=2007-12-02
+#
+# The SKEL variable specifies the directory containing "skeletal" user
+# files; in other words, files such as a sample .profile that will be
+# copied to the new user's home directory when it is created.
+# SKEL=/etc/skel
+#
+# Defines whether the mail spool should be created while
+# creating the account
+# CREATE_MAIL_SPOOL=yes

Added: debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/group
===================================================================
--- debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/group	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,41 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:

Added: debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/gshadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,41 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::
+adm:*::
+tty:*::
+disk:*::
+lp:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::
+floppy:*::
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::

Added: debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/passwd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,19 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+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
+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
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+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
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false

Added: debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/28_grpck_usage/config/etc/shadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,19 @@
+root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
+daemon:*:12977:0:99999:7:::
+bin:*:12977:0:99999:7:::
+sys:*:12977:0:99999:7:::
+sync:*:12977:0:99999:7:::
+games:*:12977:0:99999:7:::
+man:*:12977:0:99999:7:::
+lp:*:12977:0:99999:7:::
+mail:*:12977:0:99999:7:::
+news:*:12977:0:99999:7:::
+uucp:*:12977:0:99999:7:::
+proxy:*:12977:0:99999:7:::
+www-data:*:12977:0:99999:7:::
+backup:*:12977:0:99999:7:::
+list:*:12977:0:99999:7:::
+irc:*:12977:0:99999:7:::
+gnats:*:12977:0:99999:7:::
+nobody:*:12977:0:99999:7:::
+Debian-exim:!:12977:0:99999:7:::

Added: debian/trunk/tests/cktools/grpck/28_grpck_usage/config.txt
===================================================================
--- debian/trunk/tests/cktools/grpck/28_grpck_usage/config.txt	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/28_grpck_usage/config.txt	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,10 @@
+# no testsuite password
+# root password: rootF00barbaz
+# myuser password: myuserF00barbaz
+
+user foo, in group users (only in /etc/group)
+user foo, in group tty (only in /etc/gshadow)
+user foo, in group floppy
+user foo, admin of group disk
+user foo, admin and member of group fax
+user foo, admin and member of group cdrom (only in /etc/gshadow)

Added: debian/trunk/tests/cktools/grpck/28_grpck_usage/data/usage.out
===================================================================
--- debian/trunk/tests/cktools/grpck/28_grpck_usage/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/28_grpck_usage/data/usage.out	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,2 @@
+grpck: invalid option -- 'h'
+Usage: grpck [-r] [-s] [group [gshadow]]

Added: debian/trunk/tests/cktools/grpck/28_grpck_usage/grpck.test
===================================================================
--- debian/trunk/tests/cktools/grpck/28_grpck_usage/grpck.test	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/28_grpck_usage/grpck.test	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "grpck can display its usage message"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Get grpck usage (grpck -h)..."
+grpck -h 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "1"
+echo "OK"
+
+echo "grpck reported:"
+echo "======================================================================="
+cat tmp/usage.out
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/usage.out tmp/usage.out
+echo "usage message OK."
+rm -f tmp/usage.out
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/cktools/grpck/28_grpck_usage/grpck.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/default/useradd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,36 @@
+# Default values for useradd(8)
+#
+# The SHELL variable specifies the default login shell on your
+# system.
+# Similar to DHSELL in adduser. However, we use "sh" here because
+# useradd is a low level utility and should be as general
+# as possible
+SHELL=/bin/foobar
+#
+# The default group for users
+# 100=users on Debian systems
+# Same as USERS_GID in adduser
+# This argument is used when the -n flag is specified.
+# The default behavior (when -n and -g are not specified) is to create a
+# primary user group with the same name as the user being added to the
+# system.
+GROUP=10
+#
+# The default home directory. Same as DHOME for adduser
+HOME=/tmp
+#
+# The number of days after a password expires until the account 
+# is permanently disabled
+INACTIVE=12
+#
+# The default expire date
+EXPIRE=2007-12-02
+#
+# The SKEL variable specifies the directory containing "skeletal" user
+# files; in other words, files such as a sample .profile that will be
+# copied to the new user's home directory when it is created.
+# SKEL=/etc/skel
+#
+# Defines whether the mail spool should be created while
+# creating the account
+# CREATE_MAIL_SPOOL=yes

Added: debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/group
===================================================================
--- debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/group	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,41 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:

Added: debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/gshadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,41 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::
+adm:*::
+tty:*::
+disk:*::
+lp:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::
+floppy:*::
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::

Added: debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/passwd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,19 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+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
+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
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+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
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false

Added: debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/shadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,19 @@
+root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
+daemon:*:12977:0:99999:7:::
+bin:*:12977:0:99999:7:::
+sys:*:12977:0:99999:7:::
+sync:*:12977:0:99999:7:::
+games:*:12977:0:99999:7:::
+man:*:12977:0:99999:7:::
+lp:*:12977:0:99999:7:::
+mail:*:12977:0:99999:7:::
+news:*:12977:0:99999:7:::
+uucp:*:12977:0:99999:7:::
+proxy:*:12977:0:99999:7:::
+www-data:*:12977:0:99999:7:::
+backup:*:12977:0:99999:7:::
+list:*:12977:0:99999:7:::
+irc:*:12977:0:99999:7:::
+gnats:*:12977:0:99999:7:::
+nobody:*:12977:0:99999:7:::
+Debian-exim:!:12977:0:99999:7:::

Added: debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config.txt
===================================================================
--- debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config.txt	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/config.txt	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,10 @@
+# no testsuite password
+# root password: rootF00barbaz
+# myuser password: myuserF00barbaz
+
+user foo, in group users (only in /etc/group)
+user foo, in group tty (only in /etc/gshadow)
+user foo, in group floppy
+user foo, admin of group disk
+user foo, admin and member of group fax
+user foo, admin and member of group cdrom (only in /etc/gshadow)

Added: debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/data/usage.out
===================================================================
--- debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/data/usage.out	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1 @@
+grpck: -s and -r are incompatibile

Added: debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/grpck.test
===================================================================
--- debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/grpck.test	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/grpck.test	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "grpck report failure when sorting and read only are enabled"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Get grpck usage (grpck -r -s)..."
+grpck -r -s 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "1"
+echo "OK"
+
+echo "grpck reported:"
+echo "======================================================================="
+cat tmp/usage.out
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/usage.out tmp/usage.out
+echo "usage message OK."
+rm -f tmp/usage.out
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/cktools/grpck/29_grpck_sort_readonly/grpck.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/default/useradd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,36 @@
+# Default values for useradd(8)
+#
+# The SHELL variable specifies the default login shell on your
+# system.
+# Similar to DHSELL in adduser. However, we use "sh" here because
+# useradd is a low level utility and should be as general
+# as possible
+SHELL=/bin/foobar
+#
+# The default group for users
+# 100=users on Debian systems
+# Same as USERS_GID in adduser
+# This argument is used when the -n flag is specified.
+# The default behavior (when -n and -g are not specified) is to create a
+# primary user group with the same name as the user being added to the
+# system.
+GROUP=10
+#
+# The default home directory. Same as DHOME for adduser
+HOME=/tmp
+#
+# The number of days after a password expires until the account 
+# is permanently disabled
+INACTIVE=12
+#
+# The default expire date
+EXPIRE=2007-12-02
+#
+# The SKEL variable specifies the directory containing "skeletal" user
+# files; in other words, files such as a sample .profile that will be
+# copied to the new user's home directory when it is created.
+# SKEL=/etc/skel
+#
+# Defines whether the mail spool should be created while
+# creating the account
+# CREATE_MAIL_SPOOL=yes

Added: debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/group
===================================================================
--- debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/group	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,41 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:

Added: debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/gshadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,41 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::
+adm:*::
+tty:*::
+disk:*::
+lp:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::
+floppy:*::
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::

Added: debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/passwd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,19 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+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
+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
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+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
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false

Added: debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/30_grpck_3_files/config/etc/shadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,19 @@
+root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
+daemon:*:12977:0:99999:7:::
+bin:*:12977:0:99999:7:::
+sys:*:12977:0:99999:7:::
+sync:*:12977:0:99999:7:::
+games:*:12977:0:99999:7:::
+man:*:12977:0:99999:7:::
+lp:*:12977:0:99999:7:::
+mail:*:12977:0:99999:7:::
+news:*:12977:0:99999:7:::
+uucp:*:12977:0:99999:7:::
+proxy:*:12977:0:99999:7:::
+www-data:*:12977:0:99999:7:::
+backup:*:12977:0:99999:7:::
+list:*:12977:0:99999:7:::
+irc:*:12977:0:99999:7:::
+gnats:*:12977:0:99999:7:::
+nobody:*:12977:0:99999:7:::
+Debian-exim:!:12977:0:99999:7:::

Added: debian/trunk/tests/cktools/grpck/30_grpck_3_files/config.txt
===================================================================
--- debian/trunk/tests/cktools/grpck/30_grpck_3_files/config.txt	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/30_grpck_3_files/config.txt	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,10 @@
+# no testsuite password
+# root password: rootF00barbaz
+# myuser password: myuserF00barbaz
+
+user foo, in group users (only in /etc/group)
+user foo, in group tty (only in /etc/gshadow)
+user foo, in group floppy
+user foo, admin of group disk
+user foo, admin and member of group fax
+user foo, admin and member of group cdrom (only in /etc/gshadow)

Added: debian/trunk/tests/cktools/grpck/30_grpck_3_files/data/usage.out
===================================================================
--- debian/trunk/tests/cktools/grpck/30_grpck_3_files/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/30_grpck_3_files/data/usage.out	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1 @@
+Usage: grpck [-r] [-s] [group [gshadow]]

Added: debian/trunk/tests/cktools/grpck/30_grpck_3_files/grpck.test
===================================================================
--- debian/trunk/tests/cktools/grpck/30_grpck_3_files/grpck.test	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/30_grpck_3_files/grpck.test	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "grpck checks its number of arguments"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Get grpck usage (grpck -r foo bar baz)..."
+grpck -r foo bar baz 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "1"
+echo "OK"
+
+echo "grpck reported:"
+echo "======================================================================="
+cat tmp/usage.out
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/usage.out tmp/usage.out
+echo "usage message OK."
+rm -f tmp/usage.out
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/cktools/grpck/30_grpck_3_files/grpck.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/group
===================================================================
--- debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/group	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x

Added: debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/gshadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::
+adm:*::
+tty:*::
+disk:*::
+lp:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::
+floppy:*::
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/passwd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+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
+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
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+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
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000:::/bin/false

Added: debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/shadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
+daemon:*:12977:0:99999:7:::
+bin:*:12977:0:99999:7:::
+sys:*:12977:0:99999:7:::
+sync:*:12977:0:99999:7:::
+games:*:12977:0:99999:7:::
+man:*:12977:0:99999:7:::
+lp:*:12977:0:99999:7:::
+mail:*:12977:0:99999:7:::
+news:*:12977:0:99999:7:::
+uucp:*:12977:0:99999:7:::
+proxy:*:12977:0:99999:7:::
+www-data:*:12977:0:99999:7:::
+backup:*:12977:0:99999:7:::
+list:*:12977:0:99999:7:::
+irc:*:12977:0:99999:7:::
+gnats:*:12977:0:99999:7:::
+nobody:*:12977:0:99999:7:::
+Debian-exim:!:12977:0:99999:7:::
+foo:!:12977:0:99999:7:::

Added: debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config.txt
===================================================================
--- debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config.txt	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config.txt	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,2 @@
+user foo
+group foo with typo in group

Added: debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/data/group
===================================================================
--- debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/data/group	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/data/group	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,41 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:

Added: debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.exp
===================================================================
--- debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.exp	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.exp	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+#!/usr/bin/expect
+
+set timeout 2
+expect_after default {puts "\nFAIL"; exit 1}
+
+spawn /bin/sh
+send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r"
+expect "# "
+
+send "grpck tmp/group\r"
+expect "invalid group file entry"
+expect "delete line 'foo:x'? "
+send "yes\r"
+expect "grpck: the files have been updated"
+expect "# "
+send "echo \$?\r"
+expect "2"
+send "exit\r"
+puts "OK\n"
+exit 0


Property changes on: debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.exp
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.test
===================================================================
--- debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.test	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.test	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "grpck check the number of fields and can change the system database"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "copy group and gshadow localy..."
+cp /etc/group tmp/
+echo "OK"
+
+./grpck.exp
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+../../../common/compare_file.pl data/group tmp/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+rm -f tmp/group tmp/group- tmp/gshadow tmp/gshadow-
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/group
===================================================================
--- debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/group	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,45 @@
+daemon:x:1:
+bin:x:2:
+kmem:x:15:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+root:x:0:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+shadow:x:42:
+gnats:x:41:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:
++:::
++foo1:::
+-foo2:

Added: debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/gshadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,42 @@
+daemon:*::
+bin:*::
+kmem:*::
+sys:*::
+adm:*::
+tty:*::
+disk:*::
+lp:*::
+root:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::
+floppy:*::
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+shadow:*::
+gnats:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/passwd	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+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
+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
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+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
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000:::/bin/false

Added: debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config/etc/shadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,20 @@
+root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
+daemon:*:12977:0:99999:7:::
+bin:*:12977:0:99999:7:::
+sys:*:12977:0:99999:7:::
+sync:*:12977:0:99999:7:::
+games:*:12977:0:99999:7:::
+man:*:12977:0:99999:7:::
+lp:*:12977:0:99999:7:::
+mail:*:12977:0:99999:7:::
+news:*:12977:0:99999:7:::
+uucp:*:12977:0:99999:7:::
+proxy:*:12977:0:99999:7:::
+www-data:*:12977:0:99999:7:::
+backup:*:12977:0:99999:7:::
+list:*:12977:0:99999:7:::
+irc:*:12977:0:99999:7:::
+gnats:*:12977:0:99999:7:::
+nobody:*:12977:0:99999:7:::
+Debian-exim:!:12977:0:99999:7:::
+foo:!:12977:0:99999:7:::

Added: debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config.txt
===================================================================
--- debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config.txt	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/config.txt	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,5 @@
+# no testsuite password
+# root password: rootF00barbaz
+# myuser password: myuserF00barbaz
+
+user foo, in group users

Added: debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/data/group
===================================================================
--- debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/data/group	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/data/group	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,45 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:
+nogroup:x:65534:
++:::
++foo1:::
+-foo2:

Added: debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/data/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/data/gshadow	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::
+adm:*::
+tty:*::
+disk:*::
+lp:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::
+floppy:*::
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+crontab:x::
+Debian-exim:x::
+foo:*::
+nogroup:*::

Added: debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/grpck.test
===================================================================
--- debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/grpck.test	                        (rev 0)
+++ debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/grpck.test	2011-07-14 17:08:39 UTC (rev 3407)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "grpck can sort the group entries"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Sort the group entries (grpck -s)..."
+grpck -s
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl data/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/cktools/grpck/32_grpck_sort_nis/grpck.test
___________________________________________________________________
Added: svn:executable
   + *




More information about the Pkg-shadow-commits mailing list