Release 4.15 fs/ext4/xattr_security.c
// SPDX-License-Identifier: GPL-2.0
/*
* linux/fs/ext4/xattr_security.c
* Handler for storing security labels as extended attributes.
*/
#include <linux/string.h>
#include <linux/fs.h>
#include <linux/security.h>
#include <linux/slab.h>
#include "ext4_jbd2.h"
#include "ext4.h"
#include "xattr.h"
static int
ext4_xattr_security_get(const struct xattr_handler *handler,
struct dentry *unused, struct inode *inode,
const char *name, void *buffer, size_t size)
{
return ext4_xattr_get(inode, EXT4_XATTR_INDEX_SECURITY,
name, buffer, size);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Dave Kleikamp | 31 | 64.58% | 1 | 20.00% |
Al Viro | 7 | 14.58% | 1 | 20.00% |
Andreas Gruenbacher | 6 | 12.50% | 1 | 20.00% |
Mingming Cao | 3 | 6.25% | 1 | 20.00% |
Christoph Hellwig | 1 | 2.08% | 1 | 20.00% |
Total | 48 | 100.00% | 5 | 100.00% |
static int
ext4_xattr_security_set(const struct xattr_handler *handler,
struct dentry *unused, struct inode *inode,
const char *name, const void *value,
size_t size, int flags)
{
return ext4_xattr_set(inode, EXT4_XATTR_INDEX_SECURITY,
name, value, size, flags);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Dave Kleikamp | 37 | 68.52% | 1 | 20.00% |
Al Viro | 7 | 12.96% | 1 | 20.00% |
Andreas Gruenbacher | 6 | 11.11% | 1 | 20.00% |
Mingming Cao | 3 | 5.56% | 1 | 20.00% |
Christoph Hellwig | 1 | 1.85% | 1 | 20.00% |
Total | 54 | 100.00% | 5 | 100.00% |
static int
ext4_initxattrs(struct inode *inode, const struct xattr *xattr_array,
void *fs_info)
{
const struct xattr *xattr;
handle_t *handle = fs_info;
int err = 0;
for (xattr = xattr_array; xattr->name != NULL; xattr++) {
err = ext4_xattr_set_handle(handle, inode,
EXT4_XATTR_INDEX_SECURITY,
xattr->name, xattr->value,
xattr->value_len, 0);
if (err < 0)
break;
}
return err;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Mimi Zohar | 52 | 57.78% | 1 | 25.00% |
Dave Kleikamp | 34 | 37.78% | 1 | 25.00% |
Eric Paris | 3 | 3.33% | 1 | 25.00% |
Djalal Harouni | 1 | 1.11% | 1 | 25.00% |
Total | 90 | 100.00% | 4 | 100.00% |
int
ext4_init_security(handle_t *handle, struct inode *inode, struct inode *dir,
const struct qstr *qstr)
{
return security_inode_init_security(inode, dir, qstr,
&ext4_initxattrs, handle);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Mimi Zohar | 31 | 77.50% | 1 | 50.00% |
Dave Kleikamp | 9 | 22.50% | 1 | 50.00% |
Total | 40 | 100.00% | 2 | 100.00% |
const struct xattr_handler ext4_xattr_security_handler = {
.prefix = XATTR_SECURITY_PREFIX,
.get = ext4_xattr_security_get,
.set = ext4_xattr_security_set,
};
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Dave Kleikamp | 144 | 51.99% | 1 | 7.69% |
Mimi Zohar | 83 | 29.96% | 1 | 7.69% |
Al Viro | 14 | 5.05% | 2 | 15.38% |
Andreas Gruenbacher | 12 | 4.33% | 1 | 7.69% |
Mingming Cao | 10 | 3.61% | 1 | 7.69% |
Christoph Hellwig | 5 | 1.81% | 2 | 15.38% |
Eric Paris | 3 | 1.08% | 1 | 7.69% |
Tejun Heo | 3 | 1.08% | 1 | 7.69% |
Stephen Hemminger | 1 | 0.36% | 1 | 7.69% |
Djalal Harouni | 1 | 0.36% | 1 | 7.69% |
Greg Kroah-Hartman | 1 | 0.36% | 1 | 7.69% |
Total | 277 | 100.00% | 13 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.