• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Another approach to root user?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Another approach to root user?
      • From: Ethan Funk <email@hidden>
References: 
 >Another approach to root user? (From: Ethan Funk <email@hidden>)
 >Re: Another approach to root user? (From: Jeff Moore <email@hidden>)
 >Re: Another approach to root user? (From: Ethan Funk <email@hidden>)
 >Re: Another approach to root user? (From: Jeff Moore <email@hidden>)
 >Re: Another approach to root user? (From: Ethan Funk <email@hidden>)
 >Re: Another approach to root user? (From: Jeff Moore <email@hidden>)
 >Re: Another approach to root user? (From: Ethan Funk <email@hidden>)

  • Prev by Date: Re: crashing in calls to AudioConverter on 10.3.9
  • Next by Date: Controlling input volume while recording
  • Previous by thread: Re: Another approach to root user?
  • Next by thread: Re: Another approach to root user?
  • Index(es):
    • Date
    • Thread