Re: Addressbook framework without a regular user
Re: Addressbook framework without a regular user
- Subject: Re: Addressbook framework without a regular user
- From: Vince DeMarco <email@hidden>
- Date: Wed, 8 Jan 2003 02:03:19 -0800
You could get it to work up to a point,
So basically you become the user you are interested in then called
[ABAddressBook sharedAddressBook], but the problem is when you switch
users (using seteuid() etc..), the old cached address book will still
be saved.
The first called to sharedAddressBook, initializes everything in the
library and sets it up.
If you really wanted to do this, the easiest way would be to start
another process that communicates back to the daemon, and this
secondary process accesses the address book.
Sorry.
vince
On Sunday, January 5, 2003, at 09:59 AM, Karl Kuehn wrote:
I am trying to write a small program that I want to run as a daemon
process that uses the Addressbook.framework. When I run it as a
general test (from within PB.. so a regular, logged-in user) things
run fine. I can get the shared addressbook and view users. But if I
try and run it under daemon users (say... 'nobody') I get an error
when I try and '[ABAddressBook sharedAddressBook]'. I am not trying to
touch the 'me' object at all, but I think that the framework breaks
when it tries to set that up for me. I can setuid to get around the
problem for now, but I don't like that as a solution.
For the record, the errors are:
ABAddressBook could not aquireLock: writeLock error No such file or
directory: 'Framework/AddressBook/ABAddressBook.m'
line: 1396
-[ABAddressBook _initDefaultContactManager] Can't _acquireLock
Framework/AddressBook/ABAddressBook.m:1403
Anyone got any ideas?
Karl Kuehn
email@hidden
PS.. I don't know if my setuid solution works when I am not logged in
completely (as in have the windowserver).
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.