[Bug 273029] idpirio action contrary to documentation.

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 09 Aug 2023 17:32:52 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273029

            Bug ID: 273029
           Summary: idpirio action contrary to documentation.
           Product: Base System
           Version: 13.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: dgilbert@eicat.ca

so, man idprio says, in part:

     Only root is allowed to set realtime or idle priority for a process.
     Exceptional privileges can be granted through the mac_priority(4) policy
     and the realtime and idletime user groups.  The sysctl(8) variable
     security.bsd.unprivileged_idprio is deprecated.  If set to non-zero, it
     lets any user modify the idle priority of processes they own.

to paraphrase, if I'm in group idletime, then I can use idprio to idle priority
my processes.  BUT:

[1:8:308]dgilbert@ump:~> id
uid=101(dgilbert) gid=101(dgilbert)
groups=101(dgilbert),0(wheel),5(operator),48(idletime)
[1:9:309]dgilbert@ump:~> grep idle /etc/group
idletime:*:48:dgilbert
[1:10:310]dgilbert@ump:~> idprio 5 echo
idprio: RTP_SET: Operation not permitted

I marked this as kernel (rather than bin) because the error seems to imply the
kernel is refusing, not idprio, but I could be wrong there.

-- 
You are receiving this mail because:
You are the assignee for the bug.