Exemplo n.º 1
0
bool Policy::unregisterPolicy() {
	if (!(policyConf.mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK)) {
		SYSLOG("policy @ this policy is not allowed to be unregistered");
	}

	return mac_policy_unregister(policyHandle) == KERN_SUCCESS;
}
Exemplo n.º 2
0
void AppleALC::stop(IOService *provider) {
	if (mode == StartMode::Policy && policyHandle) {
		mac_policy_unregister(policyHandle);
	}
	
	enabler.deinit();
	IOService::stop(provider);
	
	DBGLOG("init @ stopped");
}
int
    collector_1_deinitialize
    (

    )
{
#ifndef _DISABLE_COLLECTOR_1
    rpal_mutex_lock( g_collector_1_mutex );
#ifdef _USE_KAUTH
    kauth_unlisten_scope( g_listener );
#else
    mac_policy_unregister( g_policy );
#endif
    rpal_mutex_free( g_collector_1_mutex );
#endif
    return 1;
}
kern_return_t DldMacPolicy::unRegisterMacPolicy()
{
    kern_return_t  err = ENOENT;
    
    assert( preemption_enabled() );
    
    if( this->registered ){
        
        err = mac_policy_unregister( this->handlep );
        this->registered = !( KERN_SUCCESS == err );
        
        assert( KERN_SUCCESS == err );
        if( KERN_SUCCESS != err ){
            
            DBG_PRINT_ERROR(("unRegisterMacPolicy failed with err = %d\n", err));
        }
    }
    
    return err;
}
Exemplo n.º 5
0
static void unsubscribe() {
  if (handle) {
    mac_policy_unregister(handle);
    handle = 0;
  }
}
Exemplo n.º 6
0
static kern_return_t 
kmod_stop(kmod_info_t *ki, void *data) 
{
    
    return mac_policy_unregister(&count_policy_conf);
}
// stop the fun :-(
kern_return_t rexthewonderdog_stop (kmod_info_t * ki, void * d) {
	return mac_policy_unregister(mac_rex_handle);
}
kern_return_t rex_versus_the_romans_stop(kmod_info_t *ki, void *d)
{
    stop_kauth();
    return mac_policy_unregister(rex_handle);
}