* src/useradd.c: When exiting because of a failure, warn if an

home directory created, but cannot be removed.
This commit is contained in:
nekral-guest 2010-03-18 18:57:03 +00:00
parent 86498400da
commit 8e2010a26c
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -208,7 +208,12 @@ static void create_mail (void);
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) {