我们有一个 launchd 守护进程,它从钥匙串内部存储用户名和密码。当我们尝试添加(使用 SecKeychainAddGenericPassword)删除(使用 SecKeychainFindGenericPassword 和 SecKeychainItemDelete)但我们无法获取使用 SecKeychainFindGenericPassword 设置的密码时,它可以工作。函数返回
-25293 errSecAuthFailed : The user name or passphrase you entered is not correct.
守护进程已签名并以 root 身份运行。密码保存在系统钥匙串中。
当我们使用 sudo 从终端运行应用程序时,它可以工作。它能够访问密码。但是当它在launchd中运行时,它不起作用。有什么东西阻止我们在 launchd 中使用钥匙串吗?
谢谢,马克-艾蒂安