Re: NKE: priv and non-priv access
Re: NKE: priv and non-priv access
- Subject: Re: NKE: priv and non-priv access
- From: Arno Hautala <email@hidden>
- Date: Fri, 28 Oct 2005 20:11:51 -0400
Sheesh, thanks for the quick response.
On 28 Oct 2005, at 19:37, Josh Graessley wrote:
1) Register two kernel controls, one that requires root and one
that doesn't.
Mmm, I was hoping to avoid that. Er, by two controls do you mean
within the same NKE or register two NKEs? If it's within the same
NKE (I'm just getting started with the whole NKE thing so bear with
me) how do I assign different functions to different priv levels? Or
would I just check what the passed in control reference refers to?
2) Check for root before performing an operation that requires root.
proc_t current_p = proc_self();
int result;
result = proc_suser(current_p);
proc_rele(current_p);
if (result != 0) {
return EPERM;
}
This check is in the userland app, not the NKE?
Would I be able to get the id of the user running the userland app
from the NKE? That would be more in line with my goal.
I'd rather not have to limit stat collection to a privileged process.
Thanks again.
-- --
arno s. hautala /-\ email@hidden
-- --
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden