Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F96626432
D33393.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D33393.diff
View Options
diff --git a/share/man/man4/mac_priority.4 b/share/man/man4/mac_priority.4
--- a/share/man/man4/mac_priority.4
+++ b/share/man/man4/mac_priority.4
@@ -21,7 +21,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd December 7, 2021
+.Dd December 14, 2021
.Dt MAC_PRIORITY 4
.Os
.Sh NAME
@@ -79,13 +79,16 @@
.Xr rtprio 2
system calls.
.Ss Privileges Granted
-The kernel privileges granted to any process running
-with the corresponding group gid is:
-.Bl -tag -width ".Dv PRIV_SCHED_RTPRIO" -offset indent
+The realtime policy grants the following kernel privileges to any process
+running with the realtime group id:
+.Bl -inset -offset indent -compact
.It Dv PRIV_SCHED_RTPRIO
-If it is a member of the realtime group.
+.It Dv PRIV_SCHED_SETPOLICY
+.El
+.Pp
+The kernel privilege granted by the idletime policy is:
+.Bl -inset -offset indent -compact
.It Dv PRIV_SCHED_IDPRIO
-If it is a member of the idletime group.
.El
.Ss Runtime Configuration
The following
diff --git a/sys/security/mac_priority/mac_priority.c b/sys/security/mac_priority/mac_priority.c
--- a/sys/security/mac_priority/mac_priority.c
+++ b/sys/security/mac_priority/mac_priority.c
@@ -64,8 +64,8 @@
static int
priority_priv_grant(struct ucred *cred, int priv)
{
- if (priv == PRIV_SCHED_RTPRIO && realtime_enabled &&
- groupmember(realtime_gid, cred))
+ if ((priv == PRIV_SCHED_RTPRIO || priv == PRIV_SCHED_SETPOLICY) &&
+ realtime_enabled && groupmember(realtime_gid, cred))
return (0);
if (priv == PRIV_SCHED_IDPRIO && idletime_enabled &&
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 26, 7:23 PM (22 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12856826
Default Alt Text
D33393.diff (1 KB)
Attached To
Mode
D33393: Thread creation privilege for realtime group.
Attached
Detach File
Event Timeline
Log In to Comment