linux/security/keys/proc.c

// SPDX-License-Identifier: GPL-2.0-or-later
/* procfs files for key database enumeration
 *
 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells ([email protected])
 */

#include <linux/init.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <asm/errno.h>
#include "internal.h"

static void *proc_keys_start(struct seq_file *p, loff_t *_pos);
static void *proc_keys_next(struct seq_file *p, void *v, loff_t *_pos);
static void proc_keys_stop(struct seq_file *p, void *v);
static int proc_keys_show(struct seq_file *m, void *v);

static const struct seq_operations proc_keys_ops =;

static void *proc_key_users_start(struct seq_file *p, loff_t *_pos);
static void *proc_key_users_next(struct seq_file *p, void *v, loff_t *_pos);
static void proc_key_users_stop(struct seq_file *p, void *v);
static int proc_key_users_show(struct seq_file *m, void *v);

static const struct seq_operations proc_key_users_ops =;

/*
 * Declare the /proc files.
 */
static int __init key_proc_init(void)
{}

__initcall(key_proc_init);

/*
 * Implement "/proc/keys" to provide a list of the keys on the system that
 * grant View permission to the caller.
 */
static struct rb_node *key_serial_next(struct seq_file *p, struct rb_node *n)
{}

static struct key *find_ge_key(struct seq_file *p, key_serial_t id)
{}

static void *proc_keys_start(struct seq_file *p, loff_t *_pos)
	__acquires(key_serial_lock)
{}

static inline key_serial_t key_node_serial(struct rb_node *n)
{}

static void *proc_keys_next(struct seq_file *p, void *v, loff_t *_pos)
{}

static void proc_keys_stop(struct seq_file *p, void *v)
	__releases(key_serial_lock)
{}

static int proc_keys_show(struct seq_file *m, void *v)
{}

static struct rb_node *__key_user_next(struct user_namespace *user_ns, struct rb_node *n)
{}

static struct rb_node *key_user_next(struct user_namespace *user_ns, struct rb_node *n)
{}

static struct rb_node *key_user_first(struct user_namespace *user_ns, struct rb_root *r)
{}

static void *proc_key_users_start(struct seq_file *p, loff_t *_pos)
	__acquires(key_user_lock)
{}

static void *proc_key_users_next(struct seq_file *p, void *v, loff_t *_pos)
{}

static void proc_key_users_stop(struct seq_file *p, void *v)
	__releases(key_user_lock)
{}

static int proc_key_users_show(struct seq_file *m, void *v)
{}