From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E368A1396D9 for ; Tue, 14 Nov 2017 19:22:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 01426E0D1C; Tue, 14 Nov 2017 19:22:28 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D4F05E0D1C for ; Tue, 14 Nov 2017 19:22:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8036A33D3CE for ; Tue, 14 Nov 2017 19:22:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C67A797BE for ; Tue, 14 Nov 2017 19:22:24 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1510613697.971e82784cd1ad8f9a286ee792e6417359972976.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/librc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/librc/librc-daemon.c X-VCS-Directories: src/librc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 971e82784cd1ad8f9a286ee792e6417359972976 X-VCS-Branch: master Date: Tue, 14 Nov 2017 19:22:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a1c1c1e0-676f-49de-9351-4b9a0eb9b15d X-Archives-Hash: c50da9449784d38c29509ef72799f8ad commit: 971e82784cd1ad8f9a286ee792e6417359972976 Author: William Hubbs gmail com> AuthorDate: Mon Nov 13 22:54:57 2017 +0000 Commit: William Hubbs gentoo org> CommitDate: Mon Nov 13 22:54:57 2017 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=971e8278 rc_find_pids: namespace fix Ignore namespaces if there are errors reading either the pid namespace for the current process or the process we aare testing. This fixes https://github.com/openrc/openrc/issues/180. src/librc/librc-daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c index 916cc142..a40150a6 100644 --- a/src/librc/librc-daemon.c +++ b/src/librc/librc-daemon.c @@ -155,7 +155,7 @@ rc_find_pids(const char *exec, const char *const *argv, uid_t uid, pid_t pid) if (rc <= 0) proc_ns[0] = '\0'; } - if (strcmp(my_ns, proc_ns)) + if (strlen(my_ns) && strlen (proc_ns) && strcmp(my_ns, proc_ns)) continue; if (uid) { snprintf(buffer, sizeof(buffer), "/proc/%d", p);