From dd175b11d5a240bf9ddacedbdd4c81603e13de06 Mon Sep 17 00:00:00 2001
From: Ed Maste <emaste@FreeBSD.org>
Date: Fri, 1 May 2020 14:30:59 +0000
Subject: [PATCH] correct procctl(PROC_PROTMAX_STATUS _NOFORCE return

Previously procctl(PROC_PROTMAX_STATUS, ... used the PROC_ASLR_NOFORCE
macro for the "system-wide configured policy" status, instead of
PROC_PROTMAX_NOFORCE.

They both have a value of 3, so no functional change.

Sponsored by:	The FreeBSD Foundation
---
 sys/kern/kern_procctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c
index ed9af45fa5e6..b6f6f1b772b2 100644
--- a/sys/kern/kern_procctl.c
+++ b/sys/kern/kern_procctl.c
@@ -449,7 +449,7 @@ protmax_status(struct thread *td, struct proc *p, int *data)
 
 	switch (p->p_flag2 & (P2_PROTMAX_ENABLE | P2_PROTMAX_DISABLE)) {
 	case 0:
-		d = PROC_ASLR_NOFORCE;
+		d = PROC_PROTMAX_NOFORCE;
 		break;
 	case P2_PROTMAX_ENABLE:
 		d = PROC_PROTMAX_FORCE_ENABLE;