[Pkg-shadow-commits] r3417 - in debian/trunk/tests/cktools/grpck: . 33_grpck_locked_group 33_grpck_locked_group/config 33_grpck_locked_group/config/etc 33_grpck_locked_group/config/etc/default 33_grpck_locked_group/data 34_grpck_locked_gshadow 34_grpck_locked_gshadow/config 34_grpck_locked_gshadow/config/etc 34_grpck_locked_gshadow/config/etc/default 34_grpck_locked_gshadow/data 35_grpck_duplicate_entry_group_NIS 35_grpck_duplicate_entry_group_NIS/config 35_grpck_duplicate_entry_group_NIS/config/etc 35_grpck_duplicate_entry_group_NIS/data 36_grpck_password_group_gshadow 36_grpck_password_group_gshadow/config 36_grpck_password_group_gshadow/config/etc 36_grpck_password_group_gshadow/data
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Sat Jul 16 15:44:21 UTC 2011
Author: nekral-guest
Date: 2011-07-16 15:44:21 +0000 (Sat, 16 Jul 2011)
New Revision: 3417
Added:
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config.txt
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/default/
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/default/useradd
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/group
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/gshadow
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/passwd
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/shadow
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/data/
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/data/grpck.err
debian/trunk/tests/cktools/grpck/33_grpck_locked_group/grpck.test
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config.txt
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/default/
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/default/useradd
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/group
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/gshadow
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/passwd
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/shadow
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/data/
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/data/grpck.err
debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/grpck.test
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config.txt
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/group
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/gshadow
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/passwd
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/shadow
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/group
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/gshadow
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/passwd
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/shadow
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.exp
debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.test
debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/
debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config.txt
debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/
debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/
debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/group
debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/gshadow
debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/passwd
debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/shadow
debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/data/
debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/data/grpck.out
debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/grpck.test
Log:
Added tests for grpck.
Added: debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/default/useradd (rev 0)
+++ debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/default/useradd 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/33_grpck_locked_group/config/etc/group
===================================================================
--- debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/group (rev 0)
+++ debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/group 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+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
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:
Added: debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/gshadow (rev 0)
+++ debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/gshadow 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+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/33_grpck_locked_group/config/etc/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/passwd (rev 0)
+++ debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/passwd 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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::/home/foo:/bin/false
Added: debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/shadow (rev 0)
+++ debian/trunk/tests/cktools/grpck/33_grpck_locked_group/config/etc/shadow 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/33_grpck_locked_group/config.txt
===================================================================
Added: debian/trunk/tests/cktools/grpck/33_grpck_locked_group/data/grpck.err
===================================================================
--- debian/trunk/tests/cktools/grpck/33_grpck_locked_group/data/grpck.err (rev 0)
+++ debian/trunk/tests/cktools/grpck/33_grpck_locked_group/data/grpck.err 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,2 @@
+grpck: existing lock file /etc/group.lock without a PID
+grpck: cannot lock /etc/group; try again later.
Added: debian/trunk/tests/cktools/grpck/33_grpck_locked_group/grpck.test
===================================================================
--- debian/trunk/tests/cktools/grpck/33_grpck_locked_group/grpck.test (rev 0)
+++ debian/trunk/tests/cktools/grpck/33_grpck_locked_group/grpck.test 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "grpck checks if the group file is locked"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -f /etc/group.lock' 0
+
+change_config
+
+echo -n "Create lock file for /etc/group..."
+touch /etc/group.lock
+echo "done"
+
+echo -n "Check groups (grpck)..."
+grpck 2>tmp/grpck.err && exit 1 || {
+ status=$?
+}
+echo "OK"
+
+rm -f /etc/group.lock
+
+echo -n "Check returned status ($status)..."
+test "$status" = "4"
+echo "OK"
+
+echo "grpck reported:"
+echo "======================================================================="
+cat tmp/grpck.err
+echo "======================================================================="
+echo -n "Check that there were a failure message..."
+diff -au data/grpck.err tmp/grpck.err
+echo "error message OK."
+rm -f tmp/grpck.err
+
+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/33_grpck_locked_group/grpck.test
___________________________________________________________________
Added: svn:executable
+ *
Added: debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/default/useradd (rev 0)
+++ debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/default/useradd 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/34_grpck_locked_gshadow/config/etc/group
===================================================================
--- debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/group (rev 0)
+++ debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/group 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+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
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:
Added: debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/gshadow (rev 0)
+++ debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/gshadow 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+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/34_grpck_locked_gshadow/config/etc/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/passwd (rev 0)
+++ debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/passwd 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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::/home/foo:/bin/false
Added: debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/shadow (rev 0)
+++ debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/shadow 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/34_grpck_locked_gshadow/config.txt
===================================================================
Added: debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/data/grpck.err
===================================================================
--- debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/data/grpck.err (rev 0)
+++ debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/data/grpck.err 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,2 @@
+grpck: existing lock file /etc/gshadow.lock without a PID
+grpck: cannot lock /etc/gshadow; try again later.
Added: debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/grpck.test
===================================================================
--- debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/grpck.test (rev 0)
+++ debian/trunk/tests/cktools/grpck/34_grpck_locked_gshadow/grpck.test 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "grpck checks if the gshadow file is locked"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -f /etc/gshadow.lock' 0
+
+change_config
+
+echo -n "Create lock file for /etc/gshadow..."
+touch /etc/gshadow.lock
+echo "done"
+
+echo -n "Check groups (grpck)..."
+grpck 2>tmp/grpck.err && exit 1 || {
+ status=$?
+}
+echo "OK"
+
+rm -f /etc/gshadow.lock
+
+echo -n "Check returned status ($status)..."
+test "$status" = "4"
+echo "OK"
+
+echo "grpck reported:"
+echo "======================================================================="
+cat tmp/grpck.err
+echo "======================================================================="
+echo -n "Check that there were a failure message..."
+diff -au data/grpck.err tmp/grpck.err
+echo "error message OK."
+rm -f tmp/grpck.err
+
+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/34_grpck_locked_gshadow/grpck.test
___________________________________________________________________
Added: svn:executable
+ *
Added: debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/group
===================================================================
--- debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/group (rev 0)
+++ debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/group 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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:
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:daemon
++:::
+-bar:::
+foo:x:1000:bin
Added: debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/gshadow (rev 0)
+++ debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/gshadow 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/35_grpck_duplicate_entry_group_NIS/config/etc/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/passwd (rev 0)
+++ debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/passwd 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/35_grpck_duplicate_entry_group_NIS/config/etc/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/shadow (rev 0)
+++ debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/shadow 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/35_grpck_duplicate_entry_group_NIS/config.txt
===================================================================
--- debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config.txt (rev 0)
+++ debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config.txt 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,2 @@
+user foo
+group foo with typo in group
Added: debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/group
===================================================================
--- debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/group (rev 0)
+++ debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/group 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,44 @@
+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:
++:::
+-bar:::
+foo:x:1000:bin
Added: debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/gshadow (rev 0)
+++ debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/gshadow 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/35_grpck_duplicate_entry_group_NIS/data/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/passwd (rev 0)
+++ debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/passwd 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/35_grpck_duplicate_entry_group_NIS/data/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/shadow (rev 0)
+++ debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/shadow 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/35_grpck_duplicate_entry_group_NIS/grpck.exp
===================================================================
--- debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.exp (rev 0)
+++ debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.exp 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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\r"
+expect "duplicate group entry"
+expect "delete line 'foo:x:1000:daemon'? "
+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/35_grpck_duplicate_entry_group_NIS/grpck.exp
___________________________________________________________________
Added: svn:executable
+ *
Added: debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.test
===================================================================
--- debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.test (rev 0)
+++ debian/trunk/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.test 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,37 @@
+#!/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
+
+./grpck.exp
+
+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..."
+../../../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/35_grpck_duplicate_entry_group_NIS/grpck.test
___________________________________________________________________
Added: svn:executable
+ *
Added: debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/group
===================================================================
--- debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/group (rev 0)
+++ debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/group 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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:toto:1000:
Added: debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/gshadow
===================================================================
--- debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/gshadow (rev 0)
+++ debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/gshadow 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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:*::foo
+nogroup:*::
+crontab:x::
+foo:foo::
+Debian-exim:*::
Added: debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/passwd
===================================================================
--- debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/passwd (rev 0)
+++ debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/passwd 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/36_grpck_password_group_gshadow/config/etc/shadow
===================================================================
--- debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/shadow (rev 0)
+++ debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/shadow 2011-07-16 15:44:21 UTC (rev 3417)
@@ -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/36_grpck_password_group_gshadow/config.txt
===================================================================
--- debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config.txt (rev 0)
+++ debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/config.txt 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,5 @@
+# no testsuite password
+# root password: rootF00barbaz
+# myuser password: myuserF00barbaz
+
+user foo, in group users
Added: debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/data/grpck.out
===================================================================
--- debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/data/grpck.out (rev 0)
+++ debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/data/grpck.out 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,2 @@
+group foo has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
+grpck: no changes
Added: debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/grpck.test
===================================================================
--- debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/grpck.test (rev 0)
+++ debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/grpck.test 2011-07-16 15:44:21 UTC (rev 3417)
@@ -0,0 +1,54 @@
+#!/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 "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 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/shadow /etc/shadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+
Property changes on: debian/trunk/tests/cktools/grpck/36_grpck_password_group_gshadow/grpck.test
___________________________________________________________________
Added: svn:executable
+ *
More information about the Pkg-shadow-commits
mailing list