From: Serge Hallyn Date: Thu, 23 Mar 2017 22:07:46 +0000 (-0500) Subject: user_busy: fix missing close of subuid file on error X-Git-Tag: 4.5~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6eae751e706e27b010c16245b394a664b81e6770;p=shadow user_busy: fix missing close of subuid file on error Closes #69 Reported-by: plenkow Signed-off-by: Serge Hallyn --- 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) {