* src/userdel.c: Avoid perror. Give more verbose warnings.

This commit is contained in:
nekral-guest 2010-03-16 19:13:53 +00:00
parent fd39a24b34
commit 6c4e2931ef
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2010-03-15 Nicolas François <nicolas.francois@centraliens.net>
* src/userdel.c: Avoid perror. Give more verbose warnings.
2010-03-11 Nicolas François <nicolas.francois@centraliens.net>
* man/Makefile.am: Indicate that man/generate_mans.deps is

View File

@ -758,7 +758,9 @@ static int remove_tcbdir (const char *user_name, uid_t user_id)
}
snprintf (buf, buflen, TCB_DIR "/%s", user_name);
if (shadowtcb_drop_priv () == 0) {
perror ("shadowtcb_drop_priv");
fprintf (stderr, "Cannot drop privileges: %s\n",
strerror (errno));
shadowtcb_gain_priv ();
free (buf);
return 1;
}
@ -766,7 +768,8 @@ static int remove_tcbdir (const char *user_name, uid_t user_id)
* We will regain them and remove the user's tcb directory afterwards.
*/
if (remove_tree (buf, false) != 0) {
perror ("remove_tree");
fprintf (stderr, "Cannot remove the content of %s: %s\n",
buf, strerror (errno));
shadowtcb_gain_priv ();
free (buf);
return 1;