[virt-tools-list] virt-what -- why root?
Ryan Erwin
ryan at h4v.com
Wed Jun 26 13:42:59 UTC 2019
Rich-
Thanks for your feedback.
That makes sense! Fortunate that /sys/firmware is now available!
Also, I think the Docker detection is off... Right now checking for
`/.dockerinit` but this file often does not exist.
Previously Docker was based on lxc, but now that it's seperate, you can
check /proc/1/cgroup like you do for lxc.
grep -Eq '/(lxc|docker)/[[:xdigit:]]{64}' /proc/1/cgroup
BTW, would be cool to move virt-detect to github :-)
Thank you for your time!
Ryan
On Wed, Jun 26, 2019 at 6:46 PM Richard W.M. Jones <rjones at redhat.com>
wrote:
> On Wed, Jun 26, 2019 at 06:05:57PM +0700, Ryan Erwin wrote:
> > Hello,
> >
> > I was using `virt-what` and noticed that you require root before running
> > `/usr/lib/virt-what/virt-what-cpuid-helper` however I also noticed that
> > directly running the cpuid-helper binary without root it still worked
> fine
> > for me on several machines when I directly run the helper binary.
> >
> > What circumstances have you found where cpuid-helper actually does
> requrie
> > root? Is it SELinux related?
>
> virt-what could be run as non-root. The original reason for requiring
> root was so we could run dmidecode (nothing to do with cpuid).
> However that information is now available in /sys/firmware and other
> places (on Linux at least). Since no one has done the work, virt-what
> still requires root though.
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat
> http://people.redhat.com/~rjones
> Read my programming and virtualization blog: http://rwmj.wordpress.com
> virt-builder quickly builds VMs from scratch
> http://libguestfs.org/virt-builder.1.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20190626/d7398752/attachment.htm>
More information about the virt-tools-list
mailing list