cregit-Linux how code gets into the kernel

Release 4.17 fs/ext2/xattr_security.c

Directory: fs/ext2
// SPDX-License-Identifier: GPL-2.0
/*
 * linux/fs/ext2/xattr_security.c
 * Handler for storing security labels as extended attributes.
 */

#include "ext2.h"
#include <linux/security.h>
#include "xattr.h"


static int ext2_xattr_security_get(const struct xattr_handler *handler, struct dentry *unused, struct inode *inode, const char *name, void *buffer, size_t size) { return ext2_xattr_get(inode, EXT2_XATTR_INDEX_SECURITY, name, buffer, size); }

Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton3470.83%125.00%
Al Viro714.58%125.00%
Andreas Gruenbacher612.50%125.00%
Christoph Hellwig12.08%125.00%
Total48100.00%4100.00%


static int ext2_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 ext2_xattr_set(inode, EXT2_XATTR_INDEX_SECURITY, name, value, size, flags); }

Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton4074.07%125.00%
Al Viro712.96%125.00%
Andreas Gruenbacher611.11%125.00%
Christoph Hellwig11.85%125.00%
Total54100.00%4100.00%


static int ext2_initxattrs(struct inode *inode, const struct xattr *xattr_array, void *fs_info) { const struct xattr *xattr; int err = 0; for (xattr = xattr_array; xattr->name != NULL; xattr++) { err = ext2_xattr_set(inode, EXT2_XATTR_INDEX_SECURITY, xattr->name, xattr->value, xattr->value_len, 0); if (err < 0) break; } return err; }

Contributors

PersonTokensPropCommitsCommitProp
Mimi Zohar4453.66%125.00%
Stephen D. Smalley3441.46%125.00%
Eric Paris33.66%125.00%
Rashika Kheria11.22%125.00%
Total82100.00%4100.00%


int ext2_init_security(struct inode *inode, struct inode *dir, const struct qstr *qstr) { return security_inode_init_security(inode, dir, qstr, &ext2_initxattrs, NULL); }

Contributors

PersonTokensPropCommitsCommitProp
Mimi Zohar2775.00%150.00%
Stephen D. Smalley925.00%150.00%
Total36100.00%2100.00%

const struct xattr_handler ext2_xattr_security_handler = { .prefix = XATTR_SECURITY_PREFIX, .get = ext2_xattr_security_get, .set = ext2_xattr_security_set, };

Overall Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton10039.53%17.69%
Mimi Zohar7128.06%17.69%
Stephen D. Smalley4618.18%17.69%
Al Viro155.93%323.08%
Andreas Gruenbacher124.74%17.69%
Eric Paris31.19%17.69%
Christoph Hellwig20.79%17.69%
James Morris10.40%17.69%
Greg Kroah-Hartman10.40%17.69%
Rashika Kheria10.40%17.69%
Stephen Hemminger10.40%17.69%
Total253100.00%13100.00%
Directory: fs/ext2
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.