aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-05-19 12:47:32 -0700
committerBrian Behlendorf <[email protected]>2011-07-01 12:40:08 -0700
commit5c03efc379693f992ebe39c6a00c7297c4a304ea (patch)
tree276b91b77f0fcd1c09774dcdc8b8d831b54be729 /include
parentbd2f5ac97f4265523fb1397d845eabb8647c79e4 (diff)
Linux compat 2.6.39: security_inode_init_security()
The security_inode_init_security() function now takes an additional qstr argument which must be passed in from the dentry if available. Passing a NULL is safe when no qstr is available the relevant security checks will just be skipped. Closes #246 Closes #217 Closes #187
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.in1
-rw-r--r--include/linux/Makefile.in1
-rw-r--r--include/linux/xattr_compat.h8
-rw-r--r--include/sys/Makefile.in1
-rw-r--r--include/sys/fm/Makefile.in1
-rw-r--r--include/sys/fm/fs/Makefile.in1
-rw-r--r--include/sys/fs/Makefile.in1
-rw-r--r--include/sys/zpl.h3
8 files changed, 16 insertions, 1 deletions
diff --git a/include/Makefile.in b/include/Makefile.in
index be5a18232..d1533b75e 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-rq-for-each_segment.m4 \
$(top_srcdir)/config/kernel-rq-is_sync.m4 \
+ $(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-xattr-handler.m4 \
$(top_srcdir)/config/kernel.m4 \
diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in
index e6c5ebf7a..269613190 100644
--- a/include/linux/Makefile.in
+++ b/include/linux/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-rq-for-each_segment.m4 \
$(top_srcdir)/config/kernel-rq-is_sync.m4 \
+ $(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-xattr-handler.m4 \
$(top_srcdir)/config/kernel.m4 \
diff --git a/include/linux/xattr_compat.h b/include/linux/xattr_compat.h
index 9878aab72..84d8fdeb8 100644
--- a/include/linux/xattr_compat.h
+++ b/include/linux/xattr_compat.h
@@ -84,4 +84,12 @@ fn(struct inode *ip, const char *name, const void *buffer, \
}
#endif /* HAVE_DENTRY_XATTR_SET */
+#ifdef HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY
+#define zpl_security_inode_init_security(ip, dip, qstr, nm, val, len) \
+ security_inode_init_security(ip, dip, qstr, nm, val, len)
+#else
+#define zpl_security_inode_init_security(ip, dip, qstr, nm, val, len) \
+ security_inode_init_security(ip, dip, nm, val, len)
+#endif /* HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY */
+
#endif /* _ZFS_XATTR_H */
diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in
index 5da0da174..85f73afdc 100644
--- a/include/sys/Makefile.in
+++ b/include/sys/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-rq-for-each_segment.m4 \
$(top_srcdir)/config/kernel-rq-is_sync.m4 \
+ $(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-xattr-handler.m4 \
$(top_srcdir)/config/kernel.m4 \
diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in
index 09c882b4c..00f3f9f69 100644
--- a/include/sys/fm/Makefile.in
+++ b/include/sys/fm/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-rq-for-each_segment.m4 \
$(top_srcdir)/config/kernel-rq-is_sync.m4 \
+ $(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-xattr-handler.m4 \
$(top_srcdir)/config/kernel.m4 \
diff --git a/include/sys/fm/fs/Makefile.in b/include/sys/fm/fs/Makefile.in
index e518edacd..3aa7c3e87 100644
--- a/include/sys/fm/fs/Makefile.in
+++ b/include/sys/fm/fs/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-rq-for-each_segment.m4 \
$(top_srcdir)/config/kernel-rq-is_sync.m4 \
+ $(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-xattr-handler.m4 \
$(top_srcdir)/config/kernel.m4 \
diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in
index 6152ac430..bf7f57e4e 100644
--- a/include/sys/fs/Makefile.in
+++ b/include/sys/fs/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
$(top_srcdir)/config/kernel-rq-for-each_segment.m4 \
$(top_srcdir)/config/kernel-rq-is_sync.m4 \
+ $(top_srcdir)/config/kernel-security-inode-init.m4 \
$(top_srcdir)/config/kernel-truncate-setsize.m4 \
$(top_srcdir)/config/kernel-xattr-handler.m4 \
$(top_srcdir)/config/kernel.m4 \
diff --git a/include/sys/zpl.h b/include/sys/zpl.h
index 906b5a73d..2770e59b2 100644
--- a/include/sys/zpl.h
+++ b/include/sys/zpl.h
@@ -60,7 +60,8 @@ extern struct file_system_type zpl_fs_type;
/* zpl_xattr.c */
extern ssize_t zpl_xattr_list(struct dentry *dentry, char *buf, size_t size);
-extern int zpl_xattr_security_init(struct inode *ip, struct inode *dip);
+extern int zpl_xattr_security_init(struct inode *ip, struct inode *dip,
+ const struct qstr *qstr);
extern xattr_handler_t *zpl_xattr_handlers[];