Re: Addressbook framework without a regular user
Re: Addressbook framework without a regular user
- Subject: Re: Addressbook framework without a regular user
- From: Barry Books <email@hidden>
- Date: Mon, 6 Jan 2003 20:39:10 -0600
I don't think it's possible to run without a user context, but should
be able to start the daemon with
su - user -c program
and get the context of whatever user you like. If you need the address
book of any user on the system that would be more complicated but
possible. The simplest way would be build a deamon that forks then
setuid to whatever user you like to handle the request. Not really
that much different than a setuid program but at least you don't have
setuid programs laying around.
barry
On Sunday, January 5, 2003, at 11: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.