[Pkg-shadow-commits] r2250 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Thu Aug 7 08:03:56 UTC 2008
Author: nekral-guest
Date: 2008-08-07 08:03:55 +0000 (Thu, 07 Aug 2008)
New Revision: 2250
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/pwunconv.c
Log:
* src/pwunconv.c: Report failure to unlock the passwd or shadow
file to stderr and syslog.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-08-07 08:03:38 UTC (rev 2249)
+++ upstream/trunk/ChangeLog 2008-08-07 08:03:55 UTC (rev 2250)
@@ -1,12 +1,17 @@
2008-08-07 Nicolas François <nicolas.francois at centraliens.net>
- * src/usermod.c: Report failure to unlock the passwd or shadow
+ * src/pwunconv.c: Report failure to unlock the passwd or shadow
file to stderr and syslog.
2008-08-07 Nicolas François <nicolas.francois at centraliens.net>
- * src/newusers.c: Report failure to unlock the passwd or shadow
- file to stderr and syslog.
+ * src/usermod.c: Report failure to unlock files to stderr and
+ syslog.
+
+2008-08-07 Nicolas François <nicolas.francois at centraliens.net>
+
+ * src/newusers.c: Report failure to unlock files to stderr and
+ syslog.
* src/newusers.c: In case of error when files are open or closed,
indicate the failing file.
* src/newusers.c: Do not try to unlock the files manually since
Modified: upstream/trunk/src/pwunconv.c
===================================================================
--- upstream/trunk/src/pwunconv.c 2008-08-07 08:03:38 UTC (rev 2249)
+++ upstream/trunk/src/pwunconv.c 2008-08-07 08:03:55 UTC (rev 2250)
@@ -51,15 +51,23 @@
static bool passwd_locked = false;
/* local function prototypes */
-static void fail_exit (int);
+static void fail_exit (int status);
static void fail_exit (int status)
{
if (shadow_locked) {
- spw_unlock ();
+ if (spw_unlock () == 0) {
+ fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, spw_dbname ());
+ SYSLOG ((LOG_ERR, "failed to unlock %s", spw_dbname ()));
+ /* continue */
+ }
}
if (passwd_locked) {
- pw_unlock ();
+ if (pw_unlock () == 0) {
+ fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, pw_dbname ());
+ SYSLOG ((LOG_ERR, "failed to unlock %s", pw_dbname ()));
+ /* continue */
+ }
}
exit (status);
}
@@ -164,8 +172,16 @@
fail_exit (3);
}
- spw_unlock ();
- pw_unlock ();
+ if (spw_unlock () == 0) {
+ fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, spw_dbname ());
+ SYSLOG ((LOG_ERR, "failed to unlock %s", spw_dbname ()));
+ /* continue */
+ }
+ if (pw_unlock () == 0) {
+ fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, pw_dbname ());
+ SYSLOG ((LOG_ERR, "failed to unlock %s", pw_dbname ()));
+ /* continue */
+ }
nscd_flush_cache ("passwd");
More information about the Pkg-shadow-commits
mailing list