Hi there,
We are using systemextension for network and now we try to turn on SIP and install/uninstall systemextension.
Current status is that: with SIP on, systemextension can be installed correctly, but cannot be uninstalled.
The install/uninstall code is like below. Calling installSystemExtension()
from the entrance of ProxyManger.swift:loadProxyManager
returns success:
activation request succeeded
And systemextension list
common shows the newly installed sysExt.
But calling uninstallSystemExtension()
from the entrance of ProxyManger.swift:remove()
results in error:
deactivation request failed authorization: unauthorized
And systemextension list
common shows no difference.
@available(macOS 11.0, *)
private func installSystemExtension() {
log.info("[LogApp] will submit activation request")
let request = OSSystemExtensionRequest.activationRequest(
forExtensionWithIdentifier: "com.familyzone.macappproxy.fzmacappproxy",
queue: .main
)
request.delegate = self
OSSystemExtensionManager.shared.submitRequest(request)
log.info("[LogApp] did submit activation request")
}
// MARK: - Unload System Extension
@available(macOS 11.0, *)
public func uninstallSystemExtension() {
log.info("[LogApp] will submit deactivation request")
let request = OSSystemExtensionRequest.deactivationRequest(
forExtensionWithIdentifier: "com.familyzone.macappproxy.fzmacappproxy",
queue: .main
)
request.delegate = self
OSSystemExtensionManager.shared.submitRequest(request)
log.info("[LogApp] did submit deactivation request")
}
Thanks in advance for any suggestion.