All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] devpts xattr support
@ 2004-10-26 14:14 Darrel Goeddel
  2004-10-26 14:42 ` Stephen Smalley
  0 siblings, 1 reply; 13+ messages in thread
From: Darrel Goeddel @ 2004-10-26 14:14 UTC (permalink / raw)
  To: selinux@tycho.nsa.gov

Below is a patch (against the SourceForge CVS) that will give xattr 
support to directories in a devpts filesystem.  This will allow the 
context of the root node to be retrieved and modified.  Note that there 
are other filesystems using the simple_dir_inode_operations that may 
need to be changed later as xattr support is spread to more filesystems 
(devpts is the only one causing a problem right now), so a more general 
fix may be wanted/needed later.  Any comments are appreciated.

Darrel Goeddel
Senior Secure Systems Engineer

Trusted Computer Solutions             E: dgoeddel@trustedcs.com
121 West Goose Alley                   V: 217.384.0028 x19
Urbana, IL  61801                      F: 217.384.0288


--- inode.c     12 Oct 2004 18:07:40 -0000      1.1.1.3
+++ inode.c     25 Oct 2004 17:41:43 -0000      1.2
@@ -40,6 +40,16 @@
  #endif
  };

+struct inode_operations devpts_dir_inode_operations = {
+       .lookup         = simple_lookup,
+#ifdef CONFIG_DEVPTS_FS_XATTR
+       .setxattr       = generic_setxattr,
+       .getxattr       = generic_getxattr,
+       .listxattr      = generic_listxattr,
+       .removexattr    = generic_removexattr,
+#endif /* CONFIG_DEVPTS_FS_XATTR */
+};
+
  static struct vfsmount *devpts_mnt;
  static struct dentry *devpts_root;

@@ -113,7 +123,7 @@
         inode->i_blksize = 1024;
         inode->i_uid = inode->i_gid = 0;
         inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
-       inode->i_op = &simple_dir_inode_operations;
+       inode->i_op = &devpts_dir_inode_operations;
         inode->i_fop = &simple_dir_operations;
         inode->i_nlink = 2;

--
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.

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

end of thread, other threads:[~2005-06-16 14:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-26 14:14 [PATCH] devpts xattr support Darrel Goeddel
2004-10-26 14:42 ` Stephen Smalley
2004-10-26 18:00   ` Darrel Goeddel
2004-10-27 14:15     ` Stephen Smalley
2004-10-27 14:33       ` James Morris
2004-10-27 18:10         ` Darrel Goeddel
2004-10-27 18:31           ` James Morris
2005-06-13 19:32             ` Stephen Smalley
2005-06-13 21:01               ` Darrel Goeddel
2005-06-14 13:15                 ` Stephen Smalley
2005-06-16 14:45                   ` Darrel Goeddel
2004-10-27 17:18       ` Colin Walters
2004-10-26 18:04   ` Luke Kenneth Casson Leighton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.