A
A
agavrylenko2017-04-20 13:23:53
Swift
agavrylenko, 2017-04-20 13:23:53

Why is Authorization Services not working?

After entering the root user password, it gives an error:


Elevating privileges failed:
Optional(Swift.Unmanaged<__ObjC.CFError>(_value: Error Domain=CFErrorDomainLaunchd Code=2 "(null)"))

Code part:
...
let label = "org.OperatorFoundation.MoonbounceHelper"
var error: Unmanaged<CFError>?
            
//Run the privileged helper
result = SMJobBless(kSMDomainSystemLaunchd, label as CFString, authRef!, &error)
                
if !result
{
   print("Elevating privileges failed: \(error.debugDescription)")
}
...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question