[pve-devel] [PATCH v3 container] fix #4192: revamp check for systemd version

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Nov 16 13:13:34 CET 2022


Am 08/11/2022 um 18:23 schrieb Thomas Lamprecht:
> Am 15/09/2022 um 13:52 schrieb Leo Nunner:
>> Instead of iterating through several folders, it might just be easier to
>> check the objdump output of /sbin/init and getting the version from there.
>> Resolving the /sbin/init symlink happens inside the chroot, but the
>> objdump from the host system is used, as to not run any untrusted
>> executables.
>>
>> Signed-off-by: Leo Nunner <l.nunner at proxmox.com>
>> ---
>> I think putting the subroutine to resolve the /sbin/init symlink into
>> Setup.pm makes the most sense, since this isn't realy a task for the
>> plugin.
>>
>>  src/PVE/LXC/Setup.pm           | 18 +++++++++++++++++-
>>  src/PVE/LXC/Setup/Alpine.pm    |  2 +-
>>  src/PVE/LXC/Setup/Base.pm      | 34 ++++++++++++++++++----------------
>>  src/PVE/LXC/Setup/Devuan.pm    |  2 +-
>>  src/PVE/LXC/Setup/Plugin.pm    |  2 +-
>>  src/PVE/LXC/Setup/Unmanaged.pm |  2 +-
>>  6 files changed, 39 insertions(+), 21 deletions(-)
>>
>>
> 
> applied, with a small followup for a few small white-space/indentation errors,
> otherwise nice work - thanks!
> 

actually I did not yet pushed it out and rethought this, while I don't think that
the perm change is problematic w.r.t. backward compat in practice, it seems a bit
odd to argue for disk only, maybe we need to also check for CDROM, as cloudinit
*adds* a cdrom drive, so it may required that too.

But, to decide that I wanted to check our privilege docs, only to notice that 
we do not mention the cloudinit one there at all, not great...

https://pve.proxmox.com/pve-docs/chapter-pveum.html#_privileges

Please check the dev history to see if Cloudinit is deemed enough to add the CDROM
or if we should add that priv to the check too, then re-send this with updated
commit message, the whitespace fixes and a docs patch.





More information about the pve-devel mailing list