diff --git a/ChangeLog b/ChangeLog
index 9ae23d64..83e6335b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-06  Nicolas François  <nicolas.francois@centraliens.net>
+
+	* src/groupmems.c: Call open_files() and close_files().
+	* src/groupmems.c: Always call check_perms(), which takes care of
+	checking if --list is used.
+
 2008-09-06  Nicolas François  <nicolas.francois@centraliens.net>
 
 	* libmisc/obscure.c: Compare characters to '\0', not NULL.
diff --git a/src/groupmems.c b/src/groupmems.c
index abfc25bc..bdad3ac8 100644
--- a/src/groupmems.c
+++ b/src/groupmems.c
@@ -607,20 +607,11 @@ int main (int argc, char **argv)
 		}
 	}
 
-	if (!list) {
-		check_perms ();
+	check_perms ();
 
-		if (gr_lock () == 0) {
-			fprintf (stderr,
-			         _("%s: cannot lock %s; try again later.\n"),
-			         Prog, gr_dbname ());
-			fail_exit (EXIT_GROUP_FILE);
-		}
-		gr_locked = true;
-	}
+	open_files ();
 
 	grp = gr_locate (name);
-
 	if (NULL == grp) {
 		fprintf (stderr, _("%s: group '%s' does not exist in %s\n"),
 		         Prog, name, gr_dbname ());
@@ -637,16 +628,7 @@ int main (int argc, char **argv)
 		purge_members (grp);
 	}
 
-	if (gr_close () == 0) {
-		fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, gr_dbname ());
-		SYSLOG ((LOG_ERR, "failure while writing %s", gr_dbname ()));
-		fail_exit (EXIT_GROUP_FILE);
-	}
-	if (gr_unlock () == 0) {
-		fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
-		SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
-		/* continue */
-	}
+	close_files ();
 
 	exit (EXIT_SUCCESS);
 }