[Pkg-shadow-commits] r2354 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sat Sep 6 16:27:22 UTC 2008
Author: nekral-guest
Date: 2008-09-06 16:27:21 +0000 (Sat, 06 Sep 2008)
New Revision: 2354
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/groupmems.c
Log:
* 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.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-09-06 16:00:00 UTC (rev 2353)
+++ upstream/trunk/ChangeLog 2008-09-06 16:27:21 UTC (rev 2354)
@@ -1,5 +1,11 @@
2008-09-06 Nicolas François <nicolas.francois at 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 at centraliens.net>
+
* libmisc/obscure.c: Compare characters to '\0', not NULL.
2008-09-06 Nicolas François <nicolas.francois at centraliens.net>
Modified: upstream/trunk/src/groupmems.c
===================================================================
--- upstream/trunk/src/groupmems.c 2008-09-06 16:00:00 UTC (rev 2353)
+++ upstream/trunk/src/groupmems.c 2008-09-06 16:27:21 UTC (rev 2354)
@@ -607,20 +607,11 @@
}
}
- 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 @@
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);
}
More information about the Pkg-shadow-commits
mailing list