Research
.
Skip Search Box

SELinux Mailing List

sexattr and getxattr

From: Jaspreet Singh <jsingh_at_ensim.com>
Date: Tue, 02 Nov 2004 02:01:01 +0530


Hi,

I have some trouble with using inode->i_op->get/setxattrs ...

I used getxattr and setxattr from linux/fs.h (kernel 2.6.8 and ext3) to get and set xattrs in the following manner -

getxattr from /home and set it to /var/home

ls -Zd /home /var/home

drwxr-xr-x+ root     root  system_u:object_r:home_root_t    /home/
drwxr-xr-x+ root     root  system_u:object_r:home_root_t    /var/home/

perfect till now .. but now when i try and create files inside /var/home they get the "root:object_r:var_t" unlike /home where i get "root:object_r:user_home_dir_t" :-(

and on the contrary if i create /var/home and tag with "home_root_t" using setfiles it works perfectly fine ... any clues

I cant use user-space get/setxattr coz I am writing a overlay file-system ... so ....

any suggestions ....

Jaspreet Singh

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
Received on Mon 1 Nov 2004 - 15:30:59 EST
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service