I have MacBook Pro (2017) with macOS High Sierra (10.13.6). I have SIP and amfi disabled. I want to enable a part / the majority of SIP (e.g. csrutil enable --without fs
) without having to reboot into the recovery partition and run the csrutil
command there.
I tried to modify the nvram variable csr-active-config
using nvram csr-active-config="w%01%00%00"
, but it returned an error: nvram: Error setting variable - 'csr-active-config': (iokit/common) general error
. Modifying the variable name gave successful result:
# nvram ccsr-active-config="w%01%00%00"
# nvram ccsr-active-config
ccsr-active-config w%01%00%00
Which indicated that there is still something protecting the SIP configuration even when SIP is completely disabled:
# csrutil status
System Integrity Protection status: disabled.
Note that I can change boot-args
variable with nvram
because I disabled SIP:
# nvram boot-args="amfi_get_out_of_my_way=0x1"
# nvram boot-args
boot-args amfi_get_out_of_my_way=0x1
There is only one relevant log message while setting SIP nvram:
ERROR 09:47:22.096544 +0800 kernel Sandbox: nvram(92857) System Policy: deny(1) nvram-set csr-active-config
Is it possible to change SIP configuration to become stricter (not less strict) booting into Recovery OS?
Preferably, the solution can enforce SIP configuration as soon as it's changed. The following logs in Console when I do chmod -x /bin/ls
make me think it's possible:
INFO 11:07:38.852242 +0800 sandboxd Symbolicator for chmod[94599] is NULL.
ERROR 11:07:38.862934 +0800 sandboxd Failed to produce a full report for: chmod[94599].
ERROR 11:07:38.863015 +0800 sandboxd Sandbox: chmod(94599) System Policy: allow file-write-mode /bin/ls