Comment # 5 on bug 1216878 from Julio González Gil
(In reply to Thorsten Kukuk from comment #4)
> (In reply to William Brown from comment #2)
> > Reading the source it appears that this configures with utmpx, and utmp was
> > just removed from TW.
> 
> utmp and utmpx are identical with glibc, and none of them can return an
> error. The biggest design mistake of this interface.
> 
> (In reply to Julio González Gil from comment #3)
> > I am just guessing, but maybe check_users is entering line 117
> > https://github.com/nagios-plugins/nagios-plugins/blob/master/plugins/
> > check_users.c#L117 and that's what's causing -13 to be returned.
> 
> The getutxent() functions don't return an error. Which of course does not
> mean that errno could be set from some internal function calls, but it's
> meaningless.
> 
> -13 is EACCES. So maybe your process cannot read /run/systemd/sessions/ ?
> But this should be readable for everybody, else /usr/bin/who wouldn't work,
> too.

Well, even if I call /usr/lib/nagios/plugins/check_users as root, I still get
-13 as the number of users logged in, since the updated mentioned on c#1

The system is a standard openSUSE MicroOS, and the rights for
/run/systemd/sessions:

The directory itself:

> microos:~ # ls -l /run/systemd/|grep sessions
> drwxr-xr-x  2 root root  120 Nov  6 16:21 sessions

The contents:

> # ls -l /run/systemd/sessions/
> total 8
> -rw-r--r-- 1 root root 310 Nov  5 04:31 2
> prw------- 1 root root   0 Nov  5 04:31 2.ref
> -rw-r--r-- 1 root root 320 Nov  6 16:21 3
> prw------- 1 root root   0 Nov  6 16:21 3.ref


You are receiving this mail because: