Re: Accessing the mode of a directory with its vnode and other questions
Re: Accessing the mode of a directory with its vnode and other questions
- Subject: Re: Accessing the mode of a directory with its vnode and other questions
- From: "John D." <email@hidden>
- Date: Sat, 22 Mar 2008 01:08:02 +0100
On Sat, Mar 22, 2008 at 12:27 AM, Rick Macklem <email@hidden> wrote:
> goes something like this... (untested, of course:-)
> struct vnode_attr vattr;
>
> VATTR_INIT(&vattr);
> VATTR_WANTED(&vattr, va_mode);
> err = vnode_getattr(vp, &vattr, vfs_context_current());
Thanks. I figured it out also after reading the auditing related
sources. I had some issues before I found out that you can couple
multiple VATTR_WANTED calls :)
> You'll find Darwin quite different than FreeBSD w.r.t. this. The doc is
> use is the kernel sources (xnu-1228.tar.gz found under "Get the Source"
> on http://developer.apple.com). Look in xnu-1228/bsd/nfs/nfs_serv.c for
> an example.
Right on, thanks again!
>
> Don't know the answer to the others, although you can probably figure
> out what crypto functions are in the kernel by looking ay the above
> sources. (If you use anything that isn't a kpi in your kext, you'll be
> walking on thin ice like I do. I figure that's ok for an open source
> project, but probably unwize for something that might be shipped to
> customers. Others might elaborate on this.)
The BSD subsystem provides AES and SHA2 related functionality
apparently, so I will stick to that instead of porting my existing
crypto to kernel-land.
I'm not sure on what's the best policy here, if I should start a new
thread for some kauth related questions. I'm trying to implement a
vnode scope listener that catches binary executions but so far I've
only got a fileop scope listener to catch those properly. Maybe I'm
simply doing something wrong. I was receiving NULL dvp (parent vnode)
structures, which is impossible if we are executing a binary (ie. it
must have a parent vnode, be it the root directory or the immediately
top directory where the binary image / mach-o object is located).
Cheers,
-- John.
_______________________________________________
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