From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C25F15C221 for ; Wed, 21 Nov 2018 09:57:02 +0000 (UTC) Received: from postamt.cs.uni-dortmund.de (postamt.cs.uni-dortmund.de [129.217.4.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 265B13082B70 for ; Wed, 21 Nov 2018 09:57:00 +0000 (UTC) Received: from postweb.cs.uni-dortmund.de (postweb [129.217.4.49]) (authenticated bits=0) by postamt.cs.uni-dortmund.de (8.12.6/8.12.6) with ESMTPSA id wAL9uwSS021328 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 21 Nov 2018 10:56:58 +0100 (MET) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Wed, 21 Nov 2018 10:56:58 +0100 From: Christoph Pleger In-Reply-To: <1542382913.30686.3@mail.gathman.org> References: <20181115175718.GE5291@agk-dp.fab.redhat.com> <2a7f4f1fc1a54fd6eca7d7bc9a6249ae@cs.uni-dortmund.de> <1542382913.30686.3@mail.gathman.org> Message-ID: Subject: Re: [linux-lvm] lvcreate from a setuid-root binary Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: LVM general discussion and development Hello, On 2018-11-16 16:41, Stuart D. Gathman wrote: > It's not very elegant, but the quick and dirty solution is to use sudo probably you had not yet read that far in this thread, but I already wrote that sudo does not work when called from pam_exec. To get the stderr and stdout results of sudo, I wrote a shell script wrapper around it, and the results are (maybe because sudo itself uses PAM?): sudo: unable to change to root gid: Operation not permitted sudo: unable to initialize policy plugin Someone wrote that he assumes that pam_exec ignores the setuid-bit in the file permissions, but that is obviously wrong, as this whole thread is about why lvcreate, when being called from my setuid-root-binary, has permission problems though all three (real, effective and saved) UIDs are 0 (and of course I checked that they really are 0). Regards Christoph