On Wed, Apr 13, 2011 at 2:18 PM, Jonathan Stuart <[email protected]> wrote:
> Hi Matthew,
>
> Thanks, I'll give it a shot.. for some reason f_cred off the vnode is 
> returning all zeros for uid/gid, and
> pulling the VTOI does the same thing (using getvnode()).. do these not get 
> initialized properly?

f_cred is a field in struct file, not struct vnode, so I'm confused as
to what you're referring to.

Cheers,
matthew

> -----Original Message-----
> From: Matthew Fleming [mailto:[email protected]]
> Sent: Wednesday, April 13, 2011 1:48 PM
> To: Jonathan Stuart
> Cc: [email protected]
> Subject: Re: Getting vnode + credentials of a file from a struct mount and 
> UFS inode #
>
> On Wed, Apr 13, 2011 at 12:31 PM, Jonathan Stuart <[email protected]> 
> wrote:
>> Hi,
>>
>> I'd like to pull the owner/group ownership from a file (the information I 
>> have about the file is it's UFS inode # and it's struct mount *).  I'm sure 
>> there's got to be a function that would return a vnode and I could VTOI() to 
>> get this information from the inode.. but I'm having a brainfreeze.
>>
>
> VFS_VGET(mp, ino, flags, &vp) is probably what you want.
>
> Cheers,
> matthew
>
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to