Tuesday, September 12, 2017

Re: Open /dev/mem file failed when running as a root priviledge

On 12/09/17 03:58, Nan Xiao wrote:
> Hi all,
>
> Greetings from me!
>
> I want to run dmidecode (https://github.com/mirror/dmidecode) on OpenBSD
> 6.1, but executing it will report following errors:

I also need the output of dmidecode and I do the following in by boxes:

/etc/rc.securelevel:

if [[ -x /usr/local/sbin/dmidecode ]]; then
/usr/local/sbin/dmidecode > /var/run/dmidecode.boot
fi

It runs the script at an early stage, before the change of kern.securelevel
so access to /dev/mem is allowed.

G

No comments:

Post a Comment