hi !
my app currently has the suid bit set to access root privilege.
in one one my Controller awakeFromNib method, i instantiate an object which needs to be with root priv. (RootController)
as stated clearly in Cocoa doc on apple website, the order in which nib objects are instantiated (thus their awakeFromNib: method is called) is random.
Here is my problem :
to be sure to have root right when RootController is inited, in *ALL* my controllers awakeFromNib method, i save the effective uid (in case this controller is the first one inited) :
effective = geteuid();
then temporary loose them :
seteuid(getuid()); //temporary loose root rights
//make some init here
then at the end of the awakeFromNib, i restitute root right :
seteuid(effective); // take root rights
just to be sure that if next awakeFromNib method is the one of RootController, i have root priv...
isn't that crazy ? is there a more common entry point to ALL nib's objects? a method called before all awakeFromNib ?
like a main()

(as i understand, main.m must not be changed in cocoa apps)
please help !