lkml.org 
[lkml]   [2004]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectGetting the "file struct" problem.
Date
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.046 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site