Skip to contentSkip to conversation

lvcreate from a setuid-root binary

linux-lvm matthew patton 2 participants 2 messages Nov 19, 2018 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 1 line

program calls getpwuid() with the real user id of the calling user

maybe I missed a critical post explaining why it has to be, but that's a job for a trivial sudo specification line.

I can't think of any reason why sudo is not the answer to your problem, or frankly isn't always the answer.

#2 lore raw

Hello,

Quoted 7 lines · matthew patton
Quoted 1 line

program calls getpwuid() with the real user id of the calling user

maybe I missed a critical post explaining why it has to be, but that's a job for a trivial sudo specification line.

I can't think of any reason why sudo is not the answer to your problem, or frankly isn't always the answer.

I have already tried sudo before writing my own setuid-root-program, by calling it directly from pam_exec and by letting pam_exec call another program first that calls sudo. Either case failed, even with simple tests like letting sudo run /bin/ls (and of course I checked before that the same user could use sudo from the command line).

Regards
Christoph