I've got a CoreFoundation-tool that accesses the keychain of the currently logged-in user. It works fine when run with root-permissions (using seteuid before accessing) from Terminal.
However, when the same binary is executed at system start (StartupItems-folder), it can't access the keychain, even after somebody logged in (-> error 1). I tried to fork a new process, but it produced the same result.
Anybody here got an idea what I could do?