From 6eae751e706e27b010c16245b394a664b81e6770 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Thu, 23 Mar 2017 17:07:46 -0500 Subject: [PATCH] user_busy: fix missing close of subuid file on error Closes #69 Reported-by: plenkow Signed-off-by: Serge Hallyn --- libmisc/user_busy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmisc/user_busy.c b/libmisc/user_busy.c index 0db32c39..b0867568 100644 --- a/libmisc/user_busy.c +++ b/libmisc/user_busy.c @@ -170,6 +170,9 @@ static int user_busy_processes (const char *name, uid_t uid) proc = opendir ("/proc"); if (proc == NULL) { perror ("opendir /proc"); +#ifdef ENABLE_SUBIDS + sub_uid_close(); +#endif return 0; } if (stat ("/", &sbroot) != 0) {