Fix user busy errors at userdel
From: Bastian Blank <bastian.blank@credativ.de> Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
e01bad7d3c
commit
d2fa8c5d4b
@ -175,6 +175,9 @@ static int user_busy_processes (const char *name, uid_t uid)
|
|||||||
if (stat ("/", &sbroot) != 0) {
|
if (stat ("/", &sbroot) != 0) {
|
||||||
perror ("stat (\"/\")");
|
perror ("stat (\"/\")");
|
||||||
(void) closedir (proc);
|
(void) closedir (proc);
|
||||||
|
#ifdef ENABLE_SUBIDS
|
||||||
|
sub_uid_close();
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,6 +215,9 @@ static int user_busy_processes (const char *name, uid_t uid)
|
|||||||
|
|
||||||
if (check_status (name, tmp_d_name, uid) != 0) {
|
if (check_status (name, tmp_d_name, uid) != 0) {
|
||||||
(void) closedir (proc);
|
(void) closedir (proc);
|
||||||
|
#ifdef ENABLE_SUBIDS
|
||||||
|
sub_uid_close();
|
||||||
|
#endif
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: user %s is currently used by process %d\n"),
|
_("%s: user %s is currently used by process %d\n"),
|
||||||
Prog, name, pid);
|
Prog, name, pid);
|
||||||
@ -232,6 +238,9 @@ static int user_busy_processes (const char *name, uid_t uid)
|
|||||||
}
|
}
|
||||||
if (check_status (name, task_path+6, uid) != 0) {
|
if (check_status (name, task_path+6, uid) != 0) {
|
||||||
(void) closedir (proc);
|
(void) closedir (proc);
|
||||||
|
#ifdef ENABLE_SUBIDS
|
||||||
|
sub_uid_close();
|
||||||
|
#endif
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: user %s is currently used by process %d\n"),
|
_("%s: user %s is currently used by process %d\n"),
|
||||||
Prog, name, pid);
|
Prog, name, pid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user