2002-04-10 23:11:41

by Niki Rahimi

[permalink] [raw]
Subject: Getting file attributes

Hi All,
I have been working on finding a system call that will retrieve the
current file's attributes, especially the file owner and permissions. have
seen VOP_GETATTR() in OpenBSD, which returns such information in a
structure. Is there anything equivalent to this on the Linux kernel?
I've been searching through the kernel code for something equivalent
but my paths have lead me nowhere.

Thanks,
Niki

Niki A. Rahimi
LTC Security Development
[email protected]


2002-04-10 23:26:07

by Chris Wright

[permalink] [raw]
Subject: Re: Getting file attributes

* Niki Rahimi ([email protected]) wrote:
> Hi All,
> I have been working on finding a system call that will retrieve the
> current file's attributes, especially the file owner and permissions. have
> seen VOP_GETATTR() in OpenBSD, which returns such information in a
> structure. Is there anything equivalent to this on the Linux kernel?
> I've been searching through the kernel code for something equivalent
> but my paths have lead me nowhere.

does stat(2) have what you're lookig for??

cheers,
-chris

2002-04-11 16:36:55

by Niki Rahimi

[permalink] [raw]
Subject: Re: Getting file attributes

Kurt Wall wrote:
>fstat(2), perchance?

Chris Wright wrote:
>does stat(2) have what you're lookig for??

Brilliant. Thanks much guys!!

Niki A. Rahimi
LTC Security Development
[email protected]