From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id C7A3C5A026F for ; Mon, 26 Jun 2023 09:23:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687764179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2Umn5m96hGUdDHP4dZ65/CW7StPt6lCZ/BNUMaVeRHU=; b=GzplGUaoeMoX7b5wALwNExejee5UhWNvacxRlm/As1ks7joWv11tewuwkVcZgjd8+9jw0c qRPrtkP2+MYJAuZgSU83vDt3syVdDtZepIKBGjJuHwSS61MwhV0Y76L8pjqzJMbYH3q7+A n8nIkvHvDu+L7rwKN2lP5PjxxGRlhOY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-225-TdGemvHONxOJXecxEV-SIA-1; Mon, 26 Jun 2023 03:22:57 -0400 X-MC-Unique: TdGemvHONxOJXecxEV-SIA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EB53180027F for ; Mon, 26 Jun 2023 07:22:56 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3FE16C00049; Mon, 26 Jun 2023 07:22:56 +0000 (UTC) Date: Mon, 26 Jun 2023 09:22:49 +0200 From: Stefano Brivio To: Paul Holzinger Subject: Re: [PATCH] isolation: keep CAP_SYS_PTRACE when required Message-ID: <20230626092249.7760efaa@elisabeth> In-Reply-To: <20230623082531.25947-2-pholzing@redhat.com> References: <20230623082531.25947-2-pholzing@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: CJ255PCT2S3P77YZS5D3C2634TRJVCLM X-Message-ID-Hash: CJ255PCT2S3P77YZS5D3C2634TRJVCLM X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 23 Jun 2023 10:25:32 +0200 Paul Holzinger wrote: > When pasta is started from an existing userns and tries to join the > netns from another process it fails to open /proc/$pid/ns/net due the > missing CAP_SYS_PTRACE capability in the --netns-only case. > > A simple reproducer for this. > First create a userns: > $ unshare -r > > Then create a new netns inside it and try to join that netns with pasta. > $ unshare -n sleep inf & > $ pasta --config-net --netns /proc/$!/ns/net > > Signed-off-by: Paul Holzinger Applied. -- Stefano