* Getting the "file struct" problem.
@ 2004-08-17 20:41 authn
0 siblings, 0 replies; only message in thread
From: authn @ 2004-08-17 20:41 UTC (permalink / raw)
To: linux-kernel
Hello,
I need to have a uid of an owner of a some file. And i do like:
struct file *filep;
filep=filp_open(filename, 0, 0);
if (IS_ERR(filep))
return -EIO;
And then i just follow by filep->f_dentry->d_inode->i_uid. But this solution
doesnt work in all cases. The case where it doesnt work is a file with
permissions like /bin/su
-rws--x--x 1 root bin 35780 Jun 21 21:20 /bin/su*
Where read permission has only root. Then i got I/O error. How to solve it ?
Maybe there is some other way to get the dentry struct of a file?
--
Regards
apacz
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-17 20:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-17 20:41 Getting the "file struct" problem authn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®