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.nun...@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!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to