Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distributed objects: connecting to a process running as root?



If your daemon does not need any additional privileges which come as a result of running as root, than you can actually "downgrade" your daemon to ANY user using setuid() function (man setuid for more info). This probably will be good idea, because you should not have pieces running as root if you do not want/need extra privileges.

Alternatively, if you are can use DO which employes "normal" (TCP/IP) sockets (I believe I read somewhere that it is possible), than most likely you will not have any difficulties connecting from user process to root server - because TCP/IP sockets do not have concept of "user".

On Apr 29, 2006, at 1:59 PM, James Bucanek wrote:

I haven't found this documented anywhere. I remember it being discussed on the list, but never any definitive answer.

Can an application connect to a daemon using distributed objects via a named port if the application is running as the user and the daemon is running as root? I remember someone commenting that a user-level process can't connect with a root process using DO for "security reasons."

I'm writing an application that needs to communicate with a centralized scheduling/communications server. This must be run as a daemon since it needs to run all of the time, which means that it has to run as root since StartupItems and launchd have no concept of a "user level" daemon. If I can't communicate with the daemon using DO, I've got major design headaches ahead...

--
James Bucanek
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Distributed objects: connecting to a process running as root? (From: James Bucanek <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.