[Pkg-shadow-commits] r3157 - in upstream/trunk: . src
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Thu Mar 18 18:57:04 UTC 2010
Author: nekral-guest
Date: 2010-03-18 18:57:03 +0000 (Thu, 18 Mar 2010)
New Revision: 3157
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/useradd.c
Log:
* src/useradd.c: When exiting because of a failure, warn if an
home directory created, but cannot be removed.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2010-03-18 18:52:53 UTC (rev 3156)
+++ upstream/trunk/ChangeLog 2010-03-18 18:57:03 UTC (rev 3157)
@@ -1,5 +1,10 @@
2010-03-18 Nicolas François <nicolas.francois at centraliens.net>
+ * src/useradd.c: When exiting because of a failure, warn if an
+ home directory created, but cannot be removed.
+
+2010-03-18 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/chowndir.c: Re-indent.
* libmisc/chowndir.c: Avoid assignment in comparisons.
* libmisc/chowndir.c: Added brackets and parenthesis.
Modified: upstream/trunk/src/useradd.c
===================================================================
--- upstream/trunk/src/useradd.c 2010-03-18 18:52:53 UTC (rev 3156)
+++ upstream/trunk/src/useradd.c 2010-03-18 18:57:03 UTC (rev 3157)
@@ -208,7 +208,12 @@
static void fail_exit (int code)
{
if (home_added) {
- rmdir (user_home);
+ if (rmdir (user_home) != 0) {
+ frpintf (stderr,
+ _("%s: %s was created, but could not be removed\n"),
+ Prog, user_home);
+ SYSLOG ((LOG_ERR, "failed to remove %s", user_home));
+ }
}
if (spw_locked) {
More information about the Pkg-shadow-commits
mailing list