From: Darrel Goeddel <dgoeddel@TrustedCS.com>
To: "selinux@tycho.nsa.gov" <selinux@tycho.nsa.gov>
Subject: [PATCH] devpts xattr support
Date: Tue, 26 Oct 2004 09:14:13 -0500 [thread overview]
Message-ID: <417E5BB5.1010300@trustedcs.com> (raw)
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.
next reply other threads:[~2004-10-26 14:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-26 14:14 Darrel Goeddel [this message]
2004-10-26 14:42 ` [PATCH] devpts xattr support 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=417E5BB5.1010300@trustedcs.com \
--to=dgoeddel@trustedcs.com \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.