Re: Passing per-process information between KAUTH calls
Re: Passing per-process information between KAUTH calls
- Subject: Re: Passing per-process information between KAUTH calls
- From: Slava Imameyev <email@hidden>
- Date: Fri, 24 Jul 2015 00:16:48 +1000
Hi,
Just maintain a structure that maps PID to the "magic data"( a list, a hash table etc ), fill it inĀ KAUTH_FILEOP_EXEC , look for it in VNODE KAUTH, the tricky part is removing data for PID as there is no notification on process termination, a solution would be to run a kernel thread that wake-ups on timeout ( e.g. 20 secs ) and traverses all entries calling proc_find( entry->PID ) if null is returned the entry is removed from the structure, if there is conflict on inserting a new entry because an entry for PID already exists then the existing entry is removed and replaced by the new entry. Call proc_rele for each non null value returned by proc_find .
_______________________________________________
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