我们有一个launchd守护程序,用于存储钥匙串内的用户名和密码.当我们尝试添加(使用SecKeychainAddGenericPassword)删除(使用SecKeychainFindGenericPassword和SecKeychainItemDelete)但我们无法获取使用SecKeychainFindGenericPassword设置的密码时,它会起作用.该函数返回
-25293 errSecAuthFailed : The user name or passphrase you entered is not correct.
Run Code Online (Sandbox Code Playgroud)
守护程序以root身份签名并运行.密码保存在系统钥匙串中.
当我们从带有sudo的终端运行应用程序时,它可以工作.它可以访问密码.但是当它在launchd中运行时,它不起作用.有没有什么阻止我们在launchd中使用钥匙串?
谢谢,Marc-Etienne