OSSystemExtensionReplacementActionReplace

Hello community


so when my application (containing an Endpoint Security client system extension) launches for the first time,

the user is asked to allow the extension, once done, the system wil load and run my extension communicating

with my application nicely.


When the application is restarted (let's say as result of a kill command) it will run at startup through the same

activation request, which will of cource not prompt for any user interaction anymore and then the extension

replacement callback is invoked (I guess because an extension is already active and running) where I reply with OSSystemExtensionReplacementActionReplace since there is only one version of the extension right now.


At this point the runnig extension receives a SIG_TERM (15) and terminates but NOT reloaded!!!


So for example after a reboot, the system extension starts running early, then the applciation is launched and

is doing the things mentioned above resulting in a non-running extension until the app then is restarted again.


Do I miss something here? Is tehre an API to find out if a extension is already runnign without trying to activate it?


Frank Fenn

Sophos Inc.

Here’s some choice excerpts from the doc comments in

<SystemExtensions/SystemExtensions.h>
:
It is expected that an application create and submit an activation
request whenever an extension should be active.

If the extension is already active then the request will succeed in
short order without significant delay or user interaction.
Activating an new version of an already active extension will prompt
the delegate to resolve the conflict before proceeding.

This method is invoked if the `CFBundleVersion` or
`CFBundleShortVersionString` identifiers of the target and existing
extension differ.

If the local system has System Extension developer mode enabled,
this callback will always fire when an existing extension is found,
regardless of version identifiers.

In short, I suspect you have developer mode on (-:

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
OSSystemExtensionReplacementActionReplace
 
 
Q