[linux-lvm] lvcreate from a setuid-root binary
Vladislav Bogdanov
bubble at hoster-ok.com
Wed Nov 21 09:58:50 UTC 2018
On 21.11.2018 12:56, Christoph Pleger wrote:
> 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
May be silly question: Do you have selinux or equivalent enabled?
>
> 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
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
More information about the linux-lvm
mailing list