]> granicus.if.org Git - shadow/commitdiff
user_busy: fix missing close of subuid file on error
authorSerge Hallyn <serge@hallyn.com>
Thu, 23 Mar 2017 22:07:46 +0000 (17:07 -0500)
committerSerge Hallyn <serge@hallyn.com>
Thu, 23 Mar 2017 22:07:46 +0000 (17:07 -0500)
Closes #69

Reported-by: plenkow
Signed-off-by: Serge Hallyn <serge@hallyn.com>
libmisc/user_busy.c

index 0db32c394315f0a233059c096edfec8491c5b8a8..b0867568c0961f7cb7ae7b99a9f3227d57d5e65f 100644 (file)
@@ -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) {