From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id AB812138E66 for ; Mon, 24 Feb 2014 07:50:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3CBEFE0B96; Mon, 24 Feb 2014 07:50:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C5746E0B87 for ; Mon, 24 Feb 2014 07:50:23 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F0BCA33F8D5 for ; Mon, 24 Feb 2014 07:50:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 1BB2A18875 for ; Mon, 24 Feb 2014 07:50:21 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1393228189.509986231a7dd61984223e951c63d2d01a0b861d.vapier@gentoo> Subject: [gentoo-commits] proj/releng:master commit in: tools/ X-VCS-Repository: proj/releng X-VCS-Files: tools/catalyst-auto X-VCS-Directories: tools/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 509986231a7dd61984223e951c63d2d01a0b861d X-VCS-Branch: master Date: Mon, 24 Feb 2014 07:50:21 +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: f5ef44ae-d2ef-4be9-9b87-b671f39eae98 X-Archives-Hash: d0cb45644a8ef2af8557069b4f785028 commit: 509986231a7dd61984223e951c63d2d01a0b861d Author: Mike Frysinger gentoo org> AuthorDate: Wed Jan 22 05:58:29 2014 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Feb 24 07:49:49 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=50998623 catalyst-auto: run in a mount namespace This way if things crash, we don't leak mounts that need cleaning up. --- tools/catalyst-auto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/catalyst-auto b/tools/catalyst-auto index c4c6aa6..c4796a1 100755 --- a/tools/catalyst-auto +++ b/tools/catalyst-auto @@ -1,5 +1,13 @@ #!/bin/bash +# First let's get our own mount namespace to avoid leaking crap. +if [[ -z ${UNSHARE} ]] ; then + if type -P unshare >&/dev/null ; then + UNSHARE=true exec unshare -m -- "$0" "$@" + fi +fi +unset UNSHARE + PID=$$ config_file=