linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* lgetxattr()/getxattr() return different values on a file labelled with selinux disabled
@ 2013-03-15 10:54 Thomas COUDRAY
  2013-03-15 12:53 ` Stephen Smalley
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas COUDRAY @ 2013-03-15 10:54 UTC (permalink / raw)
  To: jmorris, sds, linux-fsdevel, linux-kernel

Hi,
I encounter trouble that I can't explain when labelling my files.
Here are steps to reproduce (on both 3.2.37 and 3.7.3, with selinux, on
an ext4 fs):
0 - have a regular file "f", with a "before_t" security.selinux attribute
1 - reboot with selinux=0
2 - change the label to "after_t" (setfattr or chcon)
3 - both "ls -Z" (who calls lgetxattr(2)) and "getfattr -n
security.selinux" (who calls getxattr(2)) show "after_t"
4 - reboot with selinux enabled
5 - now ls prints "before_t", and getfattr "after_t".

I ran a small test that calls both syscalls (lgetxattr/getxattr), I
get "before_t" as expected
If I touch /.autorelabel, both ls/getfattr give "before_t".

--
Thomas Coudray

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-25 16:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-15 10:54 lgetxattr()/getxattr() return different values on a file labelled with selinux disabled Thomas COUDRAY
2013-03-15 12:53 ` Stephen Smalley
2013-03-15 15:24   ` Thomas COUDRAY
2013-03-15 17:07     ` Stephen Smalley
2013-03-25 16:39       ` Thomas COUDRAY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).