Re: Another approach to root user?
Re: Another approach to root user?
- Subject: Re: Another approach to root user?
- From: Jeff Moore <email@hidden>
- Date: Tue, 28 Mar 2006 15:42:50 -0800
On Mar 28, 2006, at 1:59 PM, Ethan Funk wrote:
That kind of session (which is what you get when you run your
daemon as root) is immune to the HAL's tracking of the currently
active user login stuff.
OK, the only problem is, the server won't run as any user but root
in as non-console session.
That seems pretty weird. I thought you just needed to add the
"UserName" key to your launchd plist to do that.
Below I have listed the chunk of code where I think it fails with
the following console message: Mar 28 14:36:21 Dusk ./arserver:
kCGErrorRangeCheck : Window Server communications from outside of
session allowed for root and console user only
The code never gets to the sprintf and write lines, which send a
message telling me where it's at for debuging. It does send
beduging message just prior to this section. Any thoughts?
Ethan...
desc.componentType = kAudioUnitType_Mixer;
desc.componentSubType = kAudioUnitSubType_MatrixMixer;
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
if(comp = FindNextComponent(0, &desc)){
result = OpenAComponent(comp, &mixer);
if (result)
return -1;
}else{
return -1;
}
sprintf(command, "found MatrixMixer\n", i);
write(statsock[0], command, strlen(command));
The culprit is likely to be the call to FindNextComponent(). My guess
is that it is calling the register function of some totally unrelated
component as part of setting up the table of what components are
installed. Likely, it is this component that is trying to do
something that connects to the Window server. I imagine that you
could confirm or deny this by stepping over the lines of code in gdb.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden