cregit-Linux how code gets into the kernel

Release 4.18 fs/reiserfs/xattr_trusted.c

Directory: fs/reiserfs
// SPDX-License-Identifier: GPL-2.0
#include "reiserfs.h"
#include <linux/capability.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/pagemap.h>
#include <linux/xattr.h>
#include "xattr.h"
#include <linux/uaccess.h>


static int trusted_get(const struct xattr_handler *handler, struct dentry *unused, struct inode *inode, const char *name, void *buffer, size_t size) { if (!capable(CAP_SYS_ADMIN) || IS_PRIVATE(inode)) return -EPERM; return reiserfs_xattr_get(inode, xattr_full_name(handler, name), buffer, size); }

Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton4769.12%116.67%
Al Viro1319.12%233.33%
Andreas Gruenbacher68.82%116.67%
Jeff Mahoney11.47%116.67%
Christoph Hellwig11.47%116.67%
Total68100.00%6100.00%


static int trusted_set(const struct xattr_handler *handler, struct dentry *unused, struct inode *inode, const char *name, const void *buffer, size_t size, int flags) { if (!capable(CAP_SYS_ADMIN) || IS_PRIVATE(inode)) return -EPERM; return reiserfs_xattr_set(inode, xattr_full_name(handler, name), buffer, size, flags); }

Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton5371.62%116.67%
Al Viro1317.57%233.33%
Andreas Gruenbacher68.11%116.67%
Jeff Mahoney11.35%116.67%
Christoph Hellwig11.35%116.67%
Total74100.00%6100.00%


static bool trusted_list(struct dentry *dentry) { return capable(CAP_SYS_ADMIN) && !IS_PRIVATE(d_inode(dentry)); }

Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton1453.85%116.67%
Andreas Gruenbacher415.38%116.67%
David Howells311.54%116.67%
Christoph Hellwig311.54%116.67%
Jeff Mahoney27.69%233.33%
Total26100.00%6100.00%

const struct xattr_handler reiserfs_xattr_trusted_handler = { .prefix = XATTR_TRUSTED_PREFIX, .get = trusted_get, .set = trusted_set, .list = trusted_list, };

Overall Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton14867.27%15.88%
Al Viro3616.36%635.29%
Andreas Gruenbacher167.27%211.76%
Jeff Mahoney62.73%211.76%
Christoph Hellwig52.27%15.88%
Randy Dunlap31.36%15.88%
David Howells31.36%15.88%
Fabian Frederick10.45%15.88%
Greg Kroah-Hartman10.45%15.88%
Stephen Hemminger10.45%15.88%
Total220100.00%17100.00%
Directory: fs/reiserfs
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.