[pmg-devel] code adjustment for PMG in /usr/share/perl5/PMG/DBTools.pm

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Apr 12 17:23:27 CEST 2019


Hi,

On 4/12/19 4:17 PM, Patrick Fogarty wrote:
> If you follow this thread...
> https://forum.proxmox.com/threads/setuid-postgres-114-failed-inappropriate-ioctl-for-device.41414/
> 
> ...you will find that I had an issue, as did others, performing upgrades/updates. I adjusted my code manually and things went back to normal. Last month you released PMG 5.2. The upgrade downloads a package that includes the original code, so the upgrade overwrites my changes, then fails the upgrade process "pmg-api --configure", after which I believe the process is in an incomplete state.
> 
> How can I assist, beyond my post in the above thread, showing the code change I made?

Either, you could sent a patch here, for this see:
https://pve.proxmox.com/wiki/Developer_Documentation
(while written for PVE, almost all is valid for PMG too)

Else you normally also can make a Bug report, which does not gets as easily forgotten as
some Forum/Mailing list thread: https://bugzilla.proxmox.com/enter_bug.cgi

But posting here may be enough this time, Stoiko, could you please take a look
at the proposed change:
https://forum.proxmox.com/threads/setuid-postgres-114-failed-inappropriate-ioctl-for-device.41414/#post-233016

Looking at perl's source code at the Perl_magic_set case for EUID (case '>')
we just see that there's no special error handling, thus the recommendation
to check $! (errno or sys_errlist[errno] depending on context) after the call.

We do that, and it seems correct, so either we need to reset it to 0 befor the
seteuid call to ensure we do not check an old value or this is correct an the
seteuid really fails in the posted case..

Patrick, can you post a bit more details about your setup, you said you run it in
PVE, inside a Virtual Machine (VM) or Container (CT)?

Because your change could just omit error checking completely, and thus not be
the "correct" solution here..

cheers,
Thomas



More information about the pmg-devel mailing list