home directory created, but cannot be removed.
+2010-03-18 Nicolas François <nicolas.francois@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@centraliens.net>
* libmisc/chowndir.c: Re-indent.
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) {