Re: NKE: priv and non-priv access
Re: NKE: priv and non-priv access
- Subject: Re: NKE: priv and non-priv access
- From: Josh Graessley <email@hidden>
- Date: Fri, 28 Oct 2005 16:37:32 -0700
You have two options:
1) Register two kernel controls, one that requires root and one that
doesn't.
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;
}
-josh
On Oct 28, 2005, at 4:29 PM, Arno Hautala wrote:
Hei,
From some previous threads I know that I can set NKE communication
to be privileged or not with the following:
AFctl_reg.ctl_flags = CTL_FLAG_PRIVILEGED;
AFctl_reg.ctl_flags = 0;
Well, from the tcplognke example it's done with a "kern_ctl_reg"
struct, but the same result.
Is it possible to designate multiple communication paths within the
same NKE as both priv and non?
Basically, I'll need a configuration mechanism to be privileged
while stat collection is not privileged. Can multiple control
structures be defined and registered to achieve this end?
Are there other methods to achieving this goal?
Thanks
-- --
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:
40apple.com
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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