macos kernel and etcetra rejoice! sysctl works on macos!

im a little afraid to set variables, but a printout of sysctl -a (you can even pass it to grep/sed/awk using pipes! and output it to a file using the > directive!) but yeah, if your developing a kernel module for macos/xnu this has critical information, such as ranges of values in the kernel, or security features, or even values set by the kernel

one that caught my eye is "security.mac.lockdown_mode_state: 0" meaning with by setting a variable you might be able to turn down a security feature lockmode, another i found is "security.mac.asp.policy.gatekeeper_enabled: 1" which means you can use a script or even a command to disable gatekeeper

i havent personally experimented with setting variables using sysctl, but yeah, sure does echo lol

but yeah theres about.. 1709 variables on macos26 beta 3, as counted by the 'wc' program in the macos terminal

but this is good news for macos kernel programmers, where you can read and average values set by the kernel to do things such as optimize kernel data (you can do some algorithmic timing with the variables set), and its fun experieming with the kernel values in macos

good luck!
unidef