forked from pool/shadow
b4a2128e54
OBS-URL: https://build.opensuse.org/request/show/398913 OBS-URL: https://build.opensuse.org/package/show/Base:System/shadow?expand=0&rev=21
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From 546e2ae44955510b06a922647796ec54744f10ce Mon Sep 17 00:00:00 2001
|
|
From: Bastian Blank <bastian.blank@credativ.de>
|
|
Date: Tue, 17 Nov 2015 10:52:24 -0600
|
|
Subject: [PATCH 17/17] Fix user busy errors at userdel
|
|
|
|
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
|
|
---
|
|
libmisc/user_busy.c | 9 +++++++++
|
|
1 file changed, 9 insertions(+)
|
|
|
|
--- libmisc/user_busy.c
|
|
+++ libmisc/user_busy.c
|
|
@@ -175,6 +175,9 @@ static int user_busy_processes (const char *name, uid_t uid)
|
|
if (stat ("/", &sbroot) != 0) {
|
|
perror ("stat (\"/\")");
|
|
(void) closedir (proc);
|
|
+#ifdef ENABLE_SUBIDS
|
|
+ sub_uid_close();
|
|
+#endif
|
|
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) {
|
|
(void) closedir (proc);
|
|
+#ifdef ENABLE_SUBIDS
|
|
+ sub_uid_close();
|
|
+#endif
|
|
fprintf (stderr,
|
|
_("%s: user %s is currently used by process %d\n"),
|
|
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) {
|
|
(void) closedir (proc);
|
|
+#ifdef ENABLE_SUBIDS
|
|
+ sub_uid_close();
|
|
+#endif
|
|
fprintf (stderr,
|
|
_("%s: user %s is currently used by process %d\n"),
|
|
Prog, name, pid);
|